diff options
| author | Sanaei <ho3ein.sanaei@gmail.com> | 2025-03-26 15:04:42 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-26 15:04:42 +0300 |
| commit | d376ce057c4e2de6071dfb2185b4fd9a3a4338b1 (patch) | |
| tree | f349a170638f023f27f507ccbc1574bd50f4a164 /web/html/common/text_modal.html | |
| parent | 6545d8b61df5ad03d89bd738dad84c5fc946a0b5 (diff) | |
| parent | 5e6e900e64bb2da5c0146cafa75d1a7b7bafaed7 (diff) | |
Merge pull request #2823 from shishkevichd/refactor/refactor-5
Code refactoring
Diffstat (limited to 'web/html/common/text_modal.html')
| -rw-r--r-- | web/html/common/text_modal.html | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/web/html/common/text_modal.html b/web/html/common/text_modal.html deleted file mode 100644 index c15282b9..00000000 --- a/web/html/common/text_modal.html +++ /dev/null @@ -1,52 +0,0 @@ -{{define "textModal"}} -<a-modal id="text-modal" v-model="txtModal.visible" :title="txtModal.title" - :closable="true" - :class="themeSwitcher.currentTheme"> - <template slot="footer"> - <a-button v-if="!ObjectUtil.isEmpty(txtModal.fileName)" icon="download" - :href="'data:application/text;charset=utf-8,' + encodeURIComponent(txtModal.content)" - :download="txtModal.fileName">[[ txtModal.fileName ]] - </a-button> - <a-button type="primary" @click="txtModal.copy(txtModal.content)">{{ i18n "copy" }}</a-button> - </template> - <a-input style="overflow-y: auto;" type="textarea" v-model="txtModal.content" - :autosize="{ minRows: 10, maxRows: 20}"></a-input> -</a-modal> - -<script> - - const txtModal = { - title: '', - content: '', - fileName: '', - qrcode: null, - visible: false, - show: function (title = '', content = '', fileName = '') { - this.title = title; - this.content = content; - this.fileName = fileName; - this.visible = true; - }, - copy: function (content = '') { - ClipboardManager - .copyText(content) - .then(() => { - app.$message.success('{{ i18n "copied" }}') - this.close(); - }) - }, - close: function () { - this.visible = false; - }, - }; - - const textModalApp = new Vue({ - delimiters: ['[[', ']]'], - el: '#text-modal', - data: { - txtModal: txtModal, - }, - }); - -</script> -{{end}} |
