mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 18:52:20 +08:00
feat(notification-manager): enhance channel manager UI (#5621)
This commit is contained in:
parent
d55f83942b
commit
35b5872338
@ -18,7 +18,7 @@ import {
|
||||
useAsyncData,
|
||||
useSchemaComponentContext,
|
||||
} from '@nocobase/client';
|
||||
import { Button, Dropdown, Empty } from 'antd';
|
||||
import { Button, Dropdown, Empty, Card } from 'antd';
|
||||
import React, { useState } from 'react';
|
||||
import channelCollection from '../../../../collections/channel';
|
||||
import messageLogCollection from '../../../../collections/messageLog';
|
||||
@ -130,22 +130,24 @@ export const ChannelManager = () => {
|
||||
<ExtendCollectionsProvider collections={[channelCollection, messageLogCollection]}>
|
||||
<SchemaComponentContext.Provider value={{ ...scCtx, designable: false }}>
|
||||
<NotificationTypesContext.Provider value={{ channelTypes: notificationTypes }}>
|
||||
<SchemaComponent
|
||||
schema={channelsSchema}
|
||||
components={{ AddNew, ConfigForm }}
|
||||
scope={{
|
||||
useCanNotDelete,
|
||||
t,
|
||||
notificationTypeOptions: notificationTypes,
|
||||
useCreateActionProps,
|
||||
useEditActionProps,
|
||||
useCloseActionProps,
|
||||
useEditFormProps,
|
||||
useCreateFormProps,
|
||||
useRecordDeleteActionProps,
|
||||
useRecordEditActionProps,
|
||||
}}
|
||||
/>
|
||||
<Card bordered={false}>
|
||||
<SchemaComponent
|
||||
schema={channelsSchema}
|
||||
components={{ AddNew, ConfigForm }}
|
||||
scope={{
|
||||
useCanNotDelete,
|
||||
t,
|
||||
notificationTypeOptions: notificationTypes,
|
||||
useCreateActionProps,
|
||||
useEditActionProps,
|
||||
useCloseActionProps,
|
||||
useEditFormProps,
|
||||
useCreateFormProps,
|
||||
useRecordDeleteActionProps,
|
||||
useRecordEditActionProps,
|
||||
}}
|
||||
/>
|
||||
</Card>
|
||||
</NotificationTypesContext.Provider>
|
||||
</SchemaComponentContext.Provider>
|
||||
</ExtendCollectionsProvider>
|
||||
|
@ -57,7 +57,6 @@ export const channelsSchema: ISchema = {
|
||||
pageSize: 20,
|
||||
},
|
||||
},
|
||||
'x-component': 'CardItem',
|
||||
properties: {
|
||||
actions: {
|
||||
type: 'void',
|
||||
@ -110,6 +109,9 @@ export const channelsSchema: ISchema = {
|
||||
type: 'void',
|
||||
'x-component': 'TableV2.Column',
|
||||
title: '{{t("Channel display name")}}',
|
||||
'x-component-props': {
|
||||
width: 100,
|
||||
},
|
||||
properties: {
|
||||
title: {
|
||||
type: 'string',
|
||||
@ -125,6 +127,9 @@ export const channelsSchema: ISchema = {
|
||||
type: 'void',
|
||||
'x-component': 'TableV2.Column',
|
||||
title: '{{t("Channel name")}}',
|
||||
'x-component-props': {
|
||||
width: 100,
|
||||
},
|
||||
properties: {
|
||||
name: {
|
||||
type: 'string',
|
||||
@ -140,6 +145,9 @@ export const channelsSchema: ISchema = {
|
||||
type: 'void',
|
||||
'x-component': 'TableV2.Column',
|
||||
title: '{{t("Description")}}',
|
||||
'x-component-props': {
|
||||
width: 200,
|
||||
},
|
||||
properties: {
|
||||
description: {
|
||||
type: 'boolean',
|
||||
@ -155,6 +163,9 @@ export const channelsSchema: ISchema = {
|
||||
title: '{{t("Notification type")}}',
|
||||
type: 'void',
|
||||
'x-component': 'TableV2.Column',
|
||||
'x-component-props': {
|
||||
width: 200,
|
||||
},
|
||||
properties: {
|
||||
notificationType: {
|
||||
type: 'string',
|
||||
@ -167,7 +178,6 @@ export const channelsSchema: ISchema = {
|
||||
type: 'void',
|
||||
title: '{{t("Actions")}}',
|
||||
'x-component': 'TableV2.Column',
|
||||
'x-decorator': 'TableV2.Column.ActionBar',
|
||||
properties: {
|
||||
edit: {
|
||||
type: 'void',
|
||||
|
@ -271,6 +271,7 @@ export const messageLogsManagerSchema: ISchema = {
|
||||
type: 'void',
|
||||
'x-component': 'FormV2',
|
||||
'x-use-component-props': 'useEditFormProps',
|
||||
'x-decorator': 'BlockItemCard',
|
||||
properties: {
|
||||
...detailFromProperties,
|
||||
footer: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user