mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 10:55:51 +02:00
fix: build issue
This commit is contained in:
parent
b5508b7366
commit
ba924cd6a9
3 changed files with 105 additions and 3 deletions
4
frontend/components.d.ts
vendored
4
frontend/components.d.ts
vendored
|
@ -13,12 +13,14 @@ declare module '@vue/runtime-core' {
|
||||||
AButton: typeof import('ant-design-vue/es')['Button']
|
AButton: typeof import('ant-design-vue/es')['Button']
|
||||||
ACard: typeof import('ant-design-vue/es')['Card']
|
ACard: typeof import('ant-design-vue/es')['Card']
|
||||||
AConfigProvider: typeof import('ant-design-vue/es')['ConfigProvider']
|
AConfigProvider: typeof import('ant-design-vue/es')['ConfigProvider']
|
||||||
|
ADivider: typeof import('ant-design-vue/es')['Divider']
|
||||||
ADrawer: typeof import('ant-design-vue/es')['Drawer']
|
ADrawer: typeof import('ant-design-vue/es')['Drawer']
|
||||||
AEmpty: typeof import('ant-design-vue/es')['Empty']
|
AEmpty: typeof import('ant-design-vue/es')['Empty']
|
||||||
AForm: typeof import('ant-design-vue/es')['Form']
|
AForm: typeof import('ant-design-vue/es')['Form']
|
||||||
AFormItem: typeof import('ant-design-vue/es')['FormItem']
|
AFormItem: typeof import('ant-design-vue/es')['FormItem']
|
||||||
AInput: typeof import('ant-design-vue/es')['Input']
|
AInput: typeof import('ant-design-vue/es')['Input']
|
||||||
AInputGroup: typeof import('ant-design-vue/es')['InputGroup']
|
AInputGroup: typeof import('ant-design-vue/es')['InputGroup']
|
||||||
|
AInputPassword: typeof import('ant-design-vue/es')['InputPassword']
|
||||||
ALayout: typeof import('ant-design-vue/es')['Layout']
|
ALayout: typeof import('ant-design-vue/es')['Layout']
|
||||||
ALayoutContent: typeof import('ant-design-vue/es')['LayoutContent']
|
ALayoutContent: typeof import('ant-design-vue/es')['LayoutContent']
|
||||||
ALayoutFooter: typeof import('ant-design-vue/es')['LayoutFooter']
|
ALayoutFooter: typeof import('ant-design-vue/es')['LayoutFooter']
|
||||||
|
@ -29,6 +31,7 @@ declare module '@vue/runtime-core' {
|
||||||
AMenu: typeof import('ant-design-vue/es')['Menu']
|
AMenu: typeof import('ant-design-vue/es')['Menu']
|
||||||
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
|
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
|
||||||
AModal: typeof import('ant-design-vue/es')['Modal']
|
AModal: typeof import('ant-design-vue/es')['Modal']
|
||||||
|
APagination: typeof import('ant-design-vue/es')['Pagination']
|
||||||
APopconfirm: typeof import('ant-design-vue/es')['Popconfirm']
|
APopconfirm: typeof import('ant-design-vue/es')['Popconfirm']
|
||||||
AProgress: typeof import('ant-design-vue/es')['Progress']
|
AProgress: typeof import('ant-design-vue/es')['Progress']
|
||||||
ASelect: typeof import('ant-design-vue/es')['Select']
|
ASelect: typeof import('ant-design-vue/es')['Select']
|
||||||
|
@ -36,6 +39,7 @@ declare module '@vue/runtime-core' {
|
||||||
ASpace: typeof import('ant-design-vue/es')['Space']
|
ASpace: typeof import('ant-design-vue/es')['Space']
|
||||||
ASubMenu: typeof import('ant-design-vue/es')['SubMenu']
|
ASubMenu: typeof import('ant-design-vue/es')['SubMenu']
|
||||||
ASwitch: typeof import('ant-design-vue/es')['Switch']
|
ASwitch: typeof import('ant-design-vue/es')['Switch']
|
||||||
|
ATable: typeof import('ant-design-vue/es')['Table']
|
||||||
ATabPane: typeof import('ant-design-vue/es')['TabPane']
|
ATabPane: typeof import('ant-design-vue/es')['TabPane']
|
||||||
ATabs: typeof import('ant-design-vue/es')['Tabs']
|
ATabs: typeof import('ant-design-vue/es')['Tabs']
|
||||||
ATag: typeof import('ant-design-vue/es')['Tag']
|
ATag: typeof import('ant-design-vue/es')['Tag']
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="tsx">
|
||||||
import {useGettext} from 'vue3-gettext'
|
import {useGettext} from 'vue3-gettext'
|
||||||
import {ref} from 'vue'
|
import {h, ref} from 'vue'
|
||||||
|
import StdTable from '@/components/StdDataDisplay/StdTable.vue'
|
||||||
|
import cert from '@/api/cert'
|
||||||
|
import {customRender, datetime} from '@/components/StdDataDisplay/StdTableTransformer'
|
||||||
|
import {input} from '@/components/StdDataEntry'
|
||||||
|
import {Badge} from 'ant-design-vue'
|
||||||
|
|
||||||
const {$gettext} = useGettext()
|
const {$gettext} = useGettext()
|
||||||
|
|
||||||
|
@ -8,9 +13,84 @@ const props = defineProps(['directivesMap'])
|
||||||
|
|
||||||
const visible = ref(false)
|
const visible = ref(false)
|
||||||
|
|
||||||
|
const columns = [{
|
||||||
|
title: () => $gettext('Name'),
|
||||||
|
dataIndex: 'name',
|
||||||
|
sorter: true,
|
||||||
|
pithy: true,
|
||||||
|
customRender: (args: customRender) => {
|
||||||
|
const {text, record} = args
|
||||||
|
if (!text) {
|
||||||
|
return h('div', record.domain)
|
||||||
|
}
|
||||||
|
return h('div', text)
|
||||||
|
},
|
||||||
|
edit: {
|
||||||
|
type: input
|
||||||
|
},
|
||||||
|
search: true
|
||||||
|
}, {
|
||||||
|
title: () => $gettext('Domain'),
|
||||||
|
dataIndex: 'domain',
|
||||||
|
sorter: true,
|
||||||
|
pithy: true,
|
||||||
|
edit: {
|
||||||
|
type: input
|
||||||
|
},
|
||||||
|
search: true
|
||||||
|
}, {
|
||||||
|
title: () => $gettext('Auto Cert'),
|
||||||
|
dataIndex: 'auto_cert',
|
||||||
|
customRender: (args: customRender) => {
|
||||||
|
const template: any = []
|
||||||
|
const {text, column} = args
|
||||||
|
if (text === true || text > 0) {
|
||||||
|
template.push(<Badge status="success"/>)
|
||||||
|
template.push($gettext('Enabled'))
|
||||||
|
} else {
|
||||||
|
template.push(<Badge status="warning"/>)
|
||||||
|
template.push($gettext('Disabled'))
|
||||||
|
}
|
||||||
|
return h('div', template)
|
||||||
|
},
|
||||||
|
sorter: true,
|
||||||
|
pithy: true
|
||||||
|
}, {
|
||||||
|
title: () => $gettext('SSL Certificate Path'),
|
||||||
|
dataIndex: 'ssl_certificate_path',
|
||||||
|
edit: {
|
||||||
|
type: input
|
||||||
|
},
|
||||||
|
display: false
|
||||||
|
}, {
|
||||||
|
title: () => $gettext('SSL Certificate Key Path'),
|
||||||
|
dataIndex: 'ssl_certificate_key_path',
|
||||||
|
edit: {
|
||||||
|
type: input
|
||||||
|
},
|
||||||
|
display: false
|
||||||
|
}, {
|
||||||
|
title: () => $gettext('Updated at'),
|
||||||
|
dataIndex: 'updated_at',
|
||||||
|
customRender: datetime,
|
||||||
|
sorter: true,
|
||||||
|
pithy: true
|
||||||
|
}, {
|
||||||
|
title: () => $gettext('Action'),
|
||||||
|
dataIndex: 'action'
|
||||||
|
}]
|
||||||
|
|
||||||
function open() {
|
function open() {
|
||||||
visible.value = true
|
visible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onSelect() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function onSelectedRecord() {
|
||||||
|
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -21,7 +101,13 @@ function open() {
|
||||||
v-model:visible="visible"
|
v-model:visible="visible"
|
||||||
:mask="false"
|
:mask="false"
|
||||||
>
|
>
|
||||||
|
<std-table
|
||||||
|
:api="cert"
|
||||||
|
:pithy="true"
|
||||||
|
:columns="columns"
|
||||||
|
@onSelected="onSelect"
|
||||||
|
@onSelectedRecord="onSelectedRecord"
|
||||||
|
/>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
12
template/conf/wordpress.conf
Normal file
12
template/conf/wordpress.conf
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# Nginx UI Template Start
|
||||||
|
# Name: WordPress
|
||||||
|
# Description[en]: WordPress Config Template
|
||||||
|
# Description[zh_CN]: WordPress 配置模板
|
||||||
|
# Author: @0xJacky
|
||||||
|
# Nginx UI Template End
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.php?$args;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add trailing slash to */wp-admin requests.
|
||||||
|
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
|
Loading…
Add table
Add a link
Reference in a new issue