From 5178d1e80887f540b60bb61a32630217b69bf331 Mon Sep 17 00:00:00 2001 From: 0xJacky Date: Fri, 12 Aug 2022 14:02:45 +0800 Subject: [PATCH] Refactored issue certificate --- frontend/components.d.ts | 1 + frontend/src/dark.less | 4 + frontend/src/language/constants.ts | 11 ++ frontend/src/language/en/app.po | 76 ++++++-- frontend/src/language/messages.pot | 74 ++++++-- frontend/src/language/translations.json | 2 +- frontend/src/language/zh_CN/app.mo | Bin 7900 -> 8652 bytes frontend/src/language/zh_CN/app.po | 75 ++++++-- frontend/src/language/zh_TW/app.po | 76 ++++++-- frontend/src/views/domain/cert/IssueCert.vue | 89 +++++++-- server/api/cert.go | 184 ++++++++++--------- server/pkg/cert/auto_cert.go | 29 ++- server/pkg/cert/cert.go | 50 +++-- 13 files changed, 472 insertions(+), 199 deletions(-) diff --git a/frontend/components.d.ts b/frontend/components.d.ts index 9755f676..97d03dd5 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -32,6 +32,7 @@ declare module '@vue/runtime-core' { AModal: typeof import('ant-design-vue/es')['Modal'] APagination: typeof import('ant-design-vue/es')['Pagination'] APopconfirm: typeof import('ant-design-vue/es')['Popconfirm'] + AProgress: typeof import('ant-design-vue/es')['Progress'] AreaChart: typeof import('./src/components/Chart/AreaChart.vue')['default'] AResult: typeof import('ant-design-vue/es')['Result'] ARow: typeof import('ant-design-vue/es')['Row'] diff --git a/frontend/src/dark.less b/frontend/src/dark.less index fc666585..65b88fe2 100644 --- a/frontend/src/dark.less +++ b/frontend/src/dark.less @@ -3,3 +3,7 @@ .directive-editor-extra { background-color: rgba(0, 0, 0, 0.84) !important; } + +.issue-cert-log-container { + background-color: rgba(0, 0, 0, 0.84) !important; +} diff --git a/frontend/src/language/constants.ts b/frontend/src/language/constants.ts index 64612245..bb8ea359 100644 --- a/frontend/src/language/constants.ts +++ b/frontend/src/language/constants.ts @@ -7,4 +7,15 @@ export const msg = [ $gettext('Prohibit changing root password in demo'), $gettext('Prohibit deleting the default user'), $gettext('Failed to get certificate information'), + + $gettext('Generating private key for registering account'), + $gettext('Preparing lego configurations'), + $gettext('Creating client facilitates communication with the CA server'), + $gettext('Using HTTP01 challenge provider'), + $gettext('Registering user'), + $gettext('Obtaining certificate'), + $gettext('Writing certificate to disk'), + $gettext('Writing certificate private key to disk'), + $gettext('Reloading nginx'), + $gettext('Finished') ] diff --git a/frontend/src/language/en/app.po b/frontend/src/language/en/app.po index 3d15e331..b2810242 100644 --- a/frontend/src/language/en/app.po +++ b/frontend/src/language/en/app.po @@ -60,7 +60,7 @@ msgstr "Auto-renewal disabled for %{name}" msgid "Auto-renewal enabled for %{name}" msgstr "Auto-renewal enabled for %{name}" -#: src/views/domain/DomainEdit.vue:166 +#: src/views/domain/DomainEdit.vue:178 msgid "Back" msgstr "Back" @@ -86,22 +86,22 @@ msgstr "Build with" msgid "Cancel" msgstr "Cancel" -#: src/views/domain/cert/CertInfo.vue:40 +#: src/views/domain/cert/CertInfo.vue:24 msgid "Certificate has expired" msgstr "Certificate has expired" -#: src/views/domain/cert/CertInfo.vue:44 +#: src/views/domain/cert/CertInfo.vue:28 msgid "Certificate is valid" msgstr "Certificate is valid" -#: src/views/domain/cert/CertInfo.vue:30 +#: src/views/domain/cert/CertInfo.vue:14 msgid "Certificate Status" msgstr "Certificate Status" #: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:29 #: src/views/domain/ngx_conf/LocationEditor.vue:21 #: src/views/domain/ngx_conf/LocationEditor.vue:7 -#: src/views/domain/ngx_conf/NgxConfigEditor.vue:154 +#: src/views/domain/ngx_conf/NgxConfigEditor.vue:155 msgid "Comments" msgstr "Comments" @@ -138,6 +138,10 @@ msgstr "Create Another" msgid "Created at" msgstr "Created at" +#: src/language/constants.ts:13 +msgid "Creating client facilitates communication with the CA server" +msgstr "" + #: src/routes/index.ts:26 msgid "Dashboard" msgstr "Dashboard" @@ -180,7 +184,7 @@ msgstr "Disable auto-renewal failed for %{name}" msgid "Disabled" msgstr "Disabled" -#: src/views/domain/DomainEdit.vue:101 src/views/domain/DomainList.vue:64 +#: src/views/domain/DomainEdit.vue:112 src/views/domain/DomainList.vue:64 msgid "Disabled successfully" msgstr "Disabled successfully" @@ -226,7 +230,7 @@ msgstr "Enable TLS" msgid "Enabled" msgstr "Enabled" -#: src/views/domain/DomainAdd.vue:46 src/views/domain/DomainEdit.vue:92 +#: src/views/domain/DomainAdd.vue:46 src/views/domain/DomainEdit.vue:103 #: src/views/domain/DomainList.vue:54 msgid "Enabled successfully" msgstr "Enabled successfully" @@ -235,15 +239,15 @@ msgstr "Enabled successfully" msgid "Encrypt website with Let's Encrypt" msgstr "Encrypt website with Let's Encrypt" -#: src/views/domain/cert/CertInfo.vue:33 +#: src/views/domain/cert/CertInfo.vue:17 msgid "Expiration Date: %{date}" msgstr "Expiration Date: %{date}" -#: src/views/domain/DomainEdit.vue:104 src/views/domain/DomainList.vue:68 +#: src/views/domain/DomainEdit.vue:115 src/views/domain/DomainList.vue:68 msgid "Failed to disable %{msg}" msgstr "Failed to disable %{msg}" -#: src/views/domain/DomainEdit.vue:95 src/views/domain/DomainList.vue:58 +#: src/views/domain/DomainEdit.vue:106 src/views/domain/DomainList.vue:58 msgid "Failed to enable %{msg}" msgstr "Failed to enable %{msg}" @@ -255,10 +259,14 @@ msgstr "" msgid "File Not Found" msgstr "File Not Found" -#: src/views/domain/DomainAdd.vue:7 +#: src/language/constants.ts:20 src/views/domain/DomainAdd.vue:7 msgid "Finished" msgstr "Finished" +#: src/language/constants.ts:11 +msgid "Generating private key for registering account" +msgstr "" + #: src/views/domain/cert/IssueCert.vue:85 msgid "Getting the certificate, please wait..." msgstr "Getting the certificate, please wait..." @@ -276,7 +284,7 @@ msgstr "Install" msgid "Install successfully" msgstr "Enabled successfully" -#: src/views/domain/cert/CertInfo.vue:31 +#: src/views/domain/cert/CertInfo.vue:15 msgid "Intermediate Certification Authorities: %{issuer}" msgstr "Intermediate Certification Authorities: %{issuer}" @@ -384,7 +392,7 @@ msgstr "No" msgid "Not Found" msgstr "Not Found" -#: src/views/domain/cert/CertInfo.vue:35 +#: src/views/domain/cert/CertInfo.vue:19 msgid "Not Valid Before: %{date}" msgstr "Not Valid Before: %{date}" @@ -396,6 +404,10 @@ msgstr "" "Note: The server_name in the current configuration must be the domain name " "you need to get the certificate." +#: src/language/constants.ts:16 +msgid "Obtaining certificate" +msgstr "" + #: src/components/StdDataDisplay/StdCurd.vue:27 #: src/components/StdDataDisplay/StdTable.vue:40 #: src/views/domain/DomainList.vue:26 @@ -435,6 +447,11 @@ msgstr "Please input your password!" msgid "Please input your username!" msgstr "Please input your username!" +#: src/language/constants.ts:12 +#, fuzzy +msgid "Preparing lego configurations" +msgstr "Configurations" + #: src/language/constants.ts:7 msgid "Prohibit changing root password in demo" msgstr "" @@ -455,11 +472,19 @@ msgstr "Reads" msgid "Receive" msgstr "Receive" +#: src/language/constants.ts:15 +msgid "Registering user" +msgstr "" + +#: src/language/constants.ts:19 +msgid "Reloading nginx" +msgstr "" + #: src/components/StdDataDisplay/StdTable.vue:187 msgid "Reset" msgstr "" -#: src/views/config/ConfigEdit.vue:52 src/views/domain/DomainEdit.vue:169 +#: src/views/config/ConfigEdit.vue:52 src/views/domain/DomainEdit.vue:181 msgid "Save" msgstr "Save" @@ -479,7 +504,7 @@ msgid "Save Successfully" msgstr "Saved successfully" #: src/views/config/ConfigEdit.vue:34 src/views/domain/DomainAdd.vue:43 -#: src/views/domain/DomainEdit.vue:80 +#: src/views/domain/DomainEdit.vue:91 msgid "Saved successfully" msgstr "Saved successfully" @@ -488,10 +513,9 @@ msgid "Send" msgstr "Send" #: src/components/StdDataDisplay/StdTable.vue:112 -#: src/components/StdDataDisplay/StdTable.vue:94 -#: src/views/config/ConfigEdit.vue:22 src/views/domain/DomainEdit.vue:44 -#: src/views/domain/DomainEdit.vue:56 src/views/domain/DomainEdit.vue:65 -#: src/views/domain/DomainEdit.vue:83 src/views/domain/DomainList.vue:78 +#: src/views/config/ConfigEdit.vue:22 src/views/domain/DomainEdit.vue:56 +#: src/views/domain/DomainEdit.vue:68 src/views/domain/DomainEdit.vue:77 +#: src/views/domain/DomainEdit.vue:94 src/views/domain/DomainList.vue:78 #: src/views/other/Install.vue:71 msgid "Server error" msgstr "Server error" @@ -529,7 +553,7 @@ msgstr "Status" msgid "Storage" msgstr "Storage" -#: src/views/domain/cert/CertInfo.vue:32 +#: src/views/domain/cert/CertInfo.vue:16 msgid "Subject Name: %{name}" msgstr "Subject Name: %{name}" @@ -579,6 +603,10 @@ msgstr "Username" msgid "Username (*)" msgstr "Username (*)" +#: src/language/constants.ts:14 +msgid "Using HTTP01 challenge provider" +msgstr "" + #: src/views/domain/cert/IssueCert.vue:12 src/views/domain/DomainAdd.vue:24 msgid "Warning" msgstr "Warning" @@ -588,6 +616,14 @@ msgstr "Warning" msgid "Writes" msgstr "Writes" +#: src/language/constants.ts:18 +msgid "Writing certificate private key to disk" +msgstr "" + +#: src/language/constants.ts:17 +msgid "Writing certificate to disk" +msgstr "" + #: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:16 msgid "Yes" msgstr "Yes" diff --git a/frontend/src/language/messages.pot b/frontend/src/language/messages.pot index ba05900e..ae65b0d8 100644 --- a/frontend/src/language/messages.pot +++ b/frontend/src/language/messages.pot @@ -54,7 +54,7 @@ msgstr "" msgid "Auto-renewal enabled for %{name}" msgstr "" -#: src/views/domain/DomainEdit.vue:166 +#: src/views/domain/DomainEdit.vue:178 msgid "Back" msgstr "" @@ -79,22 +79,22 @@ msgstr "" msgid "Cancel" msgstr "" -#: src/views/domain/cert/CertInfo.vue:40 +#: src/views/domain/cert/CertInfo.vue:24 msgid "Certificate has expired" msgstr "" -#: src/views/domain/cert/CertInfo.vue:44 +#: src/views/domain/cert/CertInfo.vue:28 msgid "Certificate is valid" msgstr "" -#: src/views/domain/cert/CertInfo.vue:30 +#: src/views/domain/cert/CertInfo.vue:14 msgid "Certificate Status" msgstr "" #: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:29 #: src/views/domain/ngx_conf/LocationEditor.vue:21 #: src/views/domain/ngx_conf/LocationEditor.vue:7 -#: src/views/domain/ngx_conf/NgxConfigEditor.vue:154 +#: src/views/domain/ngx_conf/NgxConfigEditor.vue:155 msgid "Comments" msgstr "" @@ -131,6 +131,10 @@ msgstr "" msgid "Created at" msgstr "" +#: src/language/constants.ts:13 +msgid "Creating client facilitates communication with the CA server" +msgstr "" + #: src/routes/index.ts:26 msgid "Dashboard" msgstr "" @@ -175,7 +179,7 @@ msgstr "" msgid "Disabled" msgstr "" -#: src/views/domain/DomainEdit.vue:101 +#: src/views/domain/DomainEdit.vue:112 #: src/views/domain/DomainList.vue:64 msgid "Disabled successfully" msgstr "" @@ -226,7 +230,7 @@ msgid "Enabled" msgstr "" #: src/views/domain/DomainAdd.vue:46 -#: src/views/domain/DomainEdit.vue:92 +#: src/views/domain/DomainEdit.vue:103 #: src/views/domain/DomainList.vue:54 msgid "Enabled successfully" msgstr "" @@ -235,16 +239,16 @@ msgstr "" msgid "Encrypt website with Let's Encrypt" msgstr "" -#: src/views/domain/cert/CertInfo.vue:33 +#: src/views/domain/cert/CertInfo.vue:17 msgid "Expiration Date: %{date}" msgstr "" -#: src/views/domain/DomainEdit.vue:104 +#: src/views/domain/DomainEdit.vue:115 #: src/views/domain/DomainList.vue:68 msgid "Failed to disable %{msg}" msgstr "" -#: src/views/domain/DomainEdit.vue:95 +#: src/views/domain/DomainEdit.vue:106 #: src/views/domain/DomainList.vue:58 msgid "Failed to enable %{msg}" msgstr "" @@ -258,10 +262,15 @@ msgstr "" msgid "File Not Found" msgstr "" +#: src/language/constants.ts:20 #: src/views/domain/DomainAdd.vue:7 msgid "Finished" msgstr "" +#: src/language/constants.ts:11 +msgid "Generating private key for registering account" +msgstr "" + #: src/views/domain/cert/IssueCert.vue:85 msgid "Getting the certificate, please wait..." msgstr "" @@ -279,7 +288,7 @@ msgstr "" msgid "Install successfully" msgstr "" -#: src/views/domain/cert/CertInfo.vue:31 +#: src/views/domain/cert/CertInfo.vue:15 msgid "Intermediate Certification Authorities: %{issuer}" msgstr "" @@ -387,7 +396,7 @@ msgstr "" msgid "Not Found" msgstr "" -#: src/views/domain/cert/CertInfo.vue:35 +#: src/views/domain/cert/CertInfo.vue:19 msgid "Not Valid Before: %{date}" msgstr "" @@ -395,6 +404,10 @@ msgstr "" msgid "Note: The server_name in the current configuration must be the domain name you need to get the certificate." msgstr "" +#: src/language/constants.ts:16 +msgid "Obtaining certificate" +msgstr "" + #: src/components/StdDataDisplay/StdCurd.vue:27 #: src/components/StdDataDisplay/StdTable.vue:40 #: src/views/domain/DomainList.vue:26 @@ -437,6 +450,10 @@ msgstr "" msgid "Please input your username!" msgstr "" +#: src/language/constants.ts:12 +msgid "Preparing lego configurations" +msgstr "" + #: src/language/constants.ts:7 msgid "Prohibit changing root password in demo" msgstr "" @@ -458,12 +475,20 @@ msgstr "" msgid "Receive" msgstr "" +#: src/language/constants.ts:15 +msgid "Registering user" +msgstr "" + +#: src/language/constants.ts:19 +msgid "Reloading nginx" +msgstr "" + #: src/components/StdDataDisplay/StdTable.vue:187 msgid "Reset" msgstr "" #: src/views/config/ConfigEdit.vue:52 -#: src/views/domain/DomainEdit.vue:169 +#: src/views/domain/DomainEdit.vue:181 msgid "Save" msgstr "" @@ -484,7 +509,7 @@ msgstr "" #: src/views/config/ConfigEdit.vue:34 #: src/views/domain/DomainAdd.vue:43 -#: src/views/domain/DomainEdit.vue:80 +#: src/views/domain/DomainEdit.vue:91 msgid "Saved successfully" msgstr "" @@ -494,12 +519,11 @@ msgid "Send" msgstr "" #: src/components/StdDataDisplay/StdTable.vue:112 -#: src/components/StdDataDisplay/StdTable.vue:94 #: src/views/config/ConfigEdit.vue:22 -#: src/views/domain/DomainEdit.vue:44 #: src/views/domain/DomainEdit.vue:56 -#: src/views/domain/DomainEdit.vue:65 -#: src/views/domain/DomainEdit.vue:83 +#: src/views/domain/DomainEdit.vue:68 +#: src/views/domain/DomainEdit.vue:77 +#: src/views/domain/DomainEdit.vue:94 #: src/views/domain/DomainList.vue:78 #: src/views/other/Install.vue:71 msgid "Server error" @@ -539,7 +563,7 @@ msgstr "" msgid "Storage" msgstr "" -#: src/views/domain/cert/CertInfo.vue:32 +#: src/views/domain/cert/CertInfo.vue:16 msgid "Subject Name: %{name}" msgstr "" @@ -587,6 +611,10 @@ msgstr "" msgid "Username (*)" msgstr "" +#: src/language/constants.ts:14 +msgid "Using HTTP01 challenge provider" +msgstr "" + #: src/views/domain/cert/IssueCert.vue:12 #: src/views/domain/DomainAdd.vue:24 msgid "Warning" @@ -598,6 +626,14 @@ msgstr "" msgid "Writes" msgstr "" +#: src/language/constants.ts:18 +msgid "Writing certificate private key to disk" +msgstr "" + +#: src/language/constants.ts:17 +msgid "Writing certificate to disk" +msgstr "" + #: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:16 msgid "Yes" msgstr "" diff --git a/frontend/src/language/translations.json b/frontend/src/language/translations.json index 64d2edb2..c253b5e3 100644 --- a/frontend/src/language/translations.json +++ b/frontend/src/language/translations.json @@ -1 +1 @@ -{"zh_CN":{"About":"关于","Action":"操作","Add":"添加","Add Directive Below":"在下面添加指令","Add Location":"添加 Location","Add Site":"添加站点","Advance Mode":"高级模式","Are you sure you want to delete ?":"您确定要删除吗?","Are you sure you want to remove this directive?":"您确定要删除这条指令?","Auto-renewal disabled for %{name}":"成功关闭 %{name} 自动续签","Auto-renewal enabled for %{name}":"成功启用 %{name} 自动续签","Back":"返回","Back Home":"返回首页","Base information":"基本信息","Basic Mode":"基本模式","Build with":"构建基于","Cancel":"取消","Certificate has expired":"此证书已过期","Certificate is valid":"此证书有效","Certificate Status":"证书状态","Comments":"注释","Configuration Name":"配置名称","Configurations":"配置","Configure SSL":"配置 SSL","Content":"内容","CPU Status":"CPU 状态","Create Another":"再创建一个","Created at":"创建时间","Dashboard":"仪表盘","Database (Optional, default: database)":"数据库 (可选,默认: database)","Delete":"删除","Delete ID: %{id}":"删除 ID: %{id}","Delete site: %{site_name}":"删除站点: %{site_name}","Development Mode":"开发模式","Directive":"指令","Directives":"指令","Disable auto-renewal failed for %{name}":"关闭 %{name} 自动续签失败","Disabled":"禁用","Disabled successfully":"禁用成功","Disk IO":"磁盘 IO","Domain Config Created Successfully":"域名配置文件创建成功","Edit %{n}":"编辑 %{n}","Edit Configuration":"编辑配置","Edit Site":"编辑站点","Email (*)":"邮箱 (*)","Enable auto-renewal failed for %{name}":"启用 %{name} 自动续签失败","Enable failed":"启用失败","Enable TLS":"启用 TLS","Enabled":"启用","Enabled successfully":"启用成功","Encrypt website with Let's Encrypt":"用 Let's Encrypt 对网站进行加密","Expiration Date: %{date}":"过期时间: %{date}","Failed to disable %{msg}":"禁用失败 %{msg}","Failed to enable %{msg}":"启用失败 %{msg}","Failed to get certificate information":"获取证书信息失败","File Not Found":"未找到文件","Finished":"完成","Getting the certificate, please wait...":"正在获取证书,请稍等...","Home":"首页","Install":"安装","Install successfully":"安装成功","Intermediate Certification Authorities: %{issuer}":"中级证书颁发机构: %{issuer}","Leave blank for no change":"留空表示不修改","Load Averages:":"系统负载:","Location":"Location","Locations":"Locations","Login":"登录","Login successful":"登录成功","Logout successful":"登出成功","Make sure you have configured a reverse proxy for .well-known directory to HTTPChallengePort (default: 9180) before getting the certificate.":"在获取签发证书前,请确保配置文件中已将 .well-known 目录反向代理到 HTTPChallengePort (默认: 9180)","Manage Configs":"配置管理","Manage Sites":"网站管理","Manage Users":"用户管理","Memory":"内存","Memory and Storage":"内存与存储","Modify":"修改","Modify Config":"修改配置文件","Name":"名称","Network":"网络","Network Statistics":"流量统计","Network Total Receive":"下载流量","Network Total Send":"上传流量","Next":"下一步","No":"取消","Not Found":"找不到页面","Not Valid Before: %{date}":"此前无效: %{date}","Note: The server_name in the current configuration must be the domain name you need to get the certificate.":"注意:当前配置中的 server_name 必须为需要申请证书的域名。","OK":"确定","Params":"参数","Password":"密码","Password (*)":"密码 (*)","Path":"路径","Please input your E-mail!":"请输入您的邮箱!","Please input your password!":"请输入您的密码!","Please input your username!":"请输入您的用户名!","Prohibit changing root password in demo":"禁止在演示模式下修改 root 账户的密码","Prohibit deleting the default user":"禁止删除默认用户","Project Team":"项目团队","Reads":"读","Receive":"下载","Reset":"重置","Save":"保存","Save Directive":"保存指令","Save error %{msg}":"保存错误 %{msg}","Save Successfully":"保存成功","Saved successfully":"保存成功","Send":"上传","Server error":"服务器错误","Server Info":"服务器信息","server_name not found in directives":"未在指令集合中找到 server_name","server_name parameter is required":"必须为 server_name 指令指明参数","server_name parameters more than one":"server_name 指令包含多个参数","Single Directive":"单行指令","Sites List":"站点列表","Status":"状态","Storage":"存储","Subject Name: %{name}":"主体名称: %{name}","Table":"列表","Terminal":"终端","The certificate for the domain will be checked every hour, and will be renewed if it has been more than 1 month since it was last issued.":"系统将会每小时检测一次该域名证书,若距离上次签发已超过1个月,则将自动续签。","The filename cannot contain the following characters: %{c}":"文件名不能包含以下字符: %{c}","The username or password is incorrect":"用户名或密码错误","Updated at":"修改时间","Uptime:":"运行时间:","Username":"用户名","Username (*)":"用户名 (*)","Warning":"警告","Writes":"写","Yes":"是的","License":{"Project":"开源许可"}},"zh_TW":{"About":"關於","Action":"操作","Add Directive Below":"在下面新增指令","Add Location":"新增 Location","Add Site":"新增站點","Advance Mode":"高階模式","Are you sure you want to remove this directive?":"您確定要刪除這條指令?","Auto-renewal disabled for %{name}":"已關閉 %{name} 自動續簽","Auto-renewal enabled for %{name}":"已啟用 %{name} 自動續簽","Back":"返回","Base information":"基本訊息","Basic Mode":"基本模式","Build with":"構建基於","Cancel":"取消","Certificate has expired":"此憑證已過期","Certificate is valid":"此憑證有效","Certificate Status":"憑證狀態","Comments":"註釋","Configuration Name":"配置名稱","Configurations":"配置","Configure SSL":"配置 SSL","Content":"內容","CPU Status":"中央處理器狀態","CPU:":"中央處理器:","Create Another":"再創建一個","Created at":"建立時間","Dashboard":"儀表盤","Database (Optional, default: database)":"資料庫 (可選,預設: database)","Delete ID: %{id}":"刪除 ID: %{id}","Development Mode":"開發模式","Directive":"指令","Directives":"指令","Disable auto-renewal failed for %{name}":"關閉 %{name} 自動續簽失敗","Disabled":"禁用","Disabled successfully":"禁用成功","Disk IO":"磁碟 IO","Domain Config Created Successfully":"域名配置文件創建成功","Edit %{n}":"編輯 %{n}","Edit Configuration":"編輯配置","Edit Site":"編輯站點","Email (*)":"郵箱 (*)","Enable auto-renewal failed for %{name}":"啟用 %{name} 自動續簽失敗","Enable failed":"啟用失敗","Enable TLS":"啟用 TLS","Enabled":"啟用","Enabled successfully":"啟用成功","Encrypt website with Let's Encrypt":"用 Let's Encrypt 對網站進行加密","Expiration Date: %{date}":"過期時間: %{date}","Failed to disable %{msg}":"禁用失敗 %{msg}","Failed to enable %{msg}":"啟用失敗 %{msg}","File Not Found":"未找到檔案","Finished":"完成","Getting the certificate, please wait...":"正在獲取憑證,請稍等...","Home":"首頁","Install":"安裝","Intermediate Certification Authorities: %{issuer}":"中級憑證頒發機構: %{issuer}","Leave blank for no change":"留空表示不修改","Load Averages:":"系統負載:","Location":"Location","Locations":"Locations","Login":"登入","Login successful":"登入成功","Logout successful":"登出成功","Manage Configs":"配置管理","Manage Sites":"網站管理","Manage Users":"使用者管理","Memory":"記憶體","Memory and Storage":"記憶體和存儲","Modify Config":"修改配置","Name":"名稱","Network":"網路","Network Statistics":"網路統計","Network Total Receive":"下載流量","Network Total Send":"上傳流量","Next":"下一步","No":"取消","Not Found":"找不到頁面","Not Valid Before: %{date}":"此前無效: %{date}","OK":"確定","OS:":"作業系統:","Params":"參數","Password":"密碼","Password (*)":"密碼 (*)","Path":"路徑","Please input your E-mail!":"請輸入您的郵箱!","Please input your password!":"請輸入您的密碼!","Please input your username!":"請輸入您的使用者名稱!","Project Team":"專案團隊","Reads":"讀","Receive":"下載","Save":"儲存","Save Directive":"儲存指令","Save error %{msg}":"儲存錯誤 %{msg}","Saved successfully":"儲存成功","Send":"上傳","Server error":"伺服器錯誤","Server Info":"伺服器資訊","server_name not found in directives":"未在指令集合中找到 server_name","server_name parameter is required":"必須為 server_name 指令指明參數","server_name parameters more than one":"server_name 指令包含多個參數","Single Directive":"單行指令","Sites List":"站點列表","Status":"狀態","Storage":"儲存","Subject Name: %{name}":"主體名稱: %{name}","Swap":"交換空間","Terminal":"終端","The filename cannot contain the following characters: %{c}":"檔名不能包含以下字元: %{c}","Updated at":"修改時間","Uptime:":"執行時間:","Username":"使用者名稱","Username (*)":"使用者名稱 (*)","Warning":"警告","Writes":"寫","Yes":"是的","License":{"Project":"開源軟體授權條款"}},"en":{"About":"About","Action":"Action","Add Directive Below":"Add Directive Below","Add Location":"Add Location","Add Site":"Add Site","Advance Mode":"Advance Mode","Are you sure you want to remove this directive?":"Are you sure you want to remove this directive?","Auto-renewal disabled for %{name}":"Auto-renewal disabled for %{name}","Auto-renewal enabled for %{name}":"Auto-renewal enabled for %{name}","Back":"Back","Base information":"Base information","Basic Mode":"Basic Mode","Build with":"Build with","Cancel":"Cancel","Certificate has expired":"Certificate has expired","Certificate is valid":"Certificate is valid","Certificate Status":"Certificate Status","Comments":"Comments","Configuration Name":"Configuration Name","Configurations":"Configurations","Configure SSL":"Configure SSL","Content":"Content","CPU Status":"CPU Status","CPU:":"CPU:","Create Another":"Create Another","Created at":"Created at","Dashboard":"Dashboard","Database (Optional, default: database)":"Database (Optional, default: database)","Development Mode":"Development Mode","Directive":"Directive","Directives":"Directives","Disable auto-renewal failed for %{name}":"Disable auto-renewal failed for %{name}","Disabled":"Disabled","Disabled successfully":"Disabled successfully","Disk IO":"Disk IO","Domain Config Created Successfully":"Domain Config Created Successfully","Edit %{n}":"Edit %{n}","Edit Configuration":"Edit Configuration","Edit Site":"Edit Site","Email (*)":"Email (*)","Enable auto-renewal failed for %{name}":"Enable auto-renewal failed for %{name}","Enable failed":"Enable failed","Enable TLS":"Enable TLS","Enabled":"Enabled","Enabled successfully":"Enabled successfully","Encrypt website with Let's Encrypt":"Encrypt website with Let's Encrypt","Expiration Date: %{date}":"Expiration Date: %{date}","Failed to disable %{msg}":"Failed to disable %{msg}","Failed to enable %{msg}":"Failed to enable %{msg}","File Not Found":"File Not Found","Finished":"Finished","Getting the certificate, please wait...":"Getting the certificate, please wait...","Home":"Home","Install":"Install","Intermediate Certification Authorities: %{issuer}":"Intermediate Certification Authorities: %{issuer}","Leave blank for no change":"Leave blank for no change","Load Averages:":"Load Averages:","Location":"Location","Locations":"Locations","Login":"Login","Login successful":"Login successful","Logout successful":"Logout successful","Make sure you have configured a reverse proxy for .well-known directory to HTTPChallengePort (default: 9180) before getting the certificate.":"Make sure you have configured a reverse proxy for .well-known directory to HTTPChallengePort (default: 9180) before getting the certificate.","Manage Configs":"Manage Configs","Manage Sites":"Manage Sites","Manage Users":"Manage Users","Memory":"Memory","Memory and Storage":"Memory and Storage","Modify Config":"Modify Config","Name":"Name","Network":"Network","Network Statistics":"Network Statistics","Network Total Receive":"Network Total Receive","Network Total Send":"Network Total Send","Next":"Next","No":"No","Not Found":"Not Found","Not Valid Before: %{date}":"Not Valid Before: %{date}","Note: The server_name in the current configuration must be the domain name you need to get the certificate.":"Note: The server_name in the current configuration must be the domain name you need to get the certificate.","OS:":"OS:","Params":"Params","Password":"Password","Password (*)":"Password (*)","Path":"Path","Please input your E-mail!":"Please input your E-mail!","Please input your password!":"Please input your password!","Please input your username!":"Please input your username!","Project Team":"Project Team","Reads":"Reads","Receive":"Receive","Save":"Save","Save Directive":"Save Directive","Save error %{msg}":"Save error %{msg}","Saved successfully":"Saved successfully","Send":"Send","Server error":"Server error","Server Info":"Server Info","server_name not found in directives":"server_name not found in directives","server_name parameter is required":"server_name parameter is required","server_name parameters more than one":"server_name parameters more than one","Single Directive":"Single Directive","Sites List":"Sites List","Status":"Status","Storage":"Storage","Subject Name: %{name}":"Subject Name: %{name}","Swap":"Swap","Terminal":"Terminal","The certificate for the domain will be checked every hour, and will be renewed if it has been more than 1 month since it was last issued.":"The certificate for the domain will be checked every hour, and will be renewed if it has been more than 1 month since it was last issued.","The filename cannot contain the following characters: %{c}":"The filename cannot contain the following characters: %{c}","Updated at":"Updated at","Uptime:":"Uptime:","Username":"Username","Username (*)":"Username (*)","Warning":"Warning","Writes":"Writes","Yes":"Yes","License":{"Project":"License"}}} \ No newline at end of file +{"zh_CN":{"About":"关于","Action":"操作","Add":"添加","Add Directive Below":"在下面添加指令","Add Location":"添加 Location","Add Site":"添加站点","Advance Mode":"高级模式","Are you sure you want to delete ?":"您确定要删除吗?","Are you sure you want to remove this directive?":"您确定要删除这条指令?","Auto-renewal disabled for %{name}":"成功关闭 %{name} 自动续签","Auto-renewal enabled for %{name}":"成功启用 %{name} 自动续签","Back":"返回","Back Home":"返回首页","Base information":"基本信息","Basic Mode":"基本模式","Build with":"构建基于","Cancel":"取消","Certificate has expired":"此证书已过期","Certificate is valid":"此证书有效","Certificate Status":"证书状态","Comments":"注释","Configuration Name":"配置名称","Configurations":"配置","Configure SSL":"配置 SSL","Content":"内容","CPU Status":"CPU 状态","Create Another":"再创建一个","Created at":"创建时间","Creating client facilitates communication with the CA server":"正在创建客户端用于与 CA 服务器通信","Dashboard":"仪表盘","Database (Optional, default: database)":"数据库 (可选,默认: database)","Delete":"删除","Delete ID: %{id}":"删除 ID: %{id}","Delete site: %{site_name}":"删除站点: %{site_name}","Development Mode":"开发模式","Directive":"指令","Directives":"指令","Disable auto-renewal failed for %{name}":"关闭 %{name} 自动续签失败","Disabled":"禁用","Disabled successfully":"禁用成功","Disk IO":"磁盘 IO","Domain Config Created Successfully":"域名配置文件创建成功","Edit %{n}":"编辑 %{n}","Edit Configuration":"编辑配置","Edit Site":"编辑站点","Email (*)":"邮箱 (*)","Enable auto-renewal failed for %{name}":"启用 %{name} 自动续签失败","Enable failed":"启用失败","Enable TLS":"启用 TLS","Enabled":"启用","Enabled successfully":"启用成功","Encrypt website with Let's Encrypt":"用 Let's Encrypt 对网站进行加密","Expiration Date: %{date}":"过期时间: %{date}","Failed to disable %{msg}":"禁用失败 %{msg}","Failed to enable %{msg}":"启用失败 %{msg}","Failed to get certificate information":"获取证书信息失败","File Not Found":"未找到文件","Finished":"完成","Generating private key for registering account":"正在生成私钥用于注册账户","Getting the certificate, please wait...":"正在获取证书,请稍等...","Home":"首页","Install":"安装","Install successfully":"安装成功","Intermediate Certification Authorities: %{issuer}":"中级证书颁发机构: %{issuer}","Leave blank for no change":"留空表示不修改","Load Averages:":"系统负载:","Location":"Location","Locations":"Locations","Login":"登录","Login successful":"登录成功","Logout successful":"登出成功","Make sure you have configured a reverse proxy for .well-known directory to HTTPChallengePort (default: 9180) before getting the certificate.":"在获取签发证书前,请确保配置文件中已将 .well-known 目录反向代理到 HTTPChallengePort (默认: 9180)","Manage Configs":"配置管理","Manage Sites":"网站管理","Manage Users":"用户管理","Memory":"内存","Memory and Storage":"内存与存储","Modify":"修改","Modify Config":"修改配置文件","Name":"名称","Network":"网络","Network Statistics":"流量统计","Network Total Receive":"下载流量","Network Total Send":"上传流量","Next":"下一步","No":"取消","Not Found":"找不到页面","Not Valid Before: %{date}":"此前无效: %{date}","Note: The server_name in the current configuration must be the domain name you need to get the certificate.":"注意:当前配置中的 server_name 必须为需要申请证书的域名。","Obtaining certificate":"正在获取证书","OK":"确定","Params":"参数","Password":"密码","Password (*)":"密码 (*)","Path":"路径","Please input your E-mail!":"请输入您的邮箱!","Please input your password!":"请输入您的密码!","Please input your username!":"请输入您的用户名!","Preparing lego configurations":"正在准备 Lego 的配置","Prohibit changing root password in demo":"禁止在演示模式下修改 root 账户的密码","Prohibit deleting the default user":"禁止删除默认用户","Project Team":"项目团队","Reads":"读","Receive":"下载","Registering user":"正在注册用户","Reloading nginx":"正在重载 Nginx","Reset":"重置","Save":"保存","Save Directive":"保存指令","Save error %{msg}":"保存错误 %{msg}","Save Successfully":"保存成功","Saved successfully":"保存成功","Send":"上传","Server error":"服务器错误","Server Info":"服务器信息","server_name not found in directives":"未在指令集合中找到 server_name","server_name parameter is required":"必须为 server_name 指令指明参数","server_name parameters more than one":"server_name 指令包含多个参数","Single Directive":"单行指令","Sites List":"站点列表","Status":"状态","Storage":"存储","Subject Name: %{name}":"主体名称: %{name}","Table":"列表","Terminal":"终端","The certificate for the domain will be checked every hour, and will be renewed if it has been more than 1 month since it was last issued.":"系统将会每小时检测一次该域名证书,若距离上次签发已超过1个月,则将自动续签。","The filename cannot contain the following characters: %{c}":"文件名不能包含以下字符: %{c}","The username or password is incorrect":"用户名或密码错误","Updated at":"修改时间","Uptime:":"运行时间:","Username":"用户名","Username (*)":"用户名 (*)","Using HTTP01 challenge provider":"使用 HTTP01 challenge provider","Warning":"警告","Writes":"写","Writing certificate private key to disk":"正在将证书私钥写入磁盘","Writing certificate to disk":"正在将证书写入磁盘","Yes":"是的","License":{"Project":"开源许可"}},"zh_TW":{"About":"關於","Action":"操作","Add Directive Below":"在下面新增指令","Add Location":"新增 Location","Add Site":"新增站點","Advance Mode":"高階模式","Are you sure you want to remove this directive?":"您確定要刪除這條指令?","Auto-renewal disabled for %{name}":"已關閉 %{name} 自動續簽","Auto-renewal enabled for %{name}":"已啟用 %{name} 自動續簽","Back":"返回","Base information":"基本訊息","Basic Mode":"基本模式","Build with":"構建基於","Cancel":"取消","Certificate has expired":"此憑證已過期","Certificate is valid":"此憑證有效","Certificate Status":"憑證狀態","Comments":"註釋","Configuration Name":"配置名稱","Configurations":"配置","Configure SSL":"配置 SSL","Content":"內容","CPU Status":"中央處理器狀態","CPU:":"中央處理器:","Create Another":"再創建一個","Created at":"建立時間","Dashboard":"儀表盤","Database (Optional, default: database)":"資料庫 (可選,預設: database)","Delete ID: %{id}":"刪除 ID: %{id}","Development Mode":"開發模式","Directive":"指令","Directives":"指令","Disable auto-renewal failed for %{name}":"關閉 %{name} 自動續簽失敗","Disabled":"禁用","Disabled successfully":"禁用成功","Disk IO":"磁碟 IO","Domain Config Created Successfully":"域名配置文件創建成功","Edit %{n}":"編輯 %{n}","Edit Configuration":"編輯配置","Edit Site":"編輯站點","Email (*)":"郵箱 (*)","Enable auto-renewal failed for %{name}":"啟用 %{name} 自動續簽失敗","Enable failed":"啟用失敗","Enable TLS":"啟用 TLS","Enabled":"啟用","Enabled successfully":"啟用成功","Encrypt website with Let's Encrypt":"用 Let's Encrypt 對網站進行加密","Expiration Date: %{date}":"過期時間: %{date}","Failed to disable %{msg}":"禁用失敗 %{msg}","Failed to enable %{msg}":"啟用失敗 %{msg}","File Not Found":"未找到檔案","Finished":"完成","Getting the certificate, please wait...":"正在獲取憑證,請稍等...","Home":"首頁","Install":"安裝","Intermediate Certification Authorities: %{issuer}":"中級憑證頒發機構: %{issuer}","Leave blank for no change":"留空表示不修改","Load Averages:":"系統負載:","Location":"Location","Locations":"Locations","Login":"登入","Login successful":"登入成功","Logout successful":"登出成功","Manage Configs":"配置管理","Manage Sites":"網站管理","Manage Users":"使用者管理","Memory":"記憶體","Memory and Storage":"記憶體和存儲","Modify Config":"修改配置","Name":"名稱","Network":"網路","Network Statistics":"網路統計","Network Total Receive":"下載流量","Network Total Send":"上傳流量","Next":"下一步","No":"取消","Not Found":"找不到頁面","Not Valid Before: %{date}":"此前無效: %{date}","OK":"確定","OS:":"作業系統:","Params":"參數","Password":"密碼","Password (*)":"密碼 (*)","Path":"路徑","Please input your E-mail!":"請輸入您的郵箱!","Please input your password!":"請輸入您的密碼!","Please input your username!":"請輸入您的使用者名稱!","Project Team":"專案團隊","Reads":"讀","Receive":"下載","Save":"儲存","Save Directive":"儲存指令","Save error %{msg}":"儲存錯誤 %{msg}","Saved successfully":"儲存成功","Send":"上傳","Server error":"伺服器錯誤","Server Info":"伺服器資訊","server_name not found in directives":"未在指令集合中找到 server_name","server_name parameter is required":"必須為 server_name 指令指明參數","server_name parameters more than one":"server_name 指令包含多個參數","Single Directive":"單行指令","Sites List":"站點列表","Status":"狀態","Storage":"儲存","Subject Name: %{name}":"主體名稱: %{name}","Swap":"交換空間","Terminal":"終端","The filename cannot contain the following characters: %{c}":"檔名不能包含以下字元: %{c}","Updated at":"修改時間","Uptime:":"執行時間:","Username":"使用者名稱","Username (*)":"使用者名稱 (*)","Warning":"警告","Writes":"寫","Yes":"是的","License":{"Project":"開源軟體授權條款"}},"en":{"About":"About","Action":"Action","Add Directive Below":"Add Directive Below","Add Location":"Add Location","Add Site":"Add Site","Advance Mode":"Advance Mode","Are you sure you want to remove this directive?":"Are you sure you want to remove this directive?","Auto-renewal disabled for %{name}":"Auto-renewal disabled for %{name}","Auto-renewal enabled for %{name}":"Auto-renewal enabled for %{name}","Back":"Back","Base information":"Base information","Basic Mode":"Basic Mode","Build with":"Build with","Cancel":"Cancel","Certificate has expired":"Certificate has expired","Certificate is valid":"Certificate is valid","Certificate Status":"Certificate Status","Comments":"Comments","Configuration Name":"Configuration Name","Configurations":"Configurations","Configure SSL":"Configure SSL","Content":"Content","CPU Status":"CPU Status","CPU:":"CPU:","Create Another":"Create Another","Created at":"Created at","Dashboard":"Dashboard","Database (Optional, default: database)":"Database (Optional, default: database)","Development Mode":"Development Mode","Directive":"Directive","Directives":"Directives","Disable auto-renewal failed for %{name}":"Disable auto-renewal failed for %{name}","Disabled":"Disabled","Disabled successfully":"Disabled successfully","Disk IO":"Disk IO","Domain Config Created Successfully":"Domain Config Created Successfully","Edit %{n}":"Edit %{n}","Edit Configuration":"Edit Configuration","Edit Site":"Edit Site","Email (*)":"Email (*)","Enable auto-renewal failed for %{name}":"Enable auto-renewal failed for %{name}","Enable failed":"Enable failed","Enable TLS":"Enable TLS","Enabled":"Enabled","Enabled successfully":"Enabled successfully","Encrypt website with Let's Encrypt":"Encrypt website with Let's Encrypt","Expiration Date: %{date}":"Expiration Date: %{date}","Failed to disable %{msg}":"Failed to disable %{msg}","Failed to enable %{msg}":"Failed to enable %{msg}","File Not Found":"File Not Found","Finished":"Finished","Getting the certificate, please wait...":"Getting the certificate, please wait...","Home":"Home","Install":"Install","Intermediate Certification Authorities: %{issuer}":"Intermediate Certification Authorities: %{issuer}","Leave blank for no change":"Leave blank for no change","Load Averages:":"Load Averages:","Location":"Location","Locations":"Locations","Login":"Login","Login successful":"Login successful","Logout successful":"Logout successful","Make sure you have configured a reverse proxy for .well-known directory to HTTPChallengePort (default: 9180) before getting the certificate.":"Make sure you have configured a reverse proxy for .well-known directory to HTTPChallengePort (default: 9180) before getting the certificate.","Manage Configs":"Manage Configs","Manage Sites":"Manage Sites","Manage Users":"Manage Users","Memory":"Memory","Memory and Storage":"Memory and Storage","Modify Config":"Modify Config","Name":"Name","Network":"Network","Network Statistics":"Network Statistics","Network Total Receive":"Network Total Receive","Network Total Send":"Network Total Send","Next":"Next","No":"No","Not Found":"Not Found","Not Valid Before: %{date}":"Not Valid Before: %{date}","Note: The server_name in the current configuration must be the domain name you need to get the certificate.":"Note: The server_name in the current configuration must be the domain name you need to get the certificate.","OS:":"OS:","Params":"Params","Password":"Password","Password (*)":"Password (*)","Path":"Path","Please input your E-mail!":"Please input your E-mail!","Please input your password!":"Please input your password!","Please input your username!":"Please input your username!","Project Team":"Project Team","Reads":"Reads","Receive":"Receive","Save":"Save","Save Directive":"Save Directive","Save error %{msg}":"Save error %{msg}","Saved successfully":"Saved successfully","Send":"Send","Server error":"Server error","Server Info":"Server Info","server_name not found in directives":"server_name not found in directives","server_name parameter is required":"server_name parameter is required","server_name parameters more than one":"server_name parameters more than one","Single Directive":"Single Directive","Sites List":"Sites List","Status":"Status","Storage":"Storage","Subject Name: %{name}":"Subject Name: %{name}","Swap":"Swap","Terminal":"Terminal","The certificate for the domain will be checked every hour, and will be renewed if it has been more than 1 month since it was last issued.":"The certificate for the domain will be checked every hour, and will be renewed if it has been more than 1 month since it was last issued.","The filename cannot contain the following characters: %{c}":"The filename cannot contain the following characters: %{c}","Updated at":"Updated at","Uptime:":"Uptime:","Username":"Username","Username (*)":"Username (*)","Warning":"Warning","Writes":"Writes","Yes":"Yes","License":{"Project":"License"}}} \ No newline at end of file diff --git a/frontend/src/language/zh_CN/app.mo b/frontend/src/language/zh_CN/app.mo index 31e0a45b471b8176a1c52a6c60c716ee6b605918..55635ec600246a4c01dfc2243b36221597363a56 100644 GIT binary patch delta 3708 zcmaLZdvH|c8OQN=19AzsCW;gTVTq;%Q6V6;C|*LmP>kH(1j%3sB4B2L7qSYi1D2FX8*bd_?)NDSq|+xR8?73Sk9^Md&|)BrxgLi`NJV8IAF z!^x-t+=04(ACANo$e;5$4aP>hp2B?kce_Z;=0*ol6D%3z)a5T1|I_|_0JcO$EJ1nGs_h-BCf%z{~gL$KJ0~vvg#odf*Xbx(| z^H2>|;g@lL7|`_#|rPM^O#E zgKFp;Y9<-f9{CXYbDwZ3z#*Jk@fuXU{m4^u$IM?Au>M-&-*Q3E>@+I>K5E7vq6YSF z)W8N(Nacoe($Y?_{7h82xtNC!pa!-OHSiT!k4d|K9##LZT7Pxe&jrm$TUsL=ifZs` zR0Bm=gfq=WIG+3()C%rEJ&G=5mE9>+J3XkC`8#R?{iqcRu)Hc)m?EJ9C8!Q3p_b}K zWYTW7IUgCLdkj@BfxK~UJ*uNEsD__G?VWw7i5*0Bd;~S)pP>4C7d7G384^#CxPZ4} zJ*7&q6V=d3R0F3`72ZR2*ozbJA9jEA)wvGGqgLcP)QVN2elP0qT8yB67uxVTz5j#)K7wN-YL@n7BY;_G_v{{1M{Zl!q;ko8&vlZ3eAymDi<}b4H{NJ$) zXHhfmLsj_Lu78SJ`XOut4WI~he+sI>>6X6}RsUYgFG7`n2vx2Q%di2pIrn3!-v2j9 zsKL{yXLt^;!HcMh`DAo|j9HADX{qJ!LzSD4YIr3UqlelfTkL+D`66nd-^Y{^M@gu` zpIL#wpgO#0`G2CG=>Q(69>o-7BfD~QDY8h;N6mOMs{U@|8M_Wt`#-ho=gmwJ&tD_| zfD76jpQ1XLz?Vqx|4h`Tt3b`H64mfBRJ}*c)%XPYM$3O}26#tRZX~K+5o&-XmY+VJ z_1CkVWfv;V2T>JQn6+jSHIOD$gF8?S?nVuKA1=T*?fwv+gW4a3DqmtwMy>p`lwG(D zwS;rbmB?baq}hfu$p66ZpGOU_-yFodsMqXDR7Yb_9T%HrcKvSiepLO`VoOw^o@vDL zn@|nyM9pxI`HI~?V*VUe?lEEp(@f|{y zqQo4cl?W58ZuWOx9q9N5@i;*>x1P|USuM||oVy*%3GIOfySCK4-dv1NS^8Qvq|vcq zv+w@hcH#CBpMq3=hWxP$mQp<{ZE?0;7J zQqCn-d6nKxh_;aOg6BiMIt9&sm8OX%G@A29wKx+mOb-*$D4^6M3Y?;Ri8^wCS7OwTX3kQH=FljjCjEE`oF@J zuZlG!U3oa^$D*#hx@*#~Hv+RO;$A4}M{9%Oi0?&{!J1ImkNC+@(n|!xu{CQNqJEeH zv1qW-Pu2yKbzZQdJecs}>%4f^nc=tO-4ONSxfa&O{dLp})_WU*HL-Xw?$!ER0X5KVRsAN5+^=mo2iAwQb!)Qczm8uj3{A1i1q^45m3#UoyAjP9c~erq3!;7p?VzYvZwX zel?YrhvMqnEsy(5GRqf+LfOkRNydWJexm+=mb-NCVcN+pNmaD#>8k<*%6bmIoPOaz zdfVRg+i#^0?d#e0qs(isXZ9TEers3vo4d4xJumD`Z+|J>aiDM0^W7(2>Uw%if1o(C z=es@I+A{l_`gXsXE8Wv|Al=;Bd!&;lx|+r=&THR1wy^!(qF9l2(bAlLr6pLY1T qrJFmfjr0$jdtYzr{&8n+tlUU%eKqrPQ)cgTUo7$Yd+m=FZ~PB>upn3f delta 2954 zcmYk-drZ}39LMqJa0x}h11Met4~wjbrg4OvOmd#3anZ;aG}#q|(aE&_}rzr(&m- zgE*1$MWidgyF+Fu7w)4MqiHP`lTDwQgBm~qCSoa$#%dgi4X6Qh*!^7?PkBGaVGqV& zpItwWvGniGk9SNz};BqXyP*6|bR|bim3(=}q+}UMTrRf7MPU>iOlU`uG`|4=@(BViQsQWq7sF_7^^i_WZ zs(vzRiPKR7$hZ3ycE2iAX8%`^Q3JJBVI%5+EvSY%QHN_UYAN@lI{Ff|MW=8a_M_?# z*nLe;^tciEVC53<(8mdGi@ZJ2HH>!Z@2Ox^Dt_}M^IM+Hy3|c8K zs=aZj=X_=^wo@*$^5^5&e^oeX7rsY5coj9UU#)xxwU_@`*~>esdZSU#r>hRXAf6&znD@mi!kh-$E_ffH|Chm1Nx{oQ|_m_qU=3w8#7a z^%i}M>ZjKXnqTlTgp4n|Y{uC1x3Frj=H%H8^k65Uw3#R& zW~)HbM=M+JzY>#kPZG^UCZVKGlv0U&LY*k-3C8R;5G};31aDkuJLcmoLTL`60hbe+ zpwdjDig=pXMhx~J+UrpHe?QuWXNb3m971o#BZSi0Fm64rB1)~?gaw5DDd|q` zgBjF!<5`t8n~j7Hk^WIAY5D6zx$s`slGp!;H;E?*?cZ~R_IDw%f~X;sULyD+yLrTG z#0)}dc^J1HrxI%jcF6f(;U|r#CZ-W93H_%^Cmtor2&FM2#s3evW%Lt|RFs=wI zEH8A1l=S-M5(`uy6%!r*t$*lJ_$Lcuh&PDG!-!I}|YO~BH+)BJoJg+0zYByfMB}4 import {useGettext} from 'vue3-gettext' -import {computed, nextTick, ref, watch} from 'vue' +import {computed, h, nextTick, onMounted, ref, VNode, watch} from 'vue' import {message} from 'ant-design-vue' import domain from '@/api/domain' import websocket from '@/lib/websocket' @@ -12,6 +12,7 @@ const props = defineProps(['directivesMap', 'current_server_directives', 'enable const emit = defineEmits(['changeEnabled', 'callback', 'update:enabled']) const issuing_cert = ref(false) +const modalVisible = ref(false) function onchange(r: boolean) { emit('changeEnabled', r) @@ -81,8 +82,25 @@ function change_auto_cert(r: boolean) { } } +const logContainer = ref(null) + +function log(msg: string) { + const para = document.createElement('p') + para.appendChild(document.createTextNode($gettext(msg))); + + (logContainer.value as any as Node).appendChild(para); + + (logContainer.value as any as Element).scroll({top: 320, left: 0, behavior: 'smooth'}) +} + const issue_cert = async (server_name: string, callback: Function) => { - message.info($gettext('Getting the certificate, please wait...'), 15) + progressStatus.value = 'active' + modalClosable.value = false + modalVisible.value = true + progressPercent.value = 0; + (logContainer.value as any as Element).innerHTML = '' + + log($gettext('Getting the certificate, please wait...')) const ws = websocket('/api/cert/issue/' + server_name, false) @@ -92,23 +110,25 @@ const issue_cert = async (server_name: string, callback: Function) => { ws.onmessage = m => { const r = JSON.parse(m.data) + log(r.message) + switch (r.status) { - case 'success': - message.success(r.message, 10) - break case 'info': - message.info(r.message, 10) + progressPercent.value += 5 break - case 'error': - message.error(r.message, 10) + default: + modalClosable.value = true + issuing_cert.value = false + + if (r.status === 'success' && r.ssl_certificate !== undefined && r.ssl_certificate_key !== undefined) { + progressStatus.value = 'success' + progressPercent.value = 100 + callback(r.ssl_certificate, r.ssl_certificate_key) + } else { + progressStatus.value = 'exception' + } break } - - if (r.status === 'success' && r.ssl_certificate !== undefined && r.ssl_certificate_key !== undefined) { - callback(r.ssl_certificate, r.ssl_certificate_key) - } - - issuing_cert.value = false } } @@ -143,9 +163,34 @@ watch(no_server_name, () => { emit('update:enabled', false) onchange(false) }) + +const progressStrokeColor = { + from: '#108ee9', + to: '#87d068', +} + +const progressPercent = ref(0) + +const progressStatus = ref('active') + +const modalClosable = ref(false) + +