Skip to content

Commit 6dba794

Browse files
committed
fix: fix quick switcher layer problem and filter group panel type because should not direct open
1 parent 34a380e commit 6dba794

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

client/web/src/components/QuickSwitcher/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const QuickSwitcher: React.FC = React.memo(() => {
5454

5555
return (
5656
<div
57-
className="fixed left-0 right-0 top-0 bottom-0 bg-black bg-opacity-60 flex justify-center"
57+
className="fixed left-0 right-0 top-0 bottom-0 bg-black bg-opacity-60 flex justify-center z-10"
5858
onClick={handleClose}
5959
>
6060
<div

client/web/src/components/QuickSwitcher/useQuickSwitcherAllAction.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,18 @@ function useGroupPanelActions(): QuickAction[] {
8787
const list: QuickAction[] = [];
8888

8989
Object.values(groups).forEach((group) => {
90-
group.panels.forEach((panel) => {
91-
list.push({
92-
key: `qs#grouppanel#${panel.id}`,
93-
label: `[${group.name}] ${panel.name}`,
94-
source: 'core',
95-
action: ({ navigate }) => {
96-
navigate(`/main/group/${group._id}/${panel.id}`);
97-
},
90+
group.panels
91+
.filter((p) => p.type !== model.group.GroupPanelType.GROUP)
92+
.forEach((panel) => {
93+
list.push({
94+
key: `qs#grouppanel#${panel.id}`,
95+
label: `[${group.name}] ${panel.name}`,
96+
source: 'core',
97+
action: ({ navigate }) => {
98+
navigate(`/main/group/${group._id}/${panel.id}`);
99+
},
100+
});
98101
});
99-
});
100102
});
101103

102104
return list;

0 commit comments

Comments
 (0)