🚑 Use different type of UUID

This commit is contained in:
ajnart
2022-05-23 10:23:10 +02:00
parent bf85818f8b
commit 72e08f484f
3 changed files with 1638 additions and 1631 deletions

View File

@@ -7,85 +7,86 @@
"type": "git", "type": "git",
"url": "https://github.com/ajnart/homarr" "url": "https://github.com/ajnart/homarr"
}, },
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",
"build": "next build", "build": "next build",
"analyze": "ANALYZE=true next build", "analyze": "ANALYZE=true next build",
"start": "next start", "start": "next start",
"typecheck": "tsc --noEmit", "typecheck": "tsc --noEmit",
"export": "next build && next export", "export": "next build && next export",
"lint": "next lint", "lint": "next lint",
"jest": "jest", "jest": "jest",
"jest:watch": "jest --watch", "jest:watch": "jest --watch",
"prettier:check": "prettier --check \"**/*.{ts,tsx}\"", "prettier:check": "prettier --check \"**/*.{ts,tsx}\"",
"prettier:write": "prettier --write \"**/*.{ts,tsx}\"", "prettier:write": "prettier --write \"**/*.{ts,tsx}\"",
"test": "npm run prettier:check && npm run lint && npm run typecheck && npm run jest", "test": "npm run prettier:check && npm run lint && npm run typecheck && npm run jest",
"storybook": "start-storybook -p 7001", "storybook": "start-storybook -p 7001",
"storybook:build": "build-storybook", "storybook:build": "build-storybook",
"ci": "yarn test && yarn lint --fix && yarn typecheck && yarn prettier:write" "ci": "yarn test && yarn lint --fix && yarn typecheck && yarn prettier:write"
}, },
"dependencies": { "dependencies": {
"@mantine/core": "^4.2.4", "@mantine/core": "^4.2.4",
"@mantine/dates": "^4.2.4", "@mantine/dates": "^4.2.4",
"@mantine/dropzone": "^4.2.4", "@mantine/dropzone": "^4.2.4",
"@mantine/form": "^4.2.4", "@mantine/form": "^4.2.4",
"@mantine/hooks": "^4.2.4", "@mantine/hooks": "^4.2.4",
"@mantine/modals": "^4.2.4", "@mantine/modals": "^4.2.4",
"@mantine/next": "^4.2.4", "@mantine/next": "^4.2.4",
"@mantine/notifications": "^4.2.4", "@mantine/notifications": "^4.2.4",
"@mantine/prism": "^4.2.4", "@mantine/prism": "^4.2.4",
"@mantine/rte": "^4.2.4", "@mantine/rte": "^4.2.4",
"@mantine/spotlight": "^4.2.4", "@mantine/spotlight": "^4.2.4",
"@modulz/radix-icons": "^4.0.0", "@modulz/radix-icons": "^4.0.0",
"axios": "^0.27.2", "axios": "^0.27.2",
"cookies-next": "^2.0.4", "cookies-next": "^2.0.4",
"dayjs": "^1.11.2", "dayjs": "^1.11.2",
"framer-motion": "^6.3.1", "framer-motion": "^6.3.1",
"js-file-download": "^0.4.12", "js-file-download": "^0.4.12",
"next": "12.1.5-canary.4", "next": "12.1.5-canary.4",
"prism-react-renderer": "^1.3.1", "prism-react-renderer": "^1.3.1",
"react": "18.0.0", "react": "18.0.0",
"react-dom": "18.0.0", "react-dom": "18.0.0",
"tabler-icons-react": "^1.46.0" "tabler-icons-react": "^1.46.0",
}, "uuid": "^8.3.2"
"devDependencies": { },
"@babel/core": "^7.17.8", "devDependencies": {
"@next/bundle-analyzer": "^12.1.4", "@babel/core": "^7.17.8",
"@next/eslint-plugin-next": "^12.1.4", "@next/bundle-analyzer": "^12.1.4",
"@storybook/addon-essentials": "^6.4.22", "@next/eslint-plugin-next": "^12.1.4",
"@storybook/addon-links": "^6.4.22", "@storybook/addon-essentials": "^6.4.22",
"@storybook/react": "^6.4.22", "@storybook/addon-links": "^6.4.22",
"@testing-library/dom": "^8.12.0", "@storybook/react": "^6.4.22",
"@testing-library/jest-dom": "^5.16.3", "@testing-library/dom": "^8.12.0",
"@testing-library/react": "^13.0.0", "@testing-library/jest-dom": "^5.16.3",
"@testing-library/user-event": "^14.0.4", "@testing-library/react": "^13.0.0",
"@types/jest": "^27.4.1", "@testing-library/user-event": "^14.0.4",
"@types/node": "^17.0.23", "@types/jest": "^27.4.1",
"@types/react": "17.0.43", "@types/node": "^17.0.23",
"@typescript-eslint/eslint-plugin": "^5.16.0", "@types/react": "17.0.43",
"@typescript-eslint/parser": "^5.16.0", "@typescript-eslint/eslint-plugin": "^5.16.0",
"babel-loader": "^8.2.4", "@typescript-eslint/parser": "^5.16.0",
"eslint": "^8.11.0", "babel-loader": "^8.2.4",
"eslint-config-airbnb": "19.0.4", "eslint": "^8.11.0",
"eslint-config-airbnb-typescript": "^16.1.4", "eslint-config-airbnb": "19.0.4",
"eslint-config-mantine": "1.1.0", "eslint-config-airbnb-typescript": "^16.1.4",
"eslint-plugin-import": "^2.25.4", "eslint-config-mantine": "1.1.0",
"eslint-plugin-jest": "^26.1.3", "eslint-plugin-import": "^2.25.4",
"eslint-plugin-jsx-a11y": "^6.5.1", "eslint-plugin-jest": "^26.1.3",
"eslint-plugin-react": "^7.29.4", "eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react-hooks": "^4.3.0", "eslint-plugin-react": "^7.29.4",
"eslint-plugin-storybook": "^0.5.11", "eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-testing-library": "^5.2.0", "eslint-plugin-storybook": "^0.5.11",
"eslint-plugin-unused-imports": "^2.0.0", "eslint-plugin-testing-library": "^5.2.0",
"jest": "^27.5.1", "eslint-plugin-unused-imports": "^2.0.0",
"prettier": "^2.6.2", "jest": "^27.5.1",
"storybook-addon-mock": "^2.3.2", "prettier": "^2.6.2",
"storybook-addon-turbo-build": "^1.1.0", "storybook-addon-mock": "^2.3.2",
"storybook-dark-mode": "^1.0.9", "storybook-addon-turbo-build": "^1.1.0",
"ts-jest": "^27.1.4", "storybook-dark-mode": "^1.0.9",
"typescript": "4.6.3" "ts-jest": "^27.1.4",
}, "typescript": "4.6.3"
"resolutions": { },
"@types/react": "17.0.30" "resolutions": {
} "@types/react": "17.0.30"
}
} }

View File

@@ -21,6 +21,7 @@ import { Apps } from 'tabler-icons-react';
import { useConfig } from '../../tools/state'; import { useConfig } from '../../tools/state';
import { ServiceTypeList } from '../../tools/types'; import { ServiceTypeList } from '../../tools/types';
import { AppShelfItemWrapper } from './AppShelfItemWrapper'; import { AppShelfItemWrapper } from './AppShelfItemWrapper';
import { v4 as uuidv4 } from 'uuid';
export function AddItemShelfButton(props: any) { export function AddItemShelfButton(props: any) {
const [opened, setOpened] = useState(false); const [opened, setOpened] = useState(false);
@@ -122,7 +123,7 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } &
const form = useForm({ const form = useForm({
initialValues: { initialValues: {
id: props.id ?? crypto.randomUUID(), id: props.id ?? uuidv4(),
type: props.type ?? 'Other', type: props.type ?? 'Other',
name: props.name ?? '', name: props.name ?? '',
icon: props.icon ?? '/favicon.svg', icon: props.icon ?? '/favicon.svg',

3103
yarn.lock

File diff suppressed because it is too large Load Diff