diff --git a/README-zh_CN.md b/README-zh_CN.md index 5fbb2c7e..850b9a3f 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -91,12 +91,16 @@ Nginx 网络管理界面,由 [0xJacky](https://jackyu.cn/) 与 [Hintay](https 我们欢迎您将项目翻译成任何语言。 ### 构建基于 - -- [The Go Programming Language](https://go.dev/) +- [The Go Programming Language](https://go.dev) - [Gin Web Framework](https://gin-gonic.com) -- [GORM](http://gorm.io/index.html) -- [Vue 2](https://vuejs.org) -- [vue-gettext](https://github.com/Polyconseil/vue-gettext) +- [GORM](http://gorm.io) +- [Vue 3](https://v3.vuejs.org) +- [Vite](https://vitejs.dev) +- [TypeScript](https://www.typescriptlang.org/) +- [Ant Design Vue](https://antdv.com) +- [vue3-gettext](https://github.com/jshmrtn/vue3-gettext) +- [vue3-ace-editor](https://github.com/CarterLi/vue3-ace-editor) +- [Gonginx](https://github.com/tufanbarisyildirim/gonginx) ## 入门指南 diff --git a/README-zh_TW.md b/README-zh_TW.md index 79cfc1a9..b9f7c54a 100644 --- a/README-zh_TW.md +++ b/README-zh_TW.md @@ -93,12 +93,16 @@ Nginx 網路管理介面,由 [0xJacky](https://jackyu.cn/) 與 [Hintay](https 我們歡迎您將專案翻譯成任何語言。 ### 構建基於 - -- [The Go Programming Language](https://go.dev/) +- [The Go Programming Language](https://go.dev) - [Gin Web Framework](https://gin-gonic.com) -- [GORM](http://gorm.io/index.html) -- [Vue 2](https://vuejs.org) -- [vue-gettext](https://github.com/Polyconseil/vue-gettext) +- [GORM](http://gorm.io) +- [Vue 3](https://v3.vuejs.org) +- [Vite](https://vitejs.dev) +- [TypeScript](https://www.typescriptlang.org/) +- [Ant Design Vue](https://antdv.com) +- [vue3-gettext](https://github.com/jshmrtn/vue3-gettext) +- [vue3-ace-editor](https://github.com/CarterLi/vue3-ace-editor) +- [Gonginx](https://github.com/tufanbarisyildirim/gonginx) ## 入門指南 diff --git a/README.md b/README.md index 02040d44..ca6e08f7 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,7 @@ We welcome translations into any language. - [Ant Design Vue](https://antdv.com) - [vue3-gettext](https://github.com/jshmrtn/vue3-gettext) - [vue3-ace-editor](https://github.com/CarterLi/vue3-ace-editor) +- [Gonginx](https://github.com/tufanbarisyildirim/gonginx) ## Getting Started diff --git a/frontend/package.json b/frontend/package.json index 59d3c5f2..e6f5f697 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -39,7 +39,7 @@ "less": "^4.1.3", "typescript": "^4.6.4", "unplugin-vue-components": "^0.22.9", - "vite": "^3.2.3", + "vite": "^4.0.3", "vite-plugin-html": "^3.2.0", "vue-tsc": "^1.0.9" } diff --git a/frontend/src/routes/index.ts b/frontend/src/routes/index.ts index 54d0d39b..d7ced1dc 100644 --- a/frontend/src/routes/index.ts +++ b/frontend/src/routes/index.ts @@ -74,16 +74,6 @@ export const routes = [ hideChildren: true } }, - { - path: 'config/:dir*', - name: () => $gettext('Manage Configs'), - component: () => import('@/views/config/Config.vue'), - meta: { - icon: FileOutlined, - hideChildren: true, - hiddenInSidebar: true - } - }, { path: 'config/:name+/edit', name: () => $gettext('Edit Configuration'), diff --git a/frontend/src/views/config/Config.vue b/frontend/src/views/config/Config.vue index 6f09d4ae..a69de018 100644 --- a/frontend/src/views/config/Config.vue +++ b/frontend/src/views/config/Config.vue @@ -18,7 +18,7 @@ const table = ref(null) const route = useRoute() const basePath = computed(() => { - let dir = route?.params?.dir ? (route?.params?.dir as string[])?.join('/') : '' + let dir = route?.query?.dir ?? '' if (dir) dir += '/' return dir }) @@ -54,7 +54,9 @@ watch(get_params, () => { }) } else { $router.push({ - path: '/config/' + basePath + r + query: { + dir: basePath + r + } }) } }" diff --git a/frontend/src/views/domain/DomainList.vue b/frontend/src/views/domain/DomainList.vue index c7dbca3a..4efcdacd 100644 --- a/frontend/src/views/domain/DomainList.vue +++ b/frontend/src/views/domain/DomainList.vue @@ -30,7 +30,7 @@ const columns = [{ template.push() template.push($gettext('Enabled')) } else { - template.push() + template.push() template.push($gettext('Disabled')) } return h('div', template) diff --git a/frontend/src/views/domain/cert/IssueCert.vue b/frontend/src/views/domain/cert/IssueCert.vue index ffc2c716..0adf0e38 100644 --- a/frontend/src/views/domain/cert/IssueCert.vue +++ b/frontend/src/views/domain/cert/IssueCert.vue @@ -129,7 +129,7 @@ const issue_cert = async (server_name: string, callback: Function) => { } const no_server_name = computed(() => { - return props.directivesMap['server_name'].length === 0 + return props.directivesMap['server_name']?.length === 0 }) const name = computed(() => { diff --git a/frontend/src/views/domain/ngx_conf/directive/DirectiveAdd.vue b/frontend/src/views/domain/ngx_conf/directive/DirectiveAdd.vue index b61b1ace..b3f6bea8 100644 --- a/frontend/src/views/domain/ngx_conf/directive/DirectiveAdd.vue +++ b/frontend/src/views/domain/ngx_conf/directive/DirectiveAdd.vue @@ -24,8 +24,8 @@ function add() { function save() { adding.value = false - if (mode.value === If) { - directive.directive = If + if (mode.value === 'multi-line') { + directive.directive = '' } if (props.idx) { @@ -42,19 +42,19 @@ function save() {
- + {{ $gettext('Single Directive') }} - - if + + {{ $gettext('Multi-line Directive') }}
- {{ $gettext('Add Directive Below') }} {{ $gettext('Save Directive') }} + :disabled="(mode==='default'&&(!directive.directive||!directive.params)) + ||(!directive.params&&mode==='multi-line')"> + {{ $gettext('Save Directive') }}
diff --git a/frontend/src/views/domain/ngx_conf/directive/DirectiveEditor.vue b/frontend/src/views/domain/ngx_conf/directive/DirectiveEditor.vue index d5c74dd8..c2d9aa65 100644 --- a/frontend/src/views/domain/ngx_conf/directive/DirectiveEditor.vue +++ b/frontend/src/views/domain/ngx_conf/directive/DirectiveEditor.vue @@ -32,7 +32,7 @@ function onSave(idx: number) { item-key="name" class="list-group" ghost-class="ghost" - handle=".ant-input-group-addon" + handle=".anticon-holder" >