feat(ux): Toast 通知系统,替换内联错误/成功提示

新增 toast store 和 Toast 组件,风格保存成功/失败显示 toast,
素材生成失败显示 toast,Layout 中全局渲染。
This commit is contained in:
2026-05-24 21:26:19 +08:00
parent aaf846a60d
commit e880a80c51
6 changed files with 153 additions and 0 deletions
+2
View File
@@ -1,6 +1,7 @@
import { Link, Outlet } from 'react-router-dom'
import { useAuthStore } from '../stores/auth'
import { useThemeStore } from '../stores/theme'
import ToastContainer from './Toast'
export default function Layout() {
const { user, logout } = useAuthStore()
@@ -59,6 +60,7 @@ export default function Layout() {
<main>
<Outlet />
</main>
<ToastContainer />
</>
)
}