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
path: root/web/html
diff options
context:
space:
mode:
authorTara Rostami <132676256+TaraRostami@users.noreply.github.com>2024-04-01 10:08:22 +0300
committerGitHub <noreply@github.com>2024-04-01 10:08:22 +0300
commitd759e09569008cbe6782be8d544a38f888737866 (patch)
treed105bfd2ba09d210eaec1880c93fc3dec0a06c2d /web/html
parent684e777628688e6a1d434aecb1d84be2f428d6c6 (diff)
QRious2 (#2156)
Diffstat (limited to 'web/html')
-rw-r--r--web/html/common/qrcode_modal.html9
-rw-r--r--web/html/xui/component/themeSwitch.html9
-rw-r--r--web/html/xui/inbounds.html2
3 files changed, 15 insertions, 5 deletions
diff --git a/web/html/common/qrcode_modal.html b/web/html/common/qrcode_modal.html
index 5cbe7858..524335cf 100644
--- a/web/html/common/qrcode_modal.html
+++ b/web/html/common/qrcode_modal.html
@@ -78,10 +78,13 @@
setQrCode(elmentId, content) {
new QRious({
element: document.querySelector('#' + elmentId),
- size: 300,
+ size: 400,
value: content,
- background: 'transparent',
- foreground: 'black'
+ background: 'white',
+ backgroundAlpha: 0,
+ foreground: 'black',
+ padding: 2,
+ level: 'L'
});
},
genSubLink(subID) {
diff --git a/web/html/xui/component/themeSwitch.html b/web/html/xui/component/themeSwitch.html
index 191632c1..28fe3e11 100644
--- a/web/html/xui/component/themeSwitch.html
+++ b/web/html/xui/component/themeSwitch.html
@@ -1,6 +1,6 @@
{{define "component/themeSwitchTemplate"}}
<template>
- <a-menu :theme="themeSwitcher.currentTheme" mode="inline" selected-keys="">
+ <a-menu class="change-theme" :theme="themeSwitcher.currentTheme" mode="inline" selected-keys="">
<a-menu-item mode="inline" class="ant-menu-theme-switch">
<a-icon type="bulb" :theme="themeSwitcher.isDarkTheme ? 'filled' : 'outlined'"></a-icon>
<a-switch size="small" :default-checked="themeSwitcher.isDarkTheme" @change="themeSwitcher.toggleTheme()"></a-switch>
@@ -57,6 +57,13 @@
getContainer: () => document.getElementById('message')
});
document.getElementById('message').className = themeSwitcher.currentTheme;
+ const themeAnimations = document.querySelector('.change-theme');
+ themeAnimations.addEventListener('mousedown', () => {
+ document.documentElement.setAttribute('data-theme-animations', 'off');
+ });
+ themeAnimations.addEventListener('mouseleave', () => {
+ document.documentElement.removeAttribute('data-theme-animations');
+ });
}
});
</script>
diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html
index 737834fd..355bce3f 100644
--- a/web/html/xui/inbounds.html
+++ b/web/html/xui/inbounds.html
@@ -458,7 +458,7 @@
</a-layout>
{{template "js" .}}
<script src="{{ .base_path }}assets/base64/base64.min.js"></script>
-<script src="{{ .base_path }}assets/qrcode/qrious.min.js"></script>
+<script src="{{ .base_path }}assets/qrcode/qrious2.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/model/xray.js?{{ .cur_ver }}"></script>