Skip to content

Commit ba924cd

Browse files
committed
fix: build issue
1 parent b5508b7 commit ba924cd

File tree

3 files changed

+105
-3
lines changed

3 files changed

+105
-3
lines changed

frontend/components.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ declare module '@vue/runtime-core' {
1313
AButton: typeof import('ant-design-vue/es')['Button']
1414
ACard: typeof import('ant-design-vue/es')['Card']
1515
AConfigProvider: typeof import('ant-design-vue/es')['ConfigProvider']
16+
ADivider: typeof import('ant-design-vue/es')['Divider']
1617
ADrawer: typeof import('ant-design-vue/es')['Drawer']
1718
AEmpty: typeof import('ant-design-vue/es')['Empty']
1819
AForm: typeof import('ant-design-vue/es')['Form']
1920
AFormItem: typeof import('ant-design-vue/es')['FormItem']
2021
AInput: typeof import('ant-design-vue/es')['Input']
2122
AInputGroup: typeof import('ant-design-vue/es')['InputGroup']
23+
AInputPassword: typeof import('ant-design-vue/es')['InputPassword']
2224
ALayout: typeof import('ant-design-vue/es')['Layout']
2325
ALayoutContent: typeof import('ant-design-vue/es')['LayoutContent']
2426
ALayoutFooter: typeof import('ant-design-vue/es')['LayoutFooter']
@@ -29,13 +31,15 @@ declare module '@vue/runtime-core' {
2931
AMenu: typeof import('ant-design-vue/es')['Menu']
3032
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
3133
AModal: typeof import('ant-design-vue/es')['Modal']
34+
APagination: typeof import('ant-design-vue/es')['Pagination']
3235
APopconfirm: typeof import('ant-design-vue/es')['Popconfirm']
3336
AProgress: typeof import('ant-design-vue/es')['Progress']
3437
ASelect: typeof import('ant-design-vue/es')['Select']
3538
ASelectOption: typeof import('ant-design-vue/es')['SelectOption']
3639
ASpace: typeof import('ant-design-vue/es')['Space']
3740
ASubMenu: typeof import('ant-design-vue/es')['SubMenu']
3841
ASwitch: typeof import('ant-design-vue/es')['Switch']
42+
ATable: typeof import('ant-design-vue/es')['Table']
3943
ATabPane: typeof import('ant-design-vue/es')['TabPane']
4044
ATabs: typeof import('ant-design-vue/es')['Tabs']
4145
ATag: typeof import('ant-design-vue/es')['Tag']

frontend/src/views/domain/cert/ChangeCert.vue

Lines changed: 89 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,96 @@
1-
<script setup lang="ts">
1+
<script setup lang="tsx">
22
import {useGettext} from 'vue3-gettext'
3-
import {ref} from 'vue'
3+
import {h, ref} from 'vue'
4+
import StdTable from '@/components/StdDataDisplay/StdTable.vue'
5+
import cert from '@/api/cert'
6+
import {customRender, datetime} from '@/components/StdDataDisplay/StdTableTransformer'
7+
import {input} from '@/components/StdDataEntry'
8+
import {Badge} from 'ant-design-vue'
49
510
const {$gettext} = useGettext()
611
712
const props = defineProps(['directivesMap'])
813
914
const visible = ref(false)
1015
16+
const columns = [{
17+
title: () => $gettext('Name'),
18+
dataIndex: 'name',
19+
sorter: true,
20+
pithy: true,
21+
customRender: (args: customRender) => {
22+
const {text, record} = args
23+
if (!text) {
24+
return h('div', record.domain)
25+
}
26+
return h('div', text)
27+
},
28+
edit: {
29+
type: input
30+
},
31+
search: true
32+
}, {
33+
title: () => $gettext('Domain'),
34+
dataIndex: 'domain',
35+
sorter: true,
36+
pithy: true,
37+
edit: {
38+
type: input
39+
},
40+
search: true
41+
}, {
42+
title: () => $gettext('Auto Cert'),
43+
dataIndex: 'auto_cert',
44+
customRender: (args: customRender) => {
45+
const template: any = []
46+
const {text, column} = args
47+
if (text === true || text > 0) {
48+
template.push(<Badge status="success"/>)
49+
template.push($gettext('Enabled'))
50+
} else {
51+
template.push(<Badge status="warning"/>)
52+
template.push($gettext('Disabled'))
53+
}
54+
return h('div', template)
55+
},
56+
sorter: true,
57+
pithy: true
58+
}, {
59+
title: () => $gettext('SSL Certificate Path'),
60+
dataIndex: 'ssl_certificate_path',
61+
edit: {
62+
type: input
63+
},
64+
display: false
65+
}, {
66+
title: () => $gettext('SSL Certificate Key Path'),
67+
dataIndex: 'ssl_certificate_key_path',
68+
edit: {
69+
type: input
70+
},
71+
display: false
72+
}, {
73+
title: () => $gettext('Updated at'),
74+
dataIndex: 'updated_at',
75+
customRender: datetime,
76+
sorter: true,
77+
pithy: true
78+
}, {
79+
title: () => $gettext('Action'),
80+
dataIndex: 'action'
81+
}]
82+
1183
function open() {
1284
visible.value = true
1385
}
86+
87+
function onSelect() {
88+
89+
}
90+
91+
function onSelectedRecord() {
92+
93+
}
1494
</script>
1595

1696
<template>
@@ -21,7 +101,13 @@ function open() {
21101
v-model:visible="visible"
22102
:mask="false"
23103
>
24-
104+
<std-table
105+
:api="cert"
106+
:pithy="true"
107+
:columns="columns"
108+
@onSelected="onSelect"
109+
@onSelectedRecord="onSelectedRecord"
110+
/>
25111
</a-modal>
26112
</div>
27113
</template>

template/conf/wordpress.conf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Nginx UI Template Start
2+
# Name: WordPress
3+
# Description[en]: WordPress Config Template
4+
# Description[zh_CN]: WordPress 配置模板
5+
# Author: @0xJacky
6+
# Nginx UI Template End
7+
location / {
8+
try_files $uri $uri/ /index.php?$args;
9+
}
10+
11+
# Add trailing slash to */wp-admin requests.
12+
rewrite /wp-admin$ $scheme://$host$uri/ permanent;

0 commit comments

Comments
 (0)