mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-28 00:35:32 +08:00
feat(skills): flag unmanaged skills with a green dot on the Import button
- Add an optional `enabled` flag to useScanUnmanagedSkills; the Skills panel scans once on mount (enabled:true), with 30s staleTime + keepPreviousData to dedupe disk IO across navigations. - App subscribes to the shared query (enabled:false) and renders a green dot + tooltip on the top-bar Import button when unmanaged skills are available.
This commit is contained in:
@@ -90,8 +90,9 @@ const UnifiedSkillsPanel = React.forwardRef<
|
||||
const toggleAppMutation = useToggleSkillApp();
|
||||
const uninstallMutation = useUninstallSkill();
|
||||
const restoreBackupMutation = useRestoreSkillBackup();
|
||||
// enabled: true —— 进入 Skill 页面时自动静默扫描一次(绿点提示来源)
|
||||
const { data: unmanagedSkills, refetch: scanUnmanaged } =
|
||||
useScanUnmanagedSkills();
|
||||
useScanUnmanagedSkills({ enabled: true });
|
||||
const importMutation = useImportSkillsFromApps();
|
||||
const installFromZipMutation = useInstallSkillsFromZip();
|
||||
const {
|
||||
|
||||
Reference in New Issue
Block a user