mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-28 11:13:49 +02:00
remove hide status setting
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
</ResizablePanelGroup>
|
||||
</SidebarInset>
|
||||
</SidebarProvider>
|
||||
<StatusBar v-if="showStatusBar" />
|
||||
<StatusBar />
|
||||
</div>
|
||||
|
||||
<!-- ## Dialogs ## -->
|
||||
@@ -119,7 +119,7 @@
|
||||
const router = useRouter();
|
||||
|
||||
const appearanceSettingsStore = useAppearanceSettingsStore();
|
||||
const { navWidth, isNavCollapsed, showStatusBar } = storeToRefs(appearanceSettingsStore);
|
||||
const { navWidth, isNavCollapsed } = storeToRefs(appearanceSettingsStore);
|
||||
|
||||
const sidebarOpen = computed(() => !isNavCollapsed.value);
|
||||
|
||||
|
||||
@@ -2,38 +2,113 @@ import { describe, expect, it, vi } from 'vitest';
|
||||
import { mount } from '@vue/test-utils';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const mocks = vi.hoisted(() => ({ replace: vi.fn(), setNavCollapsed: vi.fn(), setNavWidth: vi.fn() }));
|
||||
const mocks = vi.hoisted(() => ({
|
||||
replace: vi.fn(),
|
||||
setNavCollapsed: vi.fn(),
|
||||
setNavWidth: vi.fn()
|
||||
}));
|
||||
|
||||
vi.mock('pinia', async (i) => ({ ...(await i()), storeToRefs: (s) => s }));
|
||||
vi.mock('vue-router', () => ({ useRouter: () => ({ replace: (...a) => mocks.replace(...a) }) }));
|
||||
vi.mock('../../../services/watchState', () => ({ watchState: { isLoggedIn: false } }));
|
||||
vi.mock('../../../stores', () => ({ useAppearanceSettingsStore: () => ({ navWidth: ref(240), isNavCollapsed: ref(false), showStatusBar: ref(false), setNavCollapsed: (...a) => mocks.setNavCollapsed(...a), setNavWidth: (...a) => mocks.setNavWidth(...a) }) }));
|
||||
vi.mock('../../../composables/useMainLayoutResizable', () => ({ useMainLayoutResizable: () => ({ asideDefaultSize: 30, asideMinSize: 0, asideMaxPx: 480, mainDefaultSize: 70, handleLayout: vi.fn(), isAsideCollapsed: () => false, isAsideCollapsedStatic: false, isSideBarTabShow: ref(true) }) }));
|
||||
vi.mock('../../../components/ui/resizable', () => ({ ResizablePanelGroup: { template: '<div><slot :layout="[]" /></div>' }, ResizablePanel: { template: '<div><slot /></div>' }, ResizableHandle: { template: '<div />' } }));
|
||||
vi.mock('../../../components/ui/sidebar', () => ({ SidebarProvider: { template: '<div><slot /></div>' }, SidebarInset: { template: '<div><slot /></div>' } }));
|
||||
vi.mock('../../../components/nav-menu/NavMenu.vue', () => ({ default: { template: '<div />' } }));
|
||||
vi.mock('../../Sidebar/Sidebar.vue', () => ({ default: { template: '<div />' } }));
|
||||
vi.mock('../../../components/StatusBar.vue', () => ({ default: { template: '<div />' } }));
|
||||
vi.mock('../../../components/dialogs/MainDialogContainer.vue', () => ({ default: { template: '<div />' } }));
|
||||
vi.mock('../../../components/FullscreenImagePreview.vue', () => ({ default: { template: '<div />' } }));
|
||||
vi.mock('../../../components/dialogs/ChooseFavoriteGroupDialog.vue', () => ({ default: { template: '<div />' } }));
|
||||
vi.mock('../../../components/dialogs/LaunchDialog.vue', () => ({ default: { template: '<div />' } }));
|
||||
vi.mock('../../Settings/dialogs/LaunchOptionsDialog.vue', () => ({ default: { template: '<div />' } }));
|
||||
vi.mock('../../Favorites/dialogs/FriendImportDialog.vue', () => ({ default: { template: '<div />' } }));
|
||||
vi.mock('../../Favorites/dialogs/WorldImportDialog.vue', () => ({ default: { template: '<div />' } }));
|
||||
vi.mock('../../Favorites/dialogs/AvatarImportDialog.vue', () => ({ default: { template: '<div />' } }));
|
||||
vi.mock('../../../components/dialogs/GroupDialog/GroupMemberModerationDialog.vue', () => ({ default: { template: '<div />' } }));
|
||||
vi.mock('../../../components/dialogs/InviteGroupDialog.vue', () => ({ default: { template: '<div />' } }));
|
||||
vi.mock('../../Settings/dialogs/VRChatConfigDialog.vue', () => ({ default: { template: '<div />' } }));
|
||||
vi.mock('../../Settings/dialogs/PrimaryPasswordDialog.vue', () => ({ default: { template: '<div />' } }));
|
||||
vi.mock('../../../components/dialogs/SendBoopDialog.vue', () => ({ default: { template: '<div />' } }));
|
||||
vi.mock('../../Settings/dialogs/ChangelogDialog.vue', () => ({ default: { template: '<div />' } }));
|
||||
vi.mock('vue-router', () => ({
|
||||
useRouter: () => ({ replace: (...a) => mocks.replace(...a) })
|
||||
}));
|
||||
vi.mock('../../../services/watchState', () => ({
|
||||
watchState: { isLoggedIn: false }
|
||||
}));
|
||||
vi.mock('../../../stores', () => ({
|
||||
useAppearanceSettingsStore: () => ({
|
||||
navWidth: ref(240),
|
||||
isNavCollapsed: ref(false),
|
||||
setNavCollapsed: (...a) => mocks.setNavCollapsed(...a),
|
||||
setNavWidth: (...a) => mocks.setNavWidth(...a)
|
||||
})
|
||||
}));
|
||||
vi.mock('../../../composables/useMainLayoutResizable', () => ({
|
||||
useMainLayoutResizable: () => ({
|
||||
asideDefaultSize: 30,
|
||||
asideMinSize: 0,
|
||||
asideMaxPx: 480,
|
||||
mainDefaultSize: 70,
|
||||
handleLayout: vi.fn(),
|
||||
isAsideCollapsed: () => false,
|
||||
isAsideCollapsedStatic: false,
|
||||
isSideBarTabShow: ref(true)
|
||||
})
|
||||
}));
|
||||
vi.mock('../../../components/ui/resizable', () => ({
|
||||
ResizablePanelGroup: { template: '<div><slot :layout="[]" /></div>' },
|
||||
ResizablePanel: { template: '<div><slot /></div>' },
|
||||
ResizableHandle: { template: '<div />' }
|
||||
}));
|
||||
vi.mock('../../../components/ui/sidebar', () => ({
|
||||
SidebarProvider: { template: '<div><slot /></div>' },
|
||||
SidebarInset: { template: '<div><slot /></div>' }
|
||||
}));
|
||||
vi.mock('../../../components/nav-menu/NavMenu.vue', () => ({
|
||||
default: { template: '<div />' }
|
||||
}));
|
||||
vi.mock('../../Sidebar/Sidebar.vue', () => ({
|
||||
default: { template: '<div />' }
|
||||
}));
|
||||
vi.mock('../../../components/StatusBar.vue', () => ({
|
||||
default: { template: '<div />' }
|
||||
}));
|
||||
vi.mock('../../../components/dialogs/MainDialogContainer.vue', () => ({
|
||||
default: { template: '<div />' }
|
||||
}));
|
||||
vi.mock('../../../components/FullscreenImagePreview.vue', () => ({
|
||||
default: { template: '<div />' }
|
||||
}));
|
||||
vi.mock('../../../components/dialogs/ChooseFavoriteGroupDialog.vue', () => ({
|
||||
default: { template: '<div />' }
|
||||
}));
|
||||
vi.mock('../../../components/dialogs/LaunchDialog.vue', () => ({
|
||||
default: { template: '<div />' }
|
||||
}));
|
||||
vi.mock('../../Settings/dialogs/LaunchOptionsDialog.vue', () => ({
|
||||
default: { template: '<div />' }
|
||||
}));
|
||||
vi.mock('../../Favorites/dialogs/FriendImportDialog.vue', () => ({
|
||||
default: { template: '<div />' }
|
||||
}));
|
||||
vi.mock('../../Favorites/dialogs/WorldImportDialog.vue', () => ({
|
||||
default: { template: '<div />' }
|
||||
}));
|
||||
vi.mock('../../Favorites/dialogs/AvatarImportDialog.vue', () => ({
|
||||
default: { template: '<div />' }
|
||||
}));
|
||||
vi.mock(
|
||||
'../../../components/dialogs/GroupDialog/GroupMemberModerationDialog.vue',
|
||||
() => ({ default: { template: '<div />' } })
|
||||
);
|
||||
vi.mock('../../../components/dialogs/InviteGroupDialog.vue', () => ({
|
||||
default: { template: '<div />' }
|
||||
}));
|
||||
vi.mock('../../Settings/dialogs/VRChatConfigDialog.vue', () => ({
|
||||
default: { template: '<div />' }
|
||||
}));
|
||||
vi.mock('../../Settings/dialogs/PrimaryPasswordDialog.vue', () => ({
|
||||
default: { template: '<div />' }
|
||||
}));
|
||||
vi.mock('../../../components/dialogs/SendBoopDialog.vue', () => ({
|
||||
default: { template: '<div />' }
|
||||
}));
|
||||
vi.mock('../../Settings/dialogs/ChangelogDialog.vue', () => ({
|
||||
default: { template: '<div />' }
|
||||
}));
|
||||
|
||||
import MainLayout from '../MainLayout.vue';
|
||||
|
||||
describe('MainLayout.vue', () => {
|
||||
it('redirects to login when not logged in', () => {
|
||||
mount(MainLayout, { global: { stubs: { RouterView: { template: '<div />' }, KeepAlive: { template: '<div><slot /></div>' } } } });
|
||||
mount(MainLayout, {
|
||||
global: {
|
||||
stubs: {
|
||||
RouterView: { template: '<div />' },
|
||||
KeepAlive: { template: '<div><slot /></div>' }
|
||||
}
|
||||
}
|
||||
});
|
||||
expect(mocks.replace).toHaveBeenCalledWith({ name: 'login' });
|
||||
});
|
||||
});
|
||||
|
||||
@@ -82,10 +82,6 @@
|
||||
:label="t('view.settings.appearance.appearance.show_instance_id')"
|
||||
:value="showInstanceIdInLocation"
|
||||
@change="setShowInstanceIdInLocation" />
|
||||
<simple-switch
|
||||
:label="t('view.settings.appearance.appearance.show_status_bar')"
|
||||
:value="showStatusBar"
|
||||
@change="setShowStatusBar" />
|
||||
<simple-switch
|
||||
:label="t('view.settings.appearance.appearance.nicknames')"
|
||||
:value="!hideNicknames"
|
||||
@@ -393,8 +389,7 @@
|
||||
notificationIconDot,
|
||||
tablePageSizes,
|
||||
isDataTableStriped,
|
||||
showPointerOnHover,
|
||||
showStatusBar
|
||||
showPointerOnHover
|
||||
} = storeToRefs(appearanceSettingsStore);
|
||||
|
||||
const appLanguageDisplayName = computed(() => getLanguageName(String(appLanguage.value)));
|
||||
@@ -403,7 +398,6 @@
|
||||
setDisplayVRCPlusIconsAsAvatar,
|
||||
setHideNicknames,
|
||||
setShowInstanceIdInLocation,
|
||||
setShowStatusBar,
|
||||
setIsAgeGatedInstancesVisible,
|
||||
setInstanceUsersSortAlphabetical,
|
||||
setDtHour12,
|
||||
|
||||
Reference in New Issue
Block a user