mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-07-09 05:47:51 +02:00
added company setting to quick navigation
Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
@@ -5,6 +5,9 @@
|
||||
import { goto } from '$app/navigation';
|
||||
import { menu, topMenu } from '$lib/consts/navigation';
|
||||
import { shouldHideMenuItem } from '$lib/utils/common';
|
||||
import { AppStateService } from '$lib/service/appState';
|
||||
|
||||
const appState = AppStateService.instance;
|
||||
// external
|
||||
export let visible = false;
|
||||
export let toggleChangeCompanyModal = () => {};
|
||||
@@ -73,6 +76,16 @@
|
||||
category: 'Settings'
|
||||
});
|
||||
|
||||
// add the settings for the company currently being viewed
|
||||
const context = appState.getContext();
|
||||
if (appState.isCompanyContext() && context.companyID) {
|
||||
items.push({
|
||||
label: 'Company Settings',
|
||||
route: `/company/${context.companyID}`,
|
||||
category: context.companyName || 'Company'
|
||||
});
|
||||
}
|
||||
|
||||
// add actions (not navigation)
|
||||
items.push({
|
||||
label: 'Switch Company',
|
||||
|
||||
Reference in New Issue
Block a user