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/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 ++++++++++++++++++
9 files changed, 380 insertions(+)
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
(limited to 'web/html/form/stream')
diff --git a/web/html/form/stream/external_proxy.html b/web/html/form/stream/external_proxy.html
new file mode 100644
index 00000000..7ef768fb
--- /dev/null
+++ b/web/html/form/stream/external_proxy.html
@@ -0,0 +1,29 @@
+{{define "form/externalProxy"}}
+
+
+
+
+
+
+
+
+
+
+ {{ i18n "pages.inbounds.same" }}
+ {{ i18n "none" }}
+ TLS
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{{end}}
diff --git a/web/html/form/stream/stream_grpc.html b/web/html/form/stream/stream_grpc.html
new file mode 100644
index 00000000..e74a3c3f
--- /dev/null
+++ b/web/html/form/stream/stream_grpc.html
@@ -0,0 +1,13 @@
+{{define "form/streamGRPC"}}
+
+
+
+
+
+
+
+
+
+
+
+{{end}}
diff --git a/web/html/form/stream/stream_httpupgrade.html b/web/html/form/stream/stream_httpupgrade.html
new file mode 100644
index 00000000..aa433389
--- /dev/null
+++ b/web/html/form/stream/stream_httpupgrade.html
@@ -0,0 +1,26 @@
+{{define "form/streamHTTPUpgrade"}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [[ index+1 ]]
+
+
+
+
+
+
+
+{{end}}
diff --git a/web/html/form/stream/stream_kcp.html b/web/html/form/stream/stream_kcp.html
new file mode 100644
index 00000000..50794574
--- /dev/null
+++ b/web/html/form/stream/stream_kcp.html
@@ -0,0 +1,48 @@
+{{define "form/streamKCP"}}
+
+
+
+ None
+ SRTP
+ uTP
+ WeChat
+ DTLS 1.2
+ WireGuard
+ DNS
+
+
+
+
+
+
+ {{ i18n "reset" }}
+
+ {{ i18n "password" }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{{end}}
diff --git a/web/html/form/stream/stream_settings.html b/web/html/form/stream/stream_settings.html
new file mode 100644
index 00000000..f6b17cc6
--- /dev/null
+++ b/web/html/form/stream/stream_settings.html
@@ -0,0 +1,51 @@
+{{define "form/streamSettings"}}
+
+
+
+
+ TCP (RAW)
+ mKCP
+ WebSocket
+ gRPC
+ HTTPUpgrade
+ XHTTP
+
+
+
+
+
+
+ {{template "form/streamTCP"}}
+
+
+
+
+ {{template "form/streamKCP"}}
+
+
+
+
+ {{template "form/streamWS"}}
+
+
+
+
+ {{template "form/streamGRPC"}}
+
+
+
+
+ {{template "form/streamHTTPUpgrade"}}
+
+
+
+
+ {{template "form/streamXHTTP"}}
+
+
+
+
+ {{template "form/streamSockopt"}}
+
+{{end}}
diff --git a/web/html/form/stream/stream_sockopt.html b/web/html/form/stream/stream_sockopt.html
new file mode 100644
index 00000000..4480594a
--- /dev/null
+++ b/web/html/form/stream/stream_sockopt.html
@@ -0,0 +1,66 @@
+{{define "form/streamSockopt"}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [[ key ]]
+
+
+
+
+ [[ key ]]
+
+
+
+
+ Off
+ Redirect
+ TProxy
+
+
+
+
+
+
+
+
+
+
+{{end}}
diff --git a/web/html/form/stream/stream_tcp.html b/web/html/form/stream/stream_tcp.html
new file mode 100644
index 00000000..3024ef77
--- /dev/null
+++ b/web/html/form/stream/stream_tcp.html
@@ -0,0 +1,72 @@
+{{define "form/streamTCP"}}
+
+
+
+
+
+
+ inbound.stream.tcp.type = checked ? 'http' : 'none'">
+
+
+
+
+
+ {{ i18n "pages.inbounds.stream.general.request" }}
+
+
+
+
+
+
+
+ {{ i18n "pages.inbounds.stream.tcp.path" }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [[ index+1 ]]
+
+
+
+
+
+
+
+
+ {{ i18n "pages.inbounds.stream.general.response" }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [[ index+1 ]]
+
+
+
+
+
+
+
+
+
+{{end}}
diff --git a/web/html/form/stream/stream_ws.html b/web/html/form/stream/stream_ws.html
new file mode 100644
index 00000000..4c71a516
--- /dev/null
+++ b/web/html/form/stream/stream_ws.html
@@ -0,0 +1,29 @@
+{{define "form/streamWS"}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [[ index+1 ]]
+
+
+
+
+
+
+
+{{end}}
diff --git a/web/html/form/stream/stream_xhttp.html b/web/html/form/stream/stream_xhttp.html
new file mode 100644
index 00000000..4b3052b6
--- /dev/null
+++ b/web/html/form/stream/stream_xhttp.html
@@ -0,0 +1,46 @@
+{{define "form/streamXHTTP"}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [[ index+1 ]]
+
+
+
+
+
+
+
+
+ [[ key ]]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{{end}}
\ No newline at end of file
--
cgit v1.2.3