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/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 +++++++++++++ 14 files changed, 2484 insertions(+) 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 (limited to 'web/html/modals') diff --git a/web/html/modals/client_bulk_modal.html b/web/html/modals/client_bulk_modal.html new file mode 100644 index 00000000..d6bcfcd6 --- /dev/null +++ b/web/html/modals/client_bulk_modal.html @@ -0,0 +1,250 @@ +{{define "modals/clientsBulkModal"}} + + + + + Random + Random+Prefix + Random+Prefix+Num + Random+Prefix+Num+Postfix + Prefix+Num+Postfix + + + + + + + + + + + + + + + + + + + + [[ key ]] + + + + + {{ i18n "none" }} + [[ key ]] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{{end}} \ No newline at end of file diff --git a/web/html/modals/client_modal.html b/web/html/modals/client_modal.html new file mode 100644 index 00000000..eba3c2c1 --- /dev/null +++ b/web/html/modals/client_modal.html @@ -0,0 +1,172 @@ +{{define "modals/clientsModal"}} + + + {{template "form/client"}} + + +{{end}} diff --git a/web/html/modals/dns_modal.html b/web/html/modals/dns_modal.html new file mode 100644 index 00000000..e6266c06 --- /dev/null +++ b/web/html/modals/dns_modal.html @@ -0,0 +1,114 @@ +{{define "modals/dnsModal"}} + + + + + + + + + + + + [[ l ]] + + + + + + + + + + + + +{{end}} \ No newline at end of file diff --git a/web/html/modals/fakedns_modal.html b/web/html/modals/fakedns_modal.html new file mode 100644 index 00000000..8e554ac0 --- /dev/null +++ b/web/html/modals/fakedns_modal.html @@ -0,0 +1,57 @@ +{{define "modals/fakednsModal"}} + + + + + + + + + + + +{{end}} diff --git a/web/html/modals/inbound_info_modal.html b/web/html/modals/inbound_info_modal.html new file mode 100644 index 00000000..0ccaeff0 --- /dev/null +++ b/web/html/modals/inbound_info_modal.html @@ -0,0 +1,572 @@ +{{define "modals/inboundInfoModal"}} + + + + + + + + + + + + + + + + +
{{ i18n "protocol" }} + [[ dbInbound.protocol ]] +
{{ i18n "pages.inbounds.address" }} + + [[ dbInbound.address ]] + +
{{ i18n "pages.inbounds.port" }} + [[ dbInbound.port ]] +
+
+ + + + + + + + + + + + + + + + + +
{{ i18n "encryption" }} + [[ inbound.settings.method ]] +
{{ i18n "password" }} + + [[ inbound.settings.password ]] + +
{{ i18n "pages.inbounds.network" }} + [[ inbound.settings.network ]] +
+ + +
+ +{{end}} diff --git a/web/html/modals/inbound_modal.html b/web/html/modals/inbound_modal.html new file mode 100644 index 00000000..99d182b9 --- /dev/null +++ b/web/html/modals/inbound_modal.html @@ -0,0 +1,144 @@ +{{define "modals/inboundModal"}} + + {{template "form/inbound"}} + + +{{end}} diff --git a/web/html/modals/prompt_modal.html b/web/html/modals/prompt_modal.html new file mode 100644 index 00000000..5073650f --- /dev/null +++ b/web/html/modals/prompt_modal.html @@ -0,0 +1,71 @@ +{{define "modals/promptModal"}} + + + + + +{{end}} \ No newline at end of file diff --git a/web/html/modals/qrcode_modal.html b/web/html/modals/qrcode_modal.html new file mode 100644 index 00000000..92d30e93 --- /dev/null +++ b/web/html/modals/qrcode_modal.html @@ -0,0 +1,162 @@ +{{define "modals/qrcodeModal"}} + + + + + + + +