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 <33454419+MHSanaei@users.noreply.github.com>2023-03-23 22:52:50 +0300
committerMHSanaei <33454419+MHSanaei@users.noreply.github.com>2023-03-23 22:52:50 +0300
commit5ef8a5a37ec7e6b7df710fa61b0324ab5a6617ab (patch)
tree8356d79072560de703f6dbc1d26fa5d51a6d5ac1 /web/html/common
parentc49a9e877cb8481a98564b45f3462f8f73189f6e (diff)
old designv1.0.9
Diffstat (limited to 'web/html/common')
-rw-r--r--web/html/common/prompt_modal.html2
-rw-r--r--web/html/common/qrcode_modal.html29
-rw-r--r--web/html/common/text_modal.html5
3 files changed, 12 insertions, 24 deletions
diff --git a/web/html/common/prompt_modal.html b/web/html/common/prompt_modal.html
index 4b8a13d0..3ef764c5 100644
--- a/web/html/common/prompt_modal.html
+++ b/web/html/common/prompt_modal.html
@@ -1,7 +1,7 @@
{{define "promptModal"}}
<a-modal id="prompt-modal" v-model="promptModal.visible" :title="promptModal.title"
:closable="true" @ok="promptModal.ok" :mask-closable="false"
- :class="siderDrawer.isDarkTheme ? darkClass : ''"
+ :class="siderDrawer.isDarkTheme ? darkClass : ''"
:ok-text="promptModal.okText" cancel-text='{{ i18n "cancel" }}'>
<a-input id="prompt-modal-input" :type="promptModal.type"
v-model="promptModal.value"
diff --git a/web/html/common/qrcode_modal.html b/web/html/common/qrcode_modal.html
index e535b401..e6a6d476 100644
--- a/web/html/common/qrcode_modal.html
+++ b/web/html/common/qrcode_modal.html
@@ -1,10 +1,9 @@
{{define "qrcodeModal"}}
<a-modal id="qrcode-modal" v-model="qrModal.visible" :title="qrModal.title"
:closable="true" width="300px" :ok-text="qrModal.okText"
- :class="siderDrawer.isDarkTheme ? darkClass : ''"
+ :class="siderDrawer.isDarkTheme ? darkClass : ''"
cancel-text='{{ i18n "close" }}' :ok-button-props="{attrs:{id:'qr-modal-ok-btn'}}">
- <a-tag color="green" style="margin-bottom: 10px;display: block;text-align: center;" >{{ i18n "pages.inbounds.clickOnQRcode" }}</a-tag>
- <canvas @click="copyToClipboard()" id="qrCode" style="width: 100%; height: 100%;"></canvas>
+ <canvas id="qrCode" style="width: 100%; height: 100%;"></canvas>
</a-modal>
<script>
@@ -32,13 +31,12 @@
}
this.visible = true;
qrModalApp.$nextTick(() => {
- this.clipboard = new ClipboardJS('#qr-modal-ok-btn', {
- text: () => this.copyText,
- });
- this.clipboard.on('success', () => {
- app.$message.success('{{ i18n "copied" }}')
- this.clipboard.destroy();
- });
+ if (this.clipboard === null) {
+ this.clipboard = new ClipboardJS('#qr-modal-ok-btn', {
+ text: () => this.copyText,
+ });
+ this.clipboard.on('success', () => app.$message.success('{{ i18n "copied" }}'));
+ }
if (this.qrcode === null) {
this.qrcode = new QRious({
element: document.querySelector('#qrCode'),
@@ -60,17 +58,6 @@
data: {
qrModal: qrModal,
},
- methods: {
- copyToClipboard() {
- this.qrModal.clipboard = new ClipboardJS('#qrCode', {
- text: () => this.qrModal.copyText,
- });
- this.qrModal.clipboard.on('success', () => {
- app.$message.success('{{ i18n "copied" }}')
- this.qrModal.clipboard.destroy();
- });
- }
- },
});
</script>
diff --git a/web/html/common/text_modal.html b/web/html/common/text_modal.html
index b2da6160..a0352c88 100644
--- a/web/html/common/text_modal.html
+++ b/web/html/common/text_modal.html
@@ -1,7 +1,7 @@
{{define "textModal"}}
<a-modal id="text-modal" v-model="txtModal.visible" :title="txtModal.title"
:closable="true" ok-text='{{ i18n "copy" }}' cancel-text='{{ i18n "close" }}'
- :class="siderDrawer.isDarkTheme ? darkClass : ''"
+ :class="siderDrawer.isDarkTheme ? darkClass : ''"
:ok-button-props="{attrs:{id:'txt-modal-ok-btn'}}">
<a-button v-if="!ObjectUtil.isEmpty(txtModal.fileName)" type="primary" style="margin-bottom: 10px;"
:href="'data:application/text;charset=utf-8,' + encodeURIComponent(txtModal.content)" :download="txtModal.fileName">
@@ -32,6 +32,7 @@
});
this.clipboard.on('success', () => app.$message.success('{{ i18n "copied" }}'));
}
+
});
},
close: function () {
@@ -40,7 +41,7 @@
};
const textModalApp = new Vue({
- delimiters: ['[[', ']]'],
+ delimiters: ['[[', ']]'],
el: '#text-modal',
data: {
txtModal: txtModal,