Allow deleting saved color palettes

This commit is contained in:
2026-11-28 12:28:13 +08:00
parent fc4bcea127
commit 1aaf3908af
9 changed files with 80 additions and 15 deletions
+3 -1
View File
@@ -1,5 +1,6 @@
<?php
use App\Content\Database;
use App\Content\DesignLibrary;
use App\Content\McpSettings;
use App\Content\View;
@@ -15,7 +16,8 @@ $e = View::escape(...);
<label>静态资源 CDN<input name="cdn" value="<?= $e($cdn) ?>" placeholder="https://cdn.example.com"><small>填写后,公开页面的 /assets/ 文件从该地址加载。</small></label>
<div>
<?= View::fragment('admin-palette-picker', [
'id' => 'site-palette', 'label' => '站点默认配色', 'options' => $palettes, 'selected' => $paletteId,
'id' => 'site-palette', 'label' => '站点默认配色', 'selected' => $paletteId,
'options' => [['id' => '', 'name' => '系统配色', 'colors' => DesignLibrary::defaults('palette')], ...$palettes],
]) ?>
<a class="back-link" href="/admin/design#palettes">管理配色方案</a>
</div>