From 90a8daad689f6adb9bdc1d9e6133eb8fc6e2e2f1 Mon Sep 17 00:00:00 2001 From: zurdi Date: Tue, 3 Dec 2024 09:15:57 +0000 Subject: [PATCH 01/49] frontend code and files structure refactor [WIP] --- frontend/src/App.vue | 48 --------- frontend/src/RomM.vue | 7 ++ .../Administration/Tasks.vue | 3 +- .../Users/Dialog/DeleteUser.vue | 3 +- .../Administration/Users/Dialog/EditUser.vue | 3 +- .../Dashboard/Collections.vue | 0 .../Dashboard/Platforms.vue | 0 .../Dashboard/Recent.vue | 0 .../Dashboard/Stats.vue | 0 .../AppBar/Platform/PlatformInfoDrawer.vue | 11 ++- .../Management/Excluded.vue | 0 .../Management/PlatformBinding.vue | 0 .../Management/PlatformVersions.vue | 0 .../Settings/Interface.vue | 0 .../Settings/Theme.vue | 0 .../common/Navigation/SettingsDrawer.vue | 4 +- .../{ => Notifications}/Notification.vue | 0 .../UploadProgress.vue} | 4 +- .../{LoadingView.vue => ViewLoader.vue} | 6 +- .../src/{views/Home.vue => layouts/Main.vue} | 53 ++++++++-- frontend/src/layouts/Settings.vue | 8 ++ frontend/src/main.ts | 7 +- frontend/src/plugins/router.ts | 51 +++++----- frontend/src/types/emitter.d.ts | 5 - frontend/src/types/user.d.ts | 4 + frontend/src/utils/index.ts | 97 +++++++++++++++++-- frontend/src/views/Administration.vue | 2 +- frontend/src/views/Dashboard.vue | 8 +- frontend/src/views/Gallery/Platform.vue | 1 + frontend/src/views/Login.vue | 1 + frontend/src/views/Management.vue | 6 +- frontend/src/views/Settings.vue | 12 --- frontend/src/views/Setup.vue | 1 + frontend/src/views/UI.vue | 8 ++ 34 files changed, 226 insertions(+), 127 deletions(-) delete mode 100644 frontend/src/App.vue create mode 100644 frontend/src/RomM.vue rename frontend/src/{layouts => components}/Administration/Tasks.vue (99%) rename frontend/src/{layouts => components}/Dashboard/Collections.vue (100%) rename frontend/src/{layouts => components}/Dashboard/Platforms.vue (100%) rename frontend/src/{layouts => components}/Dashboard/Recent.vue (100%) rename frontend/src/{layouts => components}/Dashboard/Stats.vue (100%) rename frontend/src/{layouts => components}/Management/Excluded.vue (100%) rename frontend/src/{layouts => components}/Management/PlatformBinding.vue (100%) rename frontend/src/{layouts => components}/Management/PlatformVersions.vue (100%) rename frontend/src/{layouts => components}/Settings/Interface.vue (100%) rename frontend/src/{layouts => components}/Settings/Theme.vue (100%) rename frontend/src/components/common/{ => Notifications}/Notification.vue (100%) rename frontend/src/components/common/{UploadInProgress.vue => Notifications/UploadProgress.vue} (98%) rename frontend/src/components/common/{LoadingView.vue => ViewLoader.vue} (93%) rename frontend/src/{views/Home.vue => layouts/Main.vue} (79%) create mode 100644 frontend/src/layouts/Settings.vue create mode 100644 frontend/src/types/user.d.ts delete mode 100644 frontend/src/views/Settings.vue create mode 100644 frontend/src/views/UI.vue diff --git a/frontend/src/App.vue b/frontend/src/App.vue deleted file mode 100644 index 001e2c1ff..000000000 --- a/frontend/src/App.vue +++ /dev/null @@ -1,48 +0,0 @@ - - - diff --git a/frontend/src/RomM.vue b/frontend/src/RomM.vue new file mode 100644 index 000000000..518be9114 --- /dev/null +++ b/frontend/src/RomM.vue @@ -0,0 +1,7 @@ + diff --git a/frontend/src/layouts/Administration/Tasks.vue b/frontend/src/components/Administration/Tasks.vue similarity index 99% rename from frontend/src/layouts/Administration/Tasks.vue rename to frontend/src/components/Administration/Tasks.vue index 0264336a1..29a857a86 100644 --- a/frontend/src/layouts/Administration/Tasks.vue +++ b/frontend/src/components/Administration/Tasks.vue @@ -13,7 +13,6 @@ import { computed, inject } from "vue"; const emitter = inject>("emitter"); const heartbeatStore = storeHeartbeat(); const runningTasks = storeRunningTasks(); - const tasks = computed(() => [ { title: heartbeatStore.value.WATCHER.TITLE, @@ -47,7 +46,7 @@ const tasks = computed(() => [ }, ]); -// Methods +// Functions const runAllTasks = async () => { runningTasks.value = true; const result = await api.post("/tasks/run"); diff --git a/frontend/src/components/Administration/Users/Dialog/DeleteUser.vue b/frontend/src/components/Administration/Users/Dialog/DeleteUser.vue index e49fc418d..71da45d3a 100644 --- a/frontend/src/components/Administration/Users/Dialog/DeleteUser.vue +++ b/frontend/src/components/Administration/Users/Dialog/DeleteUser.vue @@ -2,7 +2,8 @@ import RDialog from "@/components/common/RDialog.vue"; import userApi from "@/services/api/user"; import storeUsers from "@/stores/users"; -import type { Events, UserItem } from "@/types/emitter"; +import type { Events } from "@/types/emitter"; +import type { UserItem } from "@/types/user"; import { defaultAvatarPath } from "@/utils"; import type { Emitter } from "mitt"; import { inject, ref } from "vue"; diff --git a/frontend/src/components/Administration/Users/Dialog/EditUser.vue b/frontend/src/components/Administration/Users/Dialog/EditUser.vue index d1198dbc1..f32c657fb 100644 --- a/frontend/src/components/Administration/Users/Dialog/EditUser.vue +++ b/frontend/src/components/Administration/Users/Dialog/EditUser.vue @@ -3,7 +3,8 @@ import RDialog from "@/components/common/RDialog.vue"; import userApi from "@/services/api/user"; import storeAuth from "@/stores/auth"; import storeUsers from "@/stores/users"; -import type { Events, UserItem } from "@/types/emitter"; +import type { Events } from "@/types/emitter"; +import type { UserItem } from "@/types/user"; import { defaultAvatarPath } from "@/utils"; import type { Emitter } from "mitt"; import { inject, ref } from "vue"; diff --git a/frontend/src/layouts/Dashboard/Collections.vue b/frontend/src/components/Dashboard/Collections.vue similarity index 100% rename from frontend/src/layouts/Dashboard/Collections.vue rename to frontend/src/components/Dashboard/Collections.vue diff --git a/frontend/src/layouts/Dashboard/Platforms.vue b/frontend/src/components/Dashboard/Platforms.vue similarity index 100% rename from frontend/src/layouts/Dashboard/Platforms.vue rename to frontend/src/components/Dashboard/Platforms.vue diff --git a/frontend/src/layouts/Dashboard/Recent.vue b/frontend/src/components/Dashboard/Recent.vue similarity index 100% rename from frontend/src/layouts/Dashboard/Recent.vue rename to frontend/src/components/Dashboard/Recent.vue diff --git a/frontend/src/layouts/Dashboard/Stats.vue b/frontend/src/components/Dashboard/Stats.vue similarity index 100% rename from frontend/src/layouts/Dashboard/Stats.vue rename to frontend/src/components/Dashboard/Stats.vue diff --git a/frontend/src/components/Gallery/AppBar/Platform/PlatformInfoDrawer.vue b/frontend/src/components/Gallery/AppBar/Platform/PlatformInfoDrawer.vue index 1c5686701..68a6fd9d1 100644 --- a/frontend/src/components/Gallery/AppBar/Platform/PlatformInfoDrawer.vue +++ b/frontend/src/components/Gallery/AppBar/Platform/PlatformInfoDrawer.vue @@ -224,11 +224,18 @@ async function setAspectRatio() { From 4e6e6db45f560da24e16809bc214b5076fe8379d Mon Sep 17 00:00:00 2001 From: zurdi Date: Wed, 4 Dec 2024 01:22:57 +0000 Subject: [PATCH 05/49] unify platform and collection layout --- .../Gallery/AppBar/Collection/Base.vue | 116 +------------- .../Collection/CollectionInfoDrawer.vue | 139 ++++++++++++++++ .../AppBar/Platform/PlatformInfoDrawer.vue | 150 +++++++++--------- frontend/src/stores/navigation.ts | 10 ++ 4 files changed, 229 insertions(+), 186 deletions(-) create mode 100644 frontend/src/components/Gallery/AppBar/Collection/CollectionInfoDrawer.vue diff --git a/frontend/src/components/Gallery/AppBar/Collection/Base.vue b/frontend/src/components/Gallery/AppBar/Collection/Base.vue index 98f59a29a..5960cbff1 100644 --- a/frontend/src/components/Gallery/AppBar/Collection/Base.vue +++ b/frontend/src/components/Gallery/AppBar/Collection/Base.vue @@ -1,5 +1,6 @@ diff --git a/frontend/src/components/Gallery/AppBar/Collection/CollectionInfoDrawer.vue b/frontend/src/components/Gallery/AppBar/Collection/CollectionInfoDrawer.vue new file mode 100644 index 000000000..5ea3b4fd7 --- /dev/null +++ b/frontend/src/components/Gallery/AppBar/Collection/CollectionInfoDrawer.vue @@ -0,0 +1,139 @@ + + + diff --git a/frontend/src/components/Gallery/AppBar/Platform/PlatformInfoDrawer.vue b/frontend/src/components/Gallery/AppBar/Platform/PlatformInfoDrawer.vue index 1c08fe5a4..187050f16 100644 --- a/frontend/src/components/Gallery/AppBar/Platform/PlatformInfoDrawer.vue +++ b/frontend/src/components/Gallery/AppBar/Platform/PlatformInfoDrawer.vue @@ -125,9 +125,9 @@ async function setAspectRatio() { :width="xs ? viewportWidth : '500'" v-if="currentPlatform" > - + -
+
ID: {{ currentPlatform.moby_id }}
- + From eb212a9714629761d0dee5f815c45c1def5d884c Mon Sep 17 00:00:00 2001 From: zurdi Date: Wed, 4 Dec 2024 12:45:52 +0000 Subject: [PATCH 07/49] refactor: enhance EditUser.vue component styling and improve hover interaction --- .../Administration/Users/Dialog/EditUser.vue | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/frontend/src/components/Administration/Users/Dialog/EditUser.vue b/frontend/src/components/Administration/Users/Dialog/EditUser.vue index f32c657fb..6811b4fc9 100644 --- a/frontend/src/components/Administration/Users/Dialog/EditUser.vue +++ b/frontend/src/components/Administration/Users/Dialog/EditUser.vue @@ -145,7 +145,7 @@ function closeDialog() {
mdi-pencil @@ -186,15 +186,3 @@ function closeDialog() { - - From a1a643d3ee3bd255339ef68604639c960665b3d8 Mon Sep 17 00:00:00 2001 From: zurdi Date: Wed, 4 Dec 2024 12:46:11 +0000 Subject: [PATCH 08/49] refactor: remove settings.json and update component imports for consistency --- .zed/settings.json | 16 ---------------- .../src/components/common/Game/Card/Base.vue | 1 - .../src/components/common/Navigation/HomeBtn.vue | 4 ++-- frontend/src/components/common/RDialog.vue | 4 ++-- .../common/{RommIso.vue => RIsotipo.vue} | 0 .../common/{RommLogo.vue => RLogotipo.vue} | 0 6 files changed, 4 insertions(+), 21 deletions(-) delete mode 100644 .zed/settings.json rename frontend/src/components/common/{RommIso.vue => RIsotipo.vue} (100%) rename frontend/src/components/common/{RommLogo.vue => RLogotipo.vue} (100%) diff --git a/.zed/settings.json b/.zed/settings.json deleted file mode 100644 index c808db432..000000000 --- a/.zed/settings.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "languages": { - "Python": { - "tab_size": 4 - }, - "Vue.js": { - "tab_size": 2, - "formatter": { - "external": { - "command": "prettier", - "arguments": ["--stdin-filepath", "{buffer_path}"] - } - } - } - } -} diff --git a/frontend/src/components/common/Game/Card/Base.vue b/frontend/src/components/common/Game/Card/Base.vue index 3e619b1fe..ee554561b 100644 --- a/frontend/src/components/common/Game/Card/Base.vue +++ b/frontend/src/components/common/Game/Card/Base.vue @@ -109,7 +109,6 @@ const computedAspectRatio = computed(() => { @touchend="handleTouchEnd" v-bind="hoverProps" :class="{ pointer: pointerOnHover }" - ref="card" cover :key="romsStore.isSimpleRom(rom) ? rom.updated_at : ''" :src=" diff --git a/frontend/src/components/common/Navigation/HomeBtn.vue b/frontend/src/components/common/Navigation/HomeBtn.vue index 808c01ed0..92495bab3 100644 --- a/frontend/src/components/common/Navigation/HomeBtn.vue +++ b/frontend/src/components/common/Navigation/HomeBtn.vue @@ -1,6 +1,6 @@ - diff --git a/frontend/src/styles/common.css b/frontend/src/styles/common.css index e754663f8..ef0ee8f46 100644 --- a/frontend/src/styles/common.css +++ b/frontend/src/styles/common.css @@ -8,6 +8,9 @@ body { 1px 1px 3px #000000, 0 0 3px #000000 !important; } +.v-progress-linear { + z-index: 9999 !important; +} .translucent { backdrop-filter: blur(3px) !important; text-shadow: From 23a23bb0b84d5016c507e2496dfb67f7df16d042 Mon Sep 17 00:00:00 2001 From: zurdi Date: Wed, 4 Dec 2024 20:03:57 +0000 Subject: [PATCH 11/49] refactor: update routing to use 'home' instead of 'dashboard' and place login and setup under Auth layout --- .trunk/trunk.yaml | 16 +- .../{Dashboard => Home}/Collections.vue | 0 .../{Dashboard => Home}/Platforms.vue | 0 .../components/{Dashboard => Home}/Recent.vue | 0 .../components/{Dashboard => Home}/Stats.vue | 0 .../Collection/Dialog/DeleteCollection.vue | 2 +- .../common/Collection/Dialog/RemoveRoms.vue | 2 +- .../common/Platform/Dialog/DeletePlatform.vue | 2 +- frontend/src/layouts/Auth.vue | 34 +++ frontend/src/main.ts | 2 +- frontend/src/plugins/router.ts | 42 ++-- frontend/src/stores/navigation.ts | 2 +- frontend/src/views/Auth/Login.vue | 106 ++++++++ frontend/src/views/Auth/Setup.vue | 191 ++++++++++++++ .../src/views/{Dashboard.vue => Home.vue} | 8 +- frontend/src/views/Login.vue | 142 ----------- .../views/{ => Player}/EmulatorJS/Base.vue | 2 +- .../views/{ => Player}/EmulatorJS/Player.vue | 0 .../src/views/{ => Player}/RuffleRS/Base.vue | 0 .../views/{ => Settings}/Administration.vue | 0 .../src/views/{ => Settings}/Management.vue | 0 .../{UI.vue => Settings/UserInterface.vue} | 0 frontend/src/views/Setup.vue | 238 ------------------ 23 files changed, 377 insertions(+), 412 deletions(-) rename frontend/src/components/{Dashboard => Home}/Collections.vue (100%) rename frontend/src/components/{Dashboard => Home}/Platforms.vue (100%) rename frontend/src/components/{Dashboard => Home}/Recent.vue (100%) rename frontend/src/components/{Dashboard => Home}/Stats.vue (100%) create mode 100644 frontend/src/layouts/Auth.vue create mode 100644 frontend/src/views/Auth/Login.vue create mode 100644 frontend/src/views/Auth/Setup.vue rename frontend/src/views/{Dashboard.vue => Home.vue} (79%) delete mode 100644 frontend/src/views/Login.vue rename frontend/src/views/{ => Player}/EmulatorJS/Base.vue (99%) rename frontend/src/views/{ => Player}/EmulatorJS/Player.vue (100%) rename frontend/src/views/{ => Player}/RuffleRS/Base.vue (100%) rename frontend/src/views/{ => Settings}/Administration.vue (100%) rename frontend/src/views/{ => Settings}/Management.vue (100%) rename frontend/src/views/{UI.vue => Settings/UserInterface.vue} (100%) delete mode 100644 frontend/src/views/Setup.vue diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index b76ad3d43..4b2f8ffe3 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -18,25 +18,25 @@ runtimes: # This is the section where you manage your linters. (https://docs.trunk.io/check/configuration) lint: enabled: - - markdownlint@0.42.0 - - eslint@9.14.0 + - markdownlint@0.43.0 + - eslint@9.16.0 - actionlint@1.7.4 - - bandit@1.7.10 + - bandit@1.8.0 - black@24.10.0 - - checkov@3.2.296 + - checkov@3.2.328 - git-diff-check - isort@5.13.2 - mypy@1.13.0 - osv-scanner@1.9.1 - - oxipng@9.1.2 - - prettier@3.3.3 - - ruff@0.7.3 + - oxipng@9.1.3 + - prettier@3.4.2 + - ruff@0.8.1 - shellcheck@0.10.0 - shfmt@3.6.0 - svgo@3.3.2 - taplo@0.9.3 - trivy@0.56.2 - - trufflehog@3.83.6 + - trufflehog@3.84.2 - yamllint@1.35.1 ignore: - linters: [ALL] diff --git a/frontend/src/components/Dashboard/Collections.vue b/frontend/src/components/Home/Collections.vue similarity index 100% rename from frontend/src/components/Dashboard/Collections.vue rename to frontend/src/components/Home/Collections.vue diff --git a/frontend/src/components/Dashboard/Platforms.vue b/frontend/src/components/Home/Platforms.vue similarity index 100% rename from frontend/src/components/Dashboard/Platforms.vue rename to frontend/src/components/Home/Platforms.vue diff --git a/frontend/src/components/Dashboard/Recent.vue b/frontend/src/components/Home/Recent.vue similarity index 100% rename from frontend/src/components/Dashboard/Recent.vue rename to frontend/src/components/Home/Recent.vue diff --git a/frontend/src/components/Dashboard/Stats.vue b/frontend/src/components/Home/Stats.vue similarity index 100% rename from frontend/src/components/Dashboard/Stats.vue rename to frontend/src/components/Home/Stats.vue diff --git a/frontend/src/components/common/Collection/Dialog/DeleteCollection.vue b/frontend/src/components/common/Collection/Dialog/DeleteCollection.vue index 537b542ba..6d6240649 100644 --- a/frontend/src/components/common/Collection/Dialog/DeleteCollection.vue +++ b/frontend/src/components/common/Collection/Dialog/DeleteCollection.vue @@ -47,7 +47,7 @@ async function deleteCollection() { return; }); - await router.push({ name: "dashboard" }); + await router.push({ name: "home" }); collectionsStore.remove(collection.value); emitter?.emit("refreshDrawer", null); diff --git a/frontend/src/components/common/Collection/Dialog/RemoveRoms.vue b/frontend/src/components/common/Collection/Dialog/RemoveRoms.vue index 34f144b70..916042e0e 100644 --- a/frontend/src/components/common/Collection/Dialog/RemoveRoms.vue +++ b/frontend/src/components/common/Collection/Dialog/RemoveRoms.vue @@ -66,7 +66,7 @@ async function removeRomsFromCollection() { emitter?.emit("showLoadingDialog", { loading: false, scrim: false }); romsStore.resetSelection(); if (selectedCollection.value?.roms.length == 0) { - router.push({ name: "dashboard" }); + router.push({ name: "home" }); } closeDialog(); }); diff --git a/frontend/src/components/common/Platform/Dialog/DeletePlatform.vue b/frontend/src/components/common/Platform/Dialog/DeletePlatform.vue index c34d661f1..4d3837de8 100644 --- a/frontend/src/components/common/Platform/Dialog/DeletePlatform.vue +++ b/frontend/src/components/common/Platform/Dialog/DeletePlatform.vue @@ -43,7 +43,7 @@ async function deletePlatform() { return; }); - await router.push({ name: "dashboard" }); + await router.push({ name: "home" }); platformsStore.remove(platform.value); emitter?.emit("refreshDrawer", null); diff --git a/frontend/src/layouts/Auth.vue b/frontend/src/layouts/Auth.vue new file mode 100644 index 000000000..d9c281ad6 --- /dev/null +++ b/frontend/src/layouts/Auth.vue @@ -0,0 +1,34 @@ + + + + + diff --git a/frontend/src/main.ts b/frontend/src/main.ts index 5ae409f18..e587c5181 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -5,7 +5,7 @@ import "@/styles/scrollbar.css"; import type { Events } from "@/types/emitter"; import mitt from "mitt"; import { createApp } from "vue"; -import App from "./RomM.vue"; +import App from "@/RomM.vue"; const emitter = mitt(); const app = createApp(App); diff --git a/frontend/src/plugins/router.ts b/frontend/src/plugins/router.ts index 2a6935e8e..1ca6fe4e1 100644 --- a/frontend/src/plugins/router.ts +++ b/frontend/src/plugins/router.ts @@ -5,23 +5,37 @@ import storeHeartbeat from "@/stores/heartbeat"; const routes = [ { path: "/login", - name: "login", - component: () => import("@/views/Login.vue"), + name: "loginView", + component: () => import("@/layouts/Auth.vue"), + children: [ + { + path: "", + name: "login", + component: () => import("@/views/Auth/Login.vue"), + }, + ], }, { path: "/setup", - name: "setup", - component: () => import("@/views/Setup.vue"), + name: "setupView", + component: () => import("@/layouts/Auth.vue"), + children: [ + { + path: "", + name: "setup", + component: () => import("@/views/Auth/Setup.vue"), + }, + ], }, { path: "/", - name: "home", + name: "main", component: () => import("@/layouts/Main.vue"), children: [ { path: "", - name: "dashboard", - component: () => import("@/views/Dashboard.vue"), + name: "home", + component: () => import("@/views/Home.vue"), }, { path: "platform/:platform", @@ -41,12 +55,12 @@ const routes = [ { path: "rom/:rom/ejs", name: "emulatorjs", - component: () => import("@/views/EmulatorJS/Base.vue"), + component: () => import("@/views/Player/EmulatorJS/Base.vue"), }, { path: "rom/:rom/ruffle", name: "ruffle", - component: () => import("@/views/RuffleRS/Base.vue"), + component: () => import("@/views/Player/RuffleRS/Base.vue"), }, { path: "scan", @@ -66,19 +80,19 @@ const routes = [ { path: "management", name: "management", - component: () => import("@/views/Management.vue"), + component: () => import("@/views/Settings/Management.vue"), }, { path: "administration", name: "administration", - component: () => import("@/views/Administration.vue"), + component: () => import("@/views/Settings/Administration.vue"), }, ], }, { path: ":pathMatch(.*)*", name: "noMatch", - component: () => import("@/views/Dashboard.vue"), + component: () => import("@/views/Home.vue"), }, ], }, @@ -89,10 +103,10 @@ const router = createRouter({ routes, }); -router.beforeEach((to, _from, next) => { +router.beforeEach(async (to, _from, next) => { const heartbeat = storeHeartbeat(); if (to.name == "setup" && !heartbeat.value.SHOW_SETUP_WIZARD) { - next({ name: "dashboard" }); + next({ name: "home" }); } else { next(); } diff --git a/frontend/src/stores/navigation.ts b/frontend/src/stores/navigation.ts index cb50fd273..aa4c4d86a 100644 --- a/frontend/src/stores/navigation.ts +++ b/frontend/src/stores/navigation.ts @@ -32,7 +32,7 @@ export default defineStore("navigation", { }, goHome() { this.resetDrawers(); - this.$router.push({ name: "dashboard" }); + this.$router.push({ name: "home" }); }, goScan() { this.resetDrawers(); diff --git a/frontend/src/views/Auth/Login.vue b/frontend/src/views/Auth/Login.vue new file mode 100644 index 000000000..6a2050023 --- /dev/null +++ b/frontend/src/views/Auth/Login.vue @@ -0,0 +1,106 @@ + + + diff --git a/frontend/src/views/Auth/Setup.vue b/frontend/src/views/Auth/Setup.vue new file mode 100644 index 000000000..0c25cfc68 --- /dev/null +++ b/frontend/src/views/Auth/Setup.vue @@ -0,0 +1,191 @@ + + + diff --git a/frontend/src/views/Dashboard.vue b/frontend/src/views/Home.vue similarity index 79% rename from frontend/src/views/Dashboard.vue rename to frontend/src/views/Home.vue index c871b66f1..9bb9b4c8b 100644 --- a/frontend/src/views/Dashboard.vue +++ b/frontend/src/views/Home.vue @@ -1,8 +1,8 @@ - - - - diff --git a/frontend/src/views/EmulatorJS/Base.vue b/frontend/src/views/Player/EmulatorJS/Base.vue similarity index 99% rename from frontend/src/views/EmulatorJS/Base.vue rename to frontend/src/views/Player/EmulatorJS/Base.vue index 954aab42c..a4dfa4dcb 100644 --- a/frontend/src/views/EmulatorJS/Base.vue +++ b/frontend/src/views/Player/EmulatorJS/Base.vue @@ -6,7 +6,7 @@ import romApi from "@/services/api/rom"; import storeGalleryView from "@/stores/galleryView"; import type { DetailedRom } from "@/stores/roms"; import { formatBytes, formatTimestamp, getSupportedEJSCores } from "@/utils"; -import Player from "@/views/EmulatorJS/Player.vue"; +import Player from "@/views/Player/EmulatorJS/Player.vue"; import { isNull } from "lodash"; import { storeToRefs } from "pinia"; import { onMounted, ref } from "vue"; diff --git a/frontend/src/views/EmulatorJS/Player.vue b/frontend/src/views/Player/EmulatorJS/Player.vue similarity index 100% rename from frontend/src/views/EmulatorJS/Player.vue rename to frontend/src/views/Player/EmulatorJS/Player.vue diff --git a/frontend/src/views/RuffleRS/Base.vue b/frontend/src/views/Player/RuffleRS/Base.vue similarity index 100% rename from frontend/src/views/RuffleRS/Base.vue rename to frontend/src/views/Player/RuffleRS/Base.vue diff --git a/frontend/src/views/Administration.vue b/frontend/src/views/Settings/Administration.vue similarity index 100% rename from frontend/src/views/Administration.vue rename to frontend/src/views/Settings/Administration.vue diff --git a/frontend/src/views/Management.vue b/frontend/src/views/Settings/Management.vue similarity index 100% rename from frontend/src/views/Management.vue rename to frontend/src/views/Settings/Management.vue diff --git a/frontend/src/views/UI.vue b/frontend/src/views/Settings/UserInterface.vue similarity index 100% rename from frontend/src/views/UI.vue rename to frontend/src/views/Settings/UserInterface.vue diff --git a/frontend/src/views/Setup.vue b/frontend/src/views/Setup.vue deleted file mode 100644 index efb0e616e..000000000 --- a/frontend/src/views/Setup.vue +++ /dev/null @@ -1,238 +0,0 @@ - - - - - From c3e78cbc2150186c0d68b87ca61b72e30b579f10 Mon Sep 17 00:00:00 2001 From: zurdi Date: Thu, 5 Dec 2024 00:27:51 +0000 Subject: [PATCH 12/49] refactor: swap login and setup routes and update settings layout paths --- frontend/src/plugins/router.ts | 39 ++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/frontend/src/plugins/router.ts b/frontend/src/plugins/router.ts index 1ca6fe4e1..86fea5f7d 100644 --- a/frontend/src/plugins/router.ts +++ b/frontend/src/plugins/router.ts @@ -4,26 +4,26 @@ import storeHeartbeat from "@/stores/heartbeat"; const routes = [ { - path: "/login", - name: "loginView", + path: "/setup", + name: "setupView", component: () => import("@/layouts/Auth.vue"), children: [ { path: "", - name: "login", - component: () => import("@/views/Auth/Login.vue"), + name: "setup", + component: () => import("@/views/Auth/Setup.vue"), }, ], }, { - path: "/setup", - name: "setupView", + path: "/login", + name: "loginView", component: () => import("@/layouts/Auth.vue"), children: [ { path: "", - name: "setup", - component: () => import("@/views/Auth/Setup.vue"), + name: "login", + component: () => import("@/views/Auth/Login.vue"), }, ], }, @@ -68,22 +68,33 @@ const routes = [ component: () => import("@/views/Scan.vue"), }, { - path: "settings", - name: "settings", + path: "/ui", component: () => import("@/layouts/Settings.vue"), children: [ { - path: "ui", + path: "", name: "ui", - component: () => import("@/views/UI.vue"), + component: () => import("@/views/Settings/UserInterface.vue"), }, + ], + }, + { + path: "/management", + component: () => import("@/layouts/Settings.vue"), + children: [ { - path: "management", + path: "", name: "management", component: () => import("@/views/Settings/Management.vue"), }, + ], + }, + { + path: "/administration", + component: () => import("@/layouts/Settings.vue"), + children: [ { - path: "administration", + path: "", name: "administration", component: () => import("@/views/Settings/Administration.vue"), }, From 6892a7f3e1b0da7c8c2cf92dbae7b3296b142ac9 Mon Sep 17 00:00:00 2001 From: zurdi Date: Thu, 5 Dec 2024 00:28:25 +0000 Subject: [PATCH 13/49] refactor: clean up template structure and improve alignment in rows with different aspect ratio covers --- frontend/src/components/Home/Recent.vue | 2 +- .../common/Game/Dialog/MatchRom.vue | 2 +- frontend/src/views/Auth/Login.vue | 22 ++++------ frontend/src/views/Auth/Setup.vue | 42 +++++++++---------- frontend/src/views/Gallery/Collection.vue | 6 +-- frontend/src/views/Gallery/Platform.vue | 6 +-- frontend/src/views/GameDetails.vue | 4 +- 7 files changed, 36 insertions(+), 48 deletions(-) diff --git a/frontend/src/components/Home/Recent.vue b/frontend/src/components/Home/Recent.vue index e88d528a3..51c7bb71c 100644 --- a/frontend/src/components/Home/Recent.vue +++ b/frontend/src/components/Home/Recent.vue @@ -27,7 +27,7 @@ function onGameClick(emitData: { rom: SimpleRom; event: MouseEvent }) {