diff --git a/web/html/login.html b/web/html/login.html
index b6dfc299..968aa0bc 100644
--- a/web/html/login.html
+++ b/web/html/login.html
@@ -466,71 +466,83 @@
-
+
-
-
-
-
-
- {{ i18n "pages.settings.language" }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ i18n "pages.login.hello" }}
- {{ i18n "pages.login.title" }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- [[ loading ? '' : '{{ i18n "login" }}' ]]
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ {{ i18n "pages.settings.language" }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ i18n "pages.login.hello" }}
+ {{ i18n "pages.login.title" }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [[ loadingStates.spinning ? '' : '{{ i18n "login" }}' ]]
+
+
+
+
+
+
+
+
+
@@ -544,7 +556,10 @@
el: '#app',
data: {
themeSwitcher,
- loading: false,
+ loadingStates: {
+ fetched: false,
+ spinning: false
+ },
user: {
username: "",
password: "",
@@ -559,19 +574,23 @@
},
methods: {
async login() {
- this.loading = true;
+ this.loadingStates.spinning = true;
+
const msg = await HttpUtil.post('/login', this.user);
- this.loading = false;
+
if (msg.success) {
location.href = basePath + 'panel/';
}
+
+ this.loadingStates.spinning = false;
},
async getTwoFactorEnable() {
- this.loading = true;
const msg = await HttpUtil.post('/getTwoFactorEnable');
- this.loading = false;
+
if (msg.success) {
this.twoFactorEnable = msg.obj;
+ this.loadingStates.fetched = true;
+
return msg.obj;
}
},
@@ -615,4 +634,4 @@
}
});
-{{ template "page/body_end" .}}
+{{ template "page/body_end" .}}
\ No newline at end of file
diff --git a/web/html/modals/xray_rule_modal.html b/web/html/modals/xray_rule_modal.html
index 78a0a706..90f40f28 100644
--- a/web/html/modals/xray_rule_modal.html
+++ b/web/html/modals/xray_rule_modal.html
@@ -1,11 +1,6 @@
{{define "modals/ruleModal"}}
-
-
- [[ dm ]]
-
-
@@ -123,7 +118,6 @@
confirm: null,
rule: {
type: "field",
- domainMatcher: "",
domain: "",
ip: "",
port: "",
@@ -157,7 +151,6 @@
this.confirm = confirm;
this.visible = true;
if (isEdit) {
- this.rule.domainMatcher = rule.domainMatcher;
this.rule.domain = rule.domain ? rule.domain.join(',') : [];
this.rule.ip = rule.ip ? rule.ip.join(',') : [];
this.rule.port = rule.port;
@@ -172,7 +165,6 @@
this.rule.balancerTag = rule.balancerTag ? rule.balancerTag : "";
} else {
this.rule = {
- domainMatcher: "",
domain: "",
ip: "",
port: "",
@@ -214,7 +206,6 @@
rule = {};
newRule = {};
rule.type = "field";
- rule.domainMatcher = value.domainMatcher;
rule.domain = value.domain.length > 0 ? value.domain.split(',') : [];
rule.ip = value.ip.length > 0 ? value.ip.split(',') : [];
rule.port = value.port;