Переглянути джерело

fix: unable to rename file when modifying in "Manage Configs" #1330

0xJacky 3 тижнів тому
батько
коміт
464caf5b95

+ 5 - 5
app/src/components/TwoFA/use2FAModal.ts

@@ -1,10 +1,10 @@
-import { Modal } from 'ant-design-vue'
 import twoFA from '@/api/2fa'
 import Authorization from '@/components/TwoFA/Authorization.vue'
-import { useUserStore } from '@/pinia'
+import { useAppStore, useUserStore } from '@/pinia'
 
 function use2FAModal() {
-  const [modal, contextHolder] = Modal.useModal()
+  const app = useAppStore()
+  const { modal } = storeToRefs(app)
   const refOTPAuthorization = ref<typeof Authorization>()
   // eslint-disable-next-line sonarjs/pseudo-random
   const randomId = Math.random().toString(36).substring(2, 8)
@@ -42,7 +42,7 @@ function use2FAModal() {
       injectStyles()
 
       // Create modal instance to be able to destroy it later
-      const modalInstance = modal.confirm({
+      const modalInstance = modal.value!.confirm({
         title: $gettext('Two-factor authentication required'),
         centered: true,
         maskClosable: false,
@@ -88,7 +88,7 @@ function use2FAModal() {
     })
   }
 
-  return { open, contextHolder }
+  return { open }
 }
 
 export default use2FAModal

Різницю між файлами не показано, бо вона завелика
+ 214 - 188
app/src/language/ar/app.po


Різницю між файлами не показано, бо вона завелика
+ 210 - 173
app/src/language/de_DE/app.po


+ 50 - 38
app/src/language/en/app.po

@@ -240,7 +240,7 @@ msgid "Additional"
 msgstr ""
 
 #: src/views/site/site_edit/components/SiteEditor/SiteEditor.vue:101
-#: src/views/stream/components/StreamEditor.vue:63
+#: src/views/stream/components/StreamEditor.vue:74
 msgid "Advance Mode"
 msgstr ""
 
@@ -348,7 +348,7 @@ msgstr ""
 msgid "Are you sure to generate new recovery codes?"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:86
+#: src/views/preference/components/AuthSettings/TOTP.vue:87
 msgid "Are you sure to reset 2FA?"
 msgstr ""
 
@@ -515,7 +515,7 @@ msgstr ""
 #: src/views/config/ConfigList.vue:120 src/views/config/ConfigList.vue:217
 #: src/views/nginx_log/NginxLog.vue:92
 #: src/views/site/site_edit/components/SiteEditor/SiteEditor.vue:170
-#: src/views/stream/components/StreamEditor.vue:123
+#: src/views/stream/components/StreamEditor.vue:134
 msgid "Back"
 msgstr ""
 
@@ -621,7 +621,7 @@ msgid "Basic"
 msgstr ""
 
 #: src/views/site/site_edit/components/SiteEditor/SiteEditor.vue:104
-#: src/views/stream/components/StreamEditor.vue:66
+#: src/views/stream/components/StreamEditor.vue:77
 msgid "Basic Mode"
 msgstr ""
 
@@ -1064,7 +1064,7 @@ msgstr ""
 msgid "Click or drag folders to this area to upload"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:111
+#: src/views/preference/components/AuthSettings/TOTP.vue:112
 msgid "Click to copy"
 msgstr ""
 
@@ -1375,11 +1375,11 @@ msgstr ""
 msgid "Cross-file timeline correlation"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:73
+#: src/views/preference/components/AuthSettings/TOTP.vue:74
 msgid "Current account is enabled TOTP."
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:71
+#: src/views/preference/components/AuthSettings/TOTP.vue:72
 msgid "Current account is not enabled TOTP."
 msgstr ""
 
@@ -1726,7 +1726,7 @@ msgstr ""
 #: src/views/site/components/SiteStatusSelect.vue:162
 #: src/views/site/site_edit/components/SiteEditor/SiteEditor.vue:69
 #: src/views/site/site_list/columns.tsx:146 src/views/stream/columns.tsx:112
-#: src/views/stream/components/StreamEditor.vue:38
+#: src/views/stream/components/StreamEditor.vue:49
 #: src/views/user/userColumns.tsx:39
 msgid "Disabled"
 msgstr ""
@@ -1866,8 +1866,8 @@ msgstr ""
 msgid "Duplicate to local successfully"
 msgstr ""
 
-#: src/views/dashboard/components/ModulesTable.vue:87
-#: src/views/dashboard/components/ModulesTable.vue:92
+#: src/views/dashboard/components/ModulesTable.vue:66
+#: src/views/dashboard/components/ModulesTable.vue:71
 msgid "Dynamic"
 msgstr ""
 
@@ -1892,7 +1892,7 @@ msgid "Edit"
 msgstr ""
 
 #: src/views/site/site_edit/components/SiteEditor/SiteEditor.vue:58
-#: src/views/stream/components/StreamEditor.vue:27
+#: src/views/stream/components/StreamEditor.vue:38
 msgid "Edit %{n}"
 msgstr ""
 
@@ -2029,7 +2029,7 @@ msgstr ""
 msgid "Enable TLS"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:82
+#: src/views/preference/components/AuthSettings/TOTP.vue:83
 msgid "Enable TOTP"
 msgstr ""
 
@@ -2044,7 +2044,7 @@ msgstr ""
 #: src/views/site/site_edit/components/SiteEditor/SiteEditor.vue:63
 #: src/views/site/site_list/columns.tsx:142 src/views/stream/columns.tsx:108
 #: src/views/stream/components/RightPanel/Basic.vue:24
-#: src/views/stream/components/StreamEditor.vue:32
+#: src/views/stream/components/StreamEditor.vue:43
 #: src/views/user/userColumns.tsx:36
 msgid "Enabled"
 msgstr ""
@@ -2778,7 +2778,7 @@ msgstr ""
 msgid "Generate Recovery Codes"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/RecoveryCodes.vue:33
+#: src/views/preference/components/AuthSettings/RecoveryCodes.vue:34
 msgid "Generate recovery codes successfully"
 msgstr ""
 
@@ -2883,7 +2883,7 @@ msgstr ""
 
 #: src/views/config/components/ConfigLeftPanel.vue:254
 #: src/views/site/site_edit/components/SiteEditor/SiteEditor.vue:88
-#: src/views/stream/components/StreamEditor.vue:51
+#: src/views/stream/components/StreamEditor.vue:62
 msgid "History"
 msgstr ""
 
@@ -3028,7 +3028,7 @@ msgstr ""
 msgid "Initialing core upgrader"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:120
+#: src/views/preference/components/AuthSettings/TOTP.vue:121
 msgid "Input the code from the app:"
 msgstr ""
 
@@ -3363,8 +3363,8 @@ msgstr ""
 msgid "Load successfully"
 msgstr ""
 
-#: src/views/dashboard/components/ModulesTable.vue:100
-#: src/views/dashboard/components/ModulesTable.vue:105
+#: src/views/dashboard/components/ModulesTable.vue:79
+#: src/views/dashboard/components/ModulesTable.vue:84
 msgid "Loaded"
 msgstr ""
 
@@ -3704,7 +3704,7 @@ msgstr ""
 msgid "Modify Config"
 msgstr ""
 
-#: src/views/dashboard/components/ModulesTable.vue:27
+#: src/views/dashboard/components/ModulesTable.vue:49
 msgid "Module"
 msgstr ""
 
@@ -3712,6 +3712,10 @@ msgstr ""
 msgid "Modules"
 msgstr ""
 
+#: src/views/dashboard/components/ModulesTable.vue:26
+msgid "Modules cache refreshed"
+msgstr ""
+
 #: src/views/backup/AutoBackup/components/CronEditor.vue:27
 msgid "Monday"
 msgstr ""
@@ -3897,7 +3901,7 @@ msgid "Nginx configuration has been restored"
 msgstr ""
 
 #: src/views/site/site_edit/components/SiteEditor/SiteEditor.vue:122
-#: src/views/stream/components/StreamEditor.vue:81
+#: src/views/stream/components/StreamEditor.vue:92
 msgid "Nginx Configuration Parse Error"
 msgstr ""
 
@@ -4157,8 +4161,8 @@ msgstr ""
 msgid "Not Indexed"
 msgstr ""
 
-#: src/views/dashboard/components/ModulesTable.vue:101
-#: src/views/dashboard/components/ModulesTable.vue:105
+#: src/views/dashboard/components/ModulesTable.vue:80
+#: src/views/dashboard/components/ModulesTable.vue:84
 msgid "Not Loaded"
 msgstr ""
 
@@ -4342,7 +4346,7 @@ msgstr ""
 msgid "or drag file to editor below"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:113
+#: src/views/preference/components/AuthSettings/TOTP.vue:114
 msgid "Or enter the secret: %{secret}"
 msgstr ""
 
@@ -4907,6 +4911,10 @@ msgstr ""
 msgid "Refresh"
 msgstr ""
 
+#: src/views/dashboard/components/ModulesTable.vue:114
+msgid "Refresh Modules Cache"
+msgstr ""
+
 #: src/components/LLM/ChatMessageInput.vue:74
 msgid "Regenerate response"
 msgstr ""
@@ -5017,7 +5025,7 @@ msgstr ""
 #: src/components/LLM/LLMSessionTabs.vue:283
 #: src/components/LLM/LLMSessionTabs.vue:374
 #: src/components/NgxConfigEditor/NgxUpstream.vue:75
-#: src/views/config/components/ConfigName.vue:51
+#: src/views/config/components/ConfigName.vue:50
 #: src/views/config/components/Rename.vue:56
 #: src/views/config/ConfigList.vue:190
 #: src/views/site/site_edit/components/ConfigName/ConfigName.vue:44
@@ -5079,7 +5087,7 @@ msgstr ""
 msgid "Rename successfully"
 msgstr ""
 
-#: src/views/config/components/ConfigName.vue:30
+#: src/views/config/components/ConfigName.vue:28
 #: src/views/site/site_edit/components/ConfigName/ConfigName.vue:27
 #: src/views/stream/components/ConfigName.vue:27
 msgid "Renamed successfully"
@@ -5141,7 +5149,7 @@ msgstr ""
 msgid "Reset"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:94
+#: src/views/preference/components/AuthSettings/TOTP.vue:95
 msgid "Reset 2FA"
 msgstr ""
 
@@ -5369,14 +5377,14 @@ msgstr ""
 #: src/language/curd.ts:18
 #: src/views/certificate/components/CertificateActions.vue:29
 #: src/views/config/components/ConfigLeftPanel.vue:282
-#: src/views/config/components/ConfigName.vue:59
+#: src/views/config/components/ConfigName.vue:58
 #: src/views/dashboard/components/SiteHealthCheckModal.vue:635
 #: src/views/preference/components/AuthSettings/Passkey.vue:131
 #: src/views/preference/Preference.vue:117
 #: src/views/site/site_edit/components/ConfigName/ConfigName.vue:52
 #: src/views/site/site_edit/components/SiteEditor/SiteEditor.vue:177
 #: src/views/stream/components/ConfigName.vue:52
-#: src/views/stream/components/StreamEditor.vue:130
+#: src/views/stream/components/StreamEditor.vue:141
 msgid "Save"
 msgstr ""
 
@@ -5436,7 +5444,7 @@ msgstr ""
 #: src/language/curd.ts:28 src/views/config/components/ConfigLeftPanel.vue:198
 #: src/views/site/site_add/SiteAdd.vue:36
 #: src/views/site/site_edit/components/SiteEditor/SiteEditor.vue:47
-#: src/views/stream/store.ts:71
+#: src/views/stream/components/StreamEditor.vue:26
 msgid "Saved successfully"
 msgstr ""
 
@@ -5460,7 +5468,7 @@ msgstr ""
 msgid "Scan Results"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:70
+#: src/views/preference/components/AuthSettings/TOTP.vue:71
 msgid "Scan the QR code with your mobile phone to add the account to the app."
 msgstr ""
 
@@ -5499,6 +5507,10 @@ msgstr ""
 msgid "Search module name"
 msgstr ""
 
+#: src/views/dashboard/components/ModulesTable.vue:103
+msgid "Search modules"
+msgstr ""
+
 #: src/views/nginx_log/structured/StructuredLogViewer.vue:835
 msgid "Search range"
 msgstr ""
@@ -5507,7 +5519,7 @@ msgstr ""
 msgid "Search templates"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:110
+#: src/views/preference/components/AuthSettings/TOTP.vue:111
 msgid "Secret has been copied"
 msgstr ""
 
@@ -5839,8 +5851,8 @@ msgstr ""
 msgid "Start Restore"
 msgstr ""
 
-#: src/views/dashboard/components/ModulesTable.vue:88
-#: src/views/dashboard/components/ModulesTable.vue:92
+#: src/views/dashboard/components/ModulesTable.vue:67
+#: src/views/dashboard/components/ModulesTable.vue:71
 msgid "Static"
 msgstr ""
 
@@ -5848,7 +5860,7 @@ msgstr ""
 #: src/views/backup/AutoBackup/AutoBackup.vue:160
 #: src/views/certificate/ACMEUser.vue:75
 #: src/views/certificate/CertificateList/certColumns.tsx:63
-#: src/views/dashboard/components/ModulesTable.vue:96
+#: src/views/dashboard/components/ModulesTable.vue:75
 #: src/views/nginx_log/structured/components/SearchFilters.vue:106
 #: src/views/nginx_log/structured/StructuredLogViewer.vue:240
 #: src/views/nginx_log/structured/StructuredLogViewer.vue:520
@@ -6395,7 +6407,7 @@ msgstr ""
 msgid "To confirm revocation, please type \"Revoke\" in the field below:"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:69
+#: src/views/preference/components/AuthSettings/TOTP.vue:70
 msgid ""
 "To enable it, you need to install the Google or Microsoft Authenticator app "
 "on your mobile phone."
@@ -6505,11 +6517,11 @@ msgstr ""
 msgid "Total UV"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:67
+#: src/views/preference/components/AuthSettings/TOTP.vue:68
 msgid "TOTP"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:68
+#: src/views/preference/components/AuthSettings/TOTP.vue:69
 msgid ""
 "TOTP is a two-factor authentication method that uses a time-based one-time "
 "password algorithm."
@@ -6546,7 +6558,7 @@ msgstr ""
 #: src/composables/useUpstreamStatus.ts:132
 #: src/views/certificate/CertificateList/certColumns.tsx:24
 #: src/views/config/components/Delete.vue:122
-#: src/views/dashboard/components/ModulesTable.vue:83
+#: src/views/dashboard/components/ModulesTable.vue:62
 #: src/views/nginx_log/NginxLogList.vue:140
 #: src/views/notification/notificationColumns.tsx:8
 #: src/views/preference/components/ExternalNotify/columns.tsx:19

Різницю між файлами не показано, бо вона завелика
+ 206 - 178
app/src/language/es/app.po


Різницю між файлами не показано, бо вона завелика
+ 216 - 181
app/src/language/fr_FR/app.po


Різницю між файлами не показано, бо вона завелика
+ 266 - 160
app/src/language/ja_JP/app.po


Різницю між файлами не показано, бо вона завелика
+ 243 - 158
app/src/language/ko_KR/app.po


+ 50 - 38
app/src/language/messages.pot

@@ -249,7 +249,7 @@ msgid "Additional"
 msgstr ""
 
 #: src/views/site/site_edit/components/SiteEditor/SiteEditor.vue:101
-#: src/views/stream/components/StreamEditor.vue:63
+#: src/views/stream/components/StreamEditor.vue:74
 msgid "Advance Mode"
 msgstr ""
 
@@ -354,7 +354,7 @@ msgstr ""
 msgid "Are you sure to generate new recovery codes?"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:86
+#: src/views/preference/components/AuthSettings/TOTP.vue:87
 msgid "Are you sure to reset 2FA?"
 msgstr ""
 
@@ -524,7 +524,7 @@ msgstr ""
 #: src/views/config/ConfigList.vue:217
 #: src/views/nginx_log/NginxLog.vue:92
 #: src/views/site/site_edit/components/SiteEditor/SiteEditor.vue:170
-#: src/views/stream/components/StreamEditor.vue:123
+#: src/views/stream/components/StreamEditor.vue:134
 msgid "Back"
 msgstr ""
 
@@ -629,7 +629,7 @@ msgid "Basic"
 msgstr ""
 
 #: src/views/site/site_edit/components/SiteEditor/SiteEditor.vue:104
-#: src/views/stream/components/StreamEditor.vue:66
+#: src/views/stream/components/StreamEditor.vue:77
 msgid "Basic Mode"
 msgstr ""
 
@@ -1038,7 +1038,7 @@ msgstr ""
 msgid "Click or drag folders to this area to upload"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:111
+#: src/views/preference/components/AuthSettings/TOTP.vue:112
 msgid "Click to copy"
 msgstr ""
 
@@ -1349,11 +1349,11 @@ msgstr ""
 msgid "Cross-file timeline correlation"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:73
+#: src/views/preference/components/AuthSettings/TOTP.vue:74
 msgid "Current account is enabled TOTP."
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:71
+#: src/views/preference/components/AuthSettings/TOTP.vue:72
 msgid "Current account is not enabled TOTP."
 msgstr ""
 
@@ -1705,7 +1705,7 @@ msgstr ""
 #: src/views/site/site_edit/components/SiteEditor/SiteEditor.vue:69
 #: src/views/site/site_list/columns.tsx:146
 #: src/views/stream/columns.tsx:112
-#: src/views/stream/components/StreamEditor.vue:38
+#: src/views/stream/components/StreamEditor.vue:49
 #: src/views/user/userColumns.tsx:39
 msgid "Disabled"
 msgstr ""
@@ -1844,8 +1844,8 @@ msgstr ""
 msgid "Duplicate to local successfully"
 msgstr ""
 
-#: src/views/dashboard/components/ModulesTable.vue:87
-#: src/views/dashboard/components/ModulesTable.vue:92
+#: src/views/dashboard/components/ModulesTable.vue:66
+#: src/views/dashboard/components/ModulesTable.vue:71
 msgid "Dynamic"
 msgstr ""
 
@@ -1870,7 +1870,7 @@ msgid "Edit"
 msgstr ""
 
 #: src/views/site/site_edit/components/SiteEditor/SiteEditor.vue:58
-#: src/views/stream/components/StreamEditor.vue:27
+#: src/views/stream/components/StreamEditor.vue:38
 msgid "Edit %{n}"
 msgstr ""
 
@@ -2007,7 +2007,7 @@ msgstr ""
 msgid "Enable TLS"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:82
+#: src/views/preference/components/AuthSettings/TOTP.vue:83
 msgid "Enable TOTP"
 msgstr ""
 
@@ -2024,7 +2024,7 @@ msgstr ""
 #: src/views/site/site_list/columns.tsx:142
 #: src/views/stream/columns.tsx:108
 #: src/views/stream/components/RightPanel/Basic.vue:24
-#: src/views/stream/components/StreamEditor.vue:32
+#: src/views/stream/components/StreamEditor.vue:43
 #: src/views/user/userColumns.tsx:36
 msgid "Enabled"
 msgstr ""
@@ -2746,7 +2746,7 @@ msgstr ""
 msgid "Generate Recovery Codes"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/RecoveryCodes.vue:33
+#: src/views/preference/components/AuthSettings/RecoveryCodes.vue:34
 msgid "Generate recovery codes successfully"
 msgstr ""
 
@@ -2848,7 +2848,7 @@ msgstr ""
 
 #: src/views/config/components/ConfigLeftPanel.vue:254
 #: src/views/site/site_edit/components/SiteEditor/SiteEditor.vue:88
-#: src/views/stream/components/StreamEditor.vue:51
+#: src/views/stream/components/StreamEditor.vue:62
 msgid "History"
 msgstr ""
 
@@ -2986,7 +2986,7 @@ msgstr ""
 msgid "Initialing core upgrader"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:120
+#: src/views/preference/components/AuthSettings/TOTP.vue:121
 msgid "Input the code from the app:"
 msgstr ""
 
@@ -3319,8 +3319,8 @@ msgstr ""
 msgid "Load successfully"
 msgstr ""
 
-#: src/views/dashboard/components/ModulesTable.vue:100
-#: src/views/dashboard/components/ModulesTable.vue:105
+#: src/views/dashboard/components/ModulesTable.vue:79
+#: src/views/dashboard/components/ModulesTable.vue:84
 msgid "Loaded"
 msgstr ""
 
@@ -3656,7 +3656,7 @@ msgstr ""
 msgid "Modify Config"
 msgstr ""
 
-#: src/views/dashboard/components/ModulesTable.vue:27
+#: src/views/dashboard/components/ModulesTable.vue:49
 msgid "Module"
 msgstr ""
 
@@ -3664,6 +3664,10 @@ msgstr ""
 msgid "Modules"
 msgstr ""
 
+#: src/views/dashboard/components/ModulesTable.vue:26
+msgid "Modules cache refreshed"
+msgstr ""
+
 #: src/views/backup/AutoBackup/components/CronEditor.vue:27
 msgid "Monday"
 msgstr ""
@@ -3856,7 +3860,7 @@ msgid "Nginx configuration has been restored"
 msgstr ""
 
 #: src/views/site/site_edit/components/SiteEditor/SiteEditor.vue:122
-#: src/views/stream/components/StreamEditor.vue:81
+#: src/views/stream/components/StreamEditor.vue:92
 msgid "Nginx Configuration Parse Error"
 msgstr ""
 
@@ -4118,8 +4122,8 @@ msgstr ""
 msgid "Not Indexed"
 msgstr ""
 
-#: src/views/dashboard/components/ModulesTable.vue:101
-#: src/views/dashboard/components/ModulesTable.vue:105
+#: src/views/dashboard/components/ModulesTable.vue:80
+#: src/views/dashboard/components/ModulesTable.vue:84
 msgid "Not Loaded"
 msgstr ""
 
@@ -4301,7 +4305,7 @@ msgstr ""
 msgid "or drag file to editor below"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:113
+#: src/views/preference/components/AuthSettings/TOTP.vue:114
 msgid "Or enter the secret: %{secret}"
 msgstr ""
 
@@ -4855,6 +4859,10 @@ msgstr ""
 msgid "Refresh"
 msgstr ""
 
+#: src/views/dashboard/components/ModulesTable.vue:114
+msgid "Refresh Modules Cache"
+msgstr ""
+
 #: src/components/LLM/ChatMessageInput.vue:74
 msgid "Regenerate response"
 msgstr ""
@@ -4965,7 +4973,7 @@ msgstr ""
 #: src/components/LLM/LLMSessionTabs.vue:283
 #: src/components/LLM/LLMSessionTabs.vue:374
 #: src/components/NgxConfigEditor/NgxUpstream.vue:75
-#: src/views/config/components/ConfigName.vue:51
+#: src/views/config/components/ConfigName.vue:50
 #: src/views/config/components/Rename.vue:56
 #: src/views/config/ConfigList.vue:190
 #: src/views/site/site_edit/components/ConfigName/ConfigName.vue:44
@@ -5029,7 +5037,7 @@ msgstr ""
 msgid "Rename successfully"
 msgstr ""
 
-#: src/views/config/components/ConfigName.vue:30
+#: src/views/config/components/ConfigName.vue:28
 #: src/views/site/site_edit/components/ConfigName/ConfigName.vue:27
 #: src/views/stream/components/ConfigName.vue:27
 msgid "Renamed successfully"
@@ -5092,7 +5100,7 @@ msgstr ""
 msgid "Reset"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:94
+#: src/views/preference/components/AuthSettings/TOTP.vue:95
 msgid "Reset 2FA"
 msgstr ""
 
@@ -5316,14 +5324,14 @@ msgstr ""
 #: src/language/curd.ts:18
 #: src/views/certificate/components/CertificateActions.vue:29
 #: src/views/config/components/ConfigLeftPanel.vue:282
-#: src/views/config/components/ConfigName.vue:59
+#: src/views/config/components/ConfigName.vue:58
 #: src/views/dashboard/components/SiteHealthCheckModal.vue:635
 #: src/views/preference/components/AuthSettings/Passkey.vue:131
 #: src/views/preference/Preference.vue:117
 #: src/views/site/site_edit/components/ConfigName/ConfigName.vue:52
 #: src/views/site/site_edit/components/SiteEditor/SiteEditor.vue:177
 #: src/views/stream/components/ConfigName.vue:52
-#: src/views/stream/components/StreamEditor.vue:130
+#: src/views/stream/components/StreamEditor.vue:141
 msgid "Save"
 msgstr ""
 
@@ -5385,7 +5393,7 @@ msgstr ""
 #: src/views/config/components/ConfigLeftPanel.vue:198
 #: src/views/site/site_add/SiteAdd.vue:36
 #: src/views/site/site_edit/components/SiteEditor/SiteEditor.vue:47
-#: src/views/stream/store.ts:71
+#: src/views/stream/components/StreamEditor.vue:26
 msgid "Saved successfully"
 msgstr ""
 
@@ -5409,7 +5417,7 @@ msgstr ""
 msgid "Scan Results"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:70
+#: src/views/preference/components/AuthSettings/TOTP.vue:71
 msgid "Scan the QR code with your mobile phone to add the account to the app."
 msgstr ""
 
@@ -5450,6 +5458,10 @@ msgstr ""
 msgid "Search module name"
 msgstr ""
 
+#: src/views/dashboard/components/ModulesTable.vue:103
+msgid "Search modules"
+msgstr ""
+
 #: src/views/nginx_log/structured/StructuredLogViewer.vue:835
 msgid "Search range"
 msgstr ""
@@ -5458,7 +5470,7 @@ msgstr ""
 msgid "Search templates"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:110
+#: src/views/preference/components/AuthSettings/TOTP.vue:111
 msgid "Secret has been copied"
 msgstr ""
 
@@ -5784,8 +5796,8 @@ msgstr ""
 msgid "Start Restore"
 msgstr ""
 
-#: src/views/dashboard/components/ModulesTable.vue:88
-#: src/views/dashboard/components/ModulesTable.vue:92
+#: src/views/dashboard/components/ModulesTable.vue:67
+#: src/views/dashboard/components/ModulesTable.vue:71
 msgid "Static"
 msgstr ""
 
@@ -5793,7 +5805,7 @@ msgstr ""
 #: src/views/backup/AutoBackup/AutoBackup.vue:160
 #: src/views/certificate/ACMEUser.vue:75
 #: src/views/certificate/CertificateList/certColumns.tsx:63
-#: src/views/dashboard/components/ModulesTable.vue:96
+#: src/views/dashboard/components/ModulesTable.vue:75
 #: src/views/nginx_log/structured/components/SearchFilters.vue:106
 #: src/views/nginx_log/structured/StructuredLogViewer.vue:240
 #: src/views/nginx_log/structured/StructuredLogViewer.vue:520
@@ -6304,7 +6316,7 @@ msgstr ""
 msgid "To confirm revocation, please type \"Revoke\" in the field below:"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:69
+#: src/views/preference/components/AuthSettings/TOTP.vue:70
 msgid "To enable it, you need to install the Google or Microsoft Authenticator app on your mobile phone."
 msgstr ""
 
@@ -6402,11 +6414,11 @@ msgstr ""
 msgid "Total UV"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:67
+#: src/views/preference/components/AuthSettings/TOTP.vue:68
 msgid "TOTP"
 msgstr ""
 
-#: src/views/preference/components/AuthSettings/TOTP.vue:68
+#: src/views/preference/components/AuthSettings/TOTP.vue:69
 msgid "TOTP is a two-factor authentication method that uses a time-based one-time password algorithm."
 msgstr ""
 
@@ -6441,7 +6453,7 @@ msgstr ""
 #: src/composables/useUpstreamStatus.ts:132
 #: src/views/certificate/CertificateList/certColumns.tsx:24
 #: src/views/config/components/Delete.vue:122
-#: src/views/dashboard/components/ModulesTable.vue:83
+#: src/views/dashboard/components/ModulesTable.vue:62
 #: src/views/nginx_log/NginxLogList.vue:140
 #: src/views/notification/notificationColumns.tsx:8
 #: src/views/preference/components/ExternalNotify/columns.tsx:19

Різницю між файлами не показано, бо вона завелика
+ 208 - 173
app/src/language/pt_PT/app.po


Різницю між файлами не показано, бо вона завелика
+ 201 - 174
app/src/language/ru_RU/app.po


Різницю між файлами не показано, бо вона завелика
+ 212 - 178
app/src/language/tr_TR/app.po


Різницю між файлами не показано, бо вона завелика
+ 211 - 185
app/src/language/uk_UA/app.po


Різницю між файлами не показано, бо вона завелика
+ 212 - 186
app/src/language/vi_VN/app.po


Різницю між файлами не показано, бо вона завелика
+ 234 - 160
app/src/language/zh_CN/app.po


Різницю між файлами не показано, бо вона завелика
+ 237 - 164
app/src/language/zh_TW/app.po


+ 1 - 1
app/src/views/config/ConfigEditor.vue

@@ -1,7 +1,7 @@
 <script setup lang="ts">
 import BaseEditor from '@/components/BaseEditor'
 import ConfigLeftPanel from '@/views/config/components/ConfigLeftPanel.vue'
-import ConfigRightPanel from '@/views/config/components/ConfigRightPanel.vue'
+import ConfigRightPanel from './components/ConfigRightPanel/ConfigRightPanel.vue'
 
 // Use Vue 3.4+ useTemplateRef to get reference to left panel
 const leftPanelRef = useTemplateRef<InstanceType<typeof ConfigLeftPanel>>('leftPanel')

+ 24 - 24
app/src/views/config/components/ConfigName.vue

@@ -2,12 +2,9 @@
 import config from '@/api/config'
 import use2FAModal from '@/components/TwoFA/use2FAModal'
 
-const props = defineProps<{
-  dir?: string
-}>()
-
 const name = defineModel<string>('name', { default: '' })
 
+const route = useRoute()
 const router = useRouter()
 const { message } = useGlobalApp()
 
@@ -20,18 +17,19 @@ function clickModify() {
   modify.value = true
 }
 
+const { open: openOtpModal } = use2FAModal()
+
 function save() {
   loading.value = true
-  const otpModal = use2FAModal()
 
-  otpModal.open().then(() => {
-    config.rename(props.dir!, name.value, buffer.value).then(() => {
+  openOtpModal().then(() => {
+    config.rename(route.query.basePath as string, name.value, buffer.value).then(() => {
       modify.value = false
       message.success($gettext('Renamed successfully'))
       router.push({
         path: `/config/${encodeURIComponent(buffer.value)}/edit`,
         query: {
-          basePath: encodeURIComponent(props.dir!),
+          basePath: encodeURIComponent(route.query.basePath as string),
         },
       })
     }).finally(() => {
@@ -42,25 +40,27 @@ function save() {
 </script>
 
 <template>
-  <div v-if="!modify" class="flex items-center">
-    <div class="mr-2">
-      {{ name }}
+  <div>
+    <div v-if="!modify" class="flex items-center">
+      <div class="mr-2">
+        {{ name }}
+      </div>
+      <div>
+        <AButton type="link" size="small" @click="clickModify">
+          {{ $gettext('Rename') }}
+        </AButton>
+      </div>
     </div>
-    <div>
-      <AButton type="link" size="small" @click="clickModify">
-        {{ $gettext('Rename') }}
-      </AButton>
+    <div v-else>
+      <AInput v-model:value="buffer">
+        <template #suffix>
+          <AButton :disabled="buffer === name" type="link" size="small" :loading @click="save">
+            {{ $gettext('Save') }}
+          </AButton>
+        </template>
+      </AInput>
     </div>
   </div>
-  <div v-else>
-    <AInput v-model:value="buffer">
-      <template #suffix>
-        <AButton :disabled="buffer === name" type="link" size="small" :loading @click="save">
-          {{ $gettext('Save') }}
-        </AButton>
-      </template>
-    </AInput>
-  </div>
 </template>
 
 <style scoped lang="less">

+ 0 - 24
app/src/views/config/components/ConfigRightPanel.vue

@@ -1,24 +0,0 @@
-<script setup lang="ts">
-import type { Config } from '@/api/config'
-import ConfigRightPanel from './ConfigRightPanel/ConfigRightPanel.vue'
-
-interface ConfigRightPanelProps {
-  addMode: boolean
-  newPath: string
-  modifiedAt: string
-  origName: string
-}
-
-const props = defineProps<ConfigRightPanelProps>()
-const data = defineModel<Config>('data', { required: true })
-</script>
-
-<template>
-  <ConfigRightPanel
-    v-model:data="data"
-    :add-mode="props.addMode"
-    :new-path="props.newPath"
-    :modified-at="props.modifiedAt"
-    :orig-name="props.origName"
-  />
-</template>

+ 2 - 2
app/src/views/config/components/ConfigRightPanel/Basic.vue

@@ -33,8 +33,8 @@ const settings = useSettingsStore()
         name="name"
         :label="$gettext('Name')"
       >
-        <AInput v-if="props.addMode" v-model:value="data.name" />
-        <ConfigName v-else :name="data.name" :dir="data.dir" />
+        <AInput v-if="addMode" v-model:value="data.name" />
+        <ConfigName v-else :name="data.name" />
       </AFormItem>
       <AFormItem
         v-if="!props.addMode"

+ 6 - 6
app/src/views/config/components/ConfigRightPanel/ConfigRightPanel.vue

@@ -11,7 +11,7 @@ interface ConfigRightPanelProps {
   origName: string
 }
 
-const props = defineProps<ConfigRightPanelProps>()
+defineProps<ConfigRightPanelProps>()
 const data = defineModel<Config>('data', { required: true })
 
 const activeKey = ref('basic')
@@ -41,14 +41,14 @@ const chatHeight = computed(() => {
         <ATabPane key="basic" :tab="$gettext('Basic')">
           <Basic
             v-model:data="data"
-            :add-mode="props.addMode"
-            :new-path="props.newPath"
-            :modified-at="props.modifiedAt"
-            :orig-name="props.origName"
+            :add-mode
+            :new-path
+            :modified-at
+            :orig-name
           />
         </ATabPane>
         <ATabPane key="chat" :tab="$gettext('Chat')">
-          <Chat v-model:data="data" :chat-height="chatHeight" />
+          <Chat v-model:data="data" :chat-height />
         </ATabPane>
       </ATabs>
     </ACard>

+ 2 - 2
app/src/views/config/components/Rename.vue

@@ -30,12 +30,12 @@ defineExpose({
   open,
 })
 
+const otpModal = use2FAModal()
+
 function ok() {
   refForm.value.validate().then(() => {
     const { basePath, orig_name, new_name, sync_node_ids } = data.value
 
-    const otpModal = use2FAModal()
-
     otpModal.open().then(() => {
       // Note: API will handle URL encoding of path segments
       config.rename(basePath, orig_name, new_name, sync_node_ids).then(() => {

+ 0 - 5
app/src/views/config/components/index.ts

@@ -1,5 +0,0 @@
-import ConfigLeftPanel from './ConfigLeftPanel.vue'
-import ConfigRightPanel from './ConfigRightPanel.vue'
-import Delete from './Delete.vue'
-
-export { ConfigLeftPanel, ConfigRightPanel, Delete }

+ 2 - 2
app/src/views/preference/components/AuthSettings/RecoveryCodes.vue

@@ -23,8 +23,9 @@ const newGenerated = ref(false)
 
 const codeSource = computed(() => codes.value?.map(code => code.code).join('\n'))
 
+const otpModal = use2FAModal()
+
 function clickGenerateRecoveryCodes() {
-  const otpModal = use2FAModal()
   otpModal.open().then(() => {
     recovery.generate().then(r => {
       _codes.value = r.codes
@@ -36,7 +37,6 @@ function clickGenerateRecoveryCodes() {
 }
 
 function clickViewRecoveryCodes() {
-  const otpModal = use2FAModal()
   otpModal.open().then(() => {
     recovery.view().then(r => {
       _codes.value = r.codes

+ 2 - 1
app/src/views/preference/components/AuthSettings/TOTP.vue

@@ -49,8 +49,9 @@ function enroll(code: string) {
   })
 }
 
+const otpModal = use2FAModal()
+
 function reset2FA() {
-  const otpModal = use2FAModal()
   otpModal.open().then(() => {
     otp.reset().then(() => {
       resetting.value = false

+ 1 - 1
app/src/views/preference/components/ExternalNotify/columns.tsx

@@ -57,7 +57,7 @@ const columns: StdTableColumn[] = [
     dataIndex: 'config',
     title: () => $gettext('Config'),
     edit: {
-      type: (context: { formData: ExternalNotify, column: StdTableColumn<any>, config: Record<any, any>, mode: 'add' | 'edit' }) => {
+      type: (context: { formData: ExternalNotify }) => {
         if (!context.formData.type) {
           return <div />
         }

+ 1 - 2
app/src/views/terminal/Terminal.vue

@@ -11,7 +11,7 @@ import TerminalStatusBar from './components/TerminalStatusBar.vue'
 import '@xterm/xterm/css/xterm.css'
 
 const terminalStore = useTerminalStore()
-const { open: openOtpModal, contextHolder } = use2FAModal()
+const { open: openOtpModal } = use2FAModal()
 const {
   createSession,
   destroySession,
@@ -191,7 +191,6 @@ const terminalMainContainerHeight = computed(() => {
 
 <template>
   <div>
-    <component :is="contextHolder" />
     <AConfigProvider :theme="terminalTheme">
       <AAlert
         v-if="insecureConnection"

Деякі файли не було показано, через те що забагато файлів було змінено