Skip to content

Commit adb6f88

Browse files
authored
Merge pull request #55 from 0xJacky/1.7-dev
v1.7
2 parents d7ce452 + 8b926a4 commit adb6f88

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+3735
-1854
lines changed

.air.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ bin = "tmp/main"
1313
# Customize binary.
1414
full_bin = "APP_ENV=dev APP_USER=air ./tmp/main"
1515
# Watch these filename extensions.
16-
include_ext = ["go", "tpl", "tmpl", "html"]
16+
include_ext = ["go", "tpl", "tmpl", "html", "conf"]
1717
# Ignore these filename extensions or directories.
1818
exclude_dir = ["assets", "tmp", "vendor", "frontend/node_modules", "upload"]
1919
# Watch these directories if you specified.

README-zh_CN.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,16 @@ Nginx 网络管理界面,由 [0xJacky](https://jackyu.cn/) 与 [Hintay](https
9191
我们欢迎您将项目翻译成任何语言。
9292

9393
### 构建基于
94-
95-
- [The Go Programming Language](https://go.dev/)
94+
- [The Go Programming Language](https://go.dev)
9695
- [Gin Web Framework](https://gin-gonic.com)
97-
- [GORM](http://gorm.io/index.html)
98-
- [Vue 2](https://vuejs.org)
99-
- [vue-gettext](https://github.com/Polyconseil/vue-gettext)
96+
- [GORM](http://gorm.io)
97+
- [Vue 3](https://v3.vuejs.org)
98+
- [Vite](https://vitejs.dev)
99+
- [TypeScript](https://www.typescriptlang.org/)
100+
- [Ant Design Vue](https://antdv.com)
101+
- [vue3-gettext](https://github.com/jshmrtn/vue3-gettext)
102+
- [vue3-ace-editor](https://github.com/CarterLi/vue3-ace-editor)
103+
- [Gonginx](https://github.com/tufanbarisyildirim/gonginx)
100104

101105
## 入门指南
102106

README-zh_TW.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,16 @@ Nginx 網路管理介面,由 [0xJacky](https://jackyu.cn/) 與 [Hintay](https
9393
我們歡迎您將專案翻譯成任何語言。
9494

9595
### 構建基於
96-
97-
- [The Go Programming Language](https://go.dev/)
96+
- [The Go Programming Language](https://go.dev)
9897
- [Gin Web Framework](https://gin-gonic.com)
99-
- [GORM](http://gorm.io/index.html)
100-
- [Vue 2](https://vuejs.org)
101-
- [vue-gettext](https://github.com/Polyconseil/vue-gettext)
98+
- [GORM](http://gorm.io)
99+
- [Vue 3](https://v3.vuejs.org)
100+
- [Vite](https://vitejs.dev)
101+
- [TypeScript](https://www.typescriptlang.org/)
102+
- [Ant Design Vue](https://antdv.com)
103+
- [vue3-gettext](https://github.com/jshmrtn/vue3-gettext)
104+
- [vue3-ace-editor](https://github.com/CarterLi/vue3-ace-editor)
105+
- [Gonginx](https://github.com/tufanbarisyildirim/gonginx)
102106

103107
## 入門指南
104108

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ We welcome translations into any language.
9999
- [Ant Design Vue](https://antdv.com)
100100
- [vue3-gettext](https://github.com/jshmrtn/vue3-gettext)
101101
- [vue3-ace-editor](https://github.com/CarterLi/vue3-ace-editor)
102+
- [Gonginx](https://github.com/tufanbarisyildirim/gonginx)
102103

103104
## Getting Started
104105

frontend/components.d.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ declare module '@vue/runtime-core' {
2727
ALayoutFooter: typeof import('ant-design-vue/es')['LayoutFooter']
2828
ALayoutHeader: typeof import('ant-design-vue/es')['LayoutHeader']
2929
ALayoutSider: typeof import('ant-design-vue/es')['LayoutSider']
30+
AList: typeof import('ant-design-vue/es')['List']
31+
AListItem: typeof import('ant-design-vue/es')['ListItem']
3032
AMenu: typeof import('ant-design-vue/es')['Menu']
3133
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
3234
AModal: typeof import('ant-design-vue/es')['Modal']
@@ -65,8 +67,5 @@ declare module '@vue/runtime-core' {
6567
StdDataEntryComponentsStdPassword: typeof import('./src/components/StdDataEntry/components/StdPassword.vue')['default']
6668
StdDataEntryComponentsStdSelect: typeof import('./src/components/StdDataEntry/components/StdSelect.vue')['default']
6769
StdDataEntryComponentsStdSelector: typeof import('./src/components/StdDataEntry/components/StdSelector.vue')['default']
68-
StdDataEntryCompontentsStdPassword: typeof import('./src/components/StdDataEntry/compontents/StdPassword.vue')['default']
69-
StdDataEntryCompontentsStdSelect: typeof import('./src/components/StdDataEntry/compontents/StdSelect.vue')['default']
70-
StdDataEntryCompontentsStdSelector: typeof import('./src/components/StdDataEntry/compontents/StdSelector.vue')['default']
7170
}
7271
}

frontend/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "nginx-ui-frontend-next",
33
"private": true,
4-
"version": "1.6.8",
4+
"version": "1.7.0",
55
"type": "commonjs",
66
"scripts": {
77
"dev": "vite",
@@ -39,7 +39,7 @@
3939
"less": "^4.1.3",
4040
"typescript": "^4.6.4",
4141
"unplugin-vue-components": "^0.22.9",
42-
"vite": "^3.2.3",
42+
"vite": "^4.0.3",
4343
"vite-plugin-html": "^3.2.0",
4444
"vue-tsc": "^1.0.9"
4545
}

frontend/src/App.vue

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,22 @@ import {useSettingsStore} from '@/pinia'
55
import {dark_mode} from '@/lib/theme'
66
77
let media = window.matchMedia('(prefers-color-scheme: dark)')
8+
89
const callback = (media: { matches: any; }) => {
910
const settings = useSettingsStore()
10-
if (media.matches) {
11-
dark_mode(true)
12-
settings.set_theme('dark')
13-
} else {
14-
dark_mode(false)
15-
settings.set_theme('default')
11+
if (settings.preference_theme === 'auto') {
12+
if (media.matches) {
13+
dark_mode(true)
14+
settings.set_theme('dark')
15+
} else {
16+
dark_mode(false)
17+
settings.set_theme('auto')
18+
}
1619
}
1720
}
21+
1822
callback(media)
23+
1924
if (typeof media.addEventListener === 'function') {
2025
media.addEventListener('change', callback)
2126
} else if (typeof media.addListener === 'function') {

frontend/src/api/cert.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import Curd from '@/api/curd'
2+
3+
const cert = new Curd('/cert')
4+
5+
export default cert

frontend/src/api/domain.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ class Domain extends Curd {
1313
get_template() {
1414
return http.get('template')
1515
}
16-
16+
1717
add_auto_cert(domain: string) {
18-
return http.post('cert/' + domain)
18+
return http.post('auto_cert/' + domain)
1919
}
2020

2121
remove_auto_cert(domain: string) {
22-
return http.delete('cert/' + domain)
22+
return http.delete('auto_cert/' + domain)
2323
}
2424
}
2525

frontend/src/api/ngx.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ const ngx = {
77

88
tokenize_config(content: string) {
99
return http.post('/ngx/tokenize_config', {content})
10+
},
11+
12+
format_code(content: string) {
13+
return http.post('/ngx/format_code', {content})
1014
}
1115
}
1216

0 commit comments

Comments
 (0)