Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2023-04-21 18:30:14 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-04-21 18:30:14 +0300
commitb0f974a94db8508c7c77db18c89cd0ef3497f879 (patch)
tree74bc894455da45eab58a051a81b1ae320ea09254 /web/html/login.html
parent6bebde410529c068b2458ee21a03127728a8c6ae (diff)
secret token thanks to @HarlyquinForest
Diffstat (limited to 'web/html/login.html')
-rw-r--r--web/html/login.html16
1 files changed, 16 insertions, 0 deletions
diff --git a/web/html/login.html b/web/html/login.html
index 4218793c..2f4cb3e6 100644
--- a/web/html/login.html
+++ b/web/html/login.html
@@ -57,6 +57,11 @@
<a-icon slot="prefix" type="lock" style="color: rgba(0,0,0,.25)"/>
</a-input>
</a-form-item>
+ <a-form-item v-if="secretEnable">
+ <a-input type="text" placeholder='{{ i18n "secretToken" }}' v-model.trim="user.loginSecret" @keydown.enter.native="login">
+ <a-icon slot="prefix" type="key" style="color: rgba(0,0,0,.25)"/>
+ </a-input>
+ </a-form-item>
<a-form-item>
<a-button block @click="login" :loading="loading">{{ i18n "login" }}</a-button>
</a-form-item>
@@ -98,10 +103,12 @@
data: {
loading: false,
user: new User(),
+ secretEnable: false,
lang : ""
},
created(){
this.lang = getLang();
+ this.secretEnable = this.getSecretStatus();
},
methods: {
async login() {
@@ -111,6 +118,15 @@
if (msg.success) {
location.href = basePath + 'xui/';
}
+ },
+ async getSecretStatus() {
+ this.loading= true;
+ const msg = await HttpUtil.post('/getSecretStatus');
+ this.loading = false;
+ if (msg.success){
+ this.secretEnable = msg.obj;
+ return msg.obj;
+ }
}
}
});