Make admin section editor form-based and localize Montech site to Persian.

Operators can edit landing copy as plain fields instead of JSON/HTML; default CMS seed and UI chrome are now Farsi/RTL.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-30 20:33:37 +03:30
co-authored by Cursor
parent 0f4363174c
commit 3410f3e5ed
22 changed files with 462 additions and 218 deletions
+18 -3
View File
@@ -1,14 +1,14 @@
<template>
<div>
<h1>محتوای لندینگ</h1>
<p class="muted">هر بخش JSON ساخت‌یافته دارد.</p>
<p class="muted">متن‌ها را مثل فرم معمولی ویرایش کنید — نیازی به کدنویسی نیست.</p>
<table class="table">
<thead>
<tr><th>کلید</th><th>آخرین ویرایش</th><th></th></tr>
<tr><th>بخش</th><th>آخرین ویرایش</th><th></th></tr>
</thead>
<tbody>
<tr v-for="s in sections" :key="s.id">
<td>{{ s.key }}</td>
<td>{{ label(s.key) }}</td>
<td class="muted">{{ new Date(s.updatedAt).toLocaleString("fa-IR") }}</td>
<td><RouterLink :to="`/sections/${s.key}`">ویرایش</RouterLink></td>
</tr>
@@ -21,7 +21,22 @@
import { onMounted, ref } from "vue";
import { api } from "../lib/api";
const TITLES: Record<string, string> = {
hero: "صفحه اول (هیرو)",
marquee: "نوار متحرک",
manifesto: "معرفی",
services: "خدمات",
work: "نمونه کارها",
process: "فرآیند کار",
stats: "آمار",
team: "تیم",
footer: "تماس و فوتر",
};
const sections = ref<any[]>([]);
function label(key: string) {
return TITLES[key] || key;
}
onMounted(async () => {
const { data } = await api.get("/admin/sections");
sections.value = data;