Wire landing footer contact info to site settings.

Admin phone/email/address/socials now drive the public footer instead of stale section JSON.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-30 21:36:43 +03:30
co-authored by Cursor
parent e9eafdaabc
commit 55e3b6a0e9
4 changed files with 112 additions and 32 deletions
+9 -11
View File
@@ -120,13 +120,12 @@
<!-- FOOTER -->
<template v-else-if="key === 'footer'">
<p class="muted" style="margin-bottom: 1rem">
ایمیل، تلفن، آدرس و شبکه‌های اجتماعی از بخش «تنظیمات سایت» خوانده می‌شوند. اینجا فقط متن‌های نمایشی فوتر را ویرایش کنید.
</p>
<div class="field"><label class="label">عنوان بخش</label><input v-model="form.tag" class="input" /></div>
<div class="field"><label class="label">نوار متحرک پایین (هر خط یک مورد)</label><textarea v-model="footerMarqueeText" class="textarea" /></div>
<div class="field"><label class="label">متن دعوت به همکاری</label><input v-model="form.cta" class="input" /></div>
<div class="field"><label class="label">ایمیل</label><input v-model="form.email" class="input" dir="ltr" /></div>
<div class="field"><label class="label">تلفن</label><input v-model="form.phone" class="input" dir="ltr" /></div>
<div class="field"><label class="label">آدرس (هر خط یک سطر)</label><textarea v-model="footerAddressText" class="textarea" /></div>
<div class="field"><label class="label">شبکه‌های اجتماعی (هر خط یک مورد)</label><textarea v-model="footerSocialsText" class="textarea" /></div>
</template>
<template v-else>
@@ -166,8 +165,6 @@ const form = reactive<any>({});
const marqueeText = ref("");
const manifestoWordsText = ref("");
const footerMarqueeText = ref("");
const footerAddressText = ref("");
const footerSocialsText = ref("");
function splitTags(v: string) {
return v
@@ -209,8 +206,6 @@ onMounted(async () => {
if (key === "team") form.members = form.members || [];
if (key === "footer") {
footerMarqueeText.value = (form.marquee || []).join("\n");
footerAddressText.value = (form.address || []).join("\n");
footerSocialsText.value = (form.socials || []).join("\n");
}
ready.value = true;
});
@@ -222,10 +217,13 @@ function buildPayload() {
}
if (key === "footer") {
return {
...form,
tag: form.tag,
cta: form.cta,
marquee: footerMarqueeText.value.split("\n").map((s) => s.trim()).filter(Boolean),
address: footerAddressText.value.split("\n").map((s) => s.trim()).filter(Boolean),
socials: footerSocialsText.value.split("\n").map((s) => s.trim()).filter(Boolean),
email: form.email,
phone: form.phone,
address: form.address,
socials: form.socials,
};
}
return { ...form };