message: construction: feat(web): Only show the Close button from the view panel contextmenu when there is at least one view panel opened
diff: @@ -75,7 +75,8 @@ export default function ViewPanelView({
  col,
  row,
  }: TabPanelOptions) {
  - const { newView, newViewPanel, closeViewPanelAndView } = useViews();
  + const { newView, newViewPanel, closeViewPanelAndView, tabPanels } =
  + useViews();
  const { pushContextMenu } = useContextMenu();
  const { focusTab, selectTab, closeTab, saveTab, setTabEdited } = useTabs();
  const setFocusedView = useSetRecoilState(focusedViewPanelState);
  @@ -135,9 +136,11 @@ export default function ViewPanelView({
  }
  function contextMenuClick(ev: React.MouseEvent) {
  - pushContextMenu({
  - menus: [
  - {
  + const menus = [];
  +
  + // Only show the Close button if there is more than 1 view panel
  + if (!(tabPanels.length == 1 && tabPanels[row].view_panels.length === 1)) {
  + menus.push({
  label: {
  text: "Close",
  },
  @@ -148,7 +151,12 @@ export default function ViewPanelView({
  });
  return false;
  },
  - },
  + });
  + }
  +
  + pushContextMenu({
  + menus: [
  + ...menus,
  {
  label: {
  text: "contextMenus.panels.SplitHorizontally",
  