mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-13 03:43:50 +02:00
feat: Block specific navigation and tool panels from being added to the dashboard
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
export const DASHBOARD_STORAGE_KEY = 'VRCX_dashboardConfigs';
|
||||
export const DASHBOARD_NAV_KEY_PREFIX = 'dashboard-';
|
||||
export const DEFAULT_DASHBOARD_ICON = 'ri-dashboard-line';
|
||||
|
||||
export const DASHBOARD_BLOCKED_PANEL_KEYS = new Set([
|
||||
'friend-list',
|
||||
'moderation',
|
||||
'charts-instance',
|
||||
'charts-mutual',
|
||||
'tools'
|
||||
]);
|
||||
|
||||
@@ -67,6 +67,8 @@
|
||||
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from '@/components/ui/dialog';
|
||||
import { DASHBOARD_BLOCKED_PANEL_KEYS } from '@/shared/constants/dashboard';
|
||||
import { isToolNavKey } from '@/shared/constants';
|
||||
import { navDefinitions } from '@/shared/constants/ui';
|
||||
|
||||
const widgetDefinitions = [
|
||||
@@ -112,7 +114,11 @@
|
||||
|
||||
const widgetOptions = computed(() => widgetDefinitions);
|
||||
|
||||
const panelOptions = computed(() => navDefinitions.filter((def) => def.routeName));
|
||||
const panelOptions = computed(() =>
|
||||
navDefinitions.filter(
|
||||
(def) => def.routeName && !DASHBOARD_BLOCKED_PANEL_KEYS.has(def.key) && !isToolNavKey(def.key)
|
||||
)
|
||||
);
|
||||
|
||||
function handleSelectWidget(option) {
|
||||
emit('select', {
|
||||
|
||||
Reference in New Issue
Block a user