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 (
<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}
>
<div

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

Loading…
Cancel
Save