mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
feat: add server on a site config #89
This commit is contained in:
parent
3a595fcb42
commit
445be37f4e
5 changed files with 21 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "nginx-ui-frontend-next",
|
||||
"private": true,
|
||||
"version": "1.7.6",
|
||||
"version": "1.7.7",
|
||||
"type": "commonjs",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":"1.7.6","build_id":83,"total_build":153}
|
||||
{"version":"1.7.7","build_id":85,"total_build":155}
|
|
@ -68,7 +68,9 @@ async function add() {
|
|||
<a-list-item>
|
||||
<a-card size="small" :title="item.name">
|
||||
<template #extra>
|
||||
<a-button type="link" @click="view(item.filename)">{{ $gettext('View') }}</a-button>
|
||||
<a-button type="link"
|
||||
size="small" @click="view(item.filename)">{{ $gettext('View') }}
|
||||
</a-button>
|
||||
</template>
|
||||
<p>{{ $gettext('Author') }}: {{ item.author }}</p>
|
||||
<p>{{ $gettext('Description') }}: {{ trans_description(item) }}</p>
|
||||
|
|
|
@ -8,6 +8,7 @@ import Cert from '@/views/domain/cert/Cert.vue'
|
|||
import LogEntry from '@/views/domain/ngx_conf/LogEntry.vue'
|
||||
import ConfigTemplate from '@/views/domain/ngx_conf/ConfigTemplate.vue'
|
||||
import CodeEditor from '@/components/CodeEditor/CodeEditor.vue'
|
||||
import {PlusOutlined} from '@ant-design/icons-vue'
|
||||
|
||||
const {$gettext} = useGettext()
|
||||
|
||||
|
@ -145,6 +146,13 @@ watch(current_server_index, () => {
|
|||
})
|
||||
})
|
||||
|
||||
function add_server() {
|
||||
props.ngx_config.servers.push({
|
||||
comments: '',
|
||||
locations: [],
|
||||
directives: []
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -190,6 +198,13 @@ watch(current_server_index, () => {
|
|||
</div>
|
||||
|
||||
</a-tab-pane>
|
||||
|
||||
<template #rightExtra>
|
||||
<a-button @click="add_server" type="link" size="small">
|
||||
<PlusOutlined/>
|
||||
{{ $gettext('Add') }}
|
||||
</a-button>
|
||||
</template>
|
||||
</a-tabs>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":"1.7.6","build_id":83,"total_build":153}
|
||||
{"version":"1.7.7","build_id":85,"total_build":155}
|
Loading…
Add table
Add a link
Reference in a new issue