mirror of
https://github.com/vrcx-team/VRCX.git
synced 2026-04-06 00:32:02 +02:00
feat: Add setting to control the visibility of the "New Dashboard" button
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<Sidebar side="left" variant="sidebar" collapsible="icon">
|
||||
<SidebarHeader v-if="!hasDashboards" class="px-2 py-2">
|
||||
<SidebarHeader v-if="showNewDashboardButton && !hasDashboards" class="px-2 py-2">
|
||||
<SidebarMenu>
|
||||
<SidebarMenuItem>
|
||||
<SidebarMenuButton
|
||||
@@ -229,7 +229,7 @@
|
||||
const modalStore = useModalStore();
|
||||
|
||||
const appearanceSettingsStore = useAppearanceSettingsStore();
|
||||
const { themeMode, tableDensity, isDarkMode, isNavCollapsed: isCollapsed } = storeToRefs(appearanceSettingsStore);
|
||||
const { themeMode, tableDensity, isDarkMode, isNavCollapsed: isCollapsed, showNewDashboardButton } = storeToRefs(appearanceSettingsStore);
|
||||
|
||||
const {
|
||||
themes,
|
||||
|
||||
@@ -689,6 +689,10 @@
|
||||
}
|
||||
},
|
||||
"interface": {
|
||||
"navigation": {
|
||||
"header": "Navigation",
|
||||
"show_new_dashboard_button": "Show \"New Dashboard\" Button"
|
||||
},
|
||||
"lists_tables": {
|
||||
"header": "Lists & Tables"
|
||||
}
|
||||
|
||||
@@ -116,6 +116,7 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
|
||||
const isDataTableStriped = ref(false);
|
||||
const showPointerOnHover = ref(false);
|
||||
const showNewDashboardButton = ref(true);
|
||||
const tableLimitsDialog = ref({
|
||||
visible: false,
|
||||
maxTableSize: 500,
|
||||
@@ -175,6 +176,7 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
navIsCollapsedConfig,
|
||||
dataTableStripedConfig,
|
||||
showPointerOnHoverConfig,
|
||||
showNewDashboardButtonConfig,
|
||||
appFontFamilyConfig,
|
||||
customFontFamilyConfig,
|
||||
appCjkFontPackConfig,
|
||||
@@ -244,6 +246,7 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
configRepository.getBool('VRCX_navIsCollapsed', false),
|
||||
configRepository.getBool('VRCX_dataTableStriped', false),
|
||||
configRepository.getBool('VRCX_showPointerOnHover', false),
|
||||
configRepository.getBool('VRCX_showNewDashboardButton', true),
|
||||
configRepository.getString(
|
||||
'VRCX_fontFamily',
|
||||
APP_FONT_DEFAULT_KEY
|
||||
@@ -363,6 +366,7 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
isNavCollapsed.value = navIsCollapsedConfig;
|
||||
isDataTableStriped.value = dataTableStripedConfig;
|
||||
showPointerOnHover.value = showPointerOnHoverConfig;
|
||||
showNewDashboardButton.value = showNewDashboardButtonConfig;
|
||||
|
||||
applyPointerHoverClass();
|
||||
|
||||
@@ -936,6 +940,17 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
applyPointerHoverClass();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function setShowNewDashboardButton() {
|
||||
showNewDashboardButton.value = !showNewDashboardButton.value;
|
||||
configRepository.setBool(
|
||||
'VRCX_showNewDashboardButton',
|
||||
showNewDashboardButton.value
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {object} color
|
||||
*/
|
||||
@@ -1170,6 +1185,7 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
isNavCollapsed,
|
||||
isDataTableStriped,
|
||||
showPointerOnHover,
|
||||
showNewDashboardButton,
|
||||
tableLimitsDialog,
|
||||
TABLE_MAX_SIZE_MIN,
|
||||
TABLE_MAX_SIZE_MAX,
|
||||
@@ -1204,6 +1220,7 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
setRandomUserColours,
|
||||
toggleStripedDataTable,
|
||||
togglePointerOnHover,
|
||||
setShowNewDashboardButton,
|
||||
setTableDensity,
|
||||
setTrustColor,
|
||||
tryInitUserColours,
|
||||
|
||||
@@ -134,6 +134,12 @@
|
||||
</SettingsItem>
|
||||
</SettingsGroup>
|
||||
|
||||
<SettingsGroup :title="t('view.settings.interface.navigation.header')">
|
||||
<SettingsItem :label="t('view.settings.interface.navigation.show_new_dashboard_button')">
|
||||
<Switch :model-value="showNewDashboardButton" @update:modelValue="setShowNewDashboardButton" />
|
||||
</SettingsItem>
|
||||
</SettingsGroup>
|
||||
|
||||
<SettingsGroup :title="t('view.settings.interface.lists_tables.header')">
|
||||
<SettingsItem :label="t('view.settings.appearance.appearance.sort_favorite_by')">
|
||||
<RadioGroup
|
||||
@@ -378,7 +384,8 @@
|
||||
notificationIconDot,
|
||||
tablePageSizes,
|
||||
isDataTableStriped,
|
||||
showPointerOnHover
|
||||
showPointerOnHover,
|
||||
showNewDashboardButton
|
||||
} = storeToRefs(appearanceSettingsStore);
|
||||
|
||||
const appLanguageDisplayName = computed(() => getLanguageName(String(appLanguage.value)));
|
||||
@@ -401,6 +408,7 @@
|
||||
setTablePageSizes,
|
||||
toggleStripedDataTable,
|
||||
togglePointerOnHover,
|
||||
setShowNewDashboardButton,
|
||||
setAppFontFamily,
|
||||
setCustomFontFamily,
|
||||
setAppCjkFontPack
|
||||
|
||||
Reference in New Issue
Block a user