diff options
| author | Ho3ein <ho3ein.sanaei@gmail.com> | 2023-12-10 17:42:52 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-10 17:42:52 +0300 |
| commit | e3f1d3c892a1af48f27fdc36f273a55f38d13b40 (patch) | |
| tree | b11d0c1ed3c15c8f6f891a5e6df8e021d5db8ab6 /web/html/common | |
| parent | 36cf7c0a8fda915b51e75958ce729fd9a61a5c90 (diff) | |
| parent | 9fbe80f87f950673058f0001b3704251fa8b9243 (diff) | |
huge changes
Diffstat (limited to 'web/html/common')
| -rw-r--r-- | web/html/common/head.html | 16 | ||||
| -rw-r--r-- | web/html/common/js.html | 8 | ||||
| -rw-r--r-- | web/html/common/prompt_modal.html | 3 | ||||
| -rw-r--r-- | web/html/common/qrcode_modal.html | 33 | ||||
| -rw-r--r-- | web/html/common/text_modal.html | 7 |
5 files changed, 31 insertions, 36 deletions
diff --git a/web/html/common/head.html b/web/html/common/head.html index 8a89954d..4fa2ea8a 100644 --- a/web/html/common/head.html +++ b/web/html/common/head.html @@ -4,7 +4,7 @@ <meta name="renderer" content="webkit"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <link rel="stylesheet" href="{{ .base_path }}assets/ant-design-vue@1.7.2/antd.min.css"> + <link rel="stylesheet" href="{{ .base_path }}assets/ant-design-vue@1.7.8/antd.min.css"> <link rel="stylesheet" href="{{ .base_path }}assets/element-ui@2.15.0/theme-chalk/display.css"> <link rel="stylesheet" href="{{ .base_path }}assets/css/custom.css?{{ .cur_ver }}"> <link rel=”icon” type=”image/x-icon” href="{{ .base_path }}assets/favicon.ico"> @@ -13,6 +13,20 @@ [v-cloak] { display: none; } + /* vazirmatn-regular - arabic_latin_latin-ext */ + @font-face { + font-display: swap; + font-family: 'Vazirmatn'; + font-style: normal; + font-weight: 400; + src: url('{{ .base_path }}assets/Vazirmatn-UI-NL-Regular.woff2') format('woff2'); + unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC, U+0030-0039; + } + body { + font-family: -apple-system, BlinkMacSystemFont, 'Vazirmatn', 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', + 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji', + 'Segoe UI Emoji', 'Segoe UI Symbol'; + } </style> <title>{{ .host }}-{{ i18n .title}}</title> </head> diff --git a/web/html/common/js.html b/web/html/common/js.html index d400196b..661a0b87 100644 --- a/web/html/common/js.html +++ b/web/html/common/js.html @@ -1,19 +1,13 @@ {{define "js"}} <script src="{{ .base_path }}assets/vue@2.6.12/vue.min.js"></script> <script src="{{ .base_path }}assets/moment/moment.min.js"></script> -<script src="{{ .base_path }}assets/ant-design-vue@1.7.2/antd.min.js"></script> -<script src="{{ .base_path }}assets/base64/base64.min.js"></script> +<script src="{{ .base_path }}assets/ant-design-vue@1.7.8/antd.min.js"></script> <script src="{{ .base_path }}assets/axios/axios.min.js"></script> <script src="{{ .base_path }}assets/qs/qs.min.js"></script> -<script src="{{ .base_path }}assets/qrcode/qrious.min.js"></script> -<script src="{{ .base_path }}assets/clipboard/clipboard.min.js"></script> -<script src="{{ .base_path }}assets/uri/URI.min.js"></script> <script src="{{ .base_path }}assets/js/axios-init.js?{{ .cur_ver }}"></script> <script src="{{ .base_path }}assets/js/util/common.js?{{ .cur_ver }}"></script> <script src="{{ .base_path }}assets/js/util/date-util.js?{{ .cur_ver }}"></script> <script src="{{ .base_path }}assets/js/util/utils.js?{{ .cur_ver }}"></script> -<script src="{{ .base_path }}assets/js/model/xray.js?{{ .cur_ver }}"></script> -<script src="{{ .base_path }}assets/js/model/models.js?{{ .cur_ver }}"></script> <script src="{{ .base_path }}assets/js/langs.js"></script> <script> const basePath = '{{ .base_path }}'; diff --git a/web/html/common/prompt_modal.html b/web/html/common/prompt_modal.html index 17a65ec1..edfad682 100644 --- a/web/html/common/prompt_modal.html +++ b/web/html/common/prompt_modal.html @@ -1,8 +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="themeSwitcher.darkCardClass" - :ok-text="promptModal.okText" cancel-text='{{ i18n "cancel" }}'> + :ok-text="promptModal.okText" cancel-text='{{ i18n "cancel" }}' :class="themeSwitcher.currentTheme"> <a-input id="prompt-modal-input" :type="promptModal.type" v-model="promptModal.value" :autosize="{minRows: 10, maxRows: 20}" diff --git a/web/html/common/qrcode_modal.html b/web/html/common/qrcode_modal.html index 51dc38cb..4be7997d 100644 --- a/web/html/common/qrcode_modal.html +++ b/web/html/common/qrcode_modal.html @@ -1,7 +1,7 @@ {{define "qrcodeModal"}} <a-modal id="qrcode-modal" v-model="qrModal.visible" :title="qrModal.title" :closable="true" - :class="themeSwitcher.darkCardClass" + :class="themeSwitcher.currentTheme" :footer="null" width="300px"> <a-tag color="green" style="margin-bottom: 10px;display: block;text-align: center;"> @@ -13,7 +13,7 @@ </template> <a-divider>{{ i18n "pages.inbounds.client" }}</a-divider> <template v-for="(row, index) in qrModal.qrcodes"> - <a-tag color="orange" style="margin-top: 10px;display: block;text-align: center;">[[ row.remark ]]</a-tag> + <a-tag color="green" style="margin: 10px 0; display: block; text-align: center;">[[ row.remark ]]</a-tag> <canvas @click="copyToClipboard('qrCode-'+index, row.link)" :id="'qrCode-'+index" style="width: 100%; height: 100%;"></canvas> </template> </a-modal> @@ -22,39 +22,25 @@ const qrModal = { title: '', - clientIndex: 0, - inbound: new Inbound(), dbInbound: new DBInbound(), client: null, qrcodes: [], clipboard: null, visible: false, subId: '', - show: function (title = '', dbInbound = new DBInbound(), clientIndex = 0) { + show: function (title = '', dbInbound, client) { this.title = title; - this.clientIndex = clientIndex; this.dbInbound = dbInbound; this.inbound = dbInbound.toInbound(); - settings = JSON.parse(this.inbound.settings); - this.client = settings.clients[clientIndex]; - remark = [this.dbInbound.remark, ( this.client ? this.client.email : '')].filter(Boolean).join('-'); - address = this.dbInbound.address; + this.client = client; this.subId = ''; this.qrcodes = []; - if (this.inbound.tls && !ObjectUtil.isArrEmpty(this.inbound.stream.tls.settings.domains)) { - this.inbound.stream.tls.settings.domains.forEach((domain) => { - remarkText = [remark, domain.remark].filter(Boolean).join('-'); - this.qrcodes.push({ - remark: remarkText, - link: this.inbound.genLink(domain.domain, remarkText, clientIndex) - }); - }); - } else { + this.inbound.genAllLinks(this.dbInbound.remark, app.remarkModel, client).forEach(l => { this.qrcodes.push({ - remark: remark, - link: this.inbound.genLink(address, remark, clientIndex) + remark: l.remark, + link: l.link }); - } + }); this.visible = true; }, close: function () { @@ -86,8 +72,7 @@ }); }, genSubLink(subID) { - const { domain: host, port, tls: isTLS, path: base } = app.subSettings; - return buildURL({ host, port, isTLS, base, path: subID+'?name='+remark }); + return app.subSettings.subURI+subID+'?name='+subID; } }, updated() { diff --git a/web/html/common/text_modal.html b/web/html/common/text_modal.html index 1514051b..4fe2f175 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="themeSwitcher.darkCardClass" + :class="themeSwitcher.currentTheme" :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)" @@ -31,7 +31,10 @@ this.clipboard = new ClipboardJS('#txt-modal-ok-btn', { text: () => this.content, }); - this.clipboard.on('success', () => app.$message.success('{{ i18n "copied" }}')); + this.clipboard.on('success', () => { + app.$message.success('{{ i18n "copied" }}') + this.close(); + }); } }); }, |
