chore: run prettier format with new plugins
This commit is contained in:
parent
d0c8d7c077
commit
a6dd25d1c5
@ -5,5 +5,6 @@
|
||||
"singleQuote": true,
|
||||
"arrowParens": "always",
|
||||
"jsxSingleQuote": false,
|
||||
"printWidth": 100
|
||||
}
|
||||
"printWidth": 100,
|
||||
"plugins": ["prettier-plugin-prisma", "prettier-plugin-organize-imports"]
|
||||
}
|
||||
|
108
package-lock.json
generated
108
package-lock.json
generated
@ -66,7 +66,9 @@
|
||||
"lint-staged": "^11.0.0",
|
||||
"mocha": "^10.0.0",
|
||||
"nodemon": "^2.0.7",
|
||||
"prettier": "^2.3.1",
|
||||
"prettier": "^3.2.4",
|
||||
"prettier-plugin-organize-imports": "^3.2.4",
|
||||
"prettier-plugin-prisma": "^5.0.0",
|
||||
"prisma": "^4.12.0",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
@ -2291,6 +2293,12 @@
|
||||
"resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.12.0-67.659ef412370fa3b41cd7bf6e94587c1dfb7f67e7.tgz",
|
||||
"integrity": "sha512-JIHNj5jlXb9mcaJwakM0vpgRYJIAurxTUqM0iX0tfEQA5XLZ9ONkIckkhuAKdAzocZ+80GYg7QSsfpjg7OxbOA=="
|
||||
},
|
||||
"node_modules/@prisma/prisma-schema-wasm": {
|
||||
"version": "4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f1991584",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/prisma-schema-wasm/-/prisma-schema-wasm-4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f1991584.tgz",
|
||||
"integrity": "sha512-JFdsnSgBPN8reDTLOI9Vh/6ccCb2aD1LbY/LWQnkcIgNo6IdpzvuM+qRVbBuA6IZP2SdqQI8Lu6RL2P8EFBQUA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@radix-ui/number": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.0.0.tgz",
|
||||
@ -6715,15 +6723,54 @@
|
||||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.2.tgz",
|
||||
"integrity": "sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==",
|
||||
"version": "3.2.4",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.4.tgz",
|
||||
"integrity": "sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"prettier": "bin-prettier.js"
|
||||
"prettier": "bin/prettier.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/prettier-plugin-organize-imports": {
|
||||
"version": "3.2.4",
|
||||
"resolved": "https://registry.npmjs.org/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-3.2.4.tgz",
|
||||
"integrity": "sha512-6m8WBhIp0dfwu0SkgfOxJqh+HpdyfqSSLfKKRZSFbDuEQXDDndb8fTpRWkUrX/uBenkex3MgnVk0J3b3Y5byog==",
|
||||
"dev": true,
|
||||
"peerDependencies": {
|
||||
"@volar/vue-language-plugin-pug": "^1.0.4",
|
||||
"@volar/vue-typescript": "^1.0.4",
|
||||
"prettier": ">=2.0",
|
||||
"typescript": ">=2.9"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@volar/vue-language-plugin-pug": {
|
||||
"optional": true
|
||||
},
|
||||
"@volar/vue-typescript": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/prettier-plugin-prisma": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/prettier-plugin-prisma/-/prettier-plugin-prisma-5.0.0.tgz",
|
||||
"integrity": "sha512-jTJV04D9+yF7ziOOMs7CJe4ijgAH7DEGjt0SAWAToGNRy1H6BEhvcKA2UQH6gC6KVW5zeeOSAvsoiDDTt9oKXg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@prisma/prisma-schema-wasm": "4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f1991584"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14",
|
||||
"npm": ">=8"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"prettier": ">=2 || >=3"
|
||||
}
|
||||
},
|
||||
"node_modules/pretty-bytes": {
|
||||
@ -8103,6 +8150,20 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.3.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
|
||||
"integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/undefsafe": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
|
||||
@ -10300,6 +10361,12 @@
|
||||
"resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.12.0-67.659ef412370fa3b41cd7bf6e94587c1dfb7f67e7.tgz",
|
||||
"integrity": "sha512-JIHNj5jlXb9mcaJwakM0vpgRYJIAurxTUqM0iX0tfEQA5XLZ9ONkIckkhuAKdAzocZ+80GYg7QSsfpjg7OxbOA=="
|
||||
},
|
||||
"@prisma/prisma-schema-wasm": {
|
||||
"version": "4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f1991584",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/prisma-schema-wasm/-/prisma-schema-wasm-4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f1991584.tgz",
|
||||
"integrity": "sha512-JFdsnSgBPN8reDTLOI9Vh/6ccCb2aD1LbY/LWQnkcIgNo6IdpzvuM+qRVbBuA6IZP2SdqQI8Lu6RL2P8EFBQUA==",
|
||||
"dev": true
|
||||
},
|
||||
"@radix-ui/number": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.0.0.tgz",
|
||||
@ -13570,11 +13637,27 @@
|
||||
}
|
||||
},
|
||||
"prettier": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.2.tgz",
|
||||
"integrity": "sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==",
|
||||
"version": "3.2.4",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.4.tgz",
|
||||
"integrity": "sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==",
|
||||
"dev": true
|
||||
},
|
||||
"prettier-plugin-organize-imports": {
|
||||
"version": "3.2.4",
|
||||
"resolved": "https://registry.npmjs.org/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-3.2.4.tgz",
|
||||
"integrity": "sha512-6m8WBhIp0dfwu0SkgfOxJqh+HpdyfqSSLfKKRZSFbDuEQXDDndb8fTpRWkUrX/uBenkex3MgnVk0J3b3Y5byog==",
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
"prettier-plugin-prisma": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/prettier-plugin-prisma/-/prettier-plugin-prisma-5.0.0.tgz",
|
||||
"integrity": "sha512-jTJV04D9+yF7ziOOMs7CJe4ijgAH7DEGjt0SAWAToGNRy1H6BEhvcKA2UQH6gC6KVW5zeeOSAvsoiDDTt9oKXg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@prisma/prisma-schema-wasm": "4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f1991584"
|
||||
}
|
||||
},
|
||||
"pretty-bytes": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz",
|
||||
@ -14599,6 +14682,13 @@
|
||||
"integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
|
||||
"dev": true
|
||||
},
|
||||
"typescript": {
|
||||
"version": "5.3.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
|
||||
"integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"undefsafe": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
|
||||
|
@ -16,7 +16,7 @@
|
||||
"docker-run": "docker run -p 3000:3000 -d --name=hemmelig -v ./data/hemmelig/:/var/tmp/hemmelig/upload/files -v ./database/:/home/node/hemmelig/database/ hemmelig",
|
||||
"production-test": "npm run docker-build && npm run docker-run",
|
||||
"prepare": "husky install",
|
||||
"prettier": "prettier --write --ignore-unknown src/",
|
||||
"prettier": "prettier --write --ignore-unknown src/ prisma/",
|
||||
"publish-cli": "rm -rf dist/ && npx microbundle build --target node -i cli.js -o dist/ && npm publish",
|
||||
"pkg": "rm -rf dist/ bin/ && npx esbuild cli.js --bundle --platform=node --outfile=dist/cli.cjs --define:import.meta.url=__dirname && npx pkg dist/cli.cjs --targets=node18-linux-arm64 --output=bin/hemmelig"
|
||||
},
|
||||
@ -88,7 +88,9 @@
|
||||
"lint-staged": "^11.0.0",
|
||||
"mocha": "^10.0.0",
|
||||
"nodemon": "^2.0.7",
|
||||
"prettier": "^2.3.1",
|
||||
"prettier": "^3.2.4",
|
||||
"prettier-plugin-organize-imports": "^3.2.4",
|
||||
"prettier-plugin-prisma": "^5.0.0",
|
||||
"prisma": "^4.12.0",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { USER_LOGIN_CHANGED, USER_LOGIN } from '../util/constants';
|
||||
import { USER_LOGIN, USER_LOGIN_CHANGED } from '../util/constants';
|
||||
|
||||
export const userLoginChanged = (payload) => {
|
||||
return {
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { Outlet, Link } from 'react-router-dom';
|
||||
import { AppShell, Anchor, Navbar, Header, Group, useMantineTheme } from '@mantine/core';
|
||||
import { Anchor, AppShell, Group, Header, Navbar, useMantineTheme } from '@mantine/core';
|
||||
import { Link, Outlet } from 'react-router-dom';
|
||||
|
||||
import Logo from './components/header/logo';
|
||||
import Nav from './components/header/nav';
|
||||
import logoStyles from './components/header/style.module.css';
|
||||
import MainLinks from './components/settings/main-links';
|
||||
import SecondaryLinks from './components/settings/secondary-links';
|
||||
import Nav from './components/header/nav';
|
||||
import Logo from './components/header/logo';
|
||||
import logoStyles from './components/header/style.module.css';
|
||||
|
||||
const AdminShell = () => {
|
||||
const theme = useMantineTheme();
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Anchor, AppShell, Footer, Group, Header, Text, useMantineTheme } from '@mantine/core';
|
||||
import { Link, Outlet } from 'react-router-dom';
|
||||
import { AppShell, Anchor, Header, Footer, Text, useMantineTheme, Group } from '@mantine/core';
|
||||
|
||||
import { useMediaQuery } from '@mantine/hooks';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { BrowserRouter } from 'react-router-dom';
|
||||
import { MantineProvider } from '@mantine/core';
|
||||
import { ModalsProvider } from '@mantine/modals';
|
||||
import { BrowserRouter } from 'react-router-dom';
|
||||
import AppRoutes from './routes.jsx';
|
||||
|
||||
const HemmeligApplication = () => {
|
||||
|
@ -1,18 +1,17 @@
|
||||
import { Link } from 'react-router-dom';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import { Navigate } from 'react-router-dom';
|
||||
import { Anchor, Burger, Container, Group, Grid, Modal, Button } from '@mantine/core';
|
||||
import { Anchor, Burger, Button, Container, Grid, Group, Modal } from '@mantine/core';
|
||||
import { useDisclosure } from '@mantine/hooks';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import { Link, Navigate } from 'react-router-dom';
|
||||
|
||||
import Nav from './nav';
|
||||
import { userLoginChanged, userLogin } from '../../actions/';
|
||||
import Logo from './logo.jsx';
|
||||
import { userLogin, userLoginChanged } from '../../actions/';
|
||||
import { getCookie, refreshCookie } from '../../helpers/cookie';
|
||||
import Logo from './logo.jsx';
|
||||
import Nav from './nav';
|
||||
|
||||
import style from './style.module.css';
|
||||
import { refresh } from '../../api/authentication.js';
|
||||
import style from './style.module.css';
|
||||
|
||||
const Header = () => {
|
||||
const { t } = useTranslation();
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Link } from 'react-router-dom';
|
||||
import { NavLink, Group } from '@mantine/core';
|
||||
import { Group, NavLink } from '@mantine/core';
|
||||
import { useMediaQuery } from '@mantine/hooks';
|
||||
import { IconUser, IconLockOff, IconLogin, IconFingerprint, IconList } from '@tabler/icons';
|
||||
import { IconFingerprint, IconList, IconLockOff, IconLogin, IconUser } from '@tabler/icons';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import style from './style.module.css';
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
import React from 'react';
|
||||
import style from './style.module.css';
|
||||
import QRCode from 'react-qr-code';
|
||||
import { Center } from '@mantine/core';
|
||||
import QRCode from 'react-qr-code';
|
||||
import style from './style.module.css';
|
||||
|
||||
const QRLink = ({ value }) => (
|
||||
<Center>
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { IconUser, IconLock, IconSettings } from '@tabler/icons';
|
||||
import { ThemeIcon, UnstyledButton, Group, Text } from '@mantine/core';
|
||||
import { Group, Text, ThemeIcon, UnstyledButton } from '@mantine/core';
|
||||
import { IconLock, IconSettings, IconUser } from '@tabler/icons';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Box, Group, Text, ThemeIcon, UnstyledButton, rem, useMantineTheme } from '@mantine/core';
|
||||
import { IconFingerprint, IconList, IconLockOff } from '@tabler/icons';
|
||||
import { ThemeIcon, UnstyledButton, Group, Text, Box, useMantineTheme, rem } from '@mantine/core';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
import React from 'react';
|
||||
import style from './style.module.css';
|
||||
|
||||
const Spinner = () => <div className={style.loader}>Loading...</div>;
|
||||
|
@ -12,64 +12,116 @@
|
||||
-webkit-transform: translateZ(0);
|
||||
-ms-transform: translateZ(0);
|
||||
transform: translateZ(0);
|
||||
-webkit-animation: load6 1.7s infinite ease, round 1.7s infinite ease;
|
||||
animation: load6 1.7s infinite ease, round 1.7s infinite ease;
|
||||
-webkit-animation:
|
||||
load6 1.7s infinite ease,
|
||||
round 1.7s infinite ease;
|
||||
animation:
|
||||
load6 1.7s infinite ease,
|
||||
round 1.7s infinite ease;
|
||||
}
|
||||
|
||||
@-webkit-keyframes load6 {
|
||||
0% {
|
||||
box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em,
|
||||
0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;
|
||||
box-shadow:
|
||||
0 -0.83em 0 -0.4em,
|
||||
0 -0.83em 0 -0.42em,
|
||||
0 -0.83em 0 -0.44em,
|
||||
0 -0.83em 0 -0.46em,
|
||||
0 -0.83em 0 -0.477em;
|
||||
}
|
||||
5%,
|
||||
95% {
|
||||
box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em,
|
||||
0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;
|
||||
box-shadow:
|
||||
0 -0.83em 0 -0.4em,
|
||||
0 -0.83em 0 -0.42em,
|
||||
0 -0.83em 0 -0.44em,
|
||||
0 -0.83em 0 -0.46em,
|
||||
0 -0.83em 0 -0.477em;
|
||||
}
|
||||
10%,
|
||||
59% {
|
||||
box-shadow: 0 -0.83em 0 -0.4em, -0.087em -0.825em 0 -0.42em, -0.173em -0.812em 0 -0.44em,
|
||||
-0.256em -0.789em 0 -0.46em, -0.297em -0.775em 0 -0.477em;
|
||||
box-shadow:
|
||||
0 -0.83em 0 -0.4em,
|
||||
-0.087em -0.825em 0 -0.42em,
|
||||
-0.173em -0.812em 0 -0.44em,
|
||||
-0.256em -0.789em 0 -0.46em,
|
||||
-0.297em -0.775em 0 -0.477em;
|
||||
}
|
||||
20% {
|
||||
box-shadow: 0 -0.83em 0 -0.4em, -0.338em -0.758em 0 -0.42em, -0.555em -0.617em 0 -0.44em,
|
||||
-0.671em -0.488em 0 -0.46em, -0.749em -0.34em 0 -0.477em;
|
||||
box-shadow:
|
||||
0 -0.83em 0 -0.4em,
|
||||
-0.338em -0.758em 0 -0.42em,
|
||||
-0.555em -0.617em 0 -0.44em,
|
||||
-0.671em -0.488em 0 -0.46em,
|
||||
-0.749em -0.34em 0 -0.477em;
|
||||
}
|
||||
38% {
|
||||
box-shadow: 0 -0.83em 0 -0.4em, -0.377em -0.74em 0 -0.42em, -0.645em -0.522em 0 -0.44em,
|
||||
-0.775em -0.297em 0 -0.46em, -0.82em -0.09em 0 -0.477em;
|
||||
box-shadow:
|
||||
0 -0.83em 0 -0.4em,
|
||||
-0.377em -0.74em 0 -0.42em,
|
||||
-0.645em -0.522em 0 -0.44em,
|
||||
-0.775em -0.297em 0 -0.46em,
|
||||
-0.82em -0.09em 0 -0.477em;
|
||||
}
|
||||
100% {
|
||||
box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em,
|
||||
0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;
|
||||
box-shadow:
|
||||
0 -0.83em 0 -0.4em,
|
||||
0 -0.83em 0 -0.42em,
|
||||
0 -0.83em 0 -0.44em,
|
||||
0 -0.83em 0 -0.46em,
|
||||
0 -0.83em 0 -0.477em;
|
||||
}
|
||||
}
|
||||
@keyframes load6 {
|
||||
0% {
|
||||
box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em,
|
||||
0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;
|
||||
box-shadow:
|
||||
0 -0.83em 0 -0.4em,
|
||||
0 -0.83em 0 -0.42em,
|
||||
0 -0.83em 0 -0.44em,
|
||||
0 -0.83em 0 -0.46em,
|
||||
0 -0.83em 0 -0.477em;
|
||||
}
|
||||
5%,
|
||||
95% {
|
||||
box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em,
|
||||
0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;
|
||||
box-shadow:
|
||||
0 -0.83em 0 -0.4em,
|
||||
0 -0.83em 0 -0.42em,
|
||||
0 -0.83em 0 -0.44em,
|
||||
0 -0.83em 0 -0.46em,
|
||||
0 -0.83em 0 -0.477em;
|
||||
}
|
||||
10%,
|
||||
59% {
|
||||
box-shadow: 0 -0.83em 0 -0.4em, -0.087em -0.825em 0 -0.42em, -0.173em -0.812em 0 -0.44em,
|
||||
-0.256em -0.789em 0 -0.46em, -0.297em -0.775em 0 -0.477em;
|
||||
box-shadow:
|
||||
0 -0.83em 0 -0.4em,
|
||||
-0.087em -0.825em 0 -0.42em,
|
||||
-0.173em -0.812em 0 -0.44em,
|
||||
-0.256em -0.789em 0 -0.46em,
|
||||
-0.297em -0.775em 0 -0.477em;
|
||||
}
|
||||
20% {
|
||||
box-shadow: 0 -0.83em 0 -0.4em, -0.338em -0.758em 0 -0.42em, -0.555em -0.617em 0 -0.44em,
|
||||
-0.671em -0.488em 0 -0.46em, -0.749em -0.34em 0 -0.477em;
|
||||
box-shadow:
|
||||
0 -0.83em 0 -0.4em,
|
||||
-0.338em -0.758em 0 -0.42em,
|
||||
-0.555em -0.617em 0 -0.44em,
|
||||
-0.671em -0.488em 0 -0.46em,
|
||||
-0.749em -0.34em 0 -0.477em;
|
||||
}
|
||||
38% {
|
||||
box-shadow: 0 -0.83em 0 -0.4em, -0.377em -0.74em 0 -0.42em, -0.645em -0.522em 0 -0.44em,
|
||||
-0.775em -0.297em 0 -0.46em, -0.82em -0.09em 0 -0.477em;
|
||||
box-shadow:
|
||||
0 -0.83em 0 -0.4em,
|
||||
-0.377em -0.74em 0 -0.42em,
|
||||
-0.645em -0.522em 0 -0.44em,
|
||||
-0.775em -0.297em 0 -0.46em,
|
||||
-0.82em -0.09em 0 -0.477em;
|
||||
}
|
||||
100% {
|
||||
box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em,
|
||||
0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;
|
||||
box-shadow:
|
||||
0 -0.83em 0 -0.4em,
|
||||
0 -0.83em 0 -0.42em,
|
||||
0 -0.83em 0 -0.44em,
|
||||
0 -0.83em 0 -0.46em,
|
||||
0 -0.83em 0 -0.477em;
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes round {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { USER_LOGIN_CHANGED, USER_LOGIN } from '../util/constants';
|
||||
import { USER_LOGIN, USER_LOGIN_CHANGED } from '../util/constants';
|
||||
|
||||
const initialState = {
|
||||
isLoggedIn: false,
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { lazy } from 'react';
|
||||
import { Routes, Route } from 'react-router-dom';
|
||||
import ApplicationShell from './app-shell.jsx';
|
||||
import { Route, Routes } from 'react-router-dom';
|
||||
import AdminShell from './admin-shell.jsx';
|
||||
import ApplicationShell from './app-shell.jsx';
|
||||
|
||||
const Home = lazy(() => import('./routes/home'));
|
||||
const Secret = lazy(() => import('./routes/secret'));
|
||||
|
@ -1,25 +1,25 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Navigate } from 'react-router-dom';
|
||||
import {
|
||||
Stack,
|
||||
Button,
|
||||
Group,
|
||||
TextInput,
|
||||
Text,
|
||||
PasswordInput,
|
||||
Container,
|
||||
Group,
|
||||
Loader,
|
||||
PasswordInput,
|
||||
Stack,
|
||||
Text,
|
||||
TextInput,
|
||||
} from '@mantine/core';
|
||||
import { useForm } from '@mantine/form';
|
||||
import { openConfirmModal } from '@mantine/modals';
|
||||
import { IconAt, IconLock, IconEdit, IconTrash } from '@tabler/icons';
|
||||
import { IconAt, IconEdit, IconLock, IconTrash } from '@tabler/icons';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Navigate } from 'react-router-dom';
|
||||
import ErrorBox from '../../components/error-box';
|
||||
import SuccessBox from '../../components/success-box';
|
||||
|
||||
import style from './account.module.css';
|
||||
|
||||
import { getUser, updateUser, deleteUser } from '../../api/account';
|
||||
import { deleteUser, getUser, updateUser } from '../../api/account';
|
||||
|
||||
const Account = () => {
|
||||
const [success, setSuccess] = useState(false);
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { Container, Loader, Stack, Text } from '@mantine/core';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Container, Loader, Text, Stack } from '@mantine/core';
|
||||
import { Navigate } from 'react-router-dom';
|
||||
import ErrorBox from '../../components/error-box';
|
||||
|
||||
import { getUser } from '../../api/account';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { getUser } from '../../api/account';
|
||||
|
||||
const HomeAccount = () => {
|
||||
const { t } = useTranslation();
|
||||
|
@ -1,15 +1,15 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { ActionIcon, Text, Stack, Group, Table, Container, Loader } from '@mantine/core';
|
||||
import { ActionIcon, Container, Group, Loader, Stack, Table, Text } from '@mantine/core';
|
||||
import { useForm } from '@mantine/form';
|
||||
import { openConfirmModal } from '@mantine/modals';
|
||||
import { IconTrash } from '@tabler/icons';
|
||||
import dayjs from 'dayjs';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import ErrorBox from '../../components/error-box';
|
||||
import SuccessBox from '../../components/success-box';
|
||||
|
||||
import { getSecrets, burnSecret } from '../../api/secret';
|
||||
import { burnSecret, getSecrets } from '../../api/secret';
|
||||
|
||||
dayjs.extend(relativeTime);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Stack, Button, Checkbox, Group, Input, Text, Container, Loader } from '@mantine/core';
|
||||
import { Button, Checkbox, Container, Group, Input, Loader, Stack, Text } from '@mantine/core';
|
||||
import { useForm } from '@mantine/form';
|
||||
import { IconEdit, IconAt } from '@tabler/icons';
|
||||
import { IconAt, IconEdit } from '@tabler/icons';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import ErrorBox from '../../components/error-box';
|
||||
import SuccessBox from '../../components/success-box';
|
||||
|
@ -1,26 +1,26 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import {
|
||||
ActionIcon,
|
||||
Container,
|
||||
Center,
|
||||
Text,
|
||||
Stack,
|
||||
Select,
|
||||
Button,
|
||||
Center,
|
||||
Container,
|
||||
Group,
|
||||
TextInput,
|
||||
PasswordInput,
|
||||
Table,
|
||||
Modal,
|
||||
Loader,
|
||||
Modal,
|
||||
PasswordInput,
|
||||
Select,
|
||||
Stack,
|
||||
Table,
|
||||
Text,
|
||||
TextInput,
|
||||
} from '@mantine/core';
|
||||
import { useForm } from '@mantine/form';
|
||||
import { useDisclosure } from '@mantine/hooks';
|
||||
import { openConfirmModal } from '@mantine/modals';
|
||||
import { IconEdit, IconAt, IconUser, IconChefHat, IconPlus, IconTrash } from '@tabler/icons';
|
||||
import { IconAt, IconChefHat, IconEdit, IconPlus, IconTrash, IconUser } from '@tabler/icons';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { getUsers, updateUser, addUser, deleteUser } from '../../api/users';
|
||||
import { addUser, deleteUser, getUsers, updateUser } from '../../api/users';
|
||||
import ErrorBox from '../../components/error-box';
|
||||
import SuccessBox from '../../components/success-box';
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
import React from 'react';
|
||||
import { Anchor, Code, Container, Stack, Text, Title } from '@mantine/core';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Code, Container, Stack, Title, Text, Anchor } from '@mantine/core';
|
||||
|
||||
const ApiDocs = () => {
|
||||
return (
|
||||
|
@ -1,47 +1,47 @@
|
||||
import React, { useEffect, useState, useRef } from 'react';
|
||||
import passwordGenerator from 'generate-password-browser';
|
||||
import {
|
||||
ActionIcon,
|
||||
Badge,
|
||||
Box,
|
||||
Button,
|
||||
Checkbox,
|
||||
Container,
|
||||
TextInput,
|
||||
Select,
|
||||
CopyButton,
|
||||
ActionIcon,
|
||||
Tooltip,
|
||||
Group,
|
||||
Stack,
|
||||
Title,
|
||||
Text,
|
||||
Divider,
|
||||
FileButton,
|
||||
Group,
|
||||
NumberInput,
|
||||
Badge,
|
||||
Box,
|
||||
Select,
|
||||
Stack,
|
||||
Text,
|
||||
TextInput,
|
||||
Title,
|
||||
Tooltip,
|
||||
} from '@mantine/core';
|
||||
import { useForm } from '@mantine/form';
|
||||
import { useMediaQuery } from '@mantine/hooks';
|
||||
import {
|
||||
IconSquarePlus,
|
||||
IconTrash,
|
||||
IconCheck,
|
||||
IconCopy,
|
||||
IconHeading,
|
||||
IconLink,
|
||||
IconLock,
|
||||
IconLockAccess,
|
||||
IconLink,
|
||||
IconCopy,
|
||||
IconCheck,
|
||||
IconHeading,
|
||||
IconShare,
|
||||
IconShieldLock,
|
||||
IconSquarePlus,
|
||||
IconTrash,
|
||||
} from '@tabler/icons';
|
||||
import passwordGenerator from 'generate-password-browser';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { useSelector } from 'react-redux';
|
||||
import Quill from '../../components/quill';
|
||||
import QRLink from '../../components/qrlink';
|
||||
import ErrorBox from '../../components/error-box';
|
||||
import QRLink from '../../components/qrlink';
|
||||
import Quill from '../../components/quill';
|
||||
|
||||
import { zipFiles } from '../../helpers/zip';
|
||||
import { createSecret, burnSecret } from '../../api/secret';
|
||||
import { generateKey, encrypt } from '../../../shared/helpers/crypto';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { encrypt, generateKey } from '../../../shared/helpers/crypto';
|
||||
import { burnSecret, createSecret } from '../../api/secret';
|
||||
import { zipFiles } from '../../helpers/zip';
|
||||
|
||||
import config from '../../config';
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
import React from 'react';
|
||||
import { Container, Stack, Title, Text } from '@mantine/core';
|
||||
import { Container, Stack, Text, Title } from '@mantine/core';
|
||||
|
||||
const Privacy = () => {
|
||||
return (
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Anchor, Stack, Group, Title, Table, Container, Loader } from '@mantine/core';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Anchor, Container, Group, Loader, Stack, Table, Title } from '@mantine/core';
|
||||
import dayjs from 'dayjs';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import { getPublicSecrets } from '../../api/secret';
|
||||
|
||||
|
@ -1,23 +1,23 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { useParams, Link, useLocation } from 'react-router-dom';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Link, useLocation, useParams } from 'react-router-dom';
|
||||
|
||||
import { Button, Group, Container, TextInput, Stack, Title, Text } from '@mantine/core';
|
||||
import { Button, Container, Group, Stack, Text, TextInput, Title } from '@mantine/core';
|
||||
import {
|
||||
IconSquarePlus,
|
||||
IconDownload,
|
||||
IconLock,
|
||||
IconEye,
|
||||
IconPerspective,
|
||||
IconHeading,
|
||||
IconLock,
|
||||
IconPerspective,
|
||||
IconShieldLock,
|
||||
IconSquarePlus,
|
||||
} from '@tabler/icons';
|
||||
|
||||
import Quill from '../../components/quill';
|
||||
import ErrorBox from '../../components/error-box';
|
||||
import Quill from '../../components/quill';
|
||||
|
||||
import { decrypt } from '../../../shared/helpers/crypto';
|
||||
import { getSecret, secretExists } from '../../api/secret';
|
||||
import { downloadFile } from '../../api/upload';
|
||||
import { decrypt } from '../../../shared/helpers/crypto';
|
||||
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Navigate } from 'react-router-dom';
|
||||
import { Button, Container, TextInput, Stack, Title, Text, PasswordInput } from '@mantine/core';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import { Button, Container, PasswordInput, Stack, Text, TextInput, Title } from '@mantine/core';
|
||||
import { useForm } from '@mantine/form';
|
||||
import { IconLock, IconUser, IconLogin } from '@tabler/icons';
|
||||
import { IconLock, IconLogin, IconUser } from '@tabler/icons';
|
||||
import { useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import { Navigate } from 'react-router-dom';
|
||||
import ErrorBox from '../../components/error-box';
|
||||
import SuccessBox from '../../components/success-box';
|
||||
|
||||
import { signIn } from '../../api/authentication';
|
||||
import { userLogin } from '../../actions';
|
||||
import { signIn } from '../../api/authentication';
|
||||
|
||||
const SignIn = () => {
|
||||
const [success, setSuccess] = useState(false);
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { Center, Container, Image, Stack, Text, Title } from '@mantine/core';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Navigate } from 'react-router-dom';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import { Container, Title, Center, Text, Image, Stack } from '@mantine/core';
|
||||
import { userLoginChanged, userLogin } from '../../actions';
|
||||
import { removeCookie } from '../../helpers/cookie';
|
||||
import { Navigate } from 'react-router-dom';
|
||||
import { userLogin, userLoginChanged } from '../../actions';
|
||||
import { signOut } from '../../api/authentication';
|
||||
import { removeCookie } from '../../helpers/cookie';
|
||||
import styles from './style.module.css';
|
||||
|
||||
const SignOut = () => {
|
||||
|
@ -1,15 +1,15 @@
|
||||
import { useState } from 'react';
|
||||
import { Navigate } from 'react-router-dom';
|
||||
import { Button, Container, TextInput, Stack, Title, Text, PasswordInput } from '@mantine/core';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import { Button, Container, PasswordInput, Stack, Text, TextInput, Title } from '@mantine/core';
|
||||
import { useForm } from '@mantine/form';
|
||||
import { IconLock, IconUser, IconLogin, IconAt } from '@tabler/icons';
|
||||
import { IconAt, IconLock, IconLogin, IconUser } from '@tabler/icons';
|
||||
import { useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import { Navigate } from 'react-router-dom';
|
||||
import ErrorBox from '../../components/error-box';
|
||||
import SuccessBox from '../../components/success-box';
|
||||
|
||||
import { signUp } from '../../api/authentication';
|
||||
import { userLogin } from '../../actions';
|
||||
import { signUp } from '../../api/authentication';
|
||||
|
||||
const SignUp = () => {
|
||||
const [success, setSuccess] = useState(false);
|
||||
|
@ -1,5 +1,4 @@
|
||||
import React from 'react';
|
||||
import { Container, Stack, Title, Text } from '@mantine/core';
|
||||
import { Container, Stack, Text, Title } from '@mantine/core';
|
||||
|
||||
const TermsAndCondition = () => {
|
||||
return (
|
||||
|
@ -1,9 +1,9 @@
|
||||
import React, { Suspense } from 'react';
|
||||
import { Suspense } from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { Provider } from 'react-redux';
|
||||
|
||||
import './i18n';
|
||||
import { LoadingOverlay } from '@mantine/core';
|
||||
import './i18n';
|
||||
|
||||
import HemmeligApplication from './client/app';
|
||||
import configureStore from './client/helpers/configureStore';
|
||||
|
2
src/server/bootstrap.js
vendored
2
src/server/bootstrap.js
vendored
@ -1,7 +1,7 @@
|
||||
import config from 'config';
|
||||
import prisma from './services/prisma.js';
|
||||
import adminSettings from './adminSettings.js';
|
||||
import { hash } from './helpers/password.js';
|
||||
import prisma from './services/prisma.js';
|
||||
|
||||
const username = config.get('account.root.user');
|
||||
const email = config.get('account.root.email');
|
||||
|
@ -1,5 +1,5 @@
|
||||
import emailValidator from 'email-validator';
|
||||
import { hash, compare } from '../helpers/password.js';
|
||||
import { compare, hash } from '../helpers/password.js';
|
||||
import prisma from '../services/prisma.js';
|
||||
|
||||
const PASSWORD_LENGTH = 5;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import extractDomain from 'extract-domain';
|
||||
import prisma from '../../services/prisma.js';
|
||||
import { updateAdminSettings } from '../../bootstrap.js';
|
||||
import prisma from '../../services/prisma.js';
|
||||
|
||||
async function settings(fastify) {
|
||||
fastify.get(
|
||||
|
@ -1,8 +1,8 @@
|
||||
import emailValidator from 'email-validator';
|
||||
import config from 'config';
|
||||
import emailValidator from 'email-validator';
|
||||
import prisma from '../services/prisma.js';
|
||||
|
||||
import { hash, compare } from '../helpers/password.js';
|
||||
import { compare, hash } from '../helpers/password.js';
|
||||
|
||||
const validUsername = /^[A-Za-z0-9_-]*$/is;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import sanitize from 'sanitize-filename';
|
||||
import prisma from '../services/prisma.js';
|
||||
import fileAdapter from '../services/file-adapter.js';
|
||||
import prisma from '../services/prisma.js';
|
||||
|
||||
import { isValidSecretId } from '../helpers/regexp.js';
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
import config from 'config';
|
||||
import prettyBytes from 'pretty-bytes';
|
||||
import validator from 'validator';
|
||||
import config from 'config';
|
||||
import prisma from '../services/prisma.js';
|
||||
import { hash, compare } from '../helpers/password.js';
|
||||
import getClientIp from '../helpers/client-ip.js';
|
||||
import { compare, hash } from '../helpers/password.js';
|
||||
import prisma from '../services/prisma.js';
|
||||
|
||||
import { isValidSecretId } from '../helpers/regexp.js';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import fp from 'fastify-plugin';
|
||||
import ipRangeCheck from 'ip-range-check';
|
||||
import prisma from '../services/prisma.js';
|
||||
import getClientIp from '../helpers/client-ip.js';
|
||||
import prisma from '../services/prisma.js';
|
||||
|
||||
export default fp(async (fastify) => {
|
||||
fastify.decorate('allowedIp', async (request, reply) => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import config from 'config';
|
||||
import fp from 'fastify-plugin';
|
||||
import adminSettings from '../adminSettings.js';
|
||||
import config from 'config';
|
||||
|
||||
export default fp(async (fastify) => {
|
||||
fastify.decorate('userFeatures', async (req, reply) => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import prisma from '../services/prisma.js';
|
||||
import adminSettings from '../adminSettings.js';
|
||||
import prisma from '../services/prisma.js';
|
||||
|
||||
const secretRegex = /^\/api\/secret$/i;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import config from 'config';
|
||||
import fs from 'fs/promises';
|
||||
import { nanoid } from 'nanoid';
|
||||
import config from 'config';
|
||||
|
||||
const getFilePath = (key) => `${config.get('disk.folder')}${key}.json`;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Upload } from '@aws-sdk/lib-storage';
|
||||
import { S3 } from '@aws-sdk/client-s3';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { Upload } from '@aws-sdk/lib-storage';
|
||||
import config from 'config';
|
||||
import { nanoid } from 'nanoid';
|
||||
|
||||
function createConfig() {
|
||||
if (config.get('aws.s3.region')) {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
import adminSettings from '../adminSettings.js';
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { clientsClaim } from 'workbox-core';
|
||||
import { ExpirationPlugin } from 'workbox-expiration';
|
||||
import { precacheAndRoute, createHandlerBoundToURL } from 'workbox-precaching';
|
||||
import { createHandlerBoundToURL, precacheAndRoute } from 'workbox-precaching';
|
||||
import { registerRoute } from 'workbox-routing';
|
||||
import { StaleWhileRevalidate } from 'workbox-strategies';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Buffer } from 'buffer/';
|
||||
import { nanoid } from 'nanoid';
|
||||
import tweetnacl from 'tweetnacl';
|
||||
import tweetnaclUtil from 'tweetnacl-util';
|
||||
import { Buffer } from 'buffer/';
|
||||
|
||||
const { secretbox, randomBytes } = tweetnacl;
|
||||
const { decodeUTF8, encodeUTF8, encodeBase64, decodeBase64 } = tweetnaclUtil;
|
||||
|
Loading…
x
Reference in New Issue
Block a user