30 lines
1.1 KiB
Plaintext
30 lines
1.1 KiB
Plaintext
|
|
@page "/Admin/Sections/{key}"
|
||
|
|
@model SoroushAsadi.Pages.Admin.Sections.SectionEditModel
|
||
|
|
@{
|
||
|
|
Layout = "_AdminLayout";
|
||
|
|
ViewData["Title"] = "Edit: " + Model.SectionKey;
|
||
|
|
}
|
||
|
|
|
||
|
|
<div class="mb-6 flex items-center gap-4">
|
||
|
|
<a href="/Admin/Sections" class="text-slate-400 hover:text-white transition-colors text-sm">← Sections</a>
|
||
|
|
<h1 class="font-display text-xl font-bold text-white">@Model.SectionKey</h1>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
@if (!string.IsNullOrEmpty(Model.Message))
|
||
|
|
{
|
||
|
|
<div class="mb-4 rounded-lg border border-emerald/30 bg-emerald/10 px-4 py-3 text-sm text-emerald">@Model.Message</div>
|
||
|
|
}
|
||
|
|
|
||
|
|
<form method="post" class="space-y-4">
|
||
|
|
<div>
|
||
|
|
<label class="label-mono mb-2 block">JSON ({"fa": {...}, "en": {...}})</label>
|
||
|
|
<textarea name="json" rows="24"
|
||
|
|
class="w-full rounded-xl border border-white/10 bg-white/[.03] px-4 py-3 font-mono text-xs text-slate-200 outline-none focus:border-electric/60 transition-colors resize-y"
|
||
|
|
spellcheck="false">@Model.CurrentJson</textarea>
|
||
|
|
</div>
|
||
|
|
<div class="flex gap-3">
|
||
|
|
<button type="submit" class="btn-primary">Save</button>
|
||
|
|
<a href="/Admin/Sections" class="btn-ghost">Cancel</a>
|
||
|
|
</div>
|
||
|
|
</form>
|