mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-27 19:16:44 +00:00
fix(backend): Bump maybe vulnerable esbuild (#9155)
* fix(backend): Bump vulnerable vanilla-extract * bump deps futher * remove @types/dompurify * bump @lingui * use more modern image 20.04 ships with node 18 as default, 24.04 with 20 * bump rest of image deps * bump deps * bump base deps * bump resolution * lower resolution * fix resolution * update lingui * switch to build-in macro * fix imports
This commit is contained in:
parent
5d4b587bf7
commit
d8f5a56064
22
.github/workflows/qc_checks.yaml
vendored
22
.github/workflows/qc_checks.yaml
vendored
@ -77,7 +77,7 @@ jobs:
|
||||
|
||||
pre-commit:
|
||||
name: Style [pre-commit]
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
needs: paths-filter
|
||||
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.frontend == 'true' || needs.paths-filter.outputs.requirements == 'true' || needs.paths-filter.outputs.force == 'true'
|
||||
|
||||
@ -99,7 +99,7 @@ jobs:
|
||||
|
||||
mkdocs:
|
||||
name: Style [Documentation]
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
needs: paths-filter
|
||||
|
||||
@ -127,7 +127,7 @@ jobs:
|
||||
|
||||
schema:
|
||||
name: Tests - API Schema Documentation
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
needs: paths-filter
|
||||
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.force == 'true'
|
||||
env:
|
||||
@ -222,7 +222,7 @@ jobs:
|
||||
|
||||
schema-push:
|
||||
name: Push new schema
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [paths-filter, schema]
|
||||
if: needs.schema.result == 'success' && github.ref == 'refs/heads/master' && needs.paths-filter.outputs.api == 'true' && github.repository_owner == 'inventree'
|
||||
env:
|
||||
@ -262,7 +262,7 @@ jobs:
|
||||
|
||||
python:
|
||||
name: Tests - inventree-python
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
needs: ["pre-commit", "paths-filter"]
|
||||
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.force == 'true'
|
||||
@ -307,7 +307,7 @@ jobs:
|
||||
|
||||
coverage:
|
||||
name: Tests - DB [SQLite] + Coverage ${{ matrix.python_version }}
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
needs: ["pre-commit", "paths-filter"]
|
||||
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.force == 'true'
|
||||
@ -353,7 +353,7 @@ jobs:
|
||||
|
||||
postgres:
|
||||
name: Tests - DB [PostgreSQL]
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
needs: ["pre-commit", "paths-filter"]
|
||||
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.force == 'true'
|
||||
|
||||
@ -401,7 +401,7 @@ jobs:
|
||||
|
||||
mysql:
|
||||
name: Tests - DB [MySQL]
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
needs: ["pre-commit", "paths-filter"]
|
||||
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.force == 'true'
|
||||
@ -556,7 +556,7 @@ jobs:
|
||||
|
||||
platform_ui:
|
||||
name: Tests - Web UI
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 60
|
||||
needs: ["pre-commit", "paths-filter"]
|
||||
if: needs.paths-filter.outputs.frontend == 'true' || needs.paths-filter.outputs.force == 'true'
|
||||
@ -635,7 +635,7 @@ jobs:
|
||||
|
||||
platform_ui_build:
|
||||
name: Build - Web UI
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 60
|
||||
|
||||
steps:
|
||||
@ -664,7 +664,7 @@ jobs:
|
||||
|
||||
zizmor:
|
||||
name: Security [Zizmor]
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
needs: ["pre-commit", "paths-filter"]
|
||||
if: needs.paths-filter.outputs.cicd == 'true' || needs.paths-filter.outputs.force == 'true'
|
||||
|
||||
|
@ -3,6 +3,6 @@
|
||||
"@babel/preset-react"
|
||||
],
|
||||
"plugins": [
|
||||
"macros"
|
||||
"@lingui/babel-plugin-lingui-macro"
|
||||
]
|
||||
}
|
||||
|
@ -28,8 +28,8 @@
|
||||
"@fullcalendar/daygrid": "^6.1.15",
|
||||
"@fullcalendar/interaction": "^6.1.15",
|
||||
"@fullcalendar/react": "^6.1.15",
|
||||
"@lingui/core": "^4.11.4",
|
||||
"@lingui/react": "^4.11.4",
|
||||
"@lingui/core": "^5.3.0",
|
||||
"@lingui/react": "^5.3.0",
|
||||
"@mantine/carousel": "^7.16.0",
|
||||
"@mantine/charts": "^7.16.0",
|
||||
"@mantine/core": "^7.16.0",
|
||||
@ -44,12 +44,11 @@
|
||||
"@sentry/react": "^8.43.0",
|
||||
"@tabler/icons-react": "^3.17.0",
|
||||
"@tanstack/react-query": "^5.56.2",
|
||||
"@types/dompurify": "^3.0.5",
|
||||
"@uiw/codemirror-theme-vscode": "4.23.7",
|
||||
"@uiw/react-codemirror": "4.23.7",
|
||||
"@uiw/react-split": "^5.9.3",
|
||||
"@vanilla-extract/css": "^1.17.0",
|
||||
"axios": "^1.8.2",
|
||||
"@vanilla-extract/css": "^1.17.1",
|
||||
"axios": "^1.8.4",
|
||||
"clsx": "^2.1.1",
|
||||
"codemirror": "6.0.1",
|
||||
"dayjs": "^1.11.13",
|
||||
@ -75,12 +74,13 @@
|
||||
"zustand": "^4.5.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.26.0",
|
||||
"@babel/core": "^7.26.10",
|
||||
"@babel/preset-react": "^7.26.3",
|
||||
"@babel/preset-typescript": "^7.26.0",
|
||||
"@codecov/vite-plugin": "^1.7.0",
|
||||
"@lingui/cli": "^4.11.4",
|
||||
"@lingui/macro": "^4.11.4",
|
||||
"@babel/preset-typescript": "^7.27.0",
|
||||
"@codecov/vite-plugin": "^1.9.0",
|
||||
"@lingui/babel-plugin-lingui-macro": "^5.3.0",
|
||||
"@lingui/cli": "^5.3.0",
|
||||
"@lingui/macro": "^5.3.0",
|
||||
"@playwright/test": "^1.49.1",
|
||||
"@types/node": "^22.6.0",
|
||||
"@types/qrcode": "^1.5.5",
|
||||
@ -89,13 +89,13 @@
|
||||
"@types/react-grid-layout": "^1.3.5",
|
||||
"@types/react-router-dom": "^5.3.3",
|
||||
"@types/react-window": "^1.8.8",
|
||||
"@vanilla-extract/vite-plugin": "^4.0.19",
|
||||
"@vanilla-extract/vite-plugin": "^5.0.1",
|
||||
"@vitejs/plugin-react": "^4.3.4",
|
||||
"babel-plugin-macros": "^3.1.0",
|
||||
"nyc": "^17.1.0",
|
||||
"rollup-plugin-license": "^3.5.3",
|
||||
"typescript": "^5.7.3",
|
||||
"vite": "^6.0.9",
|
||||
"typescript": "^5.8.2",
|
||||
"vite": "^6.2.3",
|
||||
"vite-plugin-babel-macros": "^1.0.6",
|
||||
"vite-plugin-istanbul": "^6.0.2"
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Alert } from '@mantine/core';
|
||||
import { ErrorBoundary, type FallbackRender } from '@sentry/react';
|
||||
import { IconExclamationCircle } from '@tabler/icons-react';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { ActionIcon, Container, Group, Select, Stack } from '@mantine/core';
|
||||
import { useDocumentVisibility, useLocalStorage } from '@mantine/hooks';
|
||||
import { showNotification } from '@mantine/notifications';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import {
|
||||
Alert,
|
||||
Box,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Button, FocusTrap, Stack, TextInput } from '@mantine/core';
|
||||
import { IconQrcode } from '@tabler/icons-react';
|
||||
import { useCallback, useState } from 'react';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Box, Divider, Modal } from '@mantine/core';
|
||||
import { useCallback, useState } from 'react';
|
||||
import { type NavigateFunction, useNavigate } from 'react-router-dom';
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Trans, t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import {
|
||||
Alert,
|
||||
Box,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { IconUserStar } from '@tabler/icons-react';
|
||||
import { useCallback, useMemo } from 'react';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import {
|
||||
ActionIcon,
|
||||
Button,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { IconPrinter, IconReport, IconTags } from '@tabler/icons-react';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { useMemo, useState } from 'react';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
|
||||
import { InvenTreeIcon } from '../../functions/icons';
|
||||
import { ActionButton } from './ActionButton';
|
||||
|
@ -14,7 +14,7 @@ import {
|
||||
IconLogin
|
||||
} from '@tabler/icons-react';
|
||||
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { ProviderLogin } from '../../functions/auth';
|
||||
import type { Provider } from '../../states/states';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { ActionIcon, Tooltip } from '@mantine/core';
|
||||
import { useDisclosure } from '@mantine/hooks';
|
||||
import { IconQrcode } from '@tabler/icons-react';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { ActionIcon, Tooltip } from '@mantine/core';
|
||||
import { IconCommand } from '@tabler/icons-react';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { showNotification } from '@mantine/notifications';
|
||||
import { IconBell } from '@tabler/icons-react';
|
||||
import { useApi } from '../../contexts/ApiContext';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Badge, Skeleton } from '@mantine/core';
|
||||
|
||||
import { isTrue } from '../../functions/conversion';
|
||||
|
@ -4,7 +4,7 @@ import dayGridPlugin from '@fullcalendar/daygrid';
|
||||
import interactionPlugin from '@fullcalendar/interaction';
|
||||
import FullCalendar from '@fullcalendar/react';
|
||||
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import {
|
||||
ActionIcon,
|
||||
Box,
|
||||
|
@ -3,7 +3,7 @@ import type {
|
||||
EventClickArg,
|
||||
EventContentArg
|
||||
} from '@fullcalendar/core';
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { ActionIcon, Group, Text } from '@mantine/core';
|
||||
import { hideNotification, showNotification } from '@mantine/notifications';
|
||||
import {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Alert, Card, Center, Loader, Text } from '@mantine/core';
|
||||
import { useDisclosure, useHotkeys } from '@mantine/hooks';
|
||||
import { IconInfoCircle } from '@tabler/icons-react';
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Trans, t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import {
|
||||
ActionIcon,
|
||||
Group,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { ActionIcon, Box, Group, Overlay, Paper, Tooltip } from '@mantine/core';
|
||||
import { IconX } from '@tabler/icons-react';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import {
|
||||
ActionIcon,
|
||||
Alert,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
|
||||
import { ModelType } from '../../enums/ModelType';
|
||||
import { useGlobalSettingsState } from '../../states/SettingsState';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Group } from '@mantine/core';
|
||||
|
||||
import { ColorToggle } from '../../items/ColorToggle';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Stack } from '@mantine/core';
|
||||
import { useMemo } from 'react';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Stack } from '@mantine/core';
|
||||
|
||||
import { LanguageSelect } from '../../items/LanguageSelect';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import {
|
||||
ActionIcon,
|
||||
Alert,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import {
|
||||
Anchor,
|
||||
Avatar,
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Trans, t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import {
|
||||
AspectRatio,
|
||||
Button,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { notifications } from '@mantine/notifications';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import DOMPurify from 'dompurify';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { IconCode } from '@tabler/icons-react';
|
||||
|
||||
import type { Editor } from '../TemplateEditor';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Trans } from '@lingui/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import { forwardRef, useImperativeHandle, useState } from 'react';
|
||||
|
||||
import { api } from '../../../../App';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { IconFileTypePdf } from '@tabler/icons-react';
|
||||
|
||||
import type { PreviewArea } from '../TemplateEditor';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import {
|
||||
Alert,
|
||||
CloseButton,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
|
||||
import GenericErrorPage from './GenericErrorPage';
|
||||
import NotAuthenticated from './NotAuthenticated';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Trans } from '@lingui/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import {
|
||||
ActionIcon,
|
||||
Button,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
|
||||
import GenericErrorPage from './GenericErrorPage';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
|
||||
import GenericErrorPage from './GenericErrorPage';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
|
||||
import GenericErrorPage from './GenericErrorPage';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
|
||||
import GenericErrorPage from './GenericErrorPage';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import {
|
||||
Alert,
|
||||
Button,
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Trans, t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import {
|
||||
Anchor,
|
||||
Button,
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Trans, t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import {
|
||||
ActionIcon,
|
||||
Box,
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Trans, t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import { ActionIcon, Divider, Group, Select, Table, Text } from '@mantine/core';
|
||||
import { useToggle } from '@mantine/hooks';
|
||||
import {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import {
|
||||
Alert,
|
||||
FileInput,
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Trans, t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import {
|
||||
Box,
|
||||
CloseButton,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import {
|
||||
Input,
|
||||
darken,
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Trans, t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import { Alert, Container, Group, Stack, Table, Text } from '@mantine/core';
|
||||
import { IconExclamationCircle } from '@tabler/icons-react';
|
||||
import { type ReactNode, useCallback, useEffect, useMemo } from 'react';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Anchor, Group } from '@mantine/core';
|
||||
import { type ReactNode, useMemo } from 'react';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Group, HoverCard, Paper, Space, Stack, Text } from '@mantine/core';
|
||||
import { notifications } from '@mantine/notifications';
|
||||
import {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import {
|
||||
Alert,
|
||||
Button,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import {
|
||||
Alert,
|
||||
Button,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Center, Container, Loader, Stack, Text } from '@mantine/core';
|
||||
import { useInterval } from '@mantine/hooks';
|
||||
import { useEffect } from 'react';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import {
|
||||
Button,
|
||||
type FloatingPosition,
|
||||
|
@ -6,7 +6,7 @@ import {
|
||||
} from '@mantine/core';
|
||||
import { IconMoonStars, IconSun } from '@tabler/icons-react';
|
||||
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { vars } from '../../theme';
|
||||
|
||||
export function ColorToggle() {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Trans } from '@lingui/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import { Anchor, Container, HoverCard, ScrollArea, Text } from '@mantine/core';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Alert, Text } from '@mantine/core';
|
||||
|
||||
export function ErrorItem({
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Trans } from '@lingui/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import { Carousel } from '@mantine/carousel';
|
||||
import { Anchor, Button, Paper, Text } from '@mantine/core';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Trans } from '@lingui/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import { Code, Flex, Group, Text } from '@mantine/core';
|
||||
import { Link, type To } from 'react-router-dom';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { ActionIcon } from '@mantine/core';
|
||||
import { forwardRef } from 'react';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
|
@ -2,7 +2,7 @@ import { ActionIcon, Group, Tooltip } from '@mantine/core';
|
||||
import { useDisclosure } from '@mantine/hooks';
|
||||
import { IconLanguage } from '@tabler/icons-react';
|
||||
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { LanguageSelect } from './LanguageSelect';
|
||||
|
||||
export function LanguageToggle() {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Trans } from '@lingui/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
|
||||
import { useUserState } from '../../states/UserState';
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Trans, t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import {
|
||||
Anchor,
|
||||
Badge,
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Trans, t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import {
|
||||
Accordion,
|
||||
Alert,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Trans } from '@lingui/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import { Badge, Button, Divider, Group, Stack, Table } from '@mantine/core';
|
||||
import type { ContextModalProps } from '@mantine/modals';
|
||||
|
||||
|
@ -19,7 +19,7 @@ import { useQuery } from '@tanstack/react-query';
|
||||
import { type ReactNode, useEffect, useMemo, useState } from 'react';
|
||||
import { useMatch, useNavigate } from 'react-router-dom';
|
||||
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { api } from '../../App';
|
||||
import { getNavTabs } from '../../defaults/links';
|
||||
import { ApiEndpoints } from '../../enums/ApiEndpoints';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Container, Flex, Space } from '@mantine/core';
|
||||
import { Spotlight, createSpotlight } from '@mantine/spotlight';
|
||||
import { IconSearch } from '@tabler/icons-react';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Trans } from '@lingui/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import {
|
||||
Group,
|
||||
Menu,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import {
|
||||
Container,
|
||||
Drawer,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import {
|
||||
ActionIcon,
|
||||
Alert,
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Trans, t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import {
|
||||
Accordion,
|
||||
ActionIcon,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Group, SegmentedControl, Stack, Text } from '@mantine/core';
|
||||
import type { ReactNode } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Skeleton } from '@mantine/core';
|
||||
import { IconPaperclip } from '@tabler/icons-react';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Skeleton } from '@mantine/core';
|
||||
import { IconNotes } from '@tabler/icons-react';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { IconRadar } from '@tabler/icons-react';
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
import { ApiEndpoints } from '../../enums/ApiEndpoints';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Accordion, Alert, Card, Stack, Text } from '@mantine/core';
|
||||
import { IconExclamationCircle } from '@tabler/icons-react';
|
||||
import { useMemo } from 'react';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Alert, Stack, Text } from '@mantine/core';
|
||||
import { IconExclamationCircle } from '@tabler/icons-react';
|
||||
import {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Alert, Stack, Text } from '@mantine/core';
|
||||
import { IconExclamationCircle } from '@tabler/icons-react';
|
||||
import { useEffect, useMemo, useRef, useState } from 'react';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Alert, Anchor, Group, Skeleton, Space, Text } from '@mantine/core';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { type ReactNode, useCallback } from 'react';
|
||||
@ -235,5 +235,6 @@ export function UnknownRenderer({
|
||||
}: Readonly<{
|
||||
model: ModelType | undefined;
|
||||
}>): ReactNode {
|
||||
return <Alert color='red' title={t`Unknown model: ${model}`} />;
|
||||
const model_name = model ? model.toString() : 'undefined';
|
||||
return <Alert color='red' title={t`Unknown model: ${model_name}`} />;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
|
||||
import { ApiEndpoints } from '../../enums/ApiEndpoints';
|
||||
import type { ModelType } from '../../enums/ModelType';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
import { ModelType } from '../../enums/ModelType';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Badge } from '@mantine/core';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Badge } from '@mantine/core';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Text } from '@mantine/core';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Trans, t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import { Stack, Text } from '@mantine/core';
|
||||
import { notifications } from '@mantine/notifications';
|
||||
import React, {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Alert, Group, Paper, Tooltip } from '@mantine/core';
|
||||
import { showNotification } from '@mantine/notifications';
|
||||
import { IconShoppingCart } from '@tabler/icons-react';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import {
|
||||
ActionIcon,
|
||||
Card,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { i18n } from '@lingui/core';
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { I18nProvider } from '@lingui/react';
|
||||
import { LoadingOverlay, Text } from '@mantine/core';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { msg } from '@lingui/core/macro';
|
||||
import { Trans } from '@lingui/react';
|
||||
import { MantineProvider, createTheme } from '@mantine/core';
|
||||
import { ModalsProvider } from '@mantine/modals';
|
||||
import { Notifications } from '@mantine/notifications';
|
||||
import { ContextMenuProvider } from 'mantine-contextmenu';
|
||||
|
||||
import { AboutInvenTreeModal } from '../components/modals/AboutInvenTreeModal';
|
||||
import { LicenseModal } from '../components/modals/LicenseModal';
|
||||
import { QrModal } from '../components/modals/QrModal';
|
||||
@ -37,7 +37,10 @@ export function ThemeContext({
|
||||
<ContextMenuProvider>
|
||||
<LanguageContext>
|
||||
<ModalsProvider
|
||||
labels={{ confirm: t`Submit`, cancel: t`Cancel` }}
|
||||
labels={{
|
||||
confirm: <Trans id={msg`Submit`.id} />,
|
||||
cancel: <Trans id={msg`Cancel`.id} />
|
||||
}}
|
||||
modals={{
|
||||
info: ServerInfoModal,
|
||||
about: AboutInvenTreeModal,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import type { SpotlightActionData } from '@mantine/spotlight';
|
||||
import { IconBarcode, IconLink, IconPointer } from '@tabler/icons-react';
|
||||
import type { NavigateFunction } from 'react-router-dom';
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Trans, t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import { openContextModal } from '@mantine/modals';
|
||||
|
||||
import {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Stack, Table } from '@mantine/core';
|
||||
import {
|
||||
IconCalendar,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { IconPackages } from '@tabler/icons-react';
|
||||
import { useMemo, useState } from 'react';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import {
|
||||
Container,
|
||||
Flex,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Flex, Table } from '@mantine/core';
|
||||
import {
|
||||
IconAddressBook,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Table } from '@mantine/core';
|
||||
import {
|
||||
IconAddressBook,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Flex, Group, Skeleton, Stack, Table, Text } from '@mantine/core';
|
||||
import { useDisclosure } from '@mantine/hooks';
|
||||
import { modals } from '@mantine/modals';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { t } from '@lingui/macro';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Table } from '@mantine/core';
|
||||
import { useMemo } from 'react';
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user