From be4f7fc5c83afbd66bad06f7dbe3ff70978ac0c1 Mon Sep 17 00:00:00 2001 From: 0xJacky Date: Sat, 8 Apr 2023 11:31:47 +0800 Subject: [PATCH 01/25] enhance: auto-refresh after upgrade --- frontend/src/views/system/Upgrade.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/src/views/system/Upgrade.vue b/frontend/src/views/system/Upgrade.vue index 07d44081..03a5bec2 100644 --- a/frontend/src/views/system/Upgrade.vue +++ b/frontend/src/views/system/Upgrade.vue @@ -90,6 +90,10 @@ async function perform_upgrade() { progressPercent.value = 100 modalClosable.value = true log('Upgraded successfully') + + setInterval(() => { + location.reload() + }, 1000) }) }, 2000) } @@ -100,7 +104,7 @@ async function perform_upgrade() {
-
@@ -119,9 +122,8 @@ async function perform_upgrade() {

{{ $gettext('Arch') }}: {{ data.arch }}

{{ $gettext('Executable Path') }}: {{ data.ex_path }}

{{ $gettext('Last checked at') }}: {{ last_check }} - {{ - $gettext('Check again') - }} + + {{ $gettext('Check again') }}

Date: Sat, 8 Apr 2023 17:27:03 +0800 Subject: [PATCH 02/25] template: enable HSTS --- template/block/hsts.conf | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 template/block/hsts.conf diff --git a/template/block/hsts.conf b/template/block/hsts.conf new file mode 100644 index 00000000..184080ab --- /dev/null +++ b/template/block/hsts.conf @@ -0,0 +1,7 @@ +# Nginx UI Template Start +# Name: HSTS +# Description[en]: Enable HTTP Strict Transport Security +# Description[zh_CN]: 启用 HTTP 严格传输安全 +# Author: @0xJacky +# Nginx UI Template End +add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; From 69cdef4f6d6d9e74690f8cafdf9b724b6127fa84 Mon Sep 17 00:00:00 2001 From: 0xJacky Date: Sat, 8 Apr 2023 19:37:37 +0800 Subject: [PATCH 03/25] feat: added animations --- frontend/package.json | 1 + frontend/src/layouts/BaseLayout.vue | 20 ++++++++- frontend/src/main.ts | 3 +- frontend/src/views/config/Config.vue | 3 +- frontend/src/views/config/ConfigEdit.vue | 2 +- frontend/src/views/config/InspectConfig.vue | 4 +- frontend/src/views/domain/DomainEdit.vue | 6 +-- frontend/src/views/domain/DomainList.vue | 2 +- .../views/domain/ngx_conf/NgxConfigEditor.vue | 2 +- .../ngx_conf/directive/DirectiveEditor.vue | 4 +- .../directive/DirectiveEditorItem.vue | 45 +++++++------------ frontend/src/views/nginx_log/NginxLog.vue | 10 ++--- frontend/src/views/preference/Preference.vue | 10 ++--- frontend/src/views/system/Upgrade.vue | 26 +++++------ frontend/src/views/template/Template.vue | 11 ----- frontend/yarn.lock | 5 +++ 16 files changed, 77 insertions(+), 77 deletions(-) delete mode 100644 frontend/src/views/template/Template.vue diff --git a/frontend/package.json b/frontend/package.json index 96569b43..5bc3e8d7 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -12,6 +12,7 @@ }, "dependencies": { "@ant-design/icons-vue": "^6.1.0", + "@formkit/auto-animate": "^1.0.0-beta.6", "@types/lodash": "^4.14.188", "@types/marked": "^4.0.8", "@types/nprogress": "^0.2.0", diff --git a/frontend/src/layouts/BaseLayout.vue b/frontend/src/layouts/BaseLayout.vue index b09ac4dd..7971fedd 100644 --- a/frontend/src/layouts/BaseLayout.vue +++ b/frontend/src/layouts/BaseLayout.vue @@ -71,7 +71,11 @@ const lang = computed(() => {
- + + + + +
@@ -122,6 +126,20 @@ const lang = computed(() => { diff --git a/frontend/yarn.lock b/frontend/yarn.lock index baf78ff0..f46ea15d 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -609,6 +609,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.16.17.tgz#c5a1a4bfe1b57f0c3e61b29883525c6da3e5c091" integrity sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q== +"@formkit/auto-animate@^1.0.0-beta.6": + version "1.0.0-beta.6" + resolved "https://registry.yarnpkg.com/@formkit/auto-animate/-/auto-animate-1.0.0-beta.6.tgz#ed7f8bc47d774a7764756646e9e3432e8be51cb3" + integrity sha512-PVDhLAlr+B4Xb7e+1wozBUWmXa6BFU8xUPR/W/E+TsQhPS1qkAdAsJ25keEnFrcePSnXHrOsh3tiFbEToOzV9w== + "@jridgewell/gen-mapping@^0.1.0": version "0.1.1" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" From b7560ddb355948c6b7efd76bd37cab045f3651d8 Mon Sep 17 00:00:00 2001 From: 0xJacky Date: Sat, 8 Apr 2023 20:30:42 +0800 Subject: [PATCH 04/25] feat: add confirm dialog for cert renewal toggle #30 Adds a confirmation popup when toggling Let's Encrypt auto-renewal. --- frontend/src/views/domain/cert/IssueCert.vue | 38 +++++++++++++------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/frontend/src/views/domain/cert/IssueCert.vue b/frontend/src/views/domain/cert/IssueCert.vue index 5771fa04..3834940b 100644 --- a/frontend/src/views/domain/cert/IssueCert.vue +++ b/frontend/src/views/domain/cert/IssueCert.vue @@ -1,7 +1,7 @@