Skip to content

Commit

Permalink
fix: fix quick switcher layer problem and filter group panel type bec…
Browse files Browse the repository at this point in the history
…ause should not direct open
  • Loading branch information
moonrailgun committed May 11, 2024
1 parent 34a380e commit 6dba794
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion client/web/src/components/QuickSwitcher/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6dba794

Please sign in to comment.