diff --git a/cwd-admin/src/api/admin.ts b/cwd-admin/src/api/admin.ts index 5e7afc8..2ed5d92 100644 --- a/cwd-admin/src/api/admin.ts +++ b/cwd-admin/src/api/admin.ts @@ -128,6 +128,10 @@ export type FeatureSettingsResponse = { enableArticleLike: boolean; }; +export type AdminDisplaySettingsResponse = { + layoutTitle: string | null; +}; + export async function loginAdmin(name: string, password: string): Promise { const res = await post('/admin/login', { name, password }); const key = res.data.key; @@ -327,6 +331,16 @@ export function saveFeatureSettings(data: { enableCommentLike?: boolean; enableA return put<{ message: string }>('/admin/settings/features', data); } +export function fetchAdminDisplaySettings(): Promise { + return get('/admin/settings/admin-display'); +} + +export function saveAdminDisplaySettings(data: { + layoutTitle?: string; +}): Promise<{ message: string }> { + return put<{ message: string }>('/admin/settings/admin-display', data); +} + export type TelegramSettingsResponse = { botToken: string | null; chatId: string | null; diff --git a/cwd-admin/src/styles/components/setting.less b/cwd-admin/src/styles/components/setting.less index 2e52f6d..e142f84 100644 --- a/cwd-admin/src/styles/components/setting.less +++ b/cwd-admin/src/styles/components/setting.less @@ -1,3 +1,7 @@ +h1 { + color: red; +} + .page { display: flex; flex-direction: column; diff --git a/cwd-admin/src/views/LayoutView/index.vue b/cwd-admin/src/views/LayoutView/index.vue index aff4103..8195515 100644 --- a/cwd-admin/src/views/LayoutView/index.vue +++ b/cwd-admin/src/views/LayoutView/index.vue @@ -9,7 +9,7 @@ > -
CWD 评论系统
+
{{ layoutTitle }}