diff --git a/.github/workflows/build-server.yml b/.github/workflows/build-server.yml index 939ed434..560ae243 100644 --- a/.github/workflows/build-server.yml +++ b/.github/workflows/build-server.yml @@ -34,6 +34,23 @@ jobs: cd client npm run build + - name: Setup Node.js (V3) + uses: actions/setup-node@v4 + with: + node-version: '24' + cache: 'npm' + cache-dependency-path: 'client-v3/package-lock.json' + + - name: Install dependencies (V3) + run: | + cd client-v3 + npm ci + + - name: Build frontend (V3) + run: | + cd client-v3 + npm run build + - name: Upload frontend build uses: actions/upload-artifact@v4 with: diff --git a/Dockerfile b/Dockerfile index abe78178..f1203f4c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,6 @@ -FROM node:24-bookworm AS node_build +FROM node:24-bookworm AS build_v2 -# npm 11 bundled with Node 24, no separate install needed RUN mkdir -p /server/static - COPY /client/package.json /client/package.json COPY /client/package-lock.json /client/package-lock.json COPY /client/.npmrc /client/.npmrc @@ -12,7 +10,15 @@ COPY /client /client COPY /docs /docs RUN npm run build -COPY /server /server +FROM node:24-bookworm AS build_v3 + +RUN mkdir -p /server/static/ui-new +COPY /client-v3/package.json /client-v3/package.json +COPY /client-v3/package-lock.json /client-v3/package-lock.json +WORKDIR /client-v3 +RUN npm ci +COPY /client-v3 /client-v3 +RUN npm run build FROM python:3.13-bookworm @@ -22,8 +28,10 @@ RUN pip install -r requirements.txt RUN apt update RUN apt install -y nano -COPY --from=node_build /server /server +COPY /server /server +COPY --from=build_v2 /server/static /server/static +COPY --from=build_v3 /server/static/ui-new /server/static/ui-new WORKDIR /server RUN mkdir conf EXPOSE 8080 -ENTRYPOINT ["python3", "main.py"] \ No newline at end of file +ENTRYPOINT ["python3", "main.py"] diff --git a/client-v3/src/App.vue b/client-v3/src/App.vue index da462fa4..85e32afa 100644 --- a/client-v3/src/App.vue +++ b/client-v3/src/App.vue @@ -94,6 +94,7 @@ + Switch to Classic UI Help About @@ -193,6 +194,7 @@ import { useConfirm } from '@/composables/useConfirm'; import ConfirmDialog from '@/components/common/ConfirmDialog.vue'; import CreateUser from '@/components/user/CreateUser.vue'; import { useUserStore } from '@/stores/user'; +import type { UserSettings } from '@/types/api/user'; import { useSystemStore } from '@/stores/system'; import { useShowStore } from '@/stores/show'; import { useWebSocketStore } from '@/stores/websocket'; @@ -275,6 +277,14 @@ async function awaitWSConnect(): Promise { if (userStore.authToken) { await userStore.getCurrentUser(); await Promise.all([userStore.getCurrentRbac(), userStore.getUserSettings()]); + const switching = new URLSearchParams(window.location.search).has('_switch'); + if (!switching && (userStore.userSettings as UserSettings).preferred_ui === 'old') { + window.location.href = '/?_switch=1'; + return; + } + if (switching) { + await router.replace(router.currentRoute.value.path); + } } if (systemStore.currentShow != null) { await showStore.getShowSessionData(); diff --git a/client-v3/src/components/user/settings/UserSettingsConfig.vue b/client-v3/src/components/user/settings/UserSettingsConfig.vue index 6039c09f..3cf69f8e 100644 --- a/client-v3/src/components/user/settings/UserSettingsConfig.vue +++ b/client-v3/src/components/user/settings/UserSettingsConfig.vue @@ -101,9 +101,18 @@ /> + + + + - Reset - + Reset + Submit @@ -119,6 +128,7 @@