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>2024-02-27 15:31:20 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2024-02-27 15:31:20 +0300
commit9b026572cf8af4ecd6afaf59660f3fe1897a93c1 (patch)
treec129572b9c002b0eff05a0ae11438ccf9eb24b13 /web/html/common
parent6b34a3ae132b49e9ba09ef46aef4badd1ca1dfa6 (diff)
close modal only after success msg
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web/html/common')
-rw-r--r--web/html/common/prompt_modal.html8
1 files changed, 6 insertions, 2 deletions
diff --git a/web/html/common/prompt_modal.html b/web/html/common/prompt_modal.html
index edfad682..b91ede03 100644
--- a/web/html/common/prompt_modal.html
+++ b/web/html/common/prompt_modal.html
@@ -1,6 +1,7 @@
{{define "promptModal"}}
<a-modal id="prompt-modal" v-model="promptModal.visible" :title="promptModal.title"
:closable="true" @ok="promptModal.ok" :mask-closable="false"
+ :confirm-loading="promptModal.confirmLoading"
:ok-text="promptModal.okText" cancel-text='{{ i18n "cancel" }}' :class="themeSwitcher.currentTheme">
<a-input id="prompt-modal-input" :type="promptModal.type"
v-model="promptModal.value"
@@ -17,6 +18,7 @@
value: '',
okText: '{{ i18n "sure"}}',
visible: false,
+ confirmLoading: false,
keyEnter(e) {
if (this.type !== 'textarea') {
e.preventDefault();
@@ -30,7 +32,6 @@
}
},
ok() {
- promptModal.close();
promptModal.confirm(promptModal.value);
},
confirm() {},
@@ -53,7 +54,10 @@
},
close() {
this.visible = false;
- }
+ },
+ loading(loading=true) {
+ this.confirmLoading = loading;
+ },
};
const promptModalApp = new Vue({