feat(portal-shell): extract domain API layer and migrate 31 widgets
Task 4-10 of portal-shell data abstraction plan (M1-M2). Add 7 domain API modules under src/lib/api/ (parent/admin/teacher/ student/universal/sidebar/topbar), each exposing semantic hooks that wrap useWidgetQuery/useWidgetMutation and return flattened domain models. Widget code now imports from @/lib/api instead of inlining gql literals. - 31 widgets migrated (gql literal count in widgets: 0) - 7 test files (85 cases, all passing) - topbar.useNotifications renamed to useNotificationBell to avoid barrel export collision with universal.useNotifications - typecheck + lint (0 errors) + test (85/85) verified
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* locale-switcher 插件清单(topbar)
|
||||
*
|
||||
* 语言切换器,插入 top slot。通过 usePluginStore 读写 locale。
|
||||
*/
|
||||
import type { PluginManifest } from "@/lib/types";
|
||||
|
||||
export const manifestMeta: Omit<PluginManifest, "Component"> = {
|
||||
pluginId: "locale-switcher",
|
||||
version: "0.1.0",
|
||||
requiredShellVersion: "^1.0.0",
|
||||
metadata: {
|
||||
displayName: "语言切换",
|
||||
description: "切换界面语言(zh-CN / en)",
|
||||
category: "topbar",
|
||||
requiredRoles: ["teacher", "student", "parent", "admin"],
|
||||
defaultSlot: "top",
|
||||
defaultSize: { colSpan: 1, rowSpan: 1 },
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user