frontend: migration to SvelteKit 2 + Sveltestrap 6

This commit is contained in:
nemunaire 2024-01-09 10:39:08 +01:00
parent fe786e8b93
commit 4dedcfc420
43 changed files with 791 additions and 278 deletions

View File

@ -56,12 +56,11 @@ build-evdist:
build-frontend-ui:
stage: build
image: node:20-alpine3.18
image: node:21-alpine
before_script:
script:
- cd frontend/fic
- npm install --network-timeout=100000
- sed -i 's!@popperjs/core/dist/esm/popper!@popperjs/core!' node_modules/sveltestrap/src/*.js node_modules/sveltestrap/src/*.svelte
- npm run build
build-dashboard:

View File

@ -5,7 +5,6 @@ WORKDIR /ui
COPY frontend/fic/ .
RUN npm install --network-timeout=100000 && \
sed -i 's!@popperjs/core/dist/esm/popper!@popperjs/core!' node_modules/sveltestrap/src/*.js node_modules/sveltestrap/src/*.svelte && \
npm run build

View File

@ -5,7 +5,6 @@ WORKDIR /ui
COPY frontend/fic/ .
RUN npm install --network-timeout=100000 && \
sed -i 's!@popperjs/core/dist/esm/popper!@popperjs/core!' node_modules/sveltestrap/src/*.js node_modules/sveltestrap/src/*.svelte && \
npm run build

View File

@ -1,11 +1,3 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"$lib": ["src/lib"],
"$lib/*": ["src/lib/*"]
}
},
"include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"]
"extends": "./.svelte-kit/tsconfig.json"
}

File diff suppressed because it is too large Load Diff

View File

@ -9,18 +9,19 @@
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. ."
},
"devDependencies": {
"@sveltejs/adapter-static": "^2.0.0",
"@sveltejs/kit": "^1.0.0",
"@sveltejs/adapter-static": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"eslint": "^8.4.2",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-svelte3": "^4.0.0",
"eslint-plugin-svelte": "^2.35.1",
"prettier": "^3.0.0",
"prettier-plugin-svelte": "^3.0.0",
"prettier-plugin-svelte": "^3.1.2",
"sass": "^1.51.0",
"sass-loader": "^13.0.0",
"svelte": "^3.48.0",
"sveltestrap": "^5.9.0",
"vite": "^4.0.0"
"svelte": "^4.0.0",
"@sveltestrap/sveltestrap": "^6.2.1",
"vite": "^5.0.0"
},
"type": "module",
"dependencies": {
@ -30,6 +31,6 @@
"bootswatch": "^5.1.3",
"hash-wasm": "^4.9.0",
"seedrandom": "^3.0.5",
"vite": "^4.0.0"
"vite": "^5.0.0"
}
}

View File

@ -8,7 +8,7 @@
Col,
Icon,
Row,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { my } from '$lib/stores/my.js';
import { max_solved } from '$lib/stores/themes.js';

View File

@ -2,7 +2,7 @@
import {
ButtonGroup,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { time } from '$lib/stores/settings.js';

View File

@ -7,7 +7,7 @@
Icon,
ListGroup,
ListGroupItem,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import FileSize from './FileSize.svelte';

View File

@ -11,7 +11,7 @@
Progress,
Spinner,
Tooltip,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { blake2b } from 'hash-wasm';

View File

@ -8,7 +8,7 @@
ListGroup,
ListGroupItem,
Spinner,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { my } from '$lib/stores/my.js';
import { settings } from '$lib/stores/settings.js';

View File

@ -7,7 +7,7 @@
Icon,
ListGroup,
ListGroupItem,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import DateFormat from './DateFormat.svelte';

View File

@ -4,7 +4,7 @@
import {
CardBody,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
export let uri = "";
</script>

View File

@ -4,7 +4,7 @@
Button,
Icon,
Spinner,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { tick } from 'svelte';
import { my } from '$lib/stores/my.js';

View File

@ -2,7 +2,7 @@
import {
Button,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import FlagKey from './FlagKey.svelte';

View File

@ -2,7 +2,7 @@
import {
Button,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { issues, issues_idx } from '$lib/stores/issues.js';
import { settings } from '$lib/stores/settings.js';

View File

@ -17,7 +17,7 @@
NavLink,
Progress,
Row,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { challengeInfo } from '$lib/stores/challengeinfo.js';
import { my } from '$lib/stores/my.js';

View File

@ -2,7 +2,7 @@
import {
ButtonGroup,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import Clock from './Clock.svelte';
import { challengeInfo } from '$lib/stores/challengeinfo.js';

View File

@ -4,7 +4,7 @@
Icon,
NavItem,
NavLink,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { issues, issues_need_info, issues_nb_responses, issues_known_responses } from '$lib/stores/issues.js';
import { settings } from '$lib/stores/settings.js';

View File

@ -4,7 +4,7 @@
import {
Carousel,
CarouselItem,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { challengeInfo } from '$lib/stores/challengeinfo.js';

View File

@ -6,7 +6,7 @@
DropdownMenu,
DropdownToggle,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { my } from '$lib/stores/my.js';
import { tags } from '$lib/stores/mythemes.js';

View File

@ -6,7 +6,7 @@
DropdownMenu,
DropdownToggle,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { my } from '$lib/stores/my.js';
import { max_solved } from '$lib/stores/themes.js';

View File

@ -10,7 +10,7 @@
Container,
Icon,
Row,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { settings } from '$lib/stores/settings.js';

View File

@ -10,7 +10,7 @@
Container,
Icon,
Row,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { settings } from '$lib/stores/settings.js';
import { teams } from '$lib/stores/teams.js';

View File

@ -5,7 +5,7 @@
Button,
Icon,
Row,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
const dispatch = createEventDispatcher();

View File

@ -4,7 +4,7 @@
Modal,
ModalBody,
ModalHeader
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
const toggle = () => (open = !open);
export let exercice = null;

View File

@ -5,7 +5,7 @@
Column,
Icon,
Table,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import DateFormat from '$lib/components/DateFormat.svelte';

View File

@ -5,7 +5,7 @@
CardHeader,
CardBody,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { my } from '$lib/stores/my.js';
import { settings } from '$lib/stores/settings.js';

View File

@ -5,7 +5,7 @@
CardHeader,
CardBody,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
</script>
<Card class="mb-3 border-warning">

View File

@ -6,7 +6,7 @@
Icon,
ListGroup,
ListGroupItem,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
export let members = [];
</script>

View File

@ -4,7 +4,7 @@
BreadcrumbItem,
Card,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { my } from '$lib/stores/my.js';

View File

@ -6,7 +6,7 @@
import {
Container,
//Styles,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import Header from '$lib/components/Header.svelte';

View File

@ -8,7 +8,7 @@
Col,
Icon,
Row,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { goto } from '$app/navigation';

View File

@ -4,7 +4,7 @@
Container,
Icon,
Spinner,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { challengeInfo } from '$lib/stores/challengeinfo';
import { current_exercice } from '$lib/stores/exercices';

View File

@ -8,7 +8,7 @@
Col,
Icon,
Row,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { goto } from '$app/navigation';

View File

@ -3,7 +3,7 @@
Alert,
Icon,
Spinner,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import ThemeNav from '$lib/components/ThemeNav.svelte';

View File

@ -11,7 +11,7 @@
Icon,
Row,
Spinner,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import ExerciceDownloads from '$lib/components/ExerciceDownloads.svelte';
import ExerciceFlags from '$lib/components/ExerciceFlags.svelte';

View File

@ -8,7 +8,7 @@
Container,
Icon,
Row,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import ScoreGrid from '$lib/components/ScoreGrid.svelte';
import TeamChangeName from '$lib/components/TeamChangeName.svelte';

View File

@ -8,7 +8,7 @@
Container,
Icon,
Table,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import DateFormat from '$lib/components/DateFormat.svelte';

View File

@ -8,7 +8,7 @@
Container,
Icon,
Row,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { my } from '$lib/stores/my.js';
import { rank } from '$lib/stores/teams.js';

View File

@ -7,7 +7,7 @@
Container,
Icon,
Row,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { goto } from '$app/navigation';

View File

@ -4,7 +4,7 @@
CardBody,
Container,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { challengeInfo } from '$lib/stores/challengeinfo.js';
import { settings } from '$lib/stores/settings.js';

View File

@ -8,7 +8,7 @@
Container,
Icon,
Row,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { goto } from '$app/navigation';