mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-07 05:35:00 +03:00
feat(hosts): add drag-and-drop and global subscription ordering (#6895)
Hosts already had one saved order on the Hosts page, but subscriptions honoured it only inside each inbound, so a host of a later inbound could never come before one of an earlier inbound (#6894). A new opt-in setting makes raw/base64, Clash/Mihomo and JSON subscriptions follow the Hosts page order across inbounds; the default keeps today's inbound-first output unchanged. The Hosts table gains drag-and-drop reordering next to the Up/Down buttons, on a pointer-reorder hook the Routing Rules table now shares.
This commit is contained in:
@@ -7,6 +7,9 @@ const absolutePath = z.string().regex(/^\//, 'pages.settings.validation.pathLead
|
||||
export const SubProfileModeSchema = z.enum(['none', 'builtin', 'custom']);
|
||||
export type SubProfileMode = z.infer<typeof SubProfileModeSchema>;
|
||||
|
||||
export const SubHostSortModeSchema = z.enum(['inbound-first', 'hosts-first']);
|
||||
export type SubHostSortMode = z.infer<typeof SubHostSortModeSchema>;
|
||||
|
||||
export const AllSettingSchema = z
|
||||
.object({
|
||||
webListen: z.string().optional(),
|
||||
@@ -26,6 +29,7 @@ export const AllSettingSchema = z
|
||||
remarkTemplate: z.string().optional(),
|
||||
subShowIdentityOnAllLinks: z.boolean().optional(),
|
||||
subInfoNodeEnable: z.boolean().optional(),
|
||||
subHostSortMode: SubHostSortModeSchema.optional(),
|
||||
subCalendarExpireInclusive: z.boolean().optional(),
|
||||
subExpiredTemplate: z.string().optional(),
|
||||
subTrafficDepletedTemplate: z.string().optional(),
|
||||
|
||||
Reference in New Issue
Block a user