perf: optimize the display of global notifications and increase system notification prompts

and export `parseUrlStr`
feat/excalidraw
moonrailgun 2 years ago
parent a224ac602e
commit 7419df1775

@ -18,8 +18,8 @@ export const GlobalAnnouncementBar: React.FC = React.memo(() => {
}
return (
<div className="text-center bg-indigo-400 text-white relative">
{announcementInfo.text}
<div className="text-center bg-indigo-400 text-white relative px-6">
<span className="select-text">{announcementInfo.text}</span>
{announcementInfo.link && (
<Button

@ -70,6 +70,7 @@ export {
useConverseMessageContext,
loginWithToken,
useWatch,
parseUrlStr,
} from 'tailchat-shared';
export { navigate } from '@/components/AppRouterApi';

@ -82,6 +82,7 @@ export const i18n: TushanContextProps['i18n'] = {
},
'system-notify': {
create: 'Create System Notify',
tip: 'The system notification will be sent to the corresponding user in the form of inbox',
title: 'Title',
content: 'Content',
scope: 'Notify Scope',
@ -259,6 +260,7 @@ export const i18n: TushanContextProps['i18n'] = {
},
'system-notify': {
create: '创建系统通知',
tip: '系统通知将会以收件箱的形式发送给对应的用户',
title: '标题',
content: '内容',
scope: '通知范围',

@ -215,7 +215,7 @@ export const SystemConfig: React.FC = React.memo(() => {
<SwitchFormInput />
</Form.Item>
<Form.Item label={t('custom.config.announcementText')} field="text">
<Input maxLength={120} />
<Input maxLength={240} />
</Form.Item>
<Form.Item
label={t('custom.config.announcementLink')}

@ -44,6 +44,12 @@ export const SystemNotify: React.FC = React.memo(() => {
<Typography.Title heading={3} style={{ textAlign: 'center' }}>
{t('custom.system-notify.create')}
</Typography.Title>
<Typography.Title
heading={6}
style={{ textAlign: 'center', color: '#666' }}
>
{t('custom.system-notify.tip')}
</Typography.Title>
<Form form={form} onSubmit={handleSubmit}>
<Form.Item label={t('custom.system-notify.title')} field="title">

Loading…
Cancel
Save