diff --git a/web/html/xui/component/sortableTable.html b/web/html/xui/component/sortableTable.html
new file mode 100644
index 00000000..0ddd3589
--- /dev/null
+++ b/web/html/xui/component/sortableTable.html
@@ -0,0 +1,216 @@
+{{define "component/sortableTableTrigger"}}
+
+{{end}}
+
+{{define "component/sortableTable"}}
+
+
+
+{{end}}
\ No newline at end of file
diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html
index 572d8b6a..6bf1ed74 100644
--- a/web/html/xui/xray.html
+++ b/web/html/xui/xray.html
@@ -290,15 +290,19 @@
{{ i18n "pages.xray.rules.add" }}
-
+ :style="isMobile ? 'padding: 5px 0' : 'margin-top: 10px;'"
+ v-on:onSort="replaceRule">
- [[ index+1 ]]
+
+
+ [[ index+1 ]]
+
e.preventDefault()" type="more" style="font-size: 16px; text-decoration: bold;">
@@ -404,7 +408,7 @@
-
+
@@ -530,7 +534,7 @@
[[ sel ]]
-
+
@@ -630,6 +634,7 @@
{{template "js" .}}
{{template "component/themeSwitcher" .}}
+{{template "component/sortableTable" .}}
{{template "component/setting"}}
{{template "ruleModal"}}
{{template "outModal"}}
@@ -1269,7 +1274,7 @@
newRules = newTemplateSettings.routing.rules.filter(r => r.outboundTag != oldData.tag);
}
newTemplateSettings.routing.rules = newRules;
-
+
this.templateSettings = newTemplateSettings;
},
addDNSServer(){
@@ -1363,6 +1368,7 @@
});
},
replaceRule(old_index,new_index){
+ console.log(old_index, new_index);
rules = this.templateSettings.routing.rules;
if (new_index >= rules.length) rules.push(undefined);
rules.splice(new_index, 0, rules.splice(old_index, 1)[0]);
@@ -1373,6 +1379,9 @@
rules.splice(index,1);
this.routingRuleSettings = JSON.stringify(rules);
},
+ onRuleDraggingStart(...args) {
+ console.log(args);
+ },
showWarp(){
warpModal.show();
}