feat: editor language menu, title field, header actions, publish dialogs, read-only rendering and draft recovery

This commit is contained in:
Florian Sylvain committed 2026-11-02 17:13:14 +01:00
1 parent a671b81f80
commit 339e646eb8
85 files changed
+6369 -624

No files matched your search

+9 -4
View File
@@ -7,7 +7,7 @@ import { useLocalizedToast } from '@/i18n/presentation'
import type { Article } from '@/composables/useArticles'
import { bodyImageCount } from '@/lib/bodyImageIds'
const props = defineProps<{ article: Article }>()
const props = defineProps<{ article: Article; multilingual?: boolean }>()
const emit = defineEmits<{ 'copy-url': [] }>()
@@ -15,8 +15,13 @@ const toast = useLocalizedToast()
const open = defineModel<boolean>('open', { default: false })
const TITLE_NOTE =
"Titles can't be changed after an article is created. To use a different title, create a new article and delete this one."
const titleNote = computed(() =>
props.multilingual
? t(
"Each language has its own title. Changing it doesn't change the URL; edit the slug in Search and sharing.",
)
: t("Changing the title doesn't change the URL; edit the slug in Search and sharing."),
)
const MONTH_NAMES = [
'Jan',
@@ -141,7 +146,7 @@ async function copyUrl() {
</div>
<div class="flex flex-col gap-1 border-t border-default pt-3 text-sm">
<p class="text-muted">{{ t('Title') }}</p>
<p class="text-xs/[18px] text-toned">{{ t(TITLE_NOTE) }}</p>
<p class="text-xs/[18px] text-toned">{{ titleNote }}</p>
</div>
</UCard>