feat: generate password for user

This commit is contained in:
0xJacky 2022-09-15 23:35:49 +08:00
parent 92fb679b55
commit 5490e48d9f
No known key found for this signature in database
GPG key ID: B6E4A6E4A561BAF0
19 changed files with 702 additions and 259 deletions

View file

@ -60,6 +60,9 @@ declare module '@vue/runtime-core' {
SetLanguage: typeof import('./src/components/SetLanguage/SetLanguage.vue')['default'] SetLanguage: typeof import('./src/components/SetLanguage/SetLanguage.vue')['default']
StdCurd: typeof import('./src/components/StdDataDisplay/StdCurd.vue')['default'] StdCurd: typeof import('./src/components/StdDataDisplay/StdCurd.vue')['default']
StdPagination: typeof import('./src/components/StdDataDisplay/StdPagination.vue')['default'] StdPagination: typeof import('./src/components/StdDataDisplay/StdPagination.vue')['default']
StdPassword: typeof import('./src/components/StdDataEntry/compontents/StdPassword.vue')['default']
StdSelect: typeof import('./src/components/StdDataEntry/compontents/StdSelect.vue')['default']
StdSelector: typeof import('./src/components/StdDataEntry/compontents/StdSelector.vue')['default']
StdTable: typeof import('./src/components/StdDataDisplay/StdTable.vue')['default'] StdTable: typeof import('./src/components/StdDataDisplay/StdTable.vue')['default']
} }
} }

View file

