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/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 ----- 24 files changed, 1747 deletions(-) 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 (limited to 'web/html/xui/form') 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 ]] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{{end}} diff --git a/web/html/xui/form/protocol/dokodemo.html b/web/html/xui/form/protocol/dokodemo.html deleted file mode 100644 index 70ffe7e0..00000000 --- a/web/html/xui/form/protocol/dokodemo.html +++ /dev/null @@ -1,20 +0,0 @@ -{{define "form/dokodemo"}} - - - - - - - - - - TCP,UDP - TCP - UDP - - - - - - -{{end}} diff --git a/web/html/xui/form/protocol/http.html b/web/html/xui/form/protocol/http.html deleted file mode 100644 index b4c55313..00000000 --- a/web/html/xui/form/protocol/http.html +++ /dev/null @@ -1,26 +0,0 @@ -{{define "form/http"}} - - - - - - - -
{{ i18n "username" }}{{ i18n "password" }} - -
- - - - - - - - - - - -
-{{end}} diff --git a/web/html/xui/form/protocol/shadowsocks.html b/web/html/xui/form/protocol/shadowsocks.html deleted file mode 100644 index 1190b672..00000000 --- a/web/html/xui/form/protocol/shadowsocks.html +++ /dev/null @@ -1,50 +0,0 @@ -{{define "form/shadowsocks"}} - - - - - [[ method_name ]] - - - - - - - - - TCP,UDP - TCP - UDP - - - - - - -{{end}} diff --git a/web/html/xui/form/protocol/socks.html b/web/html/xui/form/protocol/socks.html deleted file mode 100644 index 849ec210..00000000 --- a/web/html/xui/form/protocol/socks.html +++ /dev/null @@ -1,34 +0,0 @@ -{{define "form/socks"}} - - - - - - - - - - - - -{{end}} diff --git a/web/html/xui/form/protocol/trojan.html b/web/html/xui/form/protocol/trojan.html deleted file mode 100644 index 09497bcd..00000000 --- a/web/html/xui/form/protocol/trojan.html +++ /dev/null @@ -1,50 +0,0 @@ -{{define "form/trojan"}} - - - {{template "form/client"}} - - - - - - - - - - - - - -
{{ i18n "pages.inbounds.email" }}Password
[[ client.email ]][[ client.password ]]
-
-
- -{{end}} diff --git a/web/html/xui/form/protocol/vless.html b/web/html/xui/form/protocol/vless.html deleted file mode 100644 index f0c9f2e2..00000000 --- a/web/html/xui/form/protocol/vless.html +++ /dev/null @@ -1,50 +0,0 @@ -{{define "form/vless"}} - - - {{template "form/client"}} - - - - - - - - - - - - - -
{{ i18n "pages.inbounds.email" }}ID
[[ client.email ]][[ client.id ]]
-
-
- -{{end}} diff --git a/web/html/xui/form/protocol/vmess.html b/web/html/xui/form/protocol/vmess.html deleted file mode 100644 index 3c5200ac..00000000 --- a/web/html/xui/form/protocol/vmess.html +++ /dev/null @@ -1,23 +0,0 @@ -{{define "form/vmess"}} - - - {{template "form/client"}} - - - - - - - - - - - - - - - -
{{ i18n "pages.inbounds.email" }}ID{{ i18n "security" }}
[[ client.email ]][[ client.id ]][[ client.security ]]
-
-
-{{end}} diff --git a/web/html/xui/form/protocol/wireguard.html b/web/html/xui/form/protocol/wireguard.html deleted file mode 100644 index 31e2e653..00000000 --- a/web/html/xui/form/protocol/wireguard.html +++ /dev/null @@ -1,76 +0,0 @@ -{{define "form/wireguard"}} - - - - - - - - - - - - - - - - - - - Peer [[ index + 1 ]] - - - - - - - - - - - - - - - - - - - - - - -{{end}} \ No newline at end of file diff --git a/web/html/xui/form/reality_settings.html b/web/html/xui/form/reality_settings.html deleted file mode 100644 index 97de0729..00000000 --- a/web/html/xui/form/reality_settings.html +++ /dev/null @@ -1,56 +0,0 @@ -{{define "form/realitySettings"}} - -{{end}} \ No newline at end of file diff --git a/web/html/xui/form/sniffing.html b/web/html/xui/form/sniffing.html deleted file mode 100644 index d8a2e85a..00000000 --- a/web/html/xui/form/sniffing.html +++ /dev/null @@ -1,29 +0,0 @@ -{{define "form/sniffing"}} - - - - {{ i18n "enabled" }} - - - - -