From 795414ef71da995d293de6d99f022620205ff31f Mon Sep 17 00:00:00 2001 From: NGPixel Date: Tue, 8 Sep 2026 19:45:11 -0400 Subject: [PATCH] fix: meta title missing translation + missing props on duplicate + tags ordering --- .../src/components/PageHistoryOverlay.vue | 15 +-- frontend/src/components/PageTags.vue | 20 +++- frontend/src/components/WelcomeOverlay.vue | 4 +- frontend/src/composables/meta.js | 23 ++-- frontend/src/helpers/pageVersions.js | 74 +++++++++++- frontend/src/pages/AdminApi.vue | 4 +- frontend/src/pages/AdminApprovals.vue | 4 +- frontend/src/pages/AdminAudit.vue | 4 +- frontend/src/pages/AdminAuth.vue | 4 +- frontend/src/pages/AdminBlocks.vue | 4 +- frontend/src/pages/AdminDashboard.vue | 4 +- frontend/src/pages/AdminEditors.vue | 4 +- frontend/src/pages/AdminExtensions.vue | 4 +- frontend/src/pages/AdminFlags.vue | 4 +- frontend/src/pages/AdminGeneral.vue | 4 +- frontend/src/pages/AdminGroups.vue | 4 +- frontend/src/pages/AdminIcons.vue | 4 +- frontend/src/pages/AdminInstances.vue | 4 +- frontend/src/pages/AdminLocale.vue | 4 +- frontend/src/pages/AdminLogin.vue | 4 +- frontend/src/pages/AdminMail.vue | 4 +- frontend/src/pages/AdminMcp.vue | 4 +- frontend/src/pages/AdminMetrics.vue | 4 +- frontend/src/pages/AdminNavigation.vue | 4 +- frontend/src/pages/AdminRendering.vue | 4 +- frontend/src/pages/AdminScheduler.vue | 4 +- frontend/src/pages/AdminSearch.vue | 4 +- frontend/src/pages/AdminSecurity.vue | 4 +- frontend/src/pages/AdminSites.vue | 4 +- frontend/src/pages/AdminStorage.vue | 4 +- frontend/src/pages/AdminSystem.vue | 4 +- frontend/src/pages/AdminTerminal.vue | 4 +- frontend/src/pages/AdminTheme.vue | 4 +- frontend/src/pages/AdminUsers.vue | 4 +- frontend/src/pages/AdminUtilities.vue | 4 +- frontend/src/pages/AdminWebhooks.vue | 4 +- frontend/src/pages/ErrorGeneric.vue | 4 +- frontend/src/pages/InboxMessages.vue | 4 +- frontend/src/pages/InboxReview.vue | 4 +- frontend/src/pages/InboxWatching.vue | 4 +- frontend/src/pages/Login.vue | 4 +- frontend/src/pages/PageVersion.vue | 10 +- frontend/src/pages/ProfileAuth.vue | 4 +- frontend/src/pages/ProfileAvatar.vue | 4 +- frontend/src/pages/ProfileGroups.vue | 4 +- frontend/src/pages/ProfileInfo.vue | 4 +- frontend/src/pages/Search.vue | 11 +- frontend/src/stores/page.js | 113 ++++++++++++++++-- 48 files changed, 309 insertions(+), 121 deletions(-) diff --git a/frontend/src/components/PageHistoryOverlay.vue b/frontend/src/components/PageHistoryOverlay.vue index 5ee259bc4..ebaae4fd4 100644 --- a/frontend/src/components/PageHistoryOverlay.vue +++ b/frontend/src/components/PageHistoryOverlay.vue @@ -264,7 +264,12 @@ import { useI18n } from 'vue-i18n' import { useRouter } from 'vue-router' import * as monaco from 'monaco-editor' -import { renderVersionSource, saveVersionSource, versionContentType } from '@/helpers/pageVersions' +import { + renderVersionSource, + saveVersionSource, + versionContentType, + versionPageProps +} from '@/helpers/pageVersions' import { confirm, dialog } from '@/composables/dialog' import { notify } from '@/composables/notify' @@ -627,18 +632,14 @@ function branchFrom(version) { const content = full.content ?? '' const resp = await API_CLIENT.post(`sites/${siteStore.id}/pages`, { json: { + // -> Everything the page was, as far as a new page may be given it; see `versionPageProps` + ...versionPageProps(full), path: target.path, title: target.title, locale: pageStore.locale, editor: full.meta?.editor || pageStore.editor, content, render: await renderOf(full), - description: full.meta?.description ?? '', - icon: full.meta?.icon ?? '', - tags: full.meta?.tags ?? [], - // -> A version that was scheduled carries dates this new page has not got, and the API - // rightly refuses that combination - publishState: full.meta?.publishState === 'published' ? 'published' : 'draft', reasonForChange: t('history.branchReason', { date: humanizeDate(full.versionDate) }) } }).json() diff --git a/frontend/src/components/PageTags.vue b/frontend/src/components/PageTags.vue index 05984b362..64045dcdd 100644 --- a/frontend/src/components/PageTags.vue +++ b/frontend/src/components/PageTags.vue @@ -30,7 +30,7 @@ v-if="props.edit" outlined v-model="pageStore.tags" - :options="state.tags" + :options="sortedTags" dense options-dense use-input @@ -45,7 +45,7 @@ diff --git a/frontend/src/pages/InboxReview.vue b/frontend/src/pages/InboxReview.vue index 04d4f6748..3d76f8a43 100644 --- a/frontend/src/pages/InboxReview.vue +++ b/frontend/src/pages/InboxReview.vue @@ -178,9 +178,9 @@ const { t } = useI18n() // META -useMeta({ +useMeta(() => ({ title: t('inbox.pendingReview') -}) +})) // DATA diff --git a/frontend/src/pages/InboxWatching.vue b/frontend/src/pages/InboxWatching.vue index b8427fa78..e5faafba3 100644 --- a/frontend/src/pages/InboxWatching.vue +++ b/frontend/src/pages/InboxWatching.vue @@ -93,9 +93,9 @@ const { t } = useI18n() // META -useMeta({ +useMeta(() => ({ title: t('inbox.watching') -}) +})) // DATA diff --git a/frontend/src/pages/Login.vue b/frontend/src/pages/Login.vue index f9728f035..2f55d0e36 100644 --- a/frontend/src/pages/Login.vue +++ b/frontend/src/pages/Login.vue @@ -30,9 +30,9 @@ const { t } = useI18n() // META -useMeta({ +useMeta(() => ({ title: t('auth.login.title') -}) +}))