mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-05-06 05:38:51 +00:00
feat: add inputs for custom branding and background images in Settings
This commit is contained in:
Generated
+1042
-284
File diff suppressed because it is too large
Load Diff
@@ -52,6 +52,11 @@ const settingFormSchema = z.object({
|
||||
tls: asOptionalField(z.boolean()),
|
||||
enable_ip_change_notification: asOptionalField(z.boolean()),
|
||||
enable_plain_ip_in_notification: asOptionalField(z.boolean()),
|
||||
custom_logo: asOptionalField(z.string()),
|
||||
custom_description: asOptionalField(z.string()),
|
||||
custom_links: asOptionalField(z.string()),
|
||||
background_image_day: asOptionalField(z.string()),
|
||||
background_image_night: asOptionalField(z.string()),
|
||||
})
|
||||
|
||||
export default function SettingsPage() {
|
||||
@@ -139,6 +144,71 @@ export default function SettingsPage() {
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="custom_logo"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>Custom Logo URL</FormLabel>
|
||||
<FormControl>
|
||||
<Input placeholder="https://example.com/logo.png" {...field} />
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="custom_description"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>Custom Description / Subtitle</FormLabel>
|
||||
<FormControl>
|
||||
<Input placeholder="My monitoring dashboard" {...field} />
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="custom_links"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>Custom Links (JSON Array)</FormLabel>
|
||||
<FormControl>
|
||||
<Input placeholder='[{"link":"https://loohui.com/","name":"Blog","blank":false}]' {...field} />
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="background_image_day"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>Background Image (Day)</FormLabel>
|
||||
<FormControl>
|
||||
<Input placeholder="https://example.com/day.jpg" {...field} />
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="background_image_night"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>Background Image (Night)</FormLabel>
|
||||
<FormControl>
|
||||
<Input placeholder="https://example.com/night.jpg" {...field} />
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="language"
|
||||
|
||||
+15
-2
@@ -667,8 +667,12 @@ export interface ModelSetting {
|
||||
/** 用于前端判断生成的安装命令是否启用 TLS */
|
||||
tls?: boolean;
|
||||
user_template?: string;
|
||||
/** 前端真实IP */
|
||||
web_real_ip_header?: string;
|
||||
custom_logo?: string;
|
||||
custom_description?: string;
|
||||
custom_links?: string;
|
||||
background_image_day?: string;
|
||||
background_image_night?: string;
|
||||
}
|
||||
|
||||
export interface ModelSettingForm {
|
||||
@@ -690,8 +694,17 @@ export interface ModelSettingForm {
|
||||
site_name?: string;
|
||||
tls?: boolean;
|
||||
user_template?: string;
|
||||
/** 前端真实IP */
|
||||
web_real_ip_header?: string;
|
||||
/** 自定义Logo链接 */
|
||||
custom_logo?: string;
|
||||
/** 自定义描述/副标题 */
|
||||
custom_description?: string;
|
||||
/** 自定义导航链接 (JSON) */
|
||||
custom_links?: string;
|
||||
/** 白天背景图链接 */
|
||||
background_image_day?: string;
|
||||
/** 夜间背景图链接 */
|
||||
background_image_night?: string;
|
||||
}
|
||||
|
||||
export interface ModelSettingResponse {
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
{"root":["./src/error-page.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/api/alert-rule.ts","./src/api/api.ts","./src/api/cron.ts","./src/api/ddns.ts","./src/api/domain.ts","./src/api/fm.ts","./src/api/nat.ts","./src/api/notification-group.ts","./src/api/notification.ts","./src/api/oauth2.ts","./src/api/online-user.ts","./src/api/server-group.ts","./src/api/server.ts","./src/api/service.ts","./src/api/settings.ts","./src/api/terminal.ts","./src/api/user.ts","./src/api/waf.ts","./src/components/action-button-group.tsx","./src/components/alert-rule.tsx","./src/components/batch-move-server-icon.tsx","./src/components/copy-button.tsx","./src/components/cron.tsx","./src/components/ddns.tsx","./src/components/fm.tsx","./src/components/group-tab.tsx","./src/components/header-button-group.tsx","./src/components/header.tsx","./src/components/install-commands.tsx","./src/components/mode-toggle.tsx","./src/components/nat.tsx","./src/components/note-menu.tsx","./src/components/notification-group.tsx","./src/components/notification-tab.tsx","./src/components/notifier.tsx","./src/components/profile.tsx","./src/components/server-config-batch.tsx","./src/components/server-config.tsx","./src/components/server-group.tsx","./src/components/server.tsx","./src/components/service.tsx","./src/components/settings-tab.tsx","./src/components/terminal.tsx","./src/components/theme-provider.tsx","./src/components/user.tsx","./src/components/ui/alert-dialog.tsx","./src/components/ui/avatar.tsx","./src/components/ui/badge.tsx","./src/components/ui/breadcrumb.tsx","./src/components/ui/button.tsx","./src/components/ui/card.tsx","./src/components/ui/checkbox.tsx","./src/components/ui/combobox.tsx","./src/components/ui/command.tsx","./src/components/ui/dialog.tsx","./src/components/ui/drawer.tsx","./src/components/ui/dropdown-menu.tsx","./src/components/ui/form.tsx","./src/components/ui/icon.tsx","./src/components/ui/input.tsx","./src/components/ui/label.tsx","./src/components/ui/navigation-menu.tsx","./src/components/ui/pagination.tsx","./src/components/ui/popover.tsx","./src/components/ui/scroll-area.tsx","./src/components/ui/select.tsx","./src/components/ui/separator.tsx","./src/components/ui/skeleton.tsx","./src/components/ui/sonner.tsx","./src/components/ui/switch.tsx","./src/components/ui/table.tsx","./src/components/ui/tabs.tsx","./src/components/ui/textarea.tsx","./src/components/xui/filepath.tsx","./src/components/xui/icon-button.tsx","./src/components/xui/multi-select.tsx","./src/components/xui/navigation-menu.tsx","./src/components/xui/overlayless-sheet.tsx","./src/components/xui/pusher.tsx","./src/components/xui/virtulized-data-table.tsx","./src/hooks/useAuth.tsx","./src/hooks/useMainStore.ts","./src/hooks/useMediaQuery.tsx","./src/hooks/useNotfication.tsx","./src/hooks/useNotificationStore.ts","./src/hooks/useServer.tsx","./src/hooks/useServerStore.ts","./src/hooks/useSetting.tsx","./src/hooks/useTerminal.ts","./src/lib/fm.ts","./src/lib/i18n.ts","./src/lib/inject.ts","./src/lib/utils.ts","./src/routes/alert-rule.tsx","./src/routes/cron.tsx","./src/routes/ddns.tsx","./src/routes/domain.tsx","./src/routes/login.tsx","./src/routes/nat.tsx","./src/routes/notification-group.tsx","./src/routes/notification.tsx","./src/routes/online-user.tsx","./src/routes/profile.tsx","./src/routes/protect.tsx","./src/routes/root.tsx","./src/routes/server-group.tsx","./src/routes/server.tsx","./src/routes/service.tsx","./src/routes/settings.tsx","./src/routes/user.tsx","./src/routes/waf.tsx","./src/types/alert-rule.ts","./src/types/api.ts","./src/types/authContext.ts","./src/types/cron.ts","./src/types/ddns.ts","./src/types/fm.ts","./src/types/index.ts","./src/types/mainStore.ts","./src/types/notification.ts","./src/types/notificationContext.ts","./src/types/notificationStore.ts","./src/types/server.ts","./src/types/serverContext.ts","./src/types/serverStore.ts","./src/types/service.ts","./src/types/settings.ts"],"errors":true,"version":"5.6.3"}
|
||||
Reference in New Issue
Block a user