mirror of https://github.com/msgbyte/tailchat
perf: 增加插件加载失败的提醒
parent
0774b9a823
commit
4771a830b0
@ -0,0 +1,18 @@
|
|||||||
|
import { notification } from 'antd';
|
||||||
|
import React from 'react';
|
||||||
|
import { t } from 'tailchat-shared';
|
||||||
|
|
||||||
|
export function showPluginLoadError(loadErrorPluginNames: string[]) {
|
||||||
|
notification.warn({
|
||||||
|
message: (
|
||||||
|
<div>
|
||||||
|
<p>{t('插件加载失败')}:</p>
|
||||||
|
|
||||||
|
{loadErrorPluginNames.map((name) => (
|
||||||
|
<p key={name}>- {name}</p>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
),
|
||||||
|
duration: 2,
|
||||||
|
});
|
||||||
|
}
|
Loading…
Reference in New Issue