From 064e378b48bfda8963d919d7adb72a3591dfb2d3 Mon Sep 17 00:00:00 2001 From: NGPixel Date: Tue, 28 Jul 2026 21:43:46 -0400 Subject: [PATCH] refactor: various UI fixes --- backend/api/schemas/site.ts | 5 + backend/api/sites.ts | 7 +- backend/locales/en.json | 18 +- backend/models/sites.ts | 6 +- frontend/.gitignore | 2 +- frontend/package-lock.json | 31 +- frontend/package.json | 3 - frontend/src/components/AccountMenu.vue | 15 +- frontend/src/components/FileManager.vue | 174 ++++-- frontend/src/components/GroupCreateDialog.vue | 7 +- frontend/src/components/HeaderNav.vue | 2 +- frontend/src/components/IconPickerDialog.vue | 81 +-- frontend/src/components/NavEditOverlay.vue | 82 +-- frontend/src/components/PageActionsCol.vue | 47 +- frontend/src/components/PageDataDialog.vue | 21 +- .../src/components/PagePropertiesDialog.vue | 152 +++-- .../src/components/PageRelationDialog.vue | 109 ++-- frontend/src/components/PageScriptsDialog.vue | 48 +- frontend/src/components/SideDialog.vue | 62 +- frontend/src/components/SiteCreateDialog.vue | 7 +- frontend/src/components/TreeBrowserDialog.vue | 8 +- frontend/src/components/TreeNav.vue | 12 +- frontend/src/components/UserCreateDialog.vue | 18 +- frontend/src/components/UserEditOverlay.vue | 242 ++++---- frontend/src/components/UtilCodeEditor.vue | 542 +++++++++++++++--- frontend/src/components/shared/WAvatar.vue | 12 +- frontend/src/components/shared/WBadge.vue | 9 +- frontend/src/components/shared/WCard.vue | 10 +- .../src/components/shared/WCardSection.vue | 12 +- frontend/src/components/shared/WCheckbox.vue | 105 +++- frontend/src/components/shared/WChip.vue | 43 +- frontend/src/components/shared/WDialog.vue | 30 +- frontend/src/components/shared/WDrawer.vue | 112 +++- frontend/src/components/shared/WForm.vue | 11 +- frontend/src/components/shared/WIcon.vue | 27 +- frontend/src/components/shared/WInput.vue | 117 +++- frontend/src/components/shared/WSelect.vue | 97 +++- frontend/src/components/shared/WTable.vue | 11 +- frontend/src/components/shared/WTooltip.vue | 7 +- frontend/src/composables/dialog.js | 26 +- frontend/src/css/_base.scss | 20 +- frontend/src/css/tailwind.css | 173 ++++++ frontend/src/layouts/AdminLayout.vue | 14 +- frontend/src/layouts/MainLayout.vue | 46 +- frontend/src/layouts/ProfileLayout.vue | 12 +- frontend/src/pages/AdminDashboard.vue | 6 +- frontend/src/pages/AdminFlags.vue | 2 +- frontend/src/pages/AdminGroups.vue | 16 +- frontend/src/pages/AdminIcons.vue | 2 +- frontend/src/pages/AdminLocale.vue | 16 +- frontend/src/pages/AdminLogin.vue | 2 +- frontend/src/pages/AdminMail.vue | 2 +- frontend/src/pages/AdminScheduler.vue | 15 +- frontend/src/pages/AdminSearch.vue | 5 +- frontend/src/pages/AdminSecurity.vue | 4 +- frontend/src/pages/AdminSites.vue | 7 +- frontend/src/pages/AdminSystem.vue | 7 +- frontend/src/pages/AdminTheme.vue | 27 +- frontend/src/pages/AdminUsers.vue | 18 +- frontend/src/pages/ProfileAuth.vue | 4 +- frontend/src/pages/ProfileAvatar.vue | 2 +- frontend/src/pages/ProfileGroups.vue | 2 +- frontend/src/pages/ProfileInfo.vue | 8 +- frontend/src/pages/Search.vue | 73 ++- frontend/src/stores/site.js | 44 +- 65 files changed, 2156 insertions(+), 701 deletions(-) diff --git a/backend/api/schemas/site.ts b/backend/api/schemas/site.ts index 567cf679c..39674bfa9 100644 --- a/backend/api/schemas/site.ts +++ b/backend/api/schemas/site.ts @@ -186,6 +186,11 @@ export async function registerSchemas(app: FastifyInstance): Promise { }, forcePrefix: { type: 'boolean' + }, + showMenu: { + type: 'boolean', + description: + 'Whether the sidebar offers a locale selector to switch between the active locales.' } } }, diff --git a/backend/api/sites.ts b/backend/api/sites.ts index 5229905d2..9437cabf3 100644 --- a/backend/api/sites.ts +++ b/backend/api/sites.ts @@ -253,7 +253,12 @@ async function routes(app: FastifyInstance) { defaults?: Record editors?: Record }> features?: Record - locales?: { primary?: string; active?: string[]; forcePrefix?: boolean } + locales?: { + primary?: string + active?: string[] + forcePrefix?: boolean + showMenu?: boolean + } robots?: Record theme?: Record uploads?: Record diff --git a/backend/locales/en.json b/backend/locales/en.json index a53a0964b..d5d399187 100644 --- a/backend/locales/en.json +++ b/backend/locales/en.json @@ -480,6 +480,8 @@ "admin.locale.rtl": "RTL", "admin.locale.saveSuccess": "Locale settings saved successfully.", "admin.locale.settings": "Locale Settings", + "admin.locale.showMenu": "Show Locale Menu", + "admin.locale.showMenuHint": "Display a locale selector in the sidebar, so visitors can switch to another active locale.", "admin.locale.sideload": "Sideload Locale Package", "admin.locale.sideloadHelp": "If you are not connected to the internet or cannot download locale files using the method above, you can instead sideload packages manually by uploading them below.", "admin.locale.subtitle": "Set localization options for your wiki", @@ -1862,12 +1864,14 @@ "history.restore.confirmTitle": "Restore page version?", "history.restore.success": "Page version restored succesfully!", "iconPicker.allSets": "All sets", - "iconPicker.custom": "Custom", - "iconPicker.customHint": "Any other icon reference, such as a webfont name (las la-home) or an image URL (img:/path/to/icon.svg).", "iconPicker.icons": "Icons", + "iconPicker.image": "Image", + "iconPicker.imageHint": "Use an image instead of an icon. Enter the path of an image hosted on this wiki, or the full URL of one hosted elsewhere.", + "iconPicker.imageSizeHint": "A square image with a transparent background works best, as it is scaled down to icon size.", + "iconPicker.imageUrl": "Image path or URL", "iconPicker.materializeFailed": "Could not store {icon} for offline use.", "iconPicker.noResults": "No icon matches your search.", - "iconPicker.reference": "Icon reference", + "iconPicker.open": "Open Icon Picker...", "iconPicker.search": "Search icons...", "iconPicker.searchFailed": "Icon search failed.", "iconPicker.searchHint": "Type at least 2 characters to search icons.", @@ -1907,17 +1911,17 @@ "pageDeleteDialog.title": "Confirm Page Deletion", "pageDuplicateDialog.title": "Duplicate and Save As...", "pageRenameDialog.title": "Rename / Move to...", - "pageSource.notFound": "This page does not exist.", - "pageSource.title": "Page Source", - "pageSource.unavailable": "You do not have permission to view the source of this page.", "pageSaveDialog.displayModePath": "Browse Using Paths", "pageSaveDialog.displayModeTitle": "Browse Using Titles", "pageSaveDialog.loadFailed": "Failed to load folder tree.", + "pageSaveDialog.pageTitle": "Page Title", "pageSaveDialog.pathInvalid": "Invalid Characters in Page Path Name. Lowercase alphanumerical and hyphen characters only.", "pageSaveDialog.pathName": "Path Name", - "pageSaveDialog.pageTitle": "Page Title", "pageSaveDialog.title": "Save As...", "pageSaveDialog.titleMissing": "Missing Page Title", + "pageSource.notFound": "This page does not exist.", + "pageSource.title": "Page Source", + "pageSource.unavailable": "You do not have permission to view the source of this page.", "profile.accessibility": "Accessibility", "profile.activity": "Activity", "profile.appearance": "Site Appearance", diff --git a/backend/models/sites.ts b/backend/models/sites.ts index 865ada893..ffcdc474d 100644 --- a/backend/models/sites.ts +++ b/backend/models/sites.ts @@ -111,7 +111,8 @@ class Sites { locales: { primary: 'en', active: ['en'], - forcePrefix: false + forcePrefix: false, + showMenu: true }, assets: { logo: false, @@ -307,7 +308,8 @@ class Sites { locales: { primary: 'en', active: ['en'], - forcePrefix: false + forcePrefix: false, + showMenu: true }, assets: { logo: false, diff --git a/frontend/.gitignore b/frontend/.gitignore index d9c11d24a..6a779e185 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -42,4 +42,4 @@ yarn-error.log* !.yarn/versions # Throwaway browser harness for verifying components/shared during the Quasar -> Tailwind migration -.harness/dist +.harness diff --git a/frontend/package-lock.json b/frontend/package-lock.json index d0119bd3d..bc09def13 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -8,8 +8,6 @@ "name": "wiki-ux", "version": "3.0.0", "dependencies": { - "@lezer/common": "1.5.2", - "@mdi/font": "7.4.47", "@quasar/extras": "2.0.1", "@simplewebauthn/browser": "13.3.0", "@tailwindcss/vite": "4.3.3", @@ -17,8 +15,6 @@ "@xterm/xterm": "6.0.0", "browser-fs-access": "0.38.0", "clipboard": "2.0.11", - "codemirror": "5.65.11", - "codemirror-asciidoc": "1.0.4", "dependency-graph": "1.0.0", "es-toolkit": "1.50.0", "filesize": "11.0.17", @@ -1683,18 +1679,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@lezer/common": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.5.2.tgz", - "integrity": "sha512-sxQE460fPZyU3sdc8lafxiPwJHBzZRy/udNFynGQky1SePYBdhkBl1kOagA9uT3pxR8K09bOrmTUqA9wb/PjSQ==", - "license": "MIT" - }, - "node_modules/@mdi/font": { - "version": "7.4.47", - "resolved": "https://registry.npmjs.org/@mdi/font/-/font-7.4.47.tgz", - "integrity": "sha512-43MtGpd585SNzHZPcYowu/84Vz2a2g31TvPMTm9uTiCSWzaheQySUcSyUH/46fPnuPQWof2yd0pGBtzee/IQWw==", - "license": "Apache-2.0" - }, "node_modules/@napi-rs/wasm-runtime": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.6.tgz", @@ -4320,18 +4304,6 @@ "tiny-emitter": "^2.0.0" } }, - "node_modules/codemirror": { - "version": "5.65.11", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.11.tgz", - "integrity": "sha512-Gp62g2eKSCHYt10axmGhKq3WoJSvVpvhXmowNq7pZdRVowwtvBR/hi2LSP5srtctKkRT33T6/n8Kv1UGp7JW4A==", - "license": "MIT" - }, - "node_modules/codemirror-asciidoc": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/codemirror-asciidoc/-/codemirror-asciidoc-1.0.4.tgz", - "integrity": "sha512-U+G8+ToPONYFGkwTprxpFzV6EV1bCA9zChAA8uT2YAnKFn357JMWL2VkdIPy2yP5N/X13GzslMOGaAk1UNE3rA==", - "license": "BSD" - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -5284,7 +5256,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, + "dev": true, "license": "MIT", "peer": true, "engines": { @@ -7496,6 +7468,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, "license": "BSD-3-Clause", "optional": true, "engines": { diff --git a/frontend/package.json b/frontend/package.json index 8c3ccb815..5f791a9cf 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -15,7 +15,6 @@ "icons:check": "node scripts/generate-icons.mjs --check" }, "dependencies": { - "@lezer/common": "1.5.2", "@quasar/extras": "2.0.1", "@simplewebauthn/browser": "13.3.0", "@tailwindcss/vite": "4.3.3", @@ -23,8 +22,6 @@ "@xterm/xterm": "6.0.0", "browser-fs-access": "0.38.0", "clipboard": "2.0.11", - "codemirror": "5.65.11", - "codemirror-asciidoc": "1.0.4", "dependency-graph": "1.0.0", "es-toolkit": "1.50.0", "filesize": "11.0.17", diff --git a/frontend/src/components/AccountMenu.vue b/frontend/src/components/AccountMenu.vue index 479a78a2a..1aec9718b 100644 --- a/frontend/src/components/AccountMenu.vue +++ b/frontend/src/components/AccountMenu.vue @@ -1,12 +1,17 @@