Lang settings tab: flag-grid language picker, bootstrap es+zh targets

- New editor-shell tab (lang): translatable languages as clickable flag
  tiles (shared langs.js mapping of the 28 Seed-X languages to flags),
  saved via the settings round-trip; translator service URL(s) shown.
- Bootstrap seeds translate_langs with Spanish and Chinese (the original
  language is never a target).
- GET /_api/settings also returns primary_lang.
- PageEditor's flag/name helpers move to the shared langs.js.
This commit is contained in:
2026-09-02 20:27:37 +00:00
parent 4c886eda86
commit b1e8f0b454
7 changed files with 266 additions and 27 deletions
+4 -2
View File
@@ -7,6 +7,7 @@ import PageEditor from './PageEditor.vue'
import BannerEditor from './BannerEditor.vue'
import SiteEditor from './SiteEditor.vue'
import StructureEditor from './StructureEditor.vue'
import LocalizationEditor from './LocalizationEditor.vue'
const props = defineProps({
pagePath: { type: String, default: '' },
@@ -17,11 +18,12 @@ const emit = defineEmits(['close'])
const currentPath = ref(props.pagePath)
const activeMode = ref(props.initialMode)
// Tab order: site-wide settings first (site, structure), then — after a
// visual break — the per-page editors (article, banner).
// Tab order: site-wide settings first (site, structure, localization), then
// — after a visual break — the per-page editors (article, banner).
const MODES = [
{ key: 'site', label: 'site', component: SiteEditor },
{ key: 'structure', label: 'structure', component: StructureEditor },
{ key: 'localization', label: 'lang', component: LocalizationEditor },
{ key: 'page', label: 'article', component: PageEditor, breakBefore: true },
{ key: 'banner', label: 'banner', component: BannerEditor },
]