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/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 ---------
12 files changed, 1294 deletions(-)
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
(limited to 'web/html/xui/settings')
diff --git a/web/html/xui/settings/panel/general.html b/web/html/xui/settings/panel/general.html
deleted file mode 100644
index 04b29341..00000000
--- a/web/html/xui/settings/panel/general.html
+++ /dev/null
@@ -1,149 +0,0 @@
-{{define "settings/panel/general"}}
-
-
-
-
- {{ i18n "pages.settings.remarkModel"}}
-
-
- {{ i18n "pages.settings.sampleRemark"}}: #[[ remarkSample ]]
-
-
-
-
- [[ value ]]
-
-
- [[ key ]]
-
-
-
-
-
- {{ i18n "pages.settings.panelListeningIP"}}
- {{ i18n "pages.settings.panelListeningIPDesc"}}
-
-
-
-
-
- {{ i18n "pages.settings.panelListeningDomain"}}
- {{ i18n "pages.settings.panelListeningDomainDesc"}}
-
-
-
-
-
- {{ i18n "pages.settings.panelPort"}}
- {{ i18n "pages.settings.panelPortDesc"}}
-
-
-
-
-
- {{ i18n "pages.settings.panelUrlPath"}}
- {{ i18n "pages.settings.panelUrlPathDesc"}}
-
-
-
-
-
- {{ i18n "pages.settings.sessionMaxAge" }}
- {{ i18n "pages.settings.sessionMaxAgeDesc" }}
-
-
-
-
-
- {{ i18n "pages.settings.pageSize" }}
- {{ i18n "pages.settings.pageSizeDesc" }}
-
-
-
-
-
- {{ i18n "pages.settings.language"}}
-
-
-
-
-
-
-
-
-
-
-
- {{ i18n "pages.settings.expireTimeDiff" }}
- {{ i18n "pages.settings.expireTimeDiffDesc" }}
-
-
-
-
-
- {{ i18n "pages.settings.trafficDiff" }}
- {{ i18n "pages.settings.trafficDiffDesc" }}
-
-
-
-
-
-
-
- {{ i18n "pages.settings.publicKeyPath"}}
- {{ i18n "pages.settings.publicKeyPathDesc"}}
-
-
-
-
-
- {{ i18n "pages.settings.privateKeyPath"}}
- {{ i18n "pages.settings.privateKeyPathDesc"}}
-
-
-
-
-
-
-
- {{ i18n "pages.settings.externalTrafficInformEnable"}}
- {{ i18n "pages.settings.externalTrafficInformEnableDesc"}}
-
-
-
-
-
- {{ i18n "pages.settings.externalTrafficInformURI"}}
- {{ i18n "pages.settings.externalTrafficInformURIDesc"}}
-
-
-
-
-
-
-
- {{ i18n "pages.settings.timeZone"}}
- {{ i18n "pages.settings.timeZoneDesc"}}
-
-
-
-
-
- {{ i18n "pages.settings.datepicker"}}
- {{ i18n "pages.settings.datepickerDescription"}}
-
-
-
-
-
-
-
-
-
-
-{{end}}
\ No newline at end of file
diff --git a/web/html/xui/settings/panel/security.html b/web/html/xui/settings/panel/security.html
deleted file mode 100644
index 7b53a959..00000000
--- a/web/html/xui/settings/panel/security.html
+++ /dev/null
@@ -1,60 +0,0 @@
-{{define "settings/panel/security"}}
-
-
-
- {{ i18n "pages.settings.oldUsername"}}
-
-
-
-
-
- {{ i18n "pages.settings.currentPassword"}}
-
-
-
-
-
- {{ i18n "pages.settings.newUsername"}}
-
-
-
-
-
- {{ i18n "pages.settings.newPassword"}}
-
-
-
-
-
-
- {{ i18n "confirm" }}
-
-
-
-
-
- {{ i18n "pages.settings.security.loginSecurity" }}
- {{ i18n "pages.settings.security.loginSecurityDesc" }}
-
-
-
-
-
-
- {{ i18n "pages.settings.security.secretToken" }}
- {{ i18n "pages.settings.security.secretTokenDesc" }}
-
-
-
-
-
-
-
- {{ i18n "confirm"}}
-
-
-
-
-
-{{end}}
\ No newline at end of file
diff --git a/web/html/xui/settings/panel/subscription/general.html b/web/html/xui/settings/panel/subscription/general.html
deleted file mode 100644
index c5577c88..00000000
--- a/web/html/xui/settings/panel/subscription/general.html
+++ /dev/null
@@ -1,98 +0,0 @@
-{{define "settings/panel/subscription/general"}}
-
-
-
- {{ i18n "pages.settings.subEnable"}}
- {{ i18n "pages.settings.subEnableDesc"}}
-
-
-
-
-
- {{ i18n "pages.settings.subTitle"}}
- {{ i18n "pages.settings.subTitleDesc"}}
-
-
-
-
-
- {{ i18n "pages.settings.subListen"}}
- {{ i18n "pages.settings.subListenDesc"}}
-
-
-
-
-
- {{ i18n "pages.settings.subDomain"}}
- {{ i18n "pages.settings.subDomainDesc"}}
-
-
-
-
-
- {{ i18n "pages.settings.subPort"}}
- {{ i18n "pages.settings.subPortDesc"}}
-
-
-
-
-
- {{ i18n "pages.settings.subPath"}}
- {{ i18n "pages.settings.subPathDesc"}}
-
-
-
-
-
- {{ i18n "pages.settings.subURI"}}
- {{ i18n "pages.settings.subURIDesc"}}
-
-
-
-
-
-
-
- {{ i18n "pages.settings.subEncrypt"}}
- {{ i18n "pages.settings.subEncryptDesc"}}
-
-
-
-
-
- {{ i18n "pages.settings.subShowInfo"}}
- {{ i18n "pages.settings.subShowInfoDesc"}}
-
-
-
-
-
-
-
- {{ i18n "pages.settings.subCertPath"}}
- {{ i18n "pages.settings.subCertPathDesc"}}
-
-
-
-
-
- {{ i18n "pages.settings.subKeyPath"}}
- {{ i18n "pages.settings.subKeyPathDesc"}}
-
-
-
-
-
-
-
- {{ i18n "pages.settings.subUpdates"}}
- {{ i18n "pages.settings.subUpdatesDesc"}}
-
-
-
-
-
-
-{{end}}
\ No newline at end of file
diff --git a/web/html/xui/settings/panel/subscription/json.html b/web/html/xui/settings/panel/subscription/json.html
deleted file mode 100644
index 4f0ee302..00000000
--- a/web/html/xui/settings/panel/subscription/json.html
+++ /dev/null
@@ -1,180 +0,0 @@
-{{define "settings/panel/subscription/json"}}
-
-
-
- {{ i18n "pages.settings.subPath"}}
- {{ i18n "pages.settings.subPathDesc"}}
-
-
-
-
-
- {{ i18n "pages.settings.subURI"}}
- {{ i18n "pages.settings.subURIDesc"}}
-
-
-
-
-
-
-
- {{ i18n "pages.settings.fragment"}}
- {{ i18n "pages.settings.fragmentDesc"}}
-
-
-
-
-
-
-
-
- Packets
-
-
-
-
-
- Length
-
-
-
-
-
- Interval
-
-
-
-
-
-
-
-
-
-
- Noises
- {{ i18n "pages.settings.noisesDesc"}}
-
-
-
-
-
-
-
-
- Type
-
- updateNoiseType(index, value)">
-
- [[ p ]]
-
-
-
-
-
- Packet
-
- updateNoisePacket(index, event.target.value)"
- placeholder="5-10">
-
-
-
- Delay (ms)
-
- updateNoiseDelay(index, event.target.value)"
- placeholder="10-20">
-
-
-
- Remove
-
-
-
- Add Noise
-
-
-
-
- {{ i18n "pages.settings.mux"}}
- {{ i18n "pages.settings.muxDesc"}}
-
-
-
-
-
-
-
-
- Concurrency
-
-
-
-
-
- xudp Concurrency
-
-
-
-
-
- xudp UDP 443
-
-
-
- [[ p ]]
-
-
-
-
-
-
-
-
-
-
- {{ i18n "pages.settings.direct"}}
- {{ i18n "pages.settings.directDesc"}}
-
-
-
-
-
-
-
-
- {{ i18n "pages.xray.directips" }}
-
-
-
- [[ p.label ]]
-
-
-
-
-
- {{ i18n "pages.xray.directdomains" }}
-
-
-
- [[ p.label ]]
-
-
-
-
-
-
-
-
-
-{{end}}
\ No newline at end of file
diff --git a/web/html/xui/settings/panel/telegram.html b/web/html/xui/settings/panel/telegram.html
deleted file mode 100644
index 0f11fc86..00000000
--- a/web/html/xui/settings/panel/telegram.html
+++ /dev/null
@@ -1,87 +0,0 @@
-{{define "settings/panel/telegram"}}
-
-
-
- {{ i18n "pages.settings.telegramBotEnable" }}
- {{ i18n "pages.settings.telegramBotEnableDesc" }}
-
-
-
-
-
- {{ i18n "pages.settings.telegramToken"}}
- {{ i18n "pages.settings.telegramTokenDesc"}}
-
-
-
-
-
- {{ i18n "pages.settings.telegramChatId"}}
- {{ i18n "pages.settings.telegramChatIdDesc"}}
-
-
-
-
-
- {{ i18n "pages.settings.telegramBotLanguage"}}
-
-
-
-
-
-
-
-
-
-
-
- {{ i18n "pages.settings.telegramNotifyTime"}}
- {{ i18n "pages.settings.telegramNotifyTimeDesc"}}
-
-
-
-
-
- {{ i18n "pages.settings.tgNotifyBackup" }}
- {{ i18n "pages.settings.tgNotifyBackupDesc" }}
-
-
-
-
-
- {{ i18n "pages.settings.tgNotifyLogin" }}
- {{ i18n "pages.settings.tgNotifyLoginDesc" }}
-
-
-
-
-
- {{ i18n "pages.settings.tgNotifyCpu" }}
- {{ i18n "pages.settings.tgNotifyCpuDesc" }}
-
-
-
-
-
-
-
- {{ i18n "pages.settings.telegramProxy"}}
- {{ i18n "pages.settings.telegramProxyDesc"}}
-
-
-
-
-
- {{ i18n "pages.settings.telegramAPIServer"}}
- {{ i18n "pages.settings.telegramAPIServerDesc"}}
-
-
-
-
-
-
-{{end}}
\ No newline at end of file
diff --git a/web/html/xui/settings/xray/advanced.html b/web/html/xui/settings/xray/advanced.html
deleted file mode 100644
index 6b9cb87b..00000000
--- a/web/html/xui/settings/xray/advanced.html
+++ /dev/null
@@ -1,14 +0,0 @@
-{{define "settings/xray/advanced"}}
-
-
-
- {{ i18n "pages.xray.completeTemplate"}}
- {{ i18n "pages.xray.Inbounds" }}
- {{ i18n "pages.xray.Outbounds" }}
- {{ i18n "pages.xray.Routings" }}
-
-
-
-{{end}}
\ No newline at end of file
diff --git a/web/html/xui/settings/xray/balancers.html b/web/html/xui/settings/xray/balancers.html
deleted file mode 100644
index 7e062ec0..00000000
--- a/web/html/xui/settings/xray/balancers.html
+++ /dev/null
@@ -1,53 +0,0 @@
-{{define "settings/xray/balancers"}}
-
-
-
- {{ i18n "pages.xray.balancer.addBalancer"}}
-
-
-
- [[ index+1 ]]
-
- e.preventDefault()" type="more"
- style="font-size: 16px; text-decoration: bold;">
-
-
-
- {{ i18n "edit" }}
-
-
-
-
- {{ i18n "delete"}}
-
-
-
-
-
-
- Random
- Round Robin
- Least Load
- Least Ping
-
-
- [[ sel ]]
-
-
-
- Observatory
- Burst Observatory
-
-
-
-
-
-
-
- {{ i18n "pages.xray.balancer.addBalancer"}}
-
-
-
-{{end}}
\ No newline at end of file
diff --git a/web/html/xui/settings/xray/basics.html b/web/html/xui/settings/xray/basics.html
deleted file mode 100644
index 3f78de77..00000000
--- a/web/html/xui/settings/xray/basics.html
+++ /dev/null
@@ -1,275 +0,0 @@
-{{define "settings/xray/basics"}}
-
-
-
-
-
-
- {{ i18n "pages.xray.generalConfigsDesc" }}
-
-
-
-
- {{ i18n "pages.xray.FreedomStrategy" }}
- {{ i18n "pages.xray.FreedomStrategyDesc" }}
-
-
-
- [[ s ]]
-
-
-
-
-
- {{ i18n "pages.xray.RoutingStrategy" }}
- {{ i18n "pages.xray.RoutingStrategyDesc" }}
-
-
-
- [[ s ]]
-
-
-
-
-
-
-
- {{ i18n "pages.xray.statsInboundUplink" }}
- {{ i18n "pages.xray.statsInboundUplinkDesc" }}
-
-
-
-
-
- {{ i18n "pages.xray.statsInboundDownlink" }}
- {{ i18n "pages.xray.statsInboundDownlinkDesc" }}
-
-
-
-
-
- {{ i18n "pages.xray.statsOutboundUplink" }}
- {{ i18n "pages.xray.statsOutboundUplinkDesc" }}
-
-
-
-
-
- {{ i18n "pages.xray.statsOutboundDownlink" }}
- {{ i18n "pages.xray.statsOutboundDownlinkDesc" }}
-
-
-
-
-
-
-
-
-
-
- {{ i18n "pages.xray.logConfigsDesc" }}
-
-
-
-
- {{ i18n "pages.xray.logLevel" }}
- {{ i18n "pages.xray.logLevelDesc" }}
-
-
-
- [[ s ]]
-
-
-
-
-
- {{ i18n "pages.xray.accessLog" }}
- {{ i18n "pages.xray.accessLogDesc" }}
-
-
-
- Empty
-
-
- [[ s ]]
-
-
-
-
-
- {{ i18n "pages.xray.errorLog" }}
- {{ i18n "pages.xray.errorLogDesc" }}
-
-
-
- Empty
-
-
- [[ s ]]
-
-
-
-
-
- {{ i18n "pages.xray.maskAddress" }}
- {{ i18n "pages.xray.maskAddressDesc" }}
-
-
-
- Empty
-
-
- [[ s ]]
-
-
-
-
-
- {{ i18n "pages.xray.dnsLog"}}
- {{ i18n "pages.xray.dnsLogDesc"}}
-
-
-
-
-
-
-
-
-
-
- {{ i18n "pages.xray.blockConfigsDesc" }}
-
-
-
-
- {{ i18n "pages.xray.Torrent"}}
- {{ i18n "pages.xray.TorrentDesc"}}
-
-
-
-
-
- {{ i18n "pages.xray.Family"}}
- {{ i18n "pages.xray.FamilyDesc"}}
-
-
-
-
-
-
-
-
-
-
- {{ i18n "pages.xray.blockConnectionsConfigsDesc" }}
-
-
-
-
- {{ i18n "pages.xray.blockips" }}
-
-
-
- [[ p.label ]]
-
-
-
-
-
- {{ i18n "pages.xray.blockdomains" }}
-
-
-
- [[ p.label ]]
-
-
-
-
-
-
-
-
- {{ i18n "pages.xray.directConnectionsConfigsDesc" }}
-
-
-
-
- {{ i18n "pages.xray.directips" }}
-
-
-
- [[ p.label ]]
-
-
-
-
-
- {{ i18n "pages.xray.directdomains" }}
-
-
-
- [[ p.label ]]
-
-
-
-
-
-
-
-
- {{ i18n "pages.xray.ipv4RoutingDesc" }}
-
-
-
-
- {{ i18n "pages.xray.ipv4Routing" }}
-
-
-
- [[ p.label ]]
-
-
-
-
-
-
-
-
- {{ i18n "pages.xray.warpRoutingDesc" }}
-
-
-
-
- {{ i18n "pages.xray.warpRouting" }}
-
-
-
-
- [[ p.label ]]
-
-
-
-
- WARP
-
-
-
-
-
-
-
- {{ i18n "pages.settings.resetDefaultConfig" }}
-
-
-
-
-{{end}}
\ No newline at end of file
diff --git a/web/html/xui/settings/xray/dns.html b/web/html/xui/settings/xray/dns.html
deleted file mode 100644
index 696f73e1..00000000
--- a/web/html/xui/settings/xray/dns.html
+++ /dev/null
@@ -1,149 +0,0 @@
-{{define "settings/xray/dns"}}
-
-
-
- {{ i18n "pages.xray.dns.enable" }}
- {{ i18n "pages.xray.dns.enableDesc" }}
-
-
-
-
-
-
- {{ i18n "pages.xray.dns.tag" }}
- {{ i18n "pages.xray.dns.tagDesc" }}
-
-
-
-
-
- {{ i18n "pages.xray.dns.clientIp" }}
- {{ i18n "pages.xray.dns.clientIpDesc" }}
-
-
-
-
-
- {{ i18n "pages.xray.dns.strategy" }}
- {{ i18n "pages.xray.dns.strategyDesc" }}
-
-
-
- [[ l ]]
-
-
-
-
-
- {{ i18n "pages.xray.dns.disableCache" }}
- {{ i18n "pages.xray.dns.disableCacheDesc" }}
-
-
-
-
-
- {{ i18n "pages.xray.dns.disableFallback" }}
- {{ i18n "pages.xray.dns.disableFallbackDesc" }}
-
-
-
-
-
- {{ i18n "pages.xray.dns.disableFallbackIfMatch" }}
- {{ i18n "pages.xray.dns.disableFallbackIfMatchDesc" }}
-
-
-
-
-
-
-
-
-
-
-
- {{ i18n "pages.xray.dns.add" }}
-
-
-
- [[ index+1 ]]
-
- e.preventDefault()" type="more"
- style="font-size: 16px; text-decoration: bold;">
-
-
-
- {{ i18n "edit" }}
-
-
-
-
- {{ i18n "delete"}}
-
-
-
-
-
-
- [[ dns.address ]]
- [[ dns ]]
-
-
- [[ dns.domains.join(",") ]]
-
-
- [[ dns.expectIPs.join(",") ]]
-
-
-
-
-
-
-
- {{ i18n "pages.xray.dns.add" }}
-
-
-
-
-
-
-
- {{ i18n "pages.xray.fakedns.add"
- }}
-
-
- [[ index+1 ]]
-
- e.preventDefault()" type="more"
- style="font-size: 16px; text-decoration: bold;">
-
-
-
- {{ i18n "edit" }}
-
-
-
-
- {{ i18n "delete"}}
-
-
-
-
-
-
-
-
-
-
-
- {{ i18n "pages.xray.fakedns.add" }}
-
-
-
-
-
-
-{{end}}
\ No newline at end of file
diff --git a/web/html/xui/settings/xray/outbounds.html b/web/html/xui/settings/xray/outbounds.html
deleted file mode 100644
index 45d07c4c..00000000
--- a/web/html/xui/settings/xray/outbounds.html
+++ /dev/null
@@ -1,72 +0,0 @@
-{{define "settings/xray/outbounds"}}
-
-
-
-
-
- {{ i18n "pages.xray.outbound.addOutbound" }}
-
- WARP
-
-
-
-
-