fix: fix quick switcher layer problem and filter group panel type because should not direct open

pull/231/head
moonrailgun 10 months ago
parent 34a380eff5
commit 6dba794198

@ -54,7 +54,7 @@ const QuickSwitcher: React.FC = React.memo(() => {
return ( return (
<div <div
className="fixed left-0 right-0 top-0 bottom-0 bg-black bg-opacity-60 flex justify-center" className="fixed left-0 right-0 top-0 bottom-0 bg-black bg-opacity-60 flex justify-center z-10"
onClick={handleClose} onClick={handleClose}
> >
<div <div

@ -87,16 +87,18 @@ function useGroupPanelActions(): QuickAction[] {
const list: QuickAction[] = []; const list: QuickAction[] = [];
Object.values(groups).forEach((group) => { Object.values(groups).forEach((group) => {
group.panels.forEach((panel) => { group.panels
list.push({ .filter((p) => p.type !== model.group.GroupPanelType.GROUP)
key: `qs#grouppanel#${panel.id}`, .forEach((panel) => {
label: `[${group.name}] ${panel.name}`, list.push({
source: 'core', key: `qs#grouppanel#${panel.id}`,
action: ({ navigate }) => { label: `[${group.name}] ${panel.name}`,
navigate(`/main/group/${group._id}/${panel.id}`); source: 'core',
}, action: ({ navigate }) => {
navigate(`/main/group/${group._id}/${panel.id}`);
},
});
}); });
});
}); });
return list; return list;

Loading…
Cancel
Save