diff --git a/api/sites/list.go b/api/sites/list.go
index 2973b363..72c12e40 100644
--- a/api/sites/list.go
+++ b/api/sites/list.go
@@ -18,8 +18,8 @@ import (
func GetSiteList(c *gin.Context) {
name := c.Query("name")
enabled := c.Query("enabled")
- orderBy := c.Query("order_by")
- sort := c.DefaultQuery("sort", "desc")
+ orderBy := c.Query("sort_by")
+ sort := c.DefaultQuery("order", "desc")
querySiteCategoryId := cast.ToUint64(c.Query("site_category_id"))
configFiles, err := os.ReadDir(nginx.GetConfPath("sites-available"))
diff --git a/app/components.d.ts b/app/components.d.ts
index 42e75225..2b5efdbf 100644
--- a/app/components.d.ts
+++ b/app/components.d.ts
@@ -49,6 +49,8 @@ declare module 'vue' {
APopconfirm: typeof import('ant-design-vue/es')['Popconfirm']
APopover: typeof import('ant-design-vue/es')['Popover']
AProgress: typeof import('ant-design-vue/es')['Progress']
+ ARadioButton: typeof import('ant-design-vue/es')['RadioButton']
+ ARadioGroup: typeof import('ant-design-vue/es')['RadioGroup']
AResult: typeof import('ant-design-vue/es')['Result']
ARow: typeof import('ant-design-vue/es')['Row']
ASelect: typeof import('ant-design-vue/es')['Select']
@@ -86,6 +88,7 @@ declare module 'vue' {
SensitiveStringSensitiveString: typeof import('./src/components/SensitiveString/SensitiveString.vue')['default']
SetLanguageSetLanguage: typeof import('./src/components/SetLanguage/SetLanguage.vue')['default']
StdDesignStdDataDisplayStdBatchEdit: typeof import('./src/components/StdDesign/StdDataDisplay/StdBatchEdit.vue')['default']
+ StdDesignStdDataDisplayStdBulkActions: typeof import('./src/components/StdDesign/StdDataDisplay/StdBulkActions.vue')['default']
StdDesignStdDataDisplayStdCurd: typeof import('./src/components/StdDesign/StdDataDisplay/StdCurd.vue')['default']
StdDesignStdDataDisplayStdCurdDetail: typeof import('./src/components/StdDesign/StdDataDisplay/StdCurdDetail.vue')['default']
StdDesignStdDataDisplayStdPagination: typeof import('./src/components/StdDesign/StdDataDisplay/StdPagination.vue')['default']
@@ -95,6 +98,8 @@ declare module 'vue' {
StdDesignStdDataEntryComponentsStdSelector: typeof import('./src/components/StdDesign/StdDataEntry/components/StdSelector.vue')['default']
StdDesignStdDataEntryStdDataEntry: typeof import('./src/components/StdDesign/StdDataEntry/StdDataEntry.vue')['default']
StdDesignStdDataEntryStdFormItem: typeof import('./src/components/StdDesign/StdDataEntry/StdFormItem.vue')['default']
+ StdDesignStdDataImportStdDataImport: typeof import('./src/components/StdDesign/StdDataImport/StdDataImport.vue')['default']
+ StdDesignStdDetailStdDetail: typeof import('./src/components/StdDesign/StdDetail/StdDetail.vue')['default']
SwitchAppearanceIconsVPIconMoon: typeof import('./src/components/SwitchAppearance/icons/VPIconMoon.vue')['default']
SwitchAppearanceIconsVPIconSun: typeof import('./src/components/SwitchAppearance/icons/VPIconSun.vue')['default']
SwitchAppearanceSwitchAppearance: typeof import('./src/components/SwitchAppearance/SwitchAppearance.vue')['default']
diff --git a/app/src/components/Notification/Notification.vue b/app/src/components/Notification/Notification.vue
index 3d2c8997..8a4a7b08 100644
--- a/app/src/components/Notification/Notification.vue
+++ b/app/src/components/Notification/Notification.vue
@@ -1,6 +1,6 @@
+
+
+
+
+
+
+ {{ $gettext('Batch Actions') }}
+
+
+ {{ action.text() }}
+
+
+
+
+ {{ $gettext('Apply') }}
+
+
+
+
+
diff --git a/app/src/components/StdDesign/StdDataDisplay/StdCurd.vue b/app/src/components/StdDesign/StdDataDisplay/StdCurd.vue
index c3b02d63..9828badb 100644
--- a/app/src/components/StdDesign/StdDataDisplay/StdCurd.vue
+++ b/app/src/components/StdDesign/StdDataDisplay/StdCurd.vue
@@ -1,28 +1,13 @@
@@ -208,24 +181,34 @@ function handleBatchUpdated() {
- {{ $gettext('Add') }}
+ >
+ {{ $gettext('Add') }}
+
-
{{ $gettext('Trash') }}
-
-
+
{{ $gettext('Back to list') }}
-
+
@@ -240,6 +223,7 @@ function handleBatchUpdated() {
}"
v-model:selected-row-keys="selectedRowKeys"
v-model:selected-rows="selectedRows"
+ :in-trash="inTrash"
@click-edit="edit"
@click-view="view"
@selected="onSelect"
diff --git a/app/src/components/StdDesign/StdDataDisplay/StdPagination.vue b/app/src/components/StdDesign/StdDataDisplay/StdPagination.vue
index 51f811e9..f062513f 100644
--- a/app/src/components/StdDesign/StdDataDisplay/StdPagination.vue
+++ b/app/src/components/StdDesign/StdDataDisplay/StdPagination.vue
@@ -1,11 +1,14 @@
+
+
+
+
+
+
+
+ {{ $gettext('Save') }}
+
+
+ {{ $gettext('Cancel') }}
+
+
+
+
+ {{ $gettext('Edit') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/components/StdDesign/types.d.ts b/app/src/components/StdDesign/types.d.ts
index 1827d4f8..f21fedf7 100644
--- a/app/src/components/StdDesign/types.d.ts
+++ b/app/src/components/StdDesign/types.d.ts
@@ -1,33 +1,52 @@
+/* eslint-disable ts/no-explicit-any */
+
+import type { Pagination } from '@/api/curd'
import type Curd from '@/api/curd'
+
import type { TableColumnType } from 'ant-design-vue'
-import type { Ref } from 'vue'
+import type { RuleObject } from 'ant-design-vue/es/form'
import type { JSX } from 'vue/jsx'
export type JSXElements = JSX.Element[]
+// use for select-option
+export type StdDesignMask =
+ Record string)>
+ | (() => Promise>)
+
export interface StdDesignEdit {
+
type?: (edit: StdDesignEdit, dataSource: any, dataIndex: any) => JSX.Element // component type
show?: (dataSource: any) => boolean // show component or not
batch?: boolean // batch edit
- mask?: Record string)> | (() => Promise>) // use for select-option
+ mask?: StdDesignMask
- rules?: [] // validator rules
+ rules?: RuleObject[] // validator rules
hint?: string | (() => string) // hint form item
actualDataIndex?: string
+ datePicker?: {
+ picker?: 'date' | 'week' | 'month' | 'year' | 'quarter'
+ format?: string
+ }
+
+ cascader?: {
+ api: () => Promise
+ fieldNames: Record
+ }
+
select?: {
multiple?: boolean
}
selector?: {
- getParams?: object
- recordValueIndex: any // relative to api return
- selectionType: any
+ getParams?: Record
+ selectionType?: 'radio' | 'checkbox'
api: Curd
valueApi?: Curd
columns: any
@@ -36,6 +55,9 @@ export interface StdDesignEdit {
bind?: any
itemKey?: any // default is id
dataSourceValueIndex?: any // relative to dataSource
+ recordValueIndex?: any // relative to dataSource
+ getCheckboxProps?: (record: any) => any
+ expandAll?: boolean
} // StdSelector Config
upload?: {
@@ -73,14 +95,13 @@ export interface StdDesignEdit {
flex?: Flex
}
-type FlexType = string | number | boolean
-
export interface Flex {
- sm?: FlexType
- md?: FlexType
- lg?: FlexType
- xl?: FlexType
- xxl?: FlexType
+ // eslint-disable-next-line sonarjs/use-type-alias
+ sm?: string | number | boolean
+ md?: string | number | boolean
+ lg?: string | number | boolean
+ xl?: string | number | boolean
+ xxl?: string | number | boolean
}
export interface Column extends TableColumnType {
@@ -98,9 +119,11 @@ export interface Column extends TableColumnType {
hiddenInExport?: boolean
import?: boolean
batch?: boolean
+ radio?: boolean
+ mask?: StdDesignMask
customRender?: function
selector?: {
- getParams?: object
+ getParams?: Record
recordValueIndex: any // relative to api return
selectionType: any
api: Curd
@@ -111,5 +134,21 @@ export interface Column extends TableColumnType {
bind?: any
itemKey?: any // default is id
dataSourceValueIndex?: any // relative to dataSource
+ getCheckboxProps?: (record: any) => any
}
}
+
+export interface StdTableResponse {
+ data: any[]
+ pagination: Pagination
+}
+
+export interface BulkActionOptions {
+ text: () => string
+ action: (rows: (number | string)[] | undefined) => Promise
+}
+
+export type BulkActions = Record & {
+ delete?: boolean | BulkActionOptions
+ recover?: boolean | BulkActionOptions
+}
diff --git a/app/src/views/certificate/ACMEUser.vue b/app/src/views/certificate/ACMEUser.vue
index a65f6f07..45d72805 100644
--- a/app/src/views/certificate/ACMEUser.vue
+++ b/app/src/views/certificate/ACMEUser.vue
@@ -1,6 +1,6 @@