feat(ui): добавить новый маршрут и интерфейс для настроек внешнего вида
Build, Test, and Push CFDM Docker Image / test (push) Failing after 36s
Build, Test, and Push CFDM Docker Image / build-and-push (push) Skipped
Build, Test, and Push CFDM Docker Image / create-release (push) Skipped
Build, Test, and Push CFDM Docker Image / update-wiki (push) Skipped

Добавлен новый маршрут для страницы настроек внешнего вида в интерфейсе. Обновлены компоненты навигации и заголовка для поддержки нового маршрута. Включены изменения в документацию и интерфейсы для отображения новых элементов управления. Также добавлена поддержка отображения быстрого доступа к разделам в панели управления.
This commit is contained in:
Denozordec
2026-07-17 20:34:05 +07:00
parent cd616c7a03
commit 13c079c969
16 changed files with 584 additions and 6 deletions
@@ -0,0 +1,2 @@
-- UI preference: show quick actions on dashboard (default on)
ALTER TABLE app_settings ADD COLUMN show_quick_actions INTEGER NOT NULL DEFAULT 1;
+5
View File
@@ -280,6 +280,11 @@ export const appSettings = sqliteTable("app_settings", {
.notNull()
.default(false),
vps_tracker_last_sync_at: text("vps_tracker_last_sync_at"),
show_quick_actions: integer("show_quick_actions", {
mode: "boolean",
})
.notNull()
.default(true),
created_at: text("created_at")
.notNull()
.default(sql`datetime('now')`),
+8
View File
@@ -34,6 +34,7 @@ export type AppSettingsDto = {
vpsTrackerIntegrationTokenSet: boolean;
vpsTrackerSyncEnabled: boolean;
vpsTrackerLastSyncAt: string | null;
showQuickActions: boolean;
};
export type AppSettingsPatch = {
@@ -41,6 +42,7 @@ export type AppSettingsPatch = {
vpsTrackerUrl?: string;
vpsTrackerIntegrationToken?: string;
vpsTrackerSyncEnabled?: boolean;
showQuickActions?: boolean;
};
function parseAppSwitcher(raw: string | null | undefined): AppSwitcherConfig {
@@ -62,6 +64,8 @@ function toDto(row: typeof appSettings.$inferSelect): AppSettingsDto {
),
vpsTrackerSyncEnabled: Boolean(row.vps_tracker_sync_enabled),
vpsTrackerLastSyncAt: row.vps_tracker_last_sync_at,
showQuickActions:
row.show_quick_actions == null ? true : Boolean(row.show_quick_actions),
};
}
@@ -132,6 +136,10 @@ export function updateAppSettings(db: Db, patch: AppSettingsPatch): AppSettingsD
patch.vpsTrackerSyncEnabled !== undefined
? patch.vpsTrackerSyncEnabled
: current.vps_tracker_sync_enabled,
show_quick_actions:
patch.showQuickActions !== undefined
? patch.showQuickActions
: current.show_quick_actions,
updated_at: new Date().toISOString(),
})
.where(eq(appSettings.id, SETTINGS_ID))
@@ -24,6 +24,7 @@ export const appSettingsPatchSchema = z.object({
vpsTrackerUrl: z.string().url().or(z.literal("")).optional(),
vpsTrackerIntegrationToken: z.string().optional(),
vpsTrackerSyncEnabled: z.boolean().optional(),
showQuickActions: z.boolean().optional(),
});
export type AppSettingsPatch = z.infer<typeof appSettingsPatchSchema>;