refine: center toast notifications and silence plugin sync feedback
- Change toast position from top-right to top-center for better visibility - Remove success notifications for plugin sync operations to reduce noise - Keep error notifications to alert users of actual issues
This commit is contained in:
@@ -3,7 +3,7 @@ import { Toaster as SonnerToaster } from "sonner";
|
|||||||
export function Toaster() {
|
export function Toaster() {
|
||||||
return (
|
return (
|
||||||
<SonnerToaster
|
<SonnerToaster
|
||||||
position="top-right"
|
position="top-center"
|
||||||
richColors
|
richColors
|
||||||
theme="system"
|
theme="system"
|
||||||
toastOptions={{
|
toastOptions={{
|
||||||
|
|||||||
@@ -39,16 +39,7 @@ export function useProviderActions(activeApp: AppType) {
|
|||||||
const isOfficial = provider.category === "official";
|
const isOfficial = provider.category === "official";
|
||||||
await settingsApi.applyClaudePluginConfig({ official: isOfficial });
|
await settingsApi.applyClaudePluginConfig({ official: isOfficial });
|
||||||
|
|
||||||
toast.success(
|
// 静默执行,不显示成功通知
|
||||||
isOfficial
|
|
||||||
? t("notifications.appliedToClaudePlugin", {
|
|
||||||
defaultValue: "已同步为官方配置",
|
|
||||||
})
|
|
||||||
: t("notifications.removedFromClaudePlugin", {
|
|
||||||
defaultValue: "已移除 Claude 插件配置",
|
|
||||||
}),
|
|
||||||
{ duration: 2200 },
|
|
||||||
);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const detail =
|
const detail =
|
||||||
extractErrorMessage(error) ||
|
extractErrorMessage(error) ||
|
||||||
|
|||||||
Reference in New Issue
Block a user