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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user