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/component/aClientTable.html | 267 ++++ web/html/component/aCustomStatistic.html | 42 + web/html/component/aPersianDatepicker.html | 72 + web/html/component/aSettingListItem.html | 49 + web/html/component/aSidebar.html | 103 ++ web/html/component/aTableSortable.html | 232 +++ web/html/component/aThemeSwitch.html | 119 ++ web/html/form/allocate.html | 15 + web/html/form/client.html | 172 +++ web/html/form/inbound.html | 133 ++ web/html/form/outbound.html | 517 +++++++ web/html/form/protocol/dokodemo.html | 20 + web/html/form/protocol/http.html | 26 + web/html/form/protocol/shadowsocks.html | 50 + web/html/form/protocol/socks.html | 34 + web/html/form/protocol/trojan.html | 50 + web/html/form/protocol/vless.html | 50 + web/html/form/protocol/vmess.html | 23 + web/html/form/protocol/wireguard.html | 76 + web/html/form/reality_settings.html | 56 + web/html/form/sniffing.html | 29 + web/html/form/stream/external_proxy.html | 29 + web/html/form/stream/stream_grpc.html | 13 + web/html/form/stream/stream_httpupgrade.html | 26 + web/html/form/stream/stream_kcp.html | 48 + web/html/form/stream/stream_settings.html | 51 + web/html/form/stream/stream_sockopt.html | 66 + web/html/form/stream/stream_tcp.html | 72 + web/html/form/stream/stream_ws.html | 29 + web/html/form/stream/stream_xhttp.html | 46 + web/html/form/tls_settings.html | 116 ++ web/html/inbounds.html | 1530 +++++++++++++++++++ web/html/index.html | 752 ++++++++++ web/html/login.html | 21 +- web/html/modals/client_bulk_modal.html | 250 ++++ web/html/modals/client_modal.html | 172 +++ web/html/modals/dns_modal.html | 114 ++ web/html/modals/fakedns_modal.html | 57 + web/html/modals/inbound_info_modal.html | 572 ++++++++ web/html/modals/inbound_modal.html | 144 ++ web/html/modals/prompt_modal.html | 71 + web/html/modals/qrcode_modal.html | 162 +++ web/html/modals/text_modal.html | 62 + web/html/modals/warp_modal.html | 246 ++++ web/html/modals/xray_balancer_modal.html | 123 ++ web/html/modals/xray_outbound_modal.html | 127 ++ web/html/modals/xray_reverse_modal.html | 138 ++ web/html/modals/xray_rule_modal.html | 246 ++++ web/html/settings.html | 542 +++++++ web/html/settings/panel/general.html | 149 ++ web/html/settings/panel/security.html | 60 + web/html/settings/panel/subscription/general.html | 98 ++ web/html/settings/panel/subscription/json.html | 180 +++ web/html/settings/panel/telegram.html | 87 ++ web/html/settings/xray/advanced.html | 14 + web/html/settings/xray/balancers.html | 53 + web/html/settings/xray/basics.html | 275 ++++ web/html/settings/xray/dns.html | 149 ++ web/html/settings/xray/outbounds.html | 74 + web/html/settings/xray/reverse.html | 38 + web/html/settings/xray/routing.html | 119 ++ web/html/xray.html | 1450 ++++++++++++++++++ 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 ------------------ 124 files changed, 10696 insertions(+), 10733 deletions(-) create mode 100644 web/html/component/aClientTable.html create mode 100644 web/html/component/aCustomStatistic.html create mode 100644 web/html/component/aPersianDatepicker.html create mode 100644 web/html/component/aSettingListItem.html create mode 100644 web/html/component/aSidebar.html create mode 100644 web/html/component/aTableSortable.html create mode 100644 web/html/component/aThemeSwitch.html create mode 100644 web/html/form/allocate.html create mode 100644 web/html/form/client.html create mode 100644 web/html/form/inbound.html create mode 100644 web/html/form/outbound.html create mode 100644 web/html/form/protocol/dokodemo.html create mode 100644 web/html/form/protocol/http.html create mode 100644 web/html/form/protocol/shadowsocks.html create mode 100644 web/html/form/protocol/socks.html create mode 100644 web/html/form/protocol/trojan.html create mode 100644 web/html/form/protocol/vless.html create mode 100644 web/html/form/protocol/vmess.html create mode 100644 web/html/form/protocol/wireguard.html create mode 100644 web/html/form/reality_settings.html create mode 100644 web/html/form/sniffing.html create mode 100644 web/html/form/stream/external_proxy.html create mode 100644 web/html/form/stream/stream_grpc.html create mode 100644 web/html/form/stream/stream_httpupgrade.html create mode 100644 web/html/form/stream/stream_kcp.html create mode 100644 web/html/form/stream/stream_settings.html create mode 100644 web/html/form/stream/stream_sockopt.html create mode 100644 web/html/form/stream/stream_tcp.html create mode 100644 web/html/form/stream/stream_ws.html create mode 100644 web/html/form/stream/stream_xhttp.html create mode 100644 web/html/form/tls_settings.html create mode 100644 web/html/inbounds.html create mode 100644 web/html/index.html create mode 100644 web/html/modals/client_bulk_modal.html create mode 100644 web/html/modals/client_modal.html create mode 100644 web/html/modals/dns_modal.html create mode 100644 web/html/modals/fakedns_modal.html create mode 100644 web/html/modals/inbound_info_modal.html create mode 100644 web/html/modals/inbound_modal.html create mode 100644 web/html/modals/prompt_modal.html create mode 100644 web/html/modals/qrcode_modal.html create mode 100644 web/html/modals/text_modal.html create mode 100644 web/html/modals/warp_modal.html create mode 100644 web/html/modals/xray_balancer_modal.html create mode 100644 web/html/modals/xray_outbound_modal.html create mode 100644 web/html/modals/xray_reverse_modal.html create mode 100644 web/html/modals/xray_rule_modal.html create mode 100644 web/html/settings.html create mode 100644 web/html/settings/panel/general.html create mode 100644 web/html/settings/panel/security.html create mode 100644 web/html/settings/panel/subscription/general.html create mode 100644 web/html/settings/panel/subscription/json.html create mode 100644 web/html/settings/panel/telegram.html create mode 100644 web/html/settings/xray/advanced.html create mode 100644 web/html/settings/xray/balancers.html create mode 100644 web/html/settings/xray/basics.html create mode 100644 web/html/settings/xray/dns.html create mode 100644 web/html/settings/xray/outbounds.html create mode 100644 web/html/settings/xray/reverse.html create mode 100644 web/html/settings/xray/routing.html create mode 100644 web/html/xray.html 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') diff --git a/web/html/component/aClientTable.html b/web/html/component/aClientTable.html new file mode 100644 index 00000000..868112d9 --- /dev/null +++ b/web/html/component/aClientTable.html @@ -0,0 +1,267 @@ +{{define "component/aClientTable"}} + + + + + + + + +{{end}} diff --git a/web/html/component/aCustomStatistic.html b/web/html/component/aCustomStatistic.html new file mode 100644 index 00000000..0bff128d --- /dev/null +++ b/web/html/component/aCustomStatistic.html @@ -0,0 +1,42 @@ +{{define "component/customStatistic"}} + +{{end}} + +{{define "component/aCustomStatistic"}} + + + +{{end}} \ No newline at end of file diff --git a/web/html/component/aPersianDatepicker.html b/web/html/component/aPersianDatepicker.html new file mode 100644 index 00000000..ebd85a08 --- /dev/null +++ b/web/html/component/aPersianDatepicker.html @@ -0,0 +1,72 @@ +{{define "component/persianDatepickerTemplate"}} + +{{end}} + +{{define "component/aPersianDatepicker"}} + + + + +{{end}} \ No newline at end of file diff --git a/web/html/component/aSettingListItem.html b/web/html/component/aSettingListItem.html new file mode 100644 index 00000000..27a7abac --- /dev/null +++ b/web/html/component/aSettingListItem.html @@ -0,0 +1,49 @@ +{{define "component/settingListItem"}} + + + + + + + + + + + + + +{{end}} + +{{define "component/aSettingListItem"}} + +{{end}} diff --git a/web/html/component/aSidebar.html b/web/html/component/aSidebar.html new file mode 100644 index 00000000..dfaebb17 --- /dev/null +++ b/web/html/component/aSidebar.html @@ -0,0 +1,103 @@ +{{define "component/sidebar/content"}} + +{{end}} + +{{define "component/aSidebar"}} + + + +{{end}} \ No newline at end of file diff --git a/web/html/component/aTableSortable.html b/web/html/component/aTableSortable.html new file mode 100644 index 00000000..443ac50c --- /dev/null +++ b/web/html/component/aTableSortable.html @@ -0,0 +1,232 @@ +{{define "component/sortableTableTrigger"}} + +{{end}} + +{{define "component/aTableSortable"}} + + +{{end}} \ No newline at end of file diff --git a/web/html/component/aThemeSwitch.html b/web/html/component/aThemeSwitch.html new file mode 100644 index 00000000..ccc17714 --- /dev/null +++ b/web/html/component/aThemeSwitch.html @@ -0,0 +1,119 @@ +{{define "component/themeSwitchTemplate"}} + +{{end}} + +{{define "component/themeSwitchTemplateLogin"}} + +{{end}} + +{{define "component/aThemeSwitch"}} + +{{end}} \ No newline at end of file diff --git a/web/html/form/allocate.html b/web/html/form/allocate.html new file mode 100644 index 00000000..aba8d5c9 --- /dev/null +++ b/web/html/form/allocate.html @@ -0,0 +1,15 @@ +{{define "form/allocate"}} + + + + [[ s ]] + + + + + + + + + +{{end}} diff --git a/web/html/form/client.html b/web/html/form/client.html new file mode 100644 index 00000000..c67f1470 --- /dev/null +++ b/web/html/form/client.html @@ -0,0 +1,172 @@ +{{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/form/inbound.html b/web/html/form/inbound.html new file mode 100644 index 00000000..021a51c7 --- /dev/null +++ b/web/html/form/inbound.html @@ -0,0 +1,133 @@ +{{define "form/inbound"}} + + + + + + + + + + + + [[ p ]] + + + + + + + + + + + + + + + + + + + +