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/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 +++++++++++++++++++++++++++++++++ 8 files changed, 329 insertions(+) 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 (limited to 'web/html/form/protocol') diff --git a/web/html/form/protocol/dokodemo.html b/web/html/form/protocol/dokodemo.html new file mode 100644 index 00000000..70ffe7e0 --- /dev/null +++ b/web/html/form/protocol/dokodemo.html @@ -0,0 +1,20 @@ +{{define "form/dokodemo"}} + + + + + + + + + + TCP,UDP + TCP + UDP + + + + + + +{{end}} diff --git a/web/html/form/protocol/http.html b/web/html/form/protocol/http.html new file mode 100644 index 00000000..fb1d74b0 --- /dev/null +++ b/web/html/form/protocol/http.html @@ -0,0 +1,26 @@ +{{define "form/http"}} + + + + + + + +
{{ i18n "username" }}{{ i18n "password" }} + +
+ + + + + + + + + + + +
+{{end}} diff --git a/web/html/form/protocol/shadowsocks.html b/web/html/form/protocol/shadowsocks.html new file mode 100644 index 00000000..b9813afb --- /dev/null +++ b/web/html/form/protocol/shadowsocks.html @@ -0,0 +1,50 @@ +{{define "form/shadowsocks"}} + + + + + [[ method_name ]] + + + + + + + + + TCP,UDP + TCP + UDP + + + + + + +{{end}} diff --git a/web/html/form/protocol/socks.html b/web/html/form/protocol/socks.html new file mode 100644 index 00000000..e126c51c --- /dev/null +++ b/web/html/form/protocol/socks.html @@ -0,0 +1,34 @@ +{{define "form/socks"}} + + + + + + + + + + + + +{{end}} diff --git a/web/html/form/protocol/trojan.html b/web/html/form/protocol/trojan.html new file mode 100644 index 00000000..fc327721 --- /dev/null +++ b/web/html/form/protocol/trojan.html @@ -0,0 +1,50 @@ +{{define "form/trojan"}} + + + {{template "form/client"}} + + + + + + + + + + + + + +
{{ i18n "pages.inbounds.email" }}Password
[[ client.email ]][[ client.password ]]
+
+
+ +{{end}} diff --git a/web/html/form/protocol/vless.html b/web/html/form/protocol/vless.html new file mode 100644 index 00000000..3cebda6e --- /dev/null +++ b/web/html/form/protocol/vless.html @@ -0,0 +1,50 @@ +{{define "form/vless"}} + + + {{template "form/client"}} + + + + + + + + + + + + + +
{{ i18n "pages.inbounds.email" }}ID
[[ client.email ]][[ client.id ]]
+
+
+ +{{end}} diff --git a/web/html/form/protocol/vmess.html b/web/html/form/protocol/vmess.html new file mode 100644 index 00000000..3c5200ac --- /dev/null +++ b/web/html/form/protocol/vmess.html @@ -0,0 +1,23 @@ +{{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/form/protocol/wireguard.html b/web/html/form/protocol/wireguard.html new file mode 100644 index 00000000..51fc4f02 --- /dev/null +++ b/web/html/form/protocol/wireguard.html @@ -0,0 +1,76 @@ +{{define "form/wireguard"}} + + + + + + + + + + + + + + + + + + + Peer [[ index + 1 ]] + + + + + + + + + + + + + + + + + + + + + + +{{end}} \ No newline at end of file -- cgit v1.2.3