diff --git a/web/assets/ant-design-vue@1.7.2/antd.min.css b/web/assets/ant-design-vue@1.7.2/antd.min.css index 5f731c06..4de7fad0 100644 --- a/web/assets/ant-design-vue@1.7.2/antd.min.css +++ b/web/assets/ant-design-vue@1.7.2/antd.min.css @@ -992,7 +992,7 @@ to{transform:scale(0) translate(50%,-50%);opacity:0} .ant-menu-item>.ant-badge>a{color:rgba(0,0,0,.65)} .ant-menu-item>.ant-badge>a:hover{color:#1890ff} .ant-menu-item-divider{height:1px;overflow:hidden;line-height:0;background-color:#e8e8e8} -.ant-menu-item-active,.ant-menu-item:hover,.ant-menu-submenu-active,.ant-menu-submenu-title:hover,.ant-menu:not(.ant-menu-inline) .ant-menu-submenu-open{color:#fff;background-image: linear-gradient(90deg,#99999980 0,#8888889e 100%);border-radius: 0.5rem} +.ant-menu-item-active,.ant-menu-item:hover,.ant-menu-submenu-active,.ant-menu-submenu-title:hover,.ant-menu:not(.ant-menu-inline) .ant-menu-submenu-open{color:#2d2d2d;background-image: linear-gradient(90deg,#99999980 0,#8888889e 100%);border-radius: 0.5rem} .ant-menu-horizontal .ant-menu-item,.ant-menu-horizontal .ant-menu-submenu{margin-top:-1px} .ant-menu-horizontal>.ant-menu-item-active,.ant-menu-horizontal>.ant-menu-item:hover,.ant-menu-horizontal>.ant-menu-submenu .ant-menu-submenu-title:hover{background-color:transparent} .ant-menu-item-selected,.ant-menu-item-selected>a,.ant-menu-item-selected>a:hover{color:#1890ff} diff --git a/web/assets/css/custom.css b/web/assets/css/custom.css index 718e87f8..7cdfe711 100644 --- a/web/assets/css/custom.css +++ b/web/assets/css/custom.css @@ -1,5 +1,23 @@ -#app { +html, +body { height: 100vh; + width: 100vw; + margin: 0; + padding: 0; + overflow: hidden; +} + +#app { + height: 100%; + min-height: 100vh; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + margin: 0; + padding: 0; + overflow: auto; } .ant-space { @@ -180,12 +198,12 @@ .ant-card-dark:hover { border-color: #e8e8e8; - box-shadow: 0 1px 10px -1px rgb(154 175 238); + box-shadow: 0 1px 10px -1px rgb(76, 88, 126); } -.ant-card-bordered:hover { - /*box-shadow: 0 3px 12px -0.8px #0000005c;*/ -} +/* .ant-card-bordered:hover { + box-shadow: 0 3px 12px -0.8px #0000005c; +} */ .ant-card-dark .ant-table-thead th { color: hsla(0,0%,100%,.65); @@ -203,6 +221,7 @@ .ant-card-dark .ant-input-group-addon { color: hsla(0,0%,100%,.65); background-color: #262f3d; + border: 1px solid rgb(0 150 112 / 0%); } .ant-card-dark .ant-list-item-meta-title, diff --git a/web/assets/js/axios-init.js b/web/assets/js/axios-init.js index bd55c3cf..b864b714 100644 --- a/web/assets/js/axios-init.js +++ b/web/assets/js/axios-init.js @@ -2,7 +2,7 @@ axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; axios.interceptors.request.use( - config => { + (config) => { if (config.data instanceof FormData) { config.headers['Content-Type'] = 'multipart/form-data'; } else { @@ -12,5 +12,5 @@ axios.interceptors.request.use( } return config; }, - error => Promise.reject(error) + (error) => Promise.reject(error), ); diff --git a/web/assets/js/langs.js b/web/assets/js/langs.js index e83b05f3..9e1f0911 100644 --- a/web/assets/js/langs.js +++ b/web/assets/js/langs.js @@ -1,41 +1,41 @@ const supportLangs = [ { - name : "English", - value : "en-US", - icon : "đŸ‡ē🇸" + name: 'English', + value: 'en-US', + icon: 'đŸ‡ē🇸', }, { - name : "Farsi", - value : "fa_IR", - icon : "🇮🇷" + name: 'Farsi', + value: 'fa_IR', + icon: '🇮🇷', }, { - name : "æą‰č¯­", - value : "zh-Hans", - icon : "đŸ‡¨đŸ‡ŗ" + name: 'æą‰č¯­', + value: 'zh-Hans', + icon: 'đŸ‡¨đŸ‡ŗ', }, { - name : "Russian", - value : "ru_RU", - icon : "🇷đŸ‡ē" + name: 'Russian', + value: 'ru_RU', + icon: '🇷đŸ‡ē', }, -] +]; -function getLang(){ - let lang = getCookie('lang') +function getLang() { + let lang = getCookie('lang'); - if (! lang){ - if (window.navigator){ + if (!lang) { + if (window.navigator) { lang = window.navigator.language || window.navigator.userLanguage; - if (isSupportLang(lang)){ - setCookie('lang' , lang , 150) - }else{ - setCookie('lang' , 'en-US' , 150) + if (isSupportLang(lang)) { + setCookie('lang', lang, 150); + } else { + setCookie('lang', 'en-US', 150); window.location.reload(); } - }else{ - setCookie('lang' , 'en-US' , 150) + } else { + setCookie('lang', 'en-US', 150); window.location.reload(); } } @@ -43,47 +43,21 @@ function getLang(){ return lang; } -function setLang(lang){ - - if (!isSupportLang(lang)){ +function setLang(lang) { + if (!isSupportLang(lang)) { lang = 'en-US'; } - setCookie('lang' , lang , 150) + setCookie('lang', lang, 150); window.location.reload(); } -function isSupportLang(lang){ - for (l of supportLangs){ - if (l.value === lang){ +function isSupportLang(lang) { + for (l of supportLangs) { + if (l.value === lang) { return true; } } return false; } - - - -function getCookie(cname) { - let name = cname + "="; - let decodedCookie = decodeURIComponent(document.cookie); - let ca = decodedCookie.split(';'); - for(let i = 0; i { setTimeout(resolve, timeout) }); } - } const seq = [ @@ -95,7 +93,6 @@ const shortIdSeq = [ ]; class RandomUtil { - static randomIntRange(min, max) { return parseInt(Math.random() * (max - min) + min, 10); } @@ -153,8 +150,8 @@ class RandomUtil { static randomText() { var chars = 'abcdefghijklmnopqrstuvwxyz1234567890'; var string = ''; - var len = 6 + Math.floor(Math.random() * 5) - for(var ii=0; ii {}, - }) { + title = '', + type = 'text', + value = '', + okText = '{{ i18n "sure"}}', + confirm = () => {}, + }) { this.title = title; this.type = type; this.value = value; diff --git a/web/html/common/qrcode_modal.html b/web/html/common/qrcode_modal.html index f492dabb..2bd2f00f 100644 --- a/web/html/common/qrcode_modal.html +++ b/web/html/common/qrcode_modal.html @@ -1,10 +1,12 @@ {{define "qrcodeModal"}} - {{ i18n "pages.inbounds.clickOnQRcode" }} + + {{ i18n "pages.inbounds.clickOnQRcode" }} + @@ -19,7 +21,7 @@ qrcode: null, clipboard: null, visible: false, - show: function (title='', content='', dbInbound=new DBInbound(), copyText='') { + show: function (title = '', content = '', dbInbound = new DBInbound(), copyText = '') { this.title = title; this.content = content; this.dbInbound = dbInbound; diff --git a/web/html/common/text_modal.html b/web/html/common/text_modal.html index ce77d0ca..1514051b 100644 --- a/web/html/common/text_modal.html +++ b/web/html/common/text_modal.html @@ -1,7 +1,7 @@ {{define "textModal"}} - + -

{{ i18n "pages.login.title" }}

+

{{ i18n "pages.login.title" }}

@@ -48,35 +60,33 @@ - + - - - + + - - + + - {{ i18n "login" }} + + + [[ loading ? '' : '{{ i18n "login" }}' ]] + + - - - Language : - - - - + + + +    @@ -84,6 +94,11 @@ + + + + + @@ -91,24 +106,24 @@
{{template "js" .}} +{{template "component/themeSwitcher" .}} +{{template "component/password" .}} \ No newline at end of file diff --git a/web/html/xui/client_bulk_modal.html b/web/html/xui/client_bulk_modal.html index d35d7278..076579a9 100644 --- a/web/html/xui/client_bulk_modal.html +++ b/web/html/xui/client_bulk_modal.html @@ -1,11 +1,11 @@ {{define "clientsBulkModal"}} - + Random Random+Prefix Random+Prefix+Num @@ -71,20 +71,20 @@
- + {{ i18n "none" }} [[ key ]] - + {{ i18n "none" }} [[ key ]] - {{ i18n "pages.inbounds.totalFlow" }} (GB) + {{ i18n "pages.inbounds.totalFlow" }} (GB)