feat(sub): per-inbound sort order for subscription links

Add a subSortIndex field to inbounds that controls the order of links
in subscription output only: the raw sub body, the HTML sub page, and
the JSON/Clash formats (all served from the same query). Lower values
come first; ties keep id order. The panel inbound list is unaffected.

The value is editable in the inbound form next to the share-address
fields, propagates to nodes via wireInbound, and follows the usual
node-sync rules (copied on import, mirrored while not dirty, never a
structural change).

Rescoped from #5214 by @Ponywka.
This commit is contained in:
MHSanaei
2026-06-12 12:03:22 +02:00
parent 7ae3ea66d1
commit f1a4286e2f
36 changed files with 367 additions and 4 deletions
+3
View File
@@ -42,6 +42,7 @@ export type DBInboundInit = Partial<{
nodeId: number | null;
shareAddrStrategy: string;
shareAddr: string;
subSortIndex: number;
originNodeGuid: string;
fallbackParent: FallbackParentRef | null;
}>;
@@ -88,6 +89,7 @@ export class DBInbound {
nodeId: number | null;
shareAddrStrategy: string;
shareAddr: string;
subSortIndex: number;
originNodeGuid: string;
fallbackParent: FallbackParentRef | null;
@@ -116,6 +118,7 @@ export class DBInbound {
this.nodeId = null;
this.shareAddrStrategy = "node";
this.shareAddr = "";
this.subSortIndex = 1;
this.originNodeGuid = "";
this.fallbackParent = null;
if (data == null) {