cinqcinqdev-seo 0.1.36 → 0.1.37
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
CHANGED
|
@@ -31,7 +31,7 @@ const isSaving = ref(false);
|
|
|
31
31
|
const isUploading = ref(false);
|
|
32
32
|
const showAddModal = ref(false);
|
|
33
33
|
const sectionSearch = ref("");
|
|
34
|
-
const selectedFieldGroup = ref("
|
|
34
|
+
const selectedFieldGroup = ref("contenu");
|
|
35
35
|
const SECTION_GROUPS = [
|
|
36
36
|
{ label: "Hero", icon: "\u26A1", types: ["HeroSection", "BlogHero"] },
|
|
37
37
|
{ label: "Content", icon: "\u{1F4DD}", types: ["TextVisual", "RichText", "Quote"] },
|
|
@@ -165,16 +165,19 @@ const seoTree = computed(() => {
|
|
|
165
165
|
const selectedCMSConfig = computed(
|
|
166
166
|
() => selectedBlockIndex.value !== null ? CMS_COMPONENTS[page.value?.content[selectedBlockIndex.value]?.type] : null
|
|
167
167
|
);
|
|
168
|
+
const CONTENT_FIELD_TYPES = ["text", "textarea", "image", "list"];
|
|
168
169
|
const visibleFields = computed(() => {
|
|
169
170
|
const cfg = selectedCMSConfig.value;
|
|
170
171
|
if (!cfg?.fields) return {};
|
|
171
|
-
if (!cfg.groups) return cfg.fields;
|
|
172
172
|
return Object.fromEntries(
|
|
173
|
-
Object.entries(cfg.fields).filter(([, f]) =>
|
|
173
|
+
Object.entries(cfg.fields).filter(([, f]) => {
|
|
174
|
+
const isContent = CONTENT_FIELD_TYPES.includes(f.type);
|
|
175
|
+
return selectedFieldGroup.value === "contenu" ? isContent : !isContent;
|
|
176
|
+
})
|
|
174
177
|
);
|
|
175
178
|
});
|
|
176
179
|
watch(selectedBlockIndex, (newVal) => {
|
|
177
|
-
selectedFieldGroup.value =
|
|
180
|
+
selectedFieldGroup.value = "contenu";
|
|
178
181
|
rightPanelMode.value = newVal !== null && !page.value?.content_locked ? "block" : "seo";
|
|
179
182
|
showDiff.value = newVal !== null && blockDiffs.value.has(newVal);
|
|
180
183
|
});
|
|
@@ -613,15 +616,21 @@ const savePage = async () => {
|
|
|
613
616
|
</div>
|
|
614
617
|
</div>
|
|
615
618
|
|
|
616
|
-
<!-- Group tabs -->
|
|
617
|
-
<div
|
|
618
|
-
<button
|
|
619
|
-
|
|
619
|
+
<!-- Group tabs: Contenu / Style -->
|
|
620
|
+
<div class="flex gap-1 bg-gray-100 p-1 rounded-xl mb-6">
|
|
621
|
+
<button @click="selectedFieldGroup = 'contenu'"
|
|
622
|
+
:class="[
|
|
623
|
+
'flex-1 py-2 text-[8px] font-black uppercase tracking-widest rounded-lg transition-all',
|
|
624
|
+
selectedFieldGroup === 'contenu' ? 'bg-white shadow text-[#3d35ff]' : 'text-gray-400 hover:text-gray-600'
|
|
625
|
+
]">
|
|
626
|
+
Contenu
|
|
627
|
+
</button>
|
|
628
|
+
<button @click="selectedFieldGroup = 'style'"
|
|
620
629
|
:class="[
|
|
621
630
|
'flex-1 py-2 text-[8px] font-black uppercase tracking-widest rounded-lg transition-all',
|
|
622
|
-
selectedFieldGroup ===
|
|
631
|
+
selectedFieldGroup === 'style' ? 'bg-white shadow text-[#3d35ff]' : 'text-gray-400 hover:text-gray-600'
|
|
623
632
|
]">
|
|
624
|
-
|
|
633
|
+
Style
|
|
625
634
|
</button>
|
|
626
635
|
</div>
|
|
627
636
|
|
|
@@ -636,10 +645,10 @@ const savePage = async () => {
|
|
|
636
645
|
<button @click="page.content[selectedBlockIndex].props[name] = ''" class="absolute inset-0 bg-black/60 text-white text-[8px] font-black opacity-0 group-hover:opacity-100 transition-opacity">SUPPRIMER</button>
|
|
637
646
|
</div>
|
|
638
647
|
<div class="flex gap-2">
|
|
639
|
-
<button @click="triggerUpload(page.content[selectedBlockIndex].props, name)" class="flex-1 py-2.5 bg-gray-50 border-2 border-dashed rounded-xl text-[9px] font-black hover:bg-gray-100 transition-all" :disabled="isUploading">
|
|
648
|
+
<button @click="triggerUpload(page.content[selectedBlockIndex].props, name)" class="flex-1 py-2.5 bg-gray-50 border-2 border-dashed rounded-xl text-[9px] font-black text-gray-700 hover:bg-gray-100 transition-all" :disabled="isUploading">
|
|
640
649
|
{{ isUploading ? "ENVOI..." : "\u2191 UPLOAD" }}
|
|
641
650
|
</button>
|
|
642
|
-
<button @click="openGallery(page.content[selectedBlockIndex].props, name)" class="flex-1 py-2.5 bg-gray-50 border-2 border-dashed rounded-xl text-[9px] font-black hover:bg-gray-100 transition-all">
|
|
651
|
+
<button @click="openGallery(page.content[selectedBlockIndex].props, name)" class="flex-1 py-2.5 bg-gray-50 border-2 border-dashed rounded-xl text-[9px] font-black text-gray-700 hover:bg-gray-100 transition-all">
|
|
643
652
|
⊞ GALERIE
|
|
644
653
|
</button>
|
|
645
654
|
</div>
|
|
@@ -703,8 +712,8 @@ const savePage = async () => {
|
|
|
703
712
|
<div v-if="subField.type === 'image'" class="mt-1 space-y-1.5">
|
|
704
713
|
<img v-if="item[subName]" :src="item[subName]" class="w-full h-16 rounded-lg border object-cover" />
|
|
705
714
|
<div class="flex gap-1.5">
|
|
706
|
-
<button @click="triggerUpload(item, subName)" class="flex-1 text-[8px] font-black uppercase bg-white px-2 py-1.5 rounded-lg shadow-sm border">↑ Upload</button>
|
|
707
|
-
<button @click="openGallery(item, subName)" class="flex-1 text-[8px] font-black uppercase bg-white px-2 py-1.5 rounded-lg shadow-sm border">⊞ Galerie</button>
|
|
715
|
+
<button @click="triggerUpload(item, subName)" class="flex-1 text-[8px] font-black uppercase text-gray-700 bg-white px-2 py-1.5 rounded-lg shadow-sm border">↑ Upload</button>
|
|
716
|
+
<button @click="openGallery(item, subName)" class="flex-1 text-[8px] font-black uppercase text-gray-700 bg-white px-2 py-1.5 rounded-lg shadow-sm border">⊞ Galerie</button>
|
|
708
717
|
</div>
|
|
709
718
|
</div>
|
|
710
719
|
<select v-else-if="subField.type === 'select'" :value="item[subName]" @change="item[subName] = $event.target.value;
|