![]()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{
+ t('view.settings.notifications.notifications.conditions.never')
+ }}
+ {{
+ t('view.settings.notifications.notifications.conditions.inside_vrchat')
+ }}
+ {{
+ t('view.settings.notifications.notifications.conditions.outside_vrchat')
+ }}
+ {{
+ t('view.settings.notifications.notifications.conditions.always')
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/Settings/components/Tabs/WristOverlayTab.vue b/src/views/Settings/components/Tabs/WristOverlayTab.vue
deleted file mode 100644
index b0f190cc..00000000
--- a/src/views/Settings/components/Tabs/WristOverlayTab.vue
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/src/views/Settings/components/Tabs/__tests__/DiscordPresenceTab.test.js b/src/views/Settings/components/Tabs/__tests__/DiscordPresenceTab.test.js
deleted file mode 100644
index 3adf9dc3..00000000
--- a/src/views/Settings/components/Tabs/__tests__/DiscordPresenceTab.test.js
+++ /dev/null
@@ -1,99 +0,0 @@
-import { beforeEach, describe, expect, it, vi } from 'vitest';
-import { mount } from '@vue/test-utils';
-
-const mocks = vi.hoisted(() => ({
- discordStore: {
- setDiscordActive: vi.fn(),
- setDiscordInstance: vi.fn(),
- setDiscordHideInvite: vi.fn(),
- setDiscordJoinButton: vi.fn(),
- setDiscordHideImage: vi.fn(),
- setDiscordShowPlatform: vi.fn(),
- setDiscordWorldIntegration: vi.fn(),
- setDiscordWorldNameAsDiscordStatus: vi.fn(),
- saveDiscordOption: vi.fn(),
- discordActive: { __v_isRef: true, value: true },
- discordInstance: { __v_isRef: true, value: true },
- discordHideInvite: { __v_isRef: true, value: false },
- discordJoinButton: { __v_isRef: true, value: true },
- discordHideImage: { __v_isRef: true, value: false },
- discordShowPlatform: { __v_isRef: true, value: true },
- discordWorldIntegration: { __v_isRef: true, value: true },
- discordWorldNameAsDiscordStatus: { __v_isRef: true, value: false }
- },
- showVRChatConfig: vi.fn()
-}));
-
-vi.mock('pinia', async (i) => ({ ...(await i()), storeToRefs: (s) => s }));
-vi.mock('vue-i18n', () => ({ useI18n: () => ({ t: (k) => k }) }));
-vi.mock('../../../../../stores', () => ({
- useDiscordPresenceSettingsStore: () => mocks.discordStore,
- useAdvancedSettingsStore: () => ({
- showVRChatConfig: (...a) => mocks.showVRChatConfig(...a)
- })
-}));
-
-vi.mock('@/components/ui/switch', () => ({
- Switch: {
- props: ['modelValue', 'disabled'],
- emits: ['update:modelValue'],
- template:
- '
'
- }
-}));
-
-vi.mock('../../SettingsGroup.vue', () => ({
- default: { template: '
' }
-}));
-
-vi.mock('../../SettingsItem.vue', () => ({
- default: {
- props: ['label', 'description'],
- template: '
'
- }
-}));
-
-import DiscordPresenceTab from '../DiscordPresenceTab.vue';
-
-describe('DiscordPresenceTab.vue', () => {
- beforeEach(() => {
- mocks.discordStore.discordActive.value = true;
- mocks.discordStore.discordInstance.value = true;
- mocks.discordStore.setDiscordActive.mockClear();
- mocks.discordStore.saveDiscordOption.mockClear();
- mocks.showVRChatConfig.mockClear();
- });
-
- it('opens VRChat config and handles switch changes', async () => {
- const wrapper = mount(DiscordPresenceTab);
-
- const tooltipRow = wrapper
- .findAll('p')
- .find((node) =>
- node
- .text()
- .includes(
- 'view.settings.discord_presence.discord_presence.enable_tooltip'
- )
- );
- expect(tooltipRow).toBeTruthy();
- await tooltipRow.trigger('click');
-
- expect(mocks.showVRChatConfig).toHaveBeenCalledTimes(1);
-
- const switches = wrapper.findAll('[data-testid="switch"]');
- await switches[0].trigger('click');
- expect(mocks.discordStore.setDiscordActive).toHaveBeenCalledTimes(1);
- expect(mocks.discordStore.saveDiscordOption).toHaveBeenCalled();
- });
-
- it('passes disabled state to dependent switches when discord is disabled', () => {
- mocks.discordStore.discordActive.value = false;
- const wrapper = mount(DiscordPresenceTab);
-
- const switches = wrapper.findAll('[data-testid="switch"]');
- const worldIntegrationSwitch = switches[1];
-
- expect(worldIntegrationSwitch?.attributes('data-disabled')).toBe('true');
- });
-});
diff --git a/src/views/Settings/components/Tabs/__tests__/WristOverlayTab.test.js b/src/views/Settings/components/Tabs/__tests__/WristOverlayTab.test.js
deleted file mode 100644
index 137ff46a..00000000
--- a/src/views/Settings/components/Tabs/__tests__/WristOverlayTab.test.js
+++ /dev/null
@@ -1,36 +0,0 @@
-import { describe, expect, it, vi } from 'vitest';
-import { mount } from '@vue/test-utils';
-
-vi.mock('../../WristOverlaySettings.vue', () => ({
- default: {
- emits: ['open-feed-filters'],
- template:
- '
'
- }
-}));
-
-vi.mock('../../../dialogs/FeedFiltersDialog.vue', () => ({
- default: {
- props: ['feedFiltersDialogMode'],
- template:
- '
'
- }
-}));
-
-import WristOverlayTab from '../WristOverlayTab.vue';
-
-describe('WristOverlayTab.vue', () => {
- it('sets feed dialog mode to wrist when child emits open-feed-filters', async () => {
- const wrapper = mount(WristOverlayTab);
-
- expect(
- wrapper.get('[data-testid="feed-dialog"]').attributes('data-mode')
- ).toBe('');
-
- await wrapper.get('[data-testid="open-filters"]').trigger('click');
-
- expect(
- wrapper.get('[data-testid="feed-dialog"]').attributes('data-mode')
- ).toBe('wrist');
- });
-});
diff --git a/src/views/Settings/components/WristOverlaySettings.vue b/src/views/Settings/components/WristOverlaySettings.vue
index feaecbe2..9ed1fa0f 100644
--- a/src/views/Settings/components/WristOverlaySettings.vue
+++ b/src/views/Settings/components/WristOverlaySettings.vue
@@ -17,15 +17,6 @@
>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
({
wristStore: {
overlayWrist: { value: true },
hidePrivateFromFeed: { value: false },
- openVRAlways: { value: false },
overlaybutton: { value: false },
overlayHand: { value: '1' },
vrBackgroundEnabled: { value: false },
@@ -20,7 +19,6 @@ const mocks = vi.hoisted(() => ({
pcUptimeOnFeed: { value: false },
setOverlayWrist: vi.fn(),
setHidePrivateFromFeed: vi.fn(),
- setOpenVRAlways: vi.fn(),
setOverlaybutton: vi.fn(),
setOverlayHand: vi.fn(),
setVrBackgroundEnabled: vi.fn(),
@@ -95,10 +93,9 @@ describe('WristOverlaySettings.vue', () => {
beforeEach(() => {
mocks.notificationsStore.openVR.value = true;
mocks.wristStore.overlayWrist.value = true;
- mocks.wristStore.openVRAlways.value = false;
mocks.wristStore.overlaybutton.value = false;
- mocks.notificationsStore.setOpenVR.mockClear();
- mocks.wristStore.setOpenVRAlways.mockClear();
+ mocks.wristStore.setOverlayWrist.mockClear();
+ mocks.wristStore.setHidePrivateFromFeed.mockClear();
mocks.wristStore.setOverlaybutton.mockClear();
mocks.wristStore.setOverlayHand.mockClear();
mocks.saveOpenVROption.mockClear();
@@ -107,32 +104,33 @@ describe('WristOverlaySettings.vue', () => {
it('emits open-feed-filters and handles switch/radio/toggle updates', async () => {
const wrapper = mount(WristOverlaySettings);
+ // Feed filters button emits event
await wrapper.get('[data-testid="filters-btn"]').trigger('click');
expect(wrapper.emitted('open-feed-filters')).toBeTruthy();
+ // First switch is now overlayWrist (SteamVR Overlay moved to VrTab)
const switches = wrapper.findAll('[data-testid="switch"]');
await switches[0].trigger('click');
- expect(mocks.notificationsStore.setOpenVR).toHaveBeenCalledTimes(1);
+ expect(mocks.wristStore.setOverlayWrist).toHaveBeenCalledTimes(1);
expect(mocks.saveOpenVROption).toHaveBeenCalled();
+ // First (and only) radio group is now overlay button (Start Overlay With moved to VrTab)
const radioGroups = wrapper.findAll('[data-testid="radio-group"]');
await radioGroups[0].get('[data-testid="radio-true"]').trigger('click');
- expect(mocks.wristStore.setOpenVRAlways).toHaveBeenCalledTimes(1);
-
- await radioGroups[1].get('[data-testid="radio-true"]').trigger('click');
expect(mocks.wristStore.setOverlaybutton).toHaveBeenCalledTimes(1);
+ // Toggle group for overlay hand
await wrapper.get('[data-testid="toggle-right"]').trigger('click');
expect(mocks.wristStore.setOverlayHand).toHaveBeenCalledWith('2');
});
- it('does not toggle openVRAlways when the value is unchanged', async () => {
- mocks.wristStore.openVRAlways.value = true;
+ it('does not toggle overlaybutton when the value is unchanged', async () => {
+ mocks.wristStore.overlaybutton.value = true;
const wrapper = mount(WristOverlaySettings);
const firstRadio = wrapper.findAll('[data-testid="radio-group"]')[0];
await firstRadio.get('[data-testid="radio-true"]').trigger('click');
- expect(mocks.wristStore.setOpenVRAlways).not.toHaveBeenCalled();
+ expect(mocks.wristStore.setOverlaybutton).not.toHaveBeenCalled();
});
});