Skip to content

Commit

Permalink
Some more history
Browse files Browse the repository at this point in the history
  • Loading branch information
Max-7 committed Oct 14, 2024
1 parent f24d4b5 commit 0fbba4e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
3 changes: 2 additions & 1 deletion client/src/router/checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function currentRouteIsOrganizationManagementRoute(): boolean {
}

export function currentRouteIsFileRoute(): boolean {
return currentRouteIsOneOf([Routes.Documents, Routes.Workspaces]);
return currentRouteIsOneOf([Routes.Documents, Routes.Workspaces, Routes.History]);
}

export function currentRouteIsLoggedRoute(): boolean {
Expand All @@ -66,5 +66,6 @@ export function currentRouteIsLoggedRoute(): boolean {
Routes.About,
Routes.MyProfile,
Routes.RecoveryExport,
Routes.History,
]);
}
22 changes: 19 additions & 3 deletions client/src/views/header/HeaderPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ import {
IonToolbar,
popoverController,
} from '@ionic/vue';
import { home, menu, notifications, search } from 'ionicons/icons';
import { home, menu, notifications, search, time } from 'ionicons/icons';
import { Ref, inject, onMounted, onUnmounted, ref } from 'vue';
const hotkeyManager: HotkeyManager = inject(HotkeyManagerKey)!;
Expand Down Expand Up @@ -193,6 +193,24 @@ async function updateRoute(): Promise<void> {
params: {},
},
];
} else if (currentRouteIs(Routes.History)) {
const workspaceHandle = getWorkspaceHandle();
if (workspaceHandle) {
workspaceName.value = await getWorkspaceName(workspaceHandle);
}
fullPath.value = [
{
id: 0,
title: 'History',
icon: time,
name: Routes.History,
},
{
id: 0,
title: workspaceName.value,
name: Routes.Documents,
}
];
} else if (currentRouteIs(Routes.Documents)) {
const workspaceHandle = getWorkspaceHandle();
if (workspaceHandle) {
Expand Down Expand Up @@ -276,8 +294,6 @@ function getTitleForRoute(): Translatable {
return 'HeaderPage.titles.myProfile';
case Routes.RecoveryExport:
return 'HeaderPage.titles.recoveryExport';
case Routes.History:
return 'History';
case null:
return '';
}
Expand Down

0 comments on commit 0fbba4e

Please sign in to comment.