@ -1,7 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import gettext from '@/gettext' import gettext from '@/gettext'
const {$gettext, interpolate} = gettext
import StdTable from './StdTable.vue' import StdTable from './StdTable.vue'
import StdDataEntry from '@/components/StdDataEntry' import StdDataEntry from '@/components/StdDataEntry'
@ -9,6 +7,8 @@ import StdDataEntry from '@/components/StdDataEntry'
import {reactive, ref} from 'vue' import {reactive, ref} from 'vue'
import {message} from 'ant-design-vue' import {message} from 'ant-design-vue'
const {$gettext} = gettext
const props = defineProps({ const props = defineProps({
api: Object, api: Object,
columns: Array, columns: Array,
@ -44,13 +44,20 @@ const props = defineProps({
type: Boolean, type: Boolean,
default: true default: true
}, },
beforeSave: {
type: Function,
default: null
},
exportCsv: {
type: Boolean,
default: false
}
}) })
const visible = ref(false) const visible = ref(false)
const update = ref(0) const update = ref(0)
const data: any = reactive({id: null}) const data: any = reactive({id: null})
const error: any = reactive({}) const error: any = reactive({})
const params = reactive({})
const selected = reactive([]) const selected = reactive([])
function onSelect(keys: any) { function onSelect(keys: any) {
@ -67,7 +74,7 @@ function add() {
Object.keys(data).forEach(v => { Object.keys(data).forEach(v => {
delete data[v] delete data[v]
}) })
clear_error() clear_error()
visible.value = true visible.value = true
} }
@ -86,7 +93,7 @@ function clear_error() {
const ok = async () => { const ok = async () => {
clear_error() clear_error()
await props.beforeSave(data)
props.api!.save(data.id, data).then((r: any) => { props.api!.save(data.id, data).then((r: any) => {
message.success($gettext('Save Successfully')) message.success($gettext('Save Successfully'))
Object.assign(data, r) Object.assign(data, r)
@ -124,11 +131,13 @@ function edit(id: any) {
</template> </template>
<std-table <std-table
ref="table" ref="table"
v-bind="props" v-bind="props"
@clickEdit="edit" @clickEdit="edit"
@selected="onSelect" @selected="onSelect"
:key="update" :key="update"
:get_params="get_params"
:exportCsv="exportCsv"
> >
<template v-slot:actions="slotProps"> <template v-slot:actions="slotProps">
<slot name="actions" :actions="slotProps.record"/> <slot name="actions" :actions="slotProps.record"/>
@ -137,23 +146,24 @@ function edit(id: any) {
</a-card> </a-card>
<a-modal <a-modal
class="std-curd-edit-modal" class="std-curd-edit-modal"
:mask="false" :mask="false"
:title="data.id ? $gettext('Modify') : $gettext('Add')" :title="data.id ? $gettext('Modify') : $gettext('Add')"
:visible="visible" :visible="visible"
:cancel-text="$gettext('Cancel')" :cancel-text="$gettext('Cancel')"
:ok-text="$gettext('OK')" :ok-text="$gettext('OK')"
@cancel="cancel" @cancel="cancel"
@ok="ok" @ok="ok"
:width="600" :width="600"
destroyOnClose destroyOnClose
> >
<std-data-entry <std-data-entry
ref="std_data_entry" ref="std_data_entry"
:data-list="editableColumns()" :data-list="editableColumns()"
:data-source="data" v-model:data-source="data"
:error="error" :error="error"
/> />
<slot name="edit" :data="data"/>
</a-modal> </a-modal>
</div> </div>
</template> </template>

View file

@ -13,12 +13,12 @@ function changePage(num: number) {
<template> <template>
<div v-if="pagination.total>pagination.per_page"> <div v-if="pagination.total>pagination.per_page">
<a-pagination <a-pagination
:current="pagination.current_page" :current="pagination.current_page"
:pageSize="pagination.per_page" :pageSize="pagination.per_page"
:size="size" :size="size"
:total="pagination.total" :total="pagination.total"
class="pagination" class="pagination"
@change="changePage" @change="changePage"
/> />
</div> </div>
</template> </template>

View file

@ -1,13 +1,15 @@
<script setup lang="ts"> <script setup lang="ts">
import gettext from '@/gettext' import gettext from '@/gettext'
import StdDataEntry from '@/components/StdDataEntry'
import StdPagination from './StdPagination.vue'
import {computed, onMounted, reactive, ref, watch} from 'vue'
import {useRoute, useRouter} from 'vue-router'
import {message} from 'ant-design-vue'
import {downloadCsv} from '@/lib/helper'
const {$gettext, interpolate} = gettext const {$gettext, interpolate} = gettext
import StdDataEntry from '@/components/StdDataEntry' const emit = defineEmits(['onSelected', 'onSelectedRecord', 'clickEdit'])
import StdPagination from './StdPagination.vue'
import {nextTick, reactive, ref, watch} from 'vue'
import {useRoute, useRouter} from 'vue-router'
import {message} from 'ant-design-vue'
const props = defineProps({ const props = defineProps({
api: Object, api: Object,
@ -20,6 +22,10 @@ const props = defineProps({
type: Boolean, type: Boolean,
default: false default: false
}, },
disable_query_params: {
type: Boolean,
default: false
},
disable_add: { disable_add: {
type: Boolean, type: Boolean,
default: false default: false
@ -41,7 +47,6 @@ const props = defineProps({
}, },
selectionType: { selectionType: {
type: String, type: String,
default: 'checkbox',
validator: function (value: string) { validator: function (value: string) {
return ['checkbox', 'radio'].indexOf(value) !== -1 return ['checkbox', 'radio'].indexOf(value) !== -1
} }
@ -57,6 +62,10 @@ const props = defineProps({
rowKey: { rowKey: {
type: String, type: String,
default: 'id' default: 'id'
},
exportCsv: {
type: Boolean,
default: false
} }
}) })
@ -70,17 +79,21 @@ const pagination = reactive({
total_pages: 1 total_pages: 1
}) })
const route = useRoute() const route = useRoute()
let params = reactive({ const params = reactive({
...route.query,
...props.get_params ...props.get_params
}) })
const selectedRowKeys = ref([]) const selectedRowKeys = ref([])
const rowSelection = reactive({})
const searchColumns = getSearchColumns() const searchColumns = getSearchColumns()
const pithyColumns = getPithyColumns() const pithyColumns = getPithyColumns()
get_list() onMounted(() => {
if (!props.disable_query_params) {
Object.assign(params, route.query)
}
get_list()
})
defineExpose({ defineExpose({
get_list get_list
@ -117,9 +130,17 @@ function stdChange(pagination: any, filters: any, sorter: any) {
if (sorter) { if (sorter) {
params['order_by'] = sorter.field params['order_by'] = sorter.field
params['sort'] = sorter.order === 'ascend' ? 'asc' : 'desc' params['sort'] = sorter.order === 'ascend' ? 'asc' : 'desc'
nextTick(() => { switch (sorter.order) {
get_list() case 'ascend':
}) params['sort'] = 'asc'
break
case 'descend':
params['sort'] = 'desc'
break
default:
params['sort'] = null
break
}
} }
} }
@ -150,11 +171,11 @@ function checked(c: any) {
function onSelectChange(_selectedRowKeys: any) { function onSelectChange(_selectedRowKeys: any) {
selectedRowKeys.value = _selectedRowKeys selectedRowKeys.value = _selectedRowKeys
// this.$emit('selected', selectedRowKeys) emit('onSelected', selectedRowKeys.value)
} }
function onSelect(record: any) { function onSelect(record: any) {
// this.$emit('selectedRecord', record) emit('onSelectedRecord', record)
} }
const router = useRouter() const router = useRouter()
@ -163,6 +184,11 @@ const reset_search = async () => {
Object.keys(params).forEach(v => { Object.keys(params).forEach(v => {
delete params[v] delete params[v]
}) })
Object.assign(params, {
...props.get_params
})
router.push({query: {}}).catch(() => { router.push({query: {}}).catch(() => {
}) })
} }
@ -171,37 +197,125 @@ watch(params, () => {
router.push({query: params}) router.push({query: params})
get_list() get_list()
}) })
const rowSelection = computed(() => {
if (props.selectionType) {
return {
selectedRowKeys: selectedRowKeys, onChange: onSelectChange,
onSelect: onSelect, type: props.selectionType
}
} else {
return null
}
})
function fn(obj: Object, desc: string) {
const arr: string[] = desc.split('.')
while (arr.length) {
// @ts-ignore
const top = obj[arr.shift()]
if (top === undefined) {
return null
}
obj = top
}
return obj
}
async function export_csv() {
let header = []
let headerKeys: any[] = []
const showColumnsMap: any = {}
// @ts-ignore
for (let showColumnsKey in pithyColumns) {
// @ts-ignore
if (pithyColumns[showColumnsKey].dataIndex === 'action') continue
// @ts-ignore
let t = pithyColumns[showColumnsKey].title
if (typeof t === 'function') {
t = t()
}
header.push({
title: t,
// @ts-ignore
key: pithyColumns[showColumnsKey].dataIndex
})
// @ts-ignore
headerKeys.push(pithyColumns[showColumnsKey].dataIndex)
// @ts-ignore
showColumnsMap[pithyColumns[showColumnsKey].dataIndex] = pithyColumns[showColumnsKey]
}
let dataSource: any = []
let hasMore = true
let page = 1
while (hasMore) {
// DataSource
await props.api!.get_list({page}).then((response: any) => {
if (response.data.length === 0) {
hasMore = false
return
}
if (response[props.data_key] === undefined) {
dataSource = dataSource.concat(...response.data)
} else {
dataSource = dataSource.concat(...response[props.data_key])
}
}).catch((e: any) => {
message.error(e.message ?? '系统错误')
})
page += 1
}
const data: any[] = []
dataSource.forEach((row: Object) => {
let obj: any = {}
headerKeys.forEach(key => {
console.log(row, key)
let data = fn(row, key)
const c = showColumnsMap[key]
console.log(c)
data = c?.customRender?.({text: data}) ?? data
obj[c.dataIndex] = data
})
data.push(obj)
})
console.log(header, data)
downloadCsv(header, data, '测试.csv')
}
</script> </script>
<template> <template>
<div class="std-table"> <div class="std-table">
<std-data-entry <std-data-entry
v-if="!disable_search" v-if="!disable_search"
:data-list="searchColumns" :data-list="searchColumns"
v-model:data-source="params" v-model:data-source="params"
layout="inline" layout="inline"
> >
<template #action> <template #action>
<div class="reset-btn"> <a-space class="reset-btn">
<a-button @click="export_csv" type="primary" ghost>
<translate>Export</translate>
</a-button>
<a-button @click="reset_search"> <a-button @click="reset_search">
<translate>Reset</translate> <translate>Reset</translate>
</a-button> </a-button>
</div> </a-space>
</template> </template>
</std-data-entry> </std-data-entry>
<a-table <a-table
:columns="pithyColumns" :columns="pithyColumns"
:data-source="data_source" :data-source="data_source"
:loading="loading" :loading="loading"
:pagination="false" :pagination="false"
:row-key="rowKey" :row-key="rowKey"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, :rowSelection="rowSelection"
onSelect: onSelect, type: selectionType}" @change="stdChange"
@change="stdChange" :scroll="{ x: scrollX }"
:scroll="{ x: scrollX }"
> >
<template <template
v-slot:bodyCell="{text, record, index, column}" v-slot:bodyCell="{text, record, index, column}"
> >
<template v-if="column.dataIndex === 'action'"> <template v-if="column.dataIndex === 'action'">
<a v-if="props.editable" @click="$emit('clickEdit', record[props.rowKey], record)"> <a v-if="props.editable" @click="$emit('clickEdit', record[props.rowKey], record)">
@ -211,10 +325,10 @@ watch(params, () => {
<template v-if="props.deletable"> <template v-if="props.deletable">
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a-popconfirm <a-popconfirm
:cancelText="$gettext('No')" :cancelText="$gettext('No')"
:okText="$gettext('OK')" :okText="$gettext('OK')"
:title="$gettext('Are you sure you want to delete ?')" :title="$gettext('Are you sure you want to delete ?')"
@confirm="destroy(record[rowKey])"> @confirm="destroy(record[rowKey])">
<a v-translate>Delete</a> <a v-translate>Delete</a>
</a-popconfirm> </a-popconfirm>
</template> </template>
@ -252,6 +366,10 @@ watch(params, () => {
// min-height: 50px; // min-height: 50px;
height: 100%; height: 100%;
display: flex; display: flex;
align-items: flex-end; align-items: flex-start;
}
:deep(.ant-form-inline .ant-form-item) {
margin-bottom: 10px;
} }
</style> </style>

View file

@ -15,3 +15,17 @@ export const datetime = (args: customRender) => {
export const date = (args: customRender) => { export const date = (args: customRender) => {
return dayjs(args.text).format('YYYY-MM-DD') return dayjs(args.text).format('YYYY-MM-DD')
} }
export const mask = (args: customRender, maskObj: any) => {
let v
if (typeof maskObj?.[args.text] === 'function') {
v = maskObj[args.text]()
} else if (typeof maskObj?.[args.text] === 'string') {
v = maskObj[args.text]
} else {
v = args.text
}
return <div>{v}</div>
}

View file

@ -0,0 +1,51 @@
<script setup lang="ts">
import {computed, ref} from 'vue'
const props = defineProps(['value', 'generate', 'placeholder'])
const emit = defineEmits(['update:value'])
const M_value = computed({
get() {
return props.value
},
set(v) {
emit('update:value', v)
}
})
const visibility = ref(false)
function handle_generate() {
visibility.value = true
M_value.value = 'xxxx'
const chars = '0123456789abcdefghijklmnopqrstuvwxyz!@#$%^&*()ABCDEFGHIJKLMNOPQRSTUVWXYZ'
const passwordLength = 12
let password = ''
for (let i = 0; i <= passwordLength; i++) {
const randomNumber = Math.floor(Math.random() * chars.length)
password += chars.substring(randomNumber, randomNumber + 1)
}
M_value.value = password
}
</script>
<template>
<a-input-group compact>
<a-input-password
v-if="!visibility"
:class="{compact: generate}"
v-model:value="M_value" :placeholoder="placeholder"/>
<a-input v-else :class="{compact: generate}" v-model:value="M_value" :placeholoder="placeholder"/>
<a-button @click="handle_generate" v-if="generate" type="primary">
<translate>Generate</translate>
</a-button>
</a-input-group>
</template>
<style scoped>
.compact {
width: calc(100% - 91px)
}
</style>

View file

@ -0,0 +1,45 @@
<script setup lang="ts">
import {computed, ref} from 'vue'
import {SelectProps} from 'ant-design-vue'
const props = defineProps(['value', 'mask'])
const emit = defineEmits(['update:value'])
const options = computed(() => {
const _options = ref<SelectProps['options']>([])
for (const [key, value] of Object.entries(props.mask)) {
const v = value as any
_options.value!.push({label: v?.(), value: key})
}
return _options
})
const _value = computed({
get() {
let v
if (typeof props.mask?.[props.value] === 'function') {
v = props.mask[props.value]()
} else if (typeof props.mask?.[props.value] === 'string') {
v = props.mask[props.value]
} else {
v = props.value
}
return v
},
set(v) {
emit('update:value', v)
}
})
</script>
<template>
<a-select v-model:value="_value"
:options="options.value" style="min-width: 180px"/>
</template>
<style lang="less" scoped>
</style>

View file

@ -0,0 +1,135 @@
<script setup lang="ts">
import {onMounted, reactive, ref, watch} from 'vue'
import StdTable from '@/components/StdDataDisplay/StdTable.vue'
const props = defineProps(['selectedKey', 'value', 'recordValueIndex',
'selectionType', 'api', 'columns', 'data_key',
'disable_search', 'get_params', 'description'])
const emit = defineEmits(['update:selectedKey', 'changeSelect'])
const visible = ref(false)
const M_value = ref('')
onMounted(() => {
init()
})
const selected = ref([])
const record: any = reactive({})
function init() {
if (props.selectedKey && !props.value && props.selectionType === 'radio') {
props.api.get(props.selectedKey).then((r: any) => {
Object.assign(record, r)
M_value.value = r[props.recordValueIndex]
})
}
}
function show() {
visible.value = true
}
function onSelect(_selected: any) {
selected.value = _selected
}
function onSelectedRecord(r: any) {
Object.assign(record, r)
}
function ok() {
visible.value = false
if (props.selectionType == 'radio') {
emit('update:selectedKey', selected.value[0])
} else {
emit('update:selectedKey', selected.value)
}
M_value.value = record[props.recordValueIndex]
emit('changeSelect', record)
}
watch(props, () => {
if (!props?.selectedKey) {
M_value.value = ''
} else if (props.value) {
M_value.value = props.value
} else {
init()
}
})
</script>
<template>
<div class="std-selector-container">
<div class="std-selector" @click="show()">
<a-input v-model="selectedKey" disabled hidden/>
<div class="value">
{{ M_value }}
</div>
<a-modal
:mask="false"
:visible="visible"
cancel-text="取消"
ok-text="选择"
title="选择器"
@cancel="visible=false"
@ok="ok()"
:width="800"
destroyOnClose
>
{{ description }}
<std-table
:api="api"
:columns="columns"
:data_key="data_key"
:disable_search="disable_search"
:pithy="true"
:get_params="get_params"
:selectionType="selectionType"
:disable_query_params="true"
@onSelected="onSelect"
@onSelectedRecord="onSelectedRecord"
/>
</a-modal>
</div>
</div>
</template>
<style lang="less" scoped>
.std-selector-container {
height: 39.9px;
display: flex;
align-items: center;
.std-selector {
box-sizing: border-box;
font-variant: tabular-nums;
list-style: none;
font-feature-settings: 'tnum';
height: 32px;
padding: 4px 11px;
color: rgba(0, 0, 0, 0.85);
font-size: 14px;
line-height: 1.5;
background-color: #fff;
background-image: none;
border: 1px solid #d9d9d9;
border-radius: 4px;
transition: all 0.3s;
margin: 0 10px 0 0;
cursor: pointer;
min-width: 180px;
@media (prefers-color-scheme: dark) {
background-color: #1e1f20;
border: 1px solid #666666;
color: rgba(255, 255, 255, 0.99);
}
.value {
}
}
}
</style>

View file

@ -1,40 +0,0 @@
import StdDataEntry from './StdDataEntry.js'
import {h} from 'vue'
import {Input} from 'ant-design-vue'
interface IEdit {
type: Function
placeholder: any
}
function readonly(edit: IEdit, dataSource: any, dataIndex: any) {
return h('p', dataSource[dataIndex])
}
function input(edit: IEdit, dataSource: any, dataIndex: any) {
return h(Input, {
placeholder: edit.placeholder?.() ?? '',
value: dataSource?.[dataIndex],
'onUpdate:value': value => {
dataSource[dataIndex] = value
// Object.assign(dataSource, {[dataIndex]: value})
}
})
}
function textarea(edit: IEdit, dataSource: any, dataIndex: any) {
return h('a-textarea')
}
function select(edit: IEdit, dataSource: any, dataIndex: any) {
return h('a-select')
}
export {
readonly,
input,
textarea,
select
}
export default StdDataEntry

View file

@ -0,0 +1,88 @@
import StdDataEntry from './StdDataEntry.js'
import {h} from 'vue'
import {Input, Textarea, InputPassword} from 'ant-design-vue'
import StdSelector from './compontents/StdSelector.vue'
import StdSelect from './compontents/StdSelect.vue'
import StdPassword from './compontents/StdPassword.vue'
interface IEdit {
type: Function
placeholder: any
mask: any
key: any
value: any
recordValueIndex: any
selectionType: any
api: Object,
columns: any,
data_key: any,
disable_search: boolean,
get_params: Object,
description: string
generate: boolean
}
function readonly(edit: IEdit, dataSource: any, dataIndex: any) {
return h('p', dataSource[dataIndex])
}
function input(edit: IEdit, dataSource: any, dataIndex: any) {
return h(Input, {
placeholder: edit.placeholder?.() ?? '',
value: dataSource?.[dataIndex],
'onUpdate:value': value => {
dataSource[dataIndex] = value
}
})
}
function textarea(edit: IEdit, dataSource: any, dataIndex: any) {
return h(Textarea, {
placeholder: edit.placeholder?.() ?? '',
value: dataSource?.[dataIndex],
'onUpdate:value': value => {
dataSource[dataIndex] = value
}
})
}
function password(edit: IEdit, dataSource: any, dataIndex: any) {
return <StdPassword
v-model:value={dataSource[dataIndex]}
generate={edit.generate}
placeholder={edit.placeholder}
/>
}
function select(edit: IEdit, dataSource: any, dataIndex: any) {
return <StdSelect
v-model:value={dataSource[dataIndex]}
mask={edit.mask}
/>
}
function selector(edit: IEdit, dataSource: any, dataIndex: any) {
return <StdSelector
v-model:selectedKey={dataSource[dataIndex]}
value={edit.value}
recordValueIndex={edit.recordValueIndex}
selectionType={edit.selectionType}
api={edit.api}
columns={edit.columns}
data_key={edit.data_key}
disable_search={edit.disable_search}
get_params={edit.get_params}
description={edit.description}
/>
}
export {
readonly,
input,
textarea,
select,
selector,
password
}
export default StdDataEntry

View file

@ -1,7 +1,7 @@
.std-data-entry-action { .std-data-entry-action {
@media (max-width: 375px) { @media (max-width: 375px) {
display: block; display: block;
width: 100%; width: 100%;
margin: 10px 0; margin: 10px 0;
} }
} }

View file

@ -13,17 +13,17 @@ msgstr ""
msgid "About" msgid "About"
msgstr "About" msgstr "About"
#: src/routes/index.ts:99 #: src/routes/index.ts:99 src/views/domain/ngx_conf/LogEntry.vue:64
msgid "Access Logs" msgid "Access Logs"
msgstr "" msgstr ""
#: src/views/config/Config.vue:24 src/views/domain/DomainList.vue:42 #: src/views/config/Config.vue:24 src/views/domain/DomainList.vue:42
#: src/views/user/User.vue:42 #: src/views/user/User.vue:43
msgid "Action" msgid "Action"
msgstr "Action" msgstr "Action"
#: src/components/StdDataDisplay/StdCurd.vue:123 #: src/components/StdDataDisplay/StdCurd.vue:130
#: src/components/StdDataDisplay/StdCurd.vue:24 #: src/components/StdDataDisplay/StdCurd.vue:26
msgid "Add" msgid "Add"
msgstr "" msgstr ""
@ -46,11 +46,7 @@ msgstr "Add Site"
msgid "Advance Mode" msgid "Advance Mode"
msgstr "Advance Mode" msgstr "Advance Mode"
#: src/views/nginx_log/NginxLog.vue:100 #: src/components/StdDataDisplay/StdTable.vue:43
msgid "All logs"
msgstr ""
#: src/components/StdDataDisplay/StdTable.vue:41
#: src/views/domain/DomainList.vue:27 #: src/views/domain/DomainList.vue:27
#, fuzzy #, fuzzy
msgid "Are you sure you want to delete ?" msgid "Are you sure you want to delete ?"
@ -77,7 +73,7 @@ msgstr "Auto-renewal disabled for %{name}"
msgid "Auto-renewal enabled for %{name}" msgid "Auto-renewal enabled for %{name}"
msgstr "Auto-renewal enabled for %{name}" msgstr "Auto-renewal enabled for %{name}"
#: src/views/domain/DomainEdit.vue:178 src/views/nginx_log/NginxLog.vue:115 #: src/views/domain/DomainEdit.vue:178 src/views/nginx_log/NginxLog.vue:162
msgid "Back" msgid "Back"
msgstr "Back" msgstr "Back"
@ -98,7 +94,7 @@ msgstr "Basic Mode"
msgid "Build with" msgid "Build with"
msgstr "Build with" msgstr "Build with"
#: src/components/StdDataDisplay/StdCurd.vue:26 #: src/components/StdDataDisplay/StdCurd.vue:28
#: src/views/config/ConfigEdit.vue:49 #: src/views/config/ConfigEdit.vue:49
msgid "Cancel" msgid "Cancel"
msgstr "Cancel" msgstr "Cancel"
@ -118,7 +114,7 @@ msgstr "Certificate Status"
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:29 #: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:29
#: src/views/domain/ngx_conf/LocationEditor.vue:21 #: src/views/domain/ngx_conf/LocationEditor.vue:21
#: src/views/domain/ngx_conf/LocationEditor.vue:35 #: src/views/domain/ngx_conf/LocationEditor.vue:35
#: src/views/domain/ngx_conf/NgxConfigEditor.vue:161 #: src/views/domain/ngx_conf/NgxConfigEditor.vue:175
msgid "Comments" msgid "Comments"
msgstr "Comments" msgstr "Comments"
@ -151,7 +147,7 @@ msgstr "CPU:"
msgid "Create Another" msgid "Create Another"
msgstr "Create Another" msgstr "Create Another"
#: src/views/user/User.vue:30 #: src/views/user/User.vue:31
msgid "Created at" msgid "Created at"
msgstr "Created at" msgstr "Created at"
@ -167,12 +163,12 @@ msgstr "Dashboard"
msgid "Database (Optional, default: database)" msgid "Database (Optional, default: database)"
msgstr "Database (Optional, default: database)" msgstr "Database (Optional, default: database)"
#: src/components/StdDataDisplay/StdTable.vue:218 #: src/components/StdDataDisplay/StdTable.vue:332
#: src/views/domain/DomainList.vue:111 #: src/views/domain/DomainList.vue:111
msgid "Delete" msgid "Delete"
msgstr "" msgstr ""
#: src/components/StdDataDisplay/StdTable.vue:92 #: src/components/StdDataDisplay/StdTable.vue:105
msgid "Delete ID: %{id}" msgid "Delete ID: %{id}"
msgstr "" msgstr ""
@ -256,7 +252,7 @@ msgstr "Enabled successfully"
msgid "Encrypt website with Let's Encrypt" msgid "Encrypt website with Let's Encrypt"
msgstr "Encrypt website with Let's Encrypt" msgstr "Encrypt website with Let's Encrypt"
#: src/routes/index.ts:103 #: src/routes/index.ts:103 src/views/domain/ngx_conf/LogEntry.vue:68
msgid "Error Logs" msgid "Error Logs"
msgstr "" msgstr ""
@ -264,6 +260,10 @@ msgstr ""
msgid "Expiration Date: %{date}" msgid "Expiration Date: %{date}"
msgstr "Expiration Date: %{date}" msgstr "Expiration Date: %{date}"
#: src/components/StdDataDisplay/StdTable.vue:299
msgid "Export"
msgstr ""
#: src/views/domain/DomainEdit.vue:115 src/views/domain/DomainList.vue:68 #: src/views/domain/DomainEdit.vue:115 src/views/domain/DomainList.vue:68
msgid "Failed to disable %{msg}" msgid "Failed to disable %{msg}"
msgstr "Failed to disable %{msg}" msgstr "Failed to disable %{msg}"
@ -276,10 +276,6 @@ msgstr "Failed to enable %{msg}"
msgid "Failed to get certificate information" msgid "Failed to get certificate information"
msgstr "" msgstr ""
#: src/views/nginx_log/NginxLog.vue:7
msgid "Fetch"
msgstr ""
#: src/views/other/Error.vue:3 src/views/other/Error.vue:4 #: src/views/other/Error.vue:3 src/views/other/Error.vue:4
msgid "File Not Found" msgid "File Not Found"
msgstr "File Not Found" msgstr "File Not Found"
@ -288,6 +284,10 @@ msgstr "File Not Found"
msgid "Finished" msgid "Finished"
msgstr "Finished" msgstr "Finished"
#: src/components/StdDataEntry/compontents/StdPassword.vue:42
msgid "Generate"
msgstr ""
#: src/language/constants.ts:11 #: src/language/constants.ts:11
msgid "Generating private key for registering account" msgid "Generating private key for registering account"
msgstr "" msgstr ""
@ -374,12 +374,12 @@ msgstr "Memory"
msgid "Memory and Storage" msgid "Memory and Storage"
msgstr "Memory and Storage" msgstr "Memory and Storage"
#: src/components/StdDataDisplay/StdCurd.vue:24 #: src/components/StdDataDisplay/StdCurd.vue:26
#: src/components/StdDataDisplay/StdTable.vue:16 #: src/components/StdDataDisplay/StdTable.vue:18
#: src/components/StdDataDisplay/StdTable.vue:17 #: src/components/StdDataDisplay/StdTable.vue:19
#: src/components/StdDataDisplay/StdTable.vue:21 #: src/components/StdDataDisplay/StdTable.vue:24
#: src/components/StdDataDisplay/StdTable.vue:31
#: src/components/StdDataDisplay/StdTable.vue:33 #: src/components/StdDataDisplay/StdTable.vue:33
#: src/components/StdDataDisplay/StdTable.vue:35
#, fuzzy #, fuzzy
msgid "Modify" msgid "Modify"
msgstr "Modify Config" msgstr "Modify Config"
@ -408,10 +408,6 @@ msgstr "Network Total Receive"
msgid "Network Total Send" msgid "Network Total Send"
msgstr "Network Total Send" msgstr "Network Total Send"
#: src/views/nginx_log/NginxLog.vue:103
msgid "New logs"
msgstr ""
#: src/views/domain/DomainAdd.vue:137 #: src/views/domain/DomainAdd.vue:137
msgid "Next" msgid "Next"
msgstr "Next" msgstr "Next"
@ -420,7 +416,7 @@ msgstr "Next"
msgid "Nginx Log" msgid "Nginx Log"
msgstr "" msgstr ""
#: src/components/StdDataDisplay/StdTable.vue:39 #: src/components/StdDataDisplay/StdTable.vue:41
#: src/views/domain/DomainList.vue:25 #: src/views/domain/DomainList.vue:25
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:17 #: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:17
#: src/views/domain/ngx_conf/LocationEditor.vue:11 #: src/views/domain/ngx_conf/LocationEditor.vue:11
@ -447,8 +443,8 @@ msgstr ""
msgid "Obtaining certificate" msgid "Obtaining certificate"
msgstr "" msgstr ""
#: src/components/StdDataDisplay/StdCurd.vue:27 #: src/components/StdDataDisplay/StdCurd.vue:29
#: src/components/StdDataDisplay/StdTable.vue:40 #: src/components/StdDataDisplay/StdTable.vue:42
#: src/views/domain/DomainList.vue:26 #: src/views/domain/DomainList.vue:26
msgid "OK" msgid "OK"
msgstr "" msgstr ""
@ -519,7 +515,7 @@ msgstr ""
msgid "Reloading nginx" msgid "Reloading nginx"
msgstr "" msgstr ""
#: src/components/StdDataDisplay/StdTable.vue:187 #: src/components/StdDataDisplay/StdTable.vue:302
msgid "Reset" msgid "Reset"
msgstr "" msgstr ""
@ -537,7 +533,7 @@ msgstr "Save Directive"
msgid "Save error %{msg}" msgid "Save error %{msg}"
msgstr "Save error %{msg}" msgstr "Save error %{msg}"
#: src/components/StdDataDisplay/StdCurd.vue:91 #: src/components/StdDataDisplay/StdCurd.vue:98
#, fuzzy #, fuzzy
msgid "Save Successfully" msgid "Save Successfully"
msgstr "Saved successfully" msgstr "Saved successfully"
@ -551,7 +547,7 @@ msgstr "Saved successfully"
msgid "Send" msgid "Send"
msgstr "Send" msgstr "Send"
#: src/components/StdDataDisplay/StdTable.vue:112 #: src/components/StdDataDisplay/StdTable.vue:125
#: src/views/config/ConfigEdit.vue:22 src/views/domain/DomainEdit.vue:56 #: src/views/config/ConfigEdit.vue:22 src/views/domain/DomainEdit.vue:56
#: src/views/domain/DomainEdit.vue:68 src/views/domain/DomainEdit.vue:77 #: src/views/domain/DomainEdit.vue:68 src/views/domain/DomainEdit.vue:77
#: src/views/domain/DomainEdit.vue:94 src/views/domain/DomainList.vue:78 #: src/views/domain/DomainEdit.vue:94 src/views/domain/DomainList.vue:78
@ -631,7 +627,7 @@ msgid "The username or password is incorrect"
msgstr "" msgstr ""
#: src/views/config/Config.vue:17 src/views/domain/DomainList.vue:36 #: src/views/config/Config.vue:17 src/views/domain/DomainList.vue:36
#: src/views/user/User.vue:36 #: src/views/user/User.vue:37
msgid "Updated at" msgid "Updated at"
msgstr "Updated at" msgstr "Updated at"

View file

@ -7,17 +7,18 @@ msgid "About"
msgstr "" msgstr ""
#: src/routes/index.ts:99 #: src/routes/index.ts:99
#: src/views/domain/ngx_conf/LogEntry.vue:64
msgid "Access Logs" msgid "Access Logs"
msgstr "" msgstr ""
#: src/views/config/Config.vue:24 #: src/views/config/Config.vue:24
#: src/views/domain/DomainList.vue:42 #: src/views/domain/DomainList.vue:42
#: src/views/user/User.vue:42 #: src/views/user/User.vue:43
msgid "Action" msgid "Action"
msgstr "" msgstr ""
#: src/components/StdDataDisplay/StdCurd.vue:123 #: src/components/StdDataDisplay/StdCurd.vue:130
#: src/components/StdDataDisplay/StdCurd.vue:24 #: src/components/StdDataDisplay/StdCurd.vue:26
msgid "Add" msgid "Add"
msgstr "" msgstr ""
@ -41,11 +42,7 @@ msgstr ""
msgid "Advance Mode" msgid "Advance Mode"
msgstr "" msgstr ""
#: src/views/nginx_log/NginxLog.vue:100 #: src/components/StdDataDisplay/StdTable.vue:43
msgid "All logs"
msgstr ""
#: src/components/StdDataDisplay/StdTable.vue:41
#: src/views/domain/DomainList.vue:27 #: src/views/domain/DomainList.vue:27
msgid "Are you sure you want to delete ?" msgid "Are you sure you want to delete ?"
msgstr "" msgstr ""
@ -71,7 +68,7 @@ msgid "Auto-renewal enabled for %{name}"
msgstr "" msgstr ""
#: src/views/domain/DomainEdit.vue:178 #: src/views/domain/DomainEdit.vue:178
#: src/views/nginx_log/NginxLog.vue:115 #: src/views/nginx_log/NginxLog.vue:162
msgid "Back" msgid "Back"
msgstr "" msgstr ""
@ -91,7 +88,7 @@ msgstr ""
msgid "Build with" msgid "Build with"
msgstr "" msgstr ""
#: src/components/StdDataDisplay/StdCurd.vue:26 #: src/components/StdDataDisplay/StdCurd.vue:28
#: src/views/config/ConfigEdit.vue:49 #: src/views/config/ConfigEdit.vue:49
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr ""
@ -111,7 +108,7 @@ msgstr ""
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:29 #: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:29
#: src/views/domain/ngx_conf/LocationEditor.vue:21 #: src/views/domain/ngx_conf/LocationEditor.vue:21
#: src/views/domain/ngx_conf/LocationEditor.vue:35 #: src/views/domain/ngx_conf/LocationEditor.vue:35
#: src/views/domain/ngx_conf/NgxConfigEditor.vue:161 #: src/views/domain/ngx_conf/NgxConfigEditor.vue:175
msgid "Comments" msgid "Comments"
msgstr "" msgstr ""
@ -144,7 +141,7 @@ msgstr ""
msgid "Create Another" msgid "Create Another"
msgstr "" msgstr ""
#: src/views/user/User.vue:30 #: src/views/user/User.vue:31
msgid "Created at" msgid "Created at"
msgstr "" msgstr ""
@ -160,12 +157,12 @@ msgstr ""
msgid "Database (Optional, default: database)" msgid "Database (Optional, default: database)"
msgstr "" msgstr ""
#: src/components/StdDataDisplay/StdTable.vue:218 #: src/components/StdDataDisplay/StdTable.vue:332
#: src/views/domain/DomainList.vue:111 #: src/views/domain/DomainList.vue:111
msgid "Delete" msgid "Delete"
msgstr "" msgstr ""
#: src/components/StdDataDisplay/StdTable.vue:92 #: src/components/StdDataDisplay/StdTable.vue:105
msgid "Delete ID: %{id}" msgid "Delete ID: %{id}"
msgstr "" msgstr ""
@ -257,6 +254,7 @@ msgid "Encrypt website with Let's Encrypt"
msgstr "" msgstr ""
#: src/routes/index.ts:103 #: src/routes/index.ts:103
#: src/views/domain/ngx_conf/LogEntry.vue:68
msgid "Error Logs" msgid "Error Logs"
msgstr "" msgstr ""
@ -264,6 +262,10 @@ msgstr ""
msgid "Expiration Date: %{date}" msgid "Expiration Date: %{date}"
msgstr "" msgstr ""
#: src/components/StdDataDisplay/StdTable.vue:299
msgid "Export"
msgstr ""
#: src/views/domain/DomainEdit.vue:115 #: src/views/domain/DomainEdit.vue:115
#: src/views/domain/DomainList.vue:68 #: src/views/domain/DomainList.vue:68
msgid "Failed to disable %{msg}" msgid "Failed to disable %{msg}"
@ -278,10 +280,6 @@ msgstr ""
msgid "Failed to get certificate information" msgid "Failed to get certificate information"
msgstr "" msgstr ""
#: src/views/nginx_log/NginxLog.vue:7
msgid "Fetch"
msgstr ""
#: src/views/other/Error.vue:3 #: src/views/other/Error.vue:3
#: src/views/other/Error.vue:4 #: src/views/other/Error.vue:4
msgid "File Not Found" msgid "File Not Found"
@ -292,6 +290,10 @@ msgstr ""
msgid "Finished" msgid "Finished"
msgstr "" msgstr ""
#: src/components/StdDataEntry/compontents/StdPassword.vue:42
msgid "Generate"
msgstr ""
#: src/language/constants.ts:11 #: src/language/constants.ts:11
msgid "Generating private key for registering account" msgid "Generating private key for registering account"
msgstr "" msgstr ""
@ -376,12 +378,12 @@ msgstr ""
msgid "Memory and Storage" msgid "Memory and Storage"
msgstr "" msgstr ""
#: src/components/StdDataDisplay/StdCurd.vue:24 #: src/components/StdDataDisplay/StdCurd.vue:26
#: src/components/StdDataDisplay/StdTable.vue:16 #: src/components/StdDataDisplay/StdTable.vue:18
#: src/components/StdDataDisplay/StdTable.vue:17 #: src/components/StdDataDisplay/StdTable.vue:19
#: src/components/StdDataDisplay/StdTable.vue:21 #: src/components/StdDataDisplay/StdTable.vue:24
#: src/components/StdDataDisplay/StdTable.vue:31
#: src/components/StdDataDisplay/StdTable.vue:33 #: src/components/StdDataDisplay/StdTable.vue:33
#: src/components/StdDataDisplay/StdTable.vue:35
msgid "Modify" msgid "Modify"
msgstr "" msgstr ""
@ -410,10 +412,6 @@ msgstr ""
msgid "Network Total Send" msgid "Network Total Send"
msgstr "" msgstr ""
#: src/views/nginx_log/NginxLog.vue:103
msgid "New logs"
msgstr ""
#: src/views/domain/DomainAdd.vue:137 #: src/views/domain/DomainAdd.vue:137
msgid "Next" msgid "Next"
msgstr "" msgstr ""
@ -423,7 +421,7 @@ msgstr ""
msgid "Nginx Log" msgid "Nginx Log"
msgstr "" msgstr ""
#: src/components/StdDataDisplay/StdTable.vue:39 #: src/components/StdDataDisplay/StdTable.vue:41
#: src/views/domain/DomainList.vue:25 #: src/views/domain/DomainList.vue:25
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:17 #: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:17
#: src/views/domain/ngx_conf/LocationEditor.vue:11 #: src/views/domain/ngx_conf/LocationEditor.vue:11
@ -448,8 +446,8 @@ msgstr ""
msgid "Obtaining certificate" msgid "Obtaining certificate"
msgstr "" msgstr ""
#: src/components/StdDataDisplay/StdCurd.vue:27 #: src/components/StdDataDisplay/StdCurd.vue:29
#: src/components/StdDataDisplay/StdTable.vue:40 #: src/components/StdDataDisplay/StdTable.vue:42
#: src/views/domain/DomainList.vue:26 #: src/views/domain/DomainList.vue:26
msgid "OK" msgid "OK"
msgstr "" msgstr ""
@ -523,7 +521,7 @@ msgstr ""
msgid "Reloading nginx" msgid "Reloading nginx"
msgstr "" msgstr ""
#: src/components/StdDataDisplay/StdTable.vue:187 #: src/components/StdDataDisplay/StdTable.vue:302
msgid "Reset" msgid "Reset"
msgstr "" msgstr ""
@ -543,7 +541,7 @@ msgstr ""
msgid "Save error %{msg}" msgid "Save error %{msg}"
msgstr "" msgstr ""
#: src/components/StdDataDisplay/StdCurd.vue:91 #: src/components/StdDataDisplay/StdCurd.vue:98
msgid "Save Successfully" msgid "Save Successfully"
msgstr "" msgstr ""
@ -558,7 +556,7 @@ msgstr ""
msgid "Send" msgid "Send"
msgstr "" msgstr ""
#: src/components/StdDataDisplay/StdTable.vue:112 #: src/components/StdDataDisplay/StdTable.vue:125
#: src/views/config/ConfigEdit.vue:22 #: src/views/config/ConfigEdit.vue:22
#: src/views/domain/DomainEdit.vue:56 #: src/views/domain/DomainEdit.vue:56
#: src/views/domain/DomainEdit.vue:68 #: src/views/domain/DomainEdit.vue:68
@ -638,7 +636,7 @@ msgstr ""
#: src/views/config/Config.vue:17 #: src/views/config/Config.vue:17
#: src/views/domain/DomainList.vue:36 #: src/views/domain/DomainList.vue:36
#: src/views/user/User.vue:36 #: src/views/user/User.vue:37
msgid "Updated at" msgid "Updated at"
msgstr "" msgstr ""

File diff suppressed because one or more lines are too long

Binary file not shown.

View file

@ -16,17 +16,17 @@ msgstr ""
msgid "About" msgid "About"
msgstr "关于" msgstr "关于"
#: src/routes/index.ts:99 #: src/routes/index.ts:99 src/views/domain/ngx_conf/LogEntry.vue:64
msgid "Access Logs" msgid "Access Logs"
msgstr "访问日志" msgstr "访问日志"
#: src/views/config/Config.vue:24 src/views/domain/DomainList.vue:42 #: src/views/config/Config.vue:24 src/views/domain/DomainList.vue:42
#: src/views/user/User.vue:42 #: src/views/user/User.vue:43
msgid "Action" msgid "Action"
msgstr "操作" msgstr "操作"
#: src/components/StdDataDisplay/StdCurd.vue:123 #: src/components/StdDataDisplay/StdCurd.vue:130
#: src/components/StdDataDisplay/StdCurd.vue:24 #: src/components/StdDataDisplay/StdCurd.vue:26
msgid "Add" msgid "Add"
msgstr "添加" msgstr "添加"
@ -49,11 +49,7 @@ msgstr "添加站点"
msgid "Advance Mode" msgid "Advance Mode"
msgstr "高级模式" msgstr "高级模式"
#: src/views/nginx_log/NginxLog.vue:100 #: src/components/StdDataDisplay/StdTable.vue:43
msgid "All logs"
msgstr "所有日志"
#: src/components/StdDataDisplay/StdTable.vue:41
#: src/views/domain/DomainList.vue:27 #: src/views/domain/DomainList.vue:27
msgid "Are you sure you want to delete ?" msgid "Are you sure you want to delete ?"
msgstr "您确定要删除吗?" msgstr "您确定要删除吗?"
@ -78,7 +74,7 @@ msgstr "成功关闭 %{name} 自动续签"
msgid "Auto-renewal enabled for %{name}" msgid "Auto-renewal enabled for %{name}"
msgstr "成功启用 %{name} 自动续签" msgstr "成功启用 %{name} 自动续签"
#: src/views/domain/DomainEdit.vue:178 src/views/nginx_log/NginxLog.vue:115 #: src/views/domain/DomainEdit.vue:178 src/views/nginx_log/NginxLog.vue:162
msgid "Back" msgid "Back"
msgstr "返回" msgstr "返回"
@ -98,7 +94,7 @@ msgstr "基本模式"
msgid "Build with" msgid "Build with"
msgstr "构建基于" msgstr "构建基于"
#: src/components/StdDataDisplay/StdCurd.vue:26 #: src/components/StdDataDisplay/StdCurd.vue:28
#: src/views/config/ConfigEdit.vue:49 #: src/views/config/ConfigEdit.vue:49
msgid "Cancel" msgid "Cancel"
msgstr "取消" msgstr "取消"
@ -118,7 +114,7 @@ msgstr "证书状态"
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:29 #: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:29
#: src/views/domain/ngx_conf/LocationEditor.vue:21 #: src/views/domain/ngx_conf/LocationEditor.vue:21
#: src/views/domain/ngx_conf/LocationEditor.vue:35 #: src/views/domain/ngx_conf/LocationEditor.vue:35
#: src/views/domain/ngx_conf/NgxConfigEditor.vue:161 #: src/views/domain/ngx_conf/NgxConfigEditor.vue:175
msgid "Comments" msgid "Comments"
msgstr "注释" msgstr "注释"
@ -151,7 +147,7 @@ msgstr ""
msgid "Create Another" msgid "Create Another"
msgstr "再创建一个" msgstr "再创建一个"
#: src/views/user/User.vue:30 #: src/views/user/User.vue:31
msgid "Created at" msgid "Created at"
msgstr "创建时间" msgstr "创建时间"
@ -167,12 +163,12 @@ msgstr "仪表盘"
msgid "Database (Optional, default: database)" msgid "Database (Optional, default: database)"
msgstr "数据库 (可选,默认: database)" msgstr "数据库 (可选,默认: database)"
#: src/components/StdDataDisplay/StdTable.vue:218 #: src/components/StdDataDisplay/StdTable.vue:332
#: src/views/domain/DomainList.vue:111 #: src/views/domain/DomainList.vue:111
msgid "Delete" msgid "Delete"
msgstr "删除" msgstr "删除"
#: src/components/StdDataDisplay/StdTable.vue:92 #: src/components/StdDataDisplay/StdTable.vue:105
msgid "Delete ID: %{id}" msgid "Delete ID: %{id}"
msgstr "删除 ID: %{id}" msgstr "删除 ID: %{id}"
@ -256,7 +252,7 @@ msgstr "启用成功"
msgid "Encrypt website with Let's Encrypt" msgid "Encrypt website with Let's Encrypt"
msgstr "用 Let's Encrypt 对网站进行加密" msgstr "用 Let's Encrypt 对网站进行加密"
#: src/routes/index.ts:103 #: src/routes/index.ts:103 src/views/domain/ngx_conf/LogEntry.vue:68
msgid "Error Logs" msgid "Error Logs"
msgstr "错误日志" msgstr "错误日志"
@ -264,6 +260,10 @@ msgstr "错误日志"
msgid "Expiration Date: %{date}" msgid "Expiration Date: %{date}"
msgstr "过期时间: %{date}" msgstr "过期时间: %{date}"
#: src/components/StdDataDisplay/StdTable.vue:299
msgid "Export"
msgstr ""
#: src/views/domain/DomainEdit.vue:115 src/views/domain/DomainList.vue:68 #: src/views/domain/DomainEdit.vue:115 src/views/domain/DomainList.vue:68
msgid "Failed to disable %{msg}" msgid "Failed to disable %{msg}"
msgstr "禁用失败 %{msg}" msgstr "禁用失败 %{msg}"
@ -276,10 +276,6 @@ msgstr "启用失败 %{msg}"
msgid "Failed to get certificate information" msgid "Failed to get certificate information"
msgstr "获取证书信息失败" msgstr "获取证书信息失败"
#: src/views/nginx_log/NginxLog.vue:7
msgid "Fetch"
msgstr "日志范围"
#: src/views/other/Error.vue:3 src/views/other/Error.vue:4 #: src/views/other/Error.vue:3 src/views/other/Error.vue:4
msgid "File Not Found" msgid "File Not Found"
msgstr "未找到文件" msgstr "未找到文件"
@ -288,6 +284,10 @@ msgstr "未找到文件"
msgid "Finished" msgid "Finished"
msgstr "完成" msgstr "完成"
#: src/components/StdDataEntry/compontents/StdPassword.vue:42
msgid "Generate"
msgstr "生成"
#: src/language/constants.ts:11 #: src/language/constants.ts:11
msgid "Generating private key for registering account" msgid "Generating private key for registering account"
msgstr "正在生成私钥用于注册账户" msgstr "正在生成私钥用于注册账户"
@ -372,12 +372,12 @@ msgstr "内存"
msgid "Memory and Storage" msgid "Memory and Storage"
msgstr "内存与存储" msgstr "内存与存储"
#: src/components/StdDataDisplay/StdCurd.vue:24 #: src/components/StdDataDisplay/StdCurd.vue:26
#: src/components/StdDataDisplay/StdTable.vue:16 #: src/components/StdDataDisplay/StdTable.vue:18
#: src/components/StdDataDisplay/StdTable.vue:17 #: src/components/StdDataDisplay/StdTable.vue:19
#: src/components/StdDataDisplay/StdTable.vue:21 #: src/components/StdDataDisplay/StdTable.vue:24
#: src/components/StdDataDisplay/StdTable.vue:31
#: src/components/StdDataDisplay/StdTable.vue:33 #: src/components/StdDataDisplay/StdTable.vue:33
#: src/components/StdDataDisplay/StdTable.vue:35
msgid "Modify" msgid "Modify"
msgstr "修改" msgstr "修改"
@ -405,10 +405,6 @@ msgstr "下载流量"
msgid "Network Total Send" msgid "Network Total Send"
msgstr "上传流量" msgstr "上传流量"
#: src/views/nginx_log/NginxLog.vue:103
msgid "New logs"
msgstr "新增日志"
#: src/views/domain/DomainAdd.vue:137 #: src/views/domain/DomainAdd.vue:137
msgid "Next" msgid "Next"
msgstr "下一步" msgstr "下一步"
@ -417,7 +413,7 @@ msgstr "下一步"
msgid "Nginx Log" msgid "Nginx Log"
msgstr "Nginx 日志" msgstr "Nginx 日志"
#: src/components/StdDataDisplay/StdTable.vue:39 #: src/components/StdDataDisplay/StdTable.vue:41
#: src/views/domain/DomainList.vue:25 #: src/views/domain/DomainList.vue:25
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:17 #: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:17
#: src/views/domain/ngx_conf/LocationEditor.vue:11 #: src/views/domain/ngx_conf/LocationEditor.vue:11
@ -442,8 +438,8 @@ msgstr "注意:当前配置中的 server_name 必须为需要申请证书的
msgid "Obtaining certificate" msgid "Obtaining certificate"
msgstr "正在获取证书" msgstr "正在获取证书"
#: src/components/StdDataDisplay/StdCurd.vue:27 #: src/components/StdDataDisplay/StdCurd.vue:29
#: src/components/StdDataDisplay/StdTable.vue:40 #: src/components/StdDataDisplay/StdTable.vue:42
#: src/views/domain/DomainList.vue:26 #: src/views/domain/DomainList.vue:26
msgid "OK" msgid "OK"
msgstr "确定" msgstr "确定"
@ -513,7 +509,7 @@ msgstr "正在注册用户"
msgid "Reloading nginx" msgid "Reloading nginx"
msgstr "正在重载 Nginx" msgstr "正在重载 Nginx"
#: src/components/StdDataDisplay/StdTable.vue:187 #: src/components/StdDataDisplay/StdTable.vue:302
msgid "Reset" msgid "Reset"
msgstr "重置" msgstr "重置"
@ -531,7 +527,7 @@ msgstr "保存指令"
msgid "Save error %{msg}" msgid "Save error %{msg}"
msgstr "保存错误 %{msg}" msgstr "保存错误 %{msg}"
#: src/components/StdDataDisplay/StdCurd.vue:91 #: src/components/StdDataDisplay/StdCurd.vue:98
msgid "Save Successfully" msgid "Save Successfully"
msgstr "保存成功" msgstr "保存成功"
@ -544,7 +540,7 @@ msgstr "保存成功"
msgid "Send" msgid "Send"
msgstr "上传" msgstr "上传"
#: src/components/StdDataDisplay/StdTable.vue:112 #: src/components/StdDataDisplay/StdTable.vue:125
#: src/views/config/ConfigEdit.vue:22 src/views/domain/DomainEdit.vue:56 #: src/views/config/ConfigEdit.vue:22 src/views/domain/DomainEdit.vue:56
#: src/views/domain/DomainEdit.vue:68 src/views/domain/DomainEdit.vue:77 #: src/views/domain/DomainEdit.vue:68 src/views/domain/DomainEdit.vue:77
#: src/views/domain/DomainEdit.vue:94 src/views/domain/DomainList.vue:78 #: src/views/domain/DomainEdit.vue:94 src/views/domain/DomainList.vue:78
@ -621,7 +617,7 @@ msgid "The username or password is incorrect"
msgstr "用户名或密码错误" msgstr "用户名或密码错误"
#: src/views/config/Config.vue:17 src/views/domain/DomainList.vue:36 #: src/views/config/Config.vue:17 src/views/domain/DomainList.vue:36
#: src/views/user/User.vue:36 #: src/views/user/User.vue:37
msgid "Updated at" msgid "Updated at"
msgstr "修改时间" msgstr "修改时间"
@ -668,6 +664,15 @@ msgctxt "Project"
msgid "License" msgid "License"
msgstr "开源许可" msgstr "开源许可"
#~ msgid "All logs"
#~ msgstr "所有日志"
#~ msgid "Fetch"
#~ msgstr "日志范围"
#~ msgid "New logs"
#~ msgstr "新增日志"
#~ msgid "404 Not Found" #~ msgid "404 Not Found"
#~ msgstr "404 未找到页面" #~ msgstr "404 未找到页面"

View file

@ -17,17 +17,17 @@ msgstr ""
msgid "About" msgid "About"
msgstr "關於" msgstr "關於"
#: src/routes/index.ts:99 #: src/routes/index.ts:99 src/views/domain/ngx_conf/LogEntry.vue:64
msgid "Access Logs" msgid "Access Logs"
msgstr "" msgstr ""
#: src/views/config/Config.vue:24 src/views/domain/DomainList.vue:42 #: src/views/config/Config.vue:24 src/views/domain/DomainList.vue:42
#: src/views/user/User.vue:42 #: src/views/user/User.vue:43
msgid "Action" msgid "Action"
msgstr "操作" msgstr "操作"
#: src/components/StdDataDisplay/StdCurd.vue:123 #: src/components/StdDataDisplay/StdCurd.vue:130
#: src/components/StdDataDisplay/StdCurd.vue:24 #: src/components/StdDataDisplay/StdCurd.vue:26
msgid "Add" msgid "Add"
msgstr "" msgstr ""
@ -50,11 +50,7 @@ msgstr "新增站點"
msgid "Advance Mode" msgid "Advance Mode"
msgstr "高階模式" msgstr "高階模式"
#: src/views/nginx_log/NginxLog.vue:100 #: src/components/StdDataDisplay/StdTable.vue:43
msgid "All logs"
msgstr ""
#: src/components/StdDataDisplay/StdTable.vue:41
#: src/views/domain/DomainList.vue:27 #: src/views/domain/DomainList.vue:27
#, fuzzy #, fuzzy
msgid "Are you sure you want to delete ?" msgid "Are you sure you want to delete ?"
@ -81,7 +77,7 @@ msgstr "已關閉 %{name} 自動續簽"
msgid "Auto-renewal enabled for %{name}" msgid "Auto-renewal enabled for %{name}"
msgstr "已啟用 %{name} 自動續簽" msgstr "已啟用 %{name} 自動續簽"
#: src/views/domain/DomainEdit.vue:178 src/views/nginx_log/NginxLog.vue:115 #: src/views/domain/DomainEdit.vue:178 src/views/nginx_log/NginxLog.vue:162
msgid "Back" msgid "Back"
msgstr "返回" msgstr "返回"
@ -102,7 +98,7 @@ msgstr "基本模式"
msgid "Build with" msgid "Build with"
msgstr "構建基於" msgstr "構建基於"
#: src/components/StdDataDisplay/StdCurd.vue:26 #: src/components/StdDataDisplay/StdCurd.vue:28
#: src/views/config/ConfigEdit.vue:49 #: src/views/config/ConfigEdit.vue:49
msgid "Cancel" msgid "Cancel"
msgstr "取消" msgstr "取消"
@ -122,7 +118,7 @@ msgstr "憑證狀態"
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:29 #: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:29
#: src/views/domain/ngx_conf/LocationEditor.vue:21 #: src/views/domain/ngx_conf/LocationEditor.vue:21
#: src/views/domain/ngx_conf/LocationEditor.vue:35 #: src/views/domain/ngx_conf/LocationEditor.vue:35
#: src/views/domain/ngx_conf/NgxConfigEditor.vue:161 #: src/views/domain/ngx_conf/NgxConfigEditor.vue:175
msgid "Comments" msgid "Comments"
msgstr "註釋" msgstr "註釋"
@ -155,7 +151,7 @@ msgstr "中央處理器:"
msgid "Create Another" msgid "Create Another"
msgstr "再創建一個" msgstr "再創建一個"
#: src/views/user/User.vue:30 #: src/views/user/User.vue:31
msgid "Created at" msgid "Created at"
msgstr "建立時間" msgstr "建立時間"
@ -171,12 +167,12 @@ msgstr "儀表盤"
msgid "Database (Optional, default: database)" msgid "Database (Optional, default: database)"
msgstr "資料庫 (可選,預設: database)" msgstr "資料庫 (可選,預設: database)"
#: src/components/StdDataDisplay/StdTable.vue:218 #: src/components/StdDataDisplay/StdTable.vue:332
#: src/views/domain/DomainList.vue:111 #: src/views/domain/DomainList.vue:111
msgid "Delete" msgid "Delete"
msgstr "" msgstr ""
#: src/components/StdDataDisplay/StdTable.vue:92 #: src/components/StdDataDisplay/StdTable.vue:105
msgid "Delete ID: %{id}" msgid "Delete ID: %{id}"
msgstr "刪除 ID: %{id}" msgstr "刪除 ID: %{id}"
@ -261,7 +257,7 @@ msgstr "啟用成功"
msgid "Encrypt website with Let's Encrypt" msgid "Encrypt website with Let's Encrypt"
msgstr "用 Let's Encrypt 對網站進行加密" msgstr "用 Let's Encrypt 對網站進行加密"
#: src/routes/index.ts:103 #: src/routes/index.ts:103 src/views/domain/ngx_conf/LogEntry.vue:68
msgid "Error Logs" msgid "Error Logs"
msgstr "" msgstr ""
@ -269,6 +265,10 @@ msgstr ""
msgid "Expiration Date: %{date}" msgid "Expiration Date: %{date}"
msgstr "過期時間: %{date}" msgstr "過期時間: %{date}"
#: src/components/StdDataDisplay/StdTable.vue:299
msgid "Export"
msgstr ""
#: src/views/domain/DomainEdit.vue:115 src/views/domain/DomainList.vue:68 #: src/views/domain/DomainEdit.vue:115 src/views/domain/DomainList.vue:68
msgid "Failed to disable %{msg}" msgid "Failed to disable %{msg}"
msgstr "禁用失敗 %{msg}" msgstr "禁用失敗 %{msg}"
@ -281,10 +281,6 @@ msgstr "啟用失敗 %{msg}"
msgid "Failed to get certificate information" msgid "Failed to get certificate information"
msgstr "" msgstr ""
#: src/views/nginx_log/NginxLog.vue:7
msgid "Fetch"
msgstr ""
#: src/views/other/Error.vue:3 src/views/other/Error.vue:4 #: src/views/other/Error.vue:3 src/views/other/Error.vue:4
msgid "File Not Found" msgid "File Not Found"
msgstr "未找到檔案" msgstr "未找到檔案"
@ -293,6 +289,10 @@ msgstr "未找到檔案"
msgid "Finished" msgid "Finished"
msgstr "完成" msgstr "完成"
#: src/components/StdDataEntry/compontents/StdPassword.vue:42
msgid "Generate"
msgstr ""
#: src/language/constants.ts:11 #: src/language/constants.ts:11
msgid "Generating private key for registering account" msgid "Generating private key for registering account"
msgstr "" msgstr ""
@ -380,12 +380,12 @@ msgstr "記憶體"
msgid "Memory and Storage" msgid "Memory and Storage"
msgstr "記憶體和存儲" msgstr "記憶體和存儲"
#: src/components/StdDataDisplay/StdCurd.vue:24 #: src/components/StdDataDisplay/StdCurd.vue:26
#: src/components/StdDataDisplay/StdTable.vue:16 #: src/components/StdDataDisplay/StdTable.vue:18
#: src/components/StdDataDisplay/StdTable.vue:17 #: src/components/StdDataDisplay/StdTable.vue:19
#: src/components/StdDataDisplay/StdTable.vue:21 #: src/components/StdDataDisplay/StdTable.vue:24
#: src/components/StdDataDisplay/StdTable.vue:31
#: src/components/StdDataDisplay/StdTable.vue:33 #: src/components/StdDataDisplay/StdTable.vue:33
#: src/components/StdDataDisplay/StdTable.vue:35
#, fuzzy #, fuzzy
msgid "Modify" msgid "Modify"
msgstr "修改配置" msgstr "修改配置"
@ -414,10 +414,6 @@ msgstr "下載流量"
msgid "Network Total Send" msgid "Network Total Send"
msgstr "上傳流量" msgstr "上傳流量"
#: src/views/nginx_log/NginxLog.vue:103
msgid "New logs"
msgstr ""
#: src/views/domain/DomainAdd.vue:137 #: src/views/domain/DomainAdd.vue:137
msgid "Next" msgid "Next"
msgstr "下一步" msgstr "下一步"
@ -426,7 +422,7 @@ msgstr "下一步"
msgid "Nginx Log" msgid "Nginx Log"
msgstr "" msgstr ""
#: src/components/StdDataDisplay/StdTable.vue:39 #: src/components/StdDataDisplay/StdTable.vue:41
#: src/views/domain/DomainList.vue:25 #: src/views/domain/DomainList.vue:25
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:17 #: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:17
#: src/views/domain/ngx_conf/LocationEditor.vue:11 #: src/views/domain/ngx_conf/LocationEditor.vue:11
@ -452,8 +448,8 @@ msgstr "注意:當前配置中的 server_name 必須為需要申請憑證的
msgid "Obtaining certificate" msgid "Obtaining certificate"
msgstr "" msgstr ""
#: src/components/StdDataDisplay/StdCurd.vue:27 #: src/components/StdDataDisplay/StdCurd.vue:29
#: src/components/StdDataDisplay/StdTable.vue:40 #: src/components/StdDataDisplay/StdTable.vue:42
#: src/views/domain/DomainList.vue:26 #: src/views/domain/DomainList.vue:26
msgid "OK" msgid "OK"
msgstr "確定" msgstr "確定"
@ -524,7 +520,7 @@ msgstr ""
msgid "Reloading nginx" msgid "Reloading nginx"
msgstr "" msgstr ""
#: src/components/StdDataDisplay/StdTable.vue:187 #: src/components/StdDataDisplay/StdTable.vue:302
msgid "Reset" msgid "Reset"
msgstr "" msgstr ""
@ -542,7 +538,7 @@ msgstr "儲存指令"
msgid "Save error %{msg}" msgid "Save error %{msg}"
msgstr "儲存錯誤 %{msg}" msgstr "儲存錯誤 %{msg}"
#: src/components/StdDataDisplay/StdCurd.vue:91 #: src/components/StdDataDisplay/StdCurd.vue:98
#, fuzzy #, fuzzy
msgid "Save Successfully" msgid "Save Successfully"
msgstr "儲存成功" msgstr "儲存成功"
@ -556,7 +552,7 @@ msgstr "儲存成功"
msgid "Send" msgid "Send"
msgstr "上傳" msgstr "上傳"
#: src/components/StdDataDisplay/StdTable.vue:112 #: src/components/StdDataDisplay/StdTable.vue:125
#: src/views/config/ConfigEdit.vue:22 src/views/domain/DomainEdit.vue:56 #: src/views/config/ConfigEdit.vue:22 src/views/domain/DomainEdit.vue:56
#: src/views/domain/DomainEdit.vue:68 src/views/domain/DomainEdit.vue:77 #: src/views/domain/DomainEdit.vue:68 src/views/domain/DomainEdit.vue:77
#: src/views/domain/DomainEdit.vue:94 src/views/domain/DomainList.vue:78 #: src/views/domain/DomainEdit.vue:94 src/views/domain/DomainList.vue:78
@ -637,7 +633,7 @@ msgid "The username or password is incorrect"
msgstr "" msgstr ""
#: src/views/config/Config.vue:17 src/views/domain/DomainList.vue:36 #: src/views/config/Config.vue:17 src/views/domain/DomainList.vue:36
#: src/views/user/User.vue:36 #: src/views/user/User.vue:37
msgid "Updated at" msgid "Updated at"
msgstr "修改時間" msgstr "修改時間"

View file

@ -9,6 +9,29 @@ function bytesToSize(bytes: number) {
return (bytes / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i] return (bytes / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i]
} }
export { function downloadCsv(header: any, data: any[], fileName: string) {
bytesToSize if (!header || !Array.isArray(header) || !Array.isArray(data) || !header.length) {
return
}
let csvContent = 'data:text/csv;charset=utf-8,\ufeff'
const _header = header.map(h => h.title).join(',')
const keys = header.map(item => item.key)
csvContent += _header + '\n'
data.forEach((item, index) => {
let dataString = ''
for (let i = 0; i < keys.length; i++) {
dataString += item[keys[i]] + ','
}
csvContent += index < data.length ? dataString.replace(/,$/, '\n') : dataString.replace(/,$/, '')
})
const a = document.createElement('a')
a.href = encodeURI(csvContent)
a.download = fileName
a.click()
window.URL.revokeObjectURL(csvContent)
}
export {
bytesToSize,
downloadCsv
} }

View file

@ -3,7 +3,7 @@ import StdCurd from '@/components/StdDataDisplay/StdCurd.vue'
import gettext from '@/gettext' import gettext from '@/gettext'
import user from '@/api/user' import user from '@/api/user'
import {datetime} from '@/components/StdDataDisplay/StdTableTransformer' import {datetime} from '@/components/StdDataDisplay/StdTableTransformer'
import {input} from '@/components/StdDataEntry' import {input, password} from '@/components/StdDataEntry'
const {$gettext} = gettext const {$gettext} = gettext
@ -22,8 +22,9 @@ const columns = [{
sorter: true, sorter: true,
pithy: true, pithy: true,
edit: { edit: {
type: input, type: password,
placeholder: () => $gettext('Leave blank for no change') placeholder: () => $gettext('Leave blank for no change'),
generate: true
}, },
display: false display: false
}, { }, {