From bea19a263db88fef44b4356082b199fbfcc39a25 Mon Sep 17 00:00:00 2001 From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com> Date: Sun, 6 Apr 2025 16:40:33 +0700 Subject: Code refactoring (#2865) * refactor: use vue inline styles in entire application * refactor: setting row in dashboard page * refactor: use blob for download file in text modal * refactor: move all html templates in `web/html` folder * refactor: `DeviceUtils` -> `MediaQueryMixin` The transition to mixins has been made, as they can update themselves. * chore: pretty right buttons in `outbounds` tab in xray settings * refactor: add translations for system status * refactor: adjust gutter spacing in setting list item * refactor: use native `a-input-password` for password field * chore: return old system status with new translations * chore: add missing translation --- web/html/xui/component/aClientTable.html | 267 ---- web/html/xui/component/aCustomStatistic.html | 42 - web/html/xui/component/aPasswordInput.html | 57 - web/html/xui/component/aPersianDatepicker.html | 72 - web/html/xui/component/aSettingListItem.html | 49 - web/html/xui/component/aSidebar.html | 103 -- web/html/xui/component/aTableSortable.html | 232 --- web/html/xui/component/aThemeSwitch.html | 119 -- web/html/xui/form/allocate.html | 15 - web/html/xui/form/client.html | 172 --- web/html/xui/form/inbound.html | 133 -- web/html/xui/form/outbound.html | 517 ------- web/html/xui/form/protocol/dokodemo.html | 20 - web/html/xui/form/protocol/http.html | 26 - web/html/xui/form/protocol/shadowsocks.html | 50 - web/html/xui/form/protocol/socks.html | 34 - web/html/xui/form/protocol/trojan.html | 50 - web/html/xui/form/protocol/vless.html | 50 - web/html/xui/form/protocol/vmess.html | 23 - web/html/xui/form/protocol/wireguard.html | 76 - web/html/xui/form/reality_settings.html | 56 - web/html/xui/form/sniffing.html | 29 - web/html/xui/form/stream/external_proxy.html | 29 - web/html/xui/form/stream/stream_grpc.html | 13 - web/html/xui/form/stream/stream_httpupgrade.html | 26 - web/html/xui/form/stream/stream_kcp.html | 48 - web/html/xui/form/stream/stream_settings.html | 51 - web/html/xui/form/stream/stream_sockopt.html | 66 - web/html/xui/form/stream/stream_tcp.html | 72 - web/html/xui/form/stream/stream_ws.html | 29 - web/html/xui/form/stream/stream_xhttp.html | 46 - web/html/xui/form/tls_settings.html | 116 -- web/html/xui/inbounds.html | 1535 -------------------- web/html/xui/index.html | 743 ---------- web/html/xui/modals/client_bulk_modal.html | 250 ---- web/html/xui/modals/client_modal.html | 172 --- web/html/xui/modals/dns_modal.html | 114 -- web/html/xui/modals/fakedns_modal.html | 57 - web/html/xui/modals/inbound_info_modal.html | 572 -------- web/html/xui/modals/inbound_modal.html | 144 -- web/html/xui/modals/prompt_modal.html | 71 - web/html/xui/modals/qrcode_modal.html | 161 -- web/html/xui/modals/text_modal.html | 52 - web/html/xui/modals/warp_modal.html | 246 ---- web/html/xui/modals/xray_balancer_modal.html | 123 -- web/html/xui/modals/xray_outbound_modal.html | 127 -- web/html/xui/modals/xray_reverse_modal.html | 138 -- web/html/xui/modals/xray_rule_modal.html | 246 ---- web/html/xui/settings.html | 540 ------- web/html/xui/settings/panel/general.html | 149 -- web/html/xui/settings/panel/security.html | 60 - .../xui/settings/panel/subscription/general.html | 98 -- web/html/xui/settings/panel/subscription/json.html | 180 --- web/html/xui/settings/panel/telegram.html | 87 -- web/html/xui/settings/xray/advanced.html | 14 - web/html/xui/settings/xray/balancers.html | 53 - web/html/xui/settings/xray/basics.html | 275 ---- web/html/xui/settings/xray/dns.html | 149 -- web/html/xui/settings/xray/outbounds.html | 72 - web/html/xui/settings/xray/reverse.html | 38 - web/html/xui/settings/xray/routing.html | 119 -- web/html/xui/xray.html | 1450 ------------------ 62 files changed, 10723 deletions(-) delete mode 100644 web/html/xui/component/aClientTable.html delete mode 100644 web/html/xui/component/aCustomStatistic.html delete mode 100644 web/html/xui/component/aPasswordInput.html delete mode 100644 web/html/xui/component/aPersianDatepicker.html delete mode 100644 web/html/xui/component/aSettingListItem.html delete mode 100644 web/html/xui/component/aSidebar.html delete mode 100644 web/html/xui/component/aTableSortable.html delete mode 100644 web/html/xui/component/aThemeSwitch.html delete mode 100644 web/html/xui/form/allocate.html delete mode 100644 web/html/xui/form/client.html delete mode 100644 web/html/xui/form/inbound.html delete mode 100644 web/html/xui/form/outbound.html delete mode 100644 web/html/xui/form/protocol/dokodemo.html delete mode 100644 web/html/xui/form/protocol/http.html delete mode 100644 web/html/xui/form/protocol/shadowsocks.html delete mode 100644 web/html/xui/form/protocol/socks.html delete mode 100644 web/html/xui/form/protocol/trojan.html delete mode 100644 web/html/xui/form/protocol/vless.html delete mode 100644 web/html/xui/form/protocol/vmess.html delete mode 100644 web/html/xui/form/protocol/wireguard.html delete mode 100644 web/html/xui/form/reality_settings.html delete mode 100644 web/html/xui/form/sniffing.html delete mode 100644 web/html/xui/form/stream/external_proxy.html delete mode 100644 web/html/xui/form/stream/stream_grpc.html delete mode 100644 web/html/xui/form/stream/stream_httpupgrade.html delete mode 100644 web/html/xui/form/stream/stream_kcp.html delete mode 100644 web/html/xui/form/stream/stream_settings.html delete mode 100644 web/html/xui/form/stream/stream_sockopt.html delete mode 100644 web/html/xui/form/stream/stream_tcp.html delete mode 100644 web/html/xui/form/stream/stream_ws.html delete mode 100644 web/html/xui/form/stream/stream_xhttp.html delete mode 100644 web/html/xui/form/tls_settings.html delete mode 100644 web/html/xui/inbounds.html delete mode 100644 web/html/xui/index.html delete mode 100644 web/html/xui/modals/client_bulk_modal.html delete mode 100644 web/html/xui/modals/client_modal.html delete mode 100644 web/html/xui/modals/dns_modal.html delete mode 100644 web/html/xui/modals/fakedns_modal.html delete mode 100644 web/html/xui/modals/inbound_info_modal.html delete mode 100644 web/html/xui/modals/inbound_modal.html delete mode 100644 web/html/xui/modals/prompt_modal.html delete mode 100644 web/html/xui/modals/qrcode_modal.html delete mode 100644 web/html/xui/modals/text_modal.html delete mode 100644 web/html/xui/modals/warp_modal.html delete mode 100644 web/html/xui/modals/xray_balancer_modal.html delete mode 100644 web/html/xui/modals/xray_outbound_modal.html delete mode 100644 web/html/xui/modals/xray_reverse_modal.html delete mode 100644 web/html/xui/modals/xray_rule_modal.html delete mode 100644 web/html/xui/settings.html delete mode 100644 web/html/xui/settings/panel/general.html delete mode 100644 web/html/xui/settings/panel/security.html delete mode 100644 web/html/xui/settings/panel/subscription/general.html delete mode 100644 web/html/xui/settings/panel/subscription/json.html delete mode 100644 web/html/xui/settings/panel/telegram.html delete mode 100644 web/html/xui/settings/xray/advanced.html delete mode 100644 web/html/xui/settings/xray/balancers.html delete mode 100644 web/html/xui/settings/xray/basics.html delete mode 100644 web/html/xui/settings/xray/dns.html delete mode 100644 web/html/xui/settings/xray/outbounds.html delete mode 100644 web/html/xui/settings/xray/reverse.html delete mode 100644 web/html/xui/settings/xray/routing.html delete mode 100644 web/html/xui/xray.html (limited to 'web/html/xui') diff --git a/web/html/xui/component/aClientTable.html b/web/html/xui/component/aClientTable.html deleted file mode 100644 index 2bea96e8..00000000 --- a/web/html/xui/component/aClientTable.html +++ /dev/null @@ -1,267 +0,0 @@ -{{define "component/aClientTable"}} - - - - - - - - -{{end}} diff --git a/web/html/xui/component/aCustomStatistic.html b/web/html/xui/component/aCustomStatistic.html deleted file mode 100644 index 0bff128d..00000000 --- a/web/html/xui/component/aCustomStatistic.html +++ /dev/null @@ -1,42 +0,0 @@ -{{define "component/customStatistic"}} - -{{end}} - -{{define "component/aCustomStatistic"}} - - - -{{end}} \ No newline at end of file diff --git a/web/html/xui/component/aPasswordInput.html b/web/html/xui/component/aPasswordInput.html deleted file mode 100644 index 460e7e76..00000000 --- a/web/html/xui/component/aPasswordInput.html +++ /dev/null @@ -1,57 +0,0 @@ -{{define "component/passwordInput"}} - -{{end}} - -{{define "component/aPasswordInput"}} - -{{end}} \ No newline at end of file diff --git a/web/html/xui/component/aPersianDatepicker.html b/web/html/xui/component/aPersianDatepicker.html deleted file mode 100644 index 58132ddd..00000000 --- a/web/html/xui/component/aPersianDatepicker.html +++ /dev/null @@ -1,72 +0,0 @@ -{{define "component/persianDatepickerTemplate"}} - -{{end}} - -{{define "component/aPersianDatepicker"}} - - - - -{{end}} \ No newline at end of file diff --git a/web/html/xui/component/aSettingListItem.html b/web/html/xui/component/aSettingListItem.html deleted file mode 100644 index 6a7d31d0..00000000 --- a/web/html/xui/component/aSettingListItem.html +++ /dev/null @@ -1,49 +0,0 @@ -{{define "component/settingListItem"}} - - - - - - - - - - - - - -{{end}} - -{{define "component/aSettingListItem"}} - -{{end}} diff --git a/web/html/xui/component/aSidebar.html b/web/html/xui/component/aSidebar.html deleted file mode 100644 index dfaebb17..00000000 --- a/web/html/xui/component/aSidebar.html +++ /dev/null @@ -1,103 +0,0 @@ -{{define "component/sidebar/content"}} - -{{end}} - -{{define "component/aSidebar"}} - - - -{{end}} \ No newline at end of file diff --git a/web/html/xui/component/aTableSortable.html b/web/html/xui/component/aTableSortable.html deleted file mode 100644 index 7dbc3d0a..00000000 --- a/web/html/xui/component/aTableSortable.html +++ /dev/null @@ -1,232 +0,0 @@ -{{define "component/sortableTableTrigger"}} - -{{end}} - -{{define "component/aTableSortable"}} - - -{{end}} \ No newline at end of file diff --git a/web/html/xui/component/aThemeSwitch.html b/web/html/xui/component/aThemeSwitch.html deleted file mode 100644 index 2f76cd1b..00000000 --- a/web/html/xui/component/aThemeSwitch.html +++ /dev/null @@ -1,119 +0,0 @@ -{{define "component/themeSwitchTemplate"}} - -{{end}} - -{{define "component/themeSwitchTemplateLogin"}} - -{{end}} - -{{define "component/aThemeSwitch"}} - -{{end}} \ No newline at end of file diff --git a/web/html/xui/form/allocate.html b/web/html/xui/form/allocate.html deleted file mode 100644 index aba8d5c9..00000000 --- a/web/html/xui/form/allocate.html +++ /dev/null @@ -1,15 +0,0 @@ -{{define "form/allocate"}} - - - - [[ s ]] - - - - - - - - - -{{end}} diff --git a/web/html/xui/form/client.html b/web/html/xui/form/client.html deleted file mode 100644 index 3aff67e0..00000000 --- a/web/html/xui/form/client.html +++ /dev/null @@ -1,172 +0,0 @@ -{{define "form/client"}} - - - - - - - - - - - - - - - - - - - [[ key ]] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ i18n "none" }} - [[ key ]] - - - - - - - - - [[ SizeFormatter.sizeFormat(clientStats.up) ]] / - [[ SizeFormatter.sizeFormat(clientStats.down) ]] - ([[ SizeFormatter.sizeFormat(clientStats.up + clientStats.down) ]]) - - - - - - - - - - - - - - - - - Expired - - - - - - -{{end}} \ No newline at end of file diff --git a/web/html/xui/form/inbound.html b/web/html/xui/form/inbound.html deleted file mode 100644 index e0521c69..00000000 --- a/web/html/xui/form/inbound.html +++ /dev/null @@ -1,133 +0,0 @@ -{{define "form/inbound"}} - - - - - - - - - - - - [[ p ]] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{template "form/sniffing"}} - - - - - - -{{end}} diff --git a/web/html/xui/form/outbound.html b/web/html/xui/form/outbound.html deleted file mode 100644 index 84652c3f..00000000 --- a/web/html/xui/form/outbound.html +++ /dev/null @@ -1,517 +0,0 @@ -{{define "form/outbound"}} - - - - - - - [[ y ]] - - - - - - - - - - -