@xleddyl/nuxt-cms 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/runtime/app/components/cms/BlocksField.vue +2 -3
- package/dist/runtime/app/components/cms/EntryForm.vue +2 -3
- package/dist/runtime/app/components/cms/LocaleSwitch.vue +6 -22
- package/dist/runtime/app/components/cms/SettingsEntryActions.vue +0 -2
- package/dist/runtime/app/components/cms/SettingsSite.vue +1 -1
- package/dist/runtime/app/components/cms/StatusBadge.vue +0 -1
- package/dist/runtime/app/components/cms/TranslationBadges.vue +0 -1
- package/dist/runtime/app/components/cms/VisualEditor.vue +3 -5
- package/dist/runtime/app/pages/admin-content.vue +2 -2
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -221,8 +221,7 @@
|
|
|
221
221
|
<KFormField
|
|
222
222
|
:name="editorFieldName(blockKey)"
|
|
223
223
|
:label="editorBlock.fields[blockKey].label"
|
|
224
|
-
:
|
|
225
|
-
:icon="cmsIcon(fieldIcon(editorBlock.fields[blockKey]))"
|
|
224
|
+
:help="editorBlock.fields[blockKey].description"
|
|
226
225
|
:required="editorBlock.fields[blockKey].required"
|
|
227
226
|
>
|
|
228
227
|
<CmsFieldInput
|
|
@@ -357,7 +356,7 @@ import { useCmsRuntime } from "../../composables/cms-runtime";
|
|
|
357
356
|
import { useCmsOverlayFlag } from "../../composables/cms-route";
|
|
358
357
|
import { CMS_BLOCK_EDITOR, CmsBlockEditorProvider } from "../../utils/block-editor";
|
|
359
358
|
import { clipboardTarget } from "../../utils/keyboard";
|
|
360
|
-
import { cmsIcon
|
|
359
|
+
import { cmsIcon } from "../../utils/ui";
|
|
361
360
|
const props = defineProps({
|
|
362
361
|
field: { type: Object, required: true },
|
|
363
362
|
locale: { type: String, required: false },
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
<KFormField
|
|
14
14
|
:name="key"
|
|
15
15
|
:label="fields[key].label"
|
|
16
|
-
:
|
|
17
|
-
:icon="cmsIcon(fieldIcon(fields[key]))"
|
|
16
|
+
:help="fields[key].description"
|
|
18
17
|
:required="fields[key].required"
|
|
19
18
|
:disabled="locked.includes(key) || void 0"
|
|
20
19
|
:highlight="highlighted === key"
|
|
@@ -68,7 +67,7 @@ import { useCmsEntryForm } from "../../composables/cms-entry-form";
|
|
|
68
67
|
import { useCmsPageQuery } from "../../composables/cms-route";
|
|
69
68
|
import { useCmsRuntime } from "../../composables/cms-runtime";
|
|
70
69
|
import { entryFormLayout, useCmsSettingsState } from "../../composables/cms-settings";
|
|
71
|
-
import { cmsIcon
|
|
70
|
+
import { cmsIcon } from "../../utils/ui";
|
|
72
71
|
const props = defineProps({
|
|
73
72
|
fields: { type: Object, required: true },
|
|
74
73
|
tabs: { type: Array, required: false },
|
|
@@ -20,11 +20,6 @@ const props = defineProps({
|
|
|
20
20
|
});
|
|
21
21
|
const model = defineModel({ type: String, ...{ required: true } });
|
|
22
22
|
const { i18n } = useCmsRuntime();
|
|
23
|
-
function stateOf(locale) {
|
|
24
|
-
const progress = props.progress?.[locale];
|
|
25
|
-
if (locale === i18n.defaultLocale || !progress?.total) return null;
|
|
26
|
-
return progress.state;
|
|
27
|
-
}
|
|
28
23
|
function titleOf(locale) {
|
|
29
24
|
const progress = props.progress?.[locale];
|
|
30
25
|
if (!progress) return void 0;
|
|
@@ -34,23 +29,12 @@ function titleOf(locale) {
|
|
|
34
29
|
if (!progress.total) return progress.values ? void 0 : `${locale}: empty`;
|
|
35
30
|
return `${locale}: ${translationSummary(progress)}`;
|
|
36
31
|
}
|
|
37
|
-
const DOT_TONES = {
|
|
38
|
-
complete: "success",
|
|
39
|
-
partial: "warning",
|
|
40
|
-
missing: "danger"
|
|
41
|
-
};
|
|
42
32
|
const options = computed(
|
|
43
|
-
() => i18n.locales.map((locale) => {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
muted: !!props.progress && !props.progress[locale]?.values,
|
|
50
|
-
dot: !!state,
|
|
51
|
-
dotTone: state ? DOT_TONES[state] : void 0,
|
|
52
|
-
dotLabel: state ? titleOf(locale) : void 0
|
|
53
|
-
};
|
|
54
|
-
})
|
|
33
|
+
() => i18n.locales.map((locale) => ({
|
|
34
|
+
value: locale,
|
|
35
|
+
label: locale,
|
|
36
|
+
title: titleOf(locale),
|
|
37
|
+
muted: !!props.progress && !props.progress[locale]?.values
|
|
38
|
+
}))
|
|
55
39
|
);
|
|
56
40
|
</script>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<KFormField
|
|
23
23
|
label="Title template"
|
|
24
24
|
name="titleTemplate"
|
|
25
|
-
:
|
|
25
|
+
:help="`${TITLE_PLACEHOLDER} is the page title, ${SITE_NAME_PLACEHOLDER} the site name.`"
|
|
26
26
|
>
|
|
27
27
|
<KInput v-model="titleTemplate" :placeholder="DEFAULT_TITLE_TEMPLATE" />
|
|
28
28
|
</KFormField>
|
|
@@ -229,8 +229,7 @@
|
|
|
229
229
|
<KFormField
|
|
230
230
|
:name="`${selectedName}.${blockKey}`"
|
|
231
231
|
:label="selectedBlock.fields[blockKey].label"
|
|
232
|
-
:
|
|
233
|
-
:icon="cmsIcon(fieldIcon(selectedBlock.fields[blockKey]))"
|
|
232
|
+
:help="selectedBlock.fields[blockKey].description"
|
|
234
233
|
:required="selectedBlock.fields[blockKey].required"
|
|
235
234
|
:highlight="highlighted === blockKey"
|
|
236
235
|
>
|
|
@@ -278,8 +277,7 @@
|
|
|
278
277
|
<KFormField
|
|
279
278
|
:name="key"
|
|
280
279
|
:label="fields[key].label"
|
|
281
|
-
:
|
|
282
|
-
:icon="cmsIcon(fieldIcon(fields[key]))"
|
|
280
|
+
:help="fields[key].description"
|
|
283
281
|
:required="fields[key].required"
|
|
284
282
|
:disabled="locked?.includes(key) || void 0"
|
|
285
283
|
:highlight="highlighted === key"
|
|
@@ -442,7 +440,7 @@ import {
|
|
|
442
440
|
onApplePlatform,
|
|
443
441
|
shortcutTarget
|
|
444
442
|
} from "../../utils/keyboard";
|
|
445
|
-
import { cmsIcon
|
|
443
|
+
import { cmsIcon } from "../../utils/ui";
|
|
446
444
|
const SEO_KEYS = ["seoTitle", "seoDescription", "seoImage", "seoNoindex"];
|
|
447
445
|
const deviceOptions = [
|
|
448
446
|
{ value: "desktop", label: "Desktop width", icon: cmsIcon("computer-desktop") },
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
<template #status>
|
|
29
29
|
<CmsStatusBadge :published="published" :scheduled="scheduled" :at="scheduledAt" />
|
|
30
|
-
<KBadge v-if="dirty" label="Unsaved changes" tone="warning"
|
|
30
|
+
<KBadge v-if="dirty" label="Unsaved changes" tone="warning" />
|
|
31
31
|
<KTooltip v-if="lock" :text="lock">
|
|
32
32
|
<KBadge size="sm" variant="outline" label="Read only" />
|
|
33
33
|
</KTooltip>
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
<KStack gap="md">
|
|
85
85
|
<KFormField
|
|
86
86
|
label="Publish at"
|
|
87
|
-
|
|
87
|
+
help="The item stays hidden from the site until this moment."
|
|
88
88
|
>
|
|
89
89
|
<CmsFieldInput v-model="scheduleDraft" :field="publishedAtField" />
|
|
90
90
|
</KFormField>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xleddyl/nuxt-cms",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "Lightweight CMS that ships with your Nuxt app: runs on the Nitro server, content types defined in code, /cms admin panel, GraphQL API, SQLite or Postgres. No external CMS needed!",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Edoardo Alberti (https://github.com/xleddyl)",
|