Skip to content

Commit

Permalink
[MS] Another fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Max-7 committed Jan 15, 2025
1 parent a98674d commit 0f7eaa7
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions client/src/views/sidebar-menu/SidebarMenuPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class="sidebar"
>
<ion-header class="sidebar-header">
<div v-show="!currentRouteIsOrganizationManagementRoute()">
<div v-show="!isManagement()">
<!-- active organization -->
<ion-card class="organization-card">
<ion-card-header
Expand Down Expand Up @@ -85,7 +85,7 @@
<!-- end of active organization -->
</div>

<div v-show="currentRouteIsOrganizationManagementRoute()">
<div v-show="isManagement()">
<div
class="back-organization"
@click="navigateTo(Routes.Workspaces)"
Expand Down Expand Up @@ -156,15 +156,12 @@

<div
class="list-sidebar-divider"
v-if="
!currentRouteIsOrganizationManagementRoute() &&
(recentDocumentManager.getWorkspaces().length > 0 || favoritesWorkspaces.length > 0)
"
v-if="!isManagement() && (recentDocumentManager.getWorkspaces().length > 0 || favoritesWorkspaces.length > 0)"
/>

<!-- workspaces -->
<div
v-show="!currentRouteIsOrganizationManagementRoute()"
v-show="!isManagement()"
class="organization-workspaces"
>
<!-- list of favorite workspaces -->
Expand Down Expand Up @@ -338,7 +335,6 @@ import {
getConnectionInfo,
getLoggedInDevices,
LoggedInDeviceInfo,
needsMocks,
} from '@/parsec';
import {
Routes,
Expand Down Expand Up @@ -394,7 +390,6 @@ import { Duration } from 'luxon';
import { recentDocumentManager, RecentFile } from '@/services/recentDocuments';
import { openPath } from '@/services/fileOpener';
import { SIDEBAR_MENU_DATA_KEY, SidebarDefaultData, SidebarSavedData } from '@/views/sidebar-menu/utils';
import { FileContentType } from '@/common/fileTypes';

const workspaces: Ref<Array<WorkspaceInfo>> = ref([]);
const eventDistributor: EventDistributor = inject(EventDistributorKey)!;
Expand Down Expand Up @@ -440,6 +435,8 @@ const watchSidebarWidthCancel = watch(computedWidth, async (value: number) => {
}, 2000);
});

const isManagement = currentRouteIsOrganizationManagementRoute;

async function goToWorkspace(workspace: WorkspaceInfo): Promise<void> {
recentDocumentManager.addWorkspace(workspace);
await recentDocumentManager.saveToStorage(storageManager);
Expand Down

0 comments on commit 0f7eaa7

Please sign in to comment.