From bb92f6a4b11ae0e6c0156fa23f014455668b521f Mon Sep 17 00:00:00 2001 From: pa Date: Mon, 5 Jan 2026 20:11:08 +0900 Subject: [PATCH] feat showInstanceIdInLocation option --- src/components/Location.vue | 14 ++++++++++++-- src/localization/en.json | 1 + src/stores/settings/appearance.js | 16 ++++++++++++++++ .../Settings/components/Tabs/AppearanceTab.vue | 8 +++++++- 4 files changed, 36 insertions(+), 3 deletions(-) diff --git a/src/components/Location.vue b/src/components/Location.vue index be958323..6fc3c620 100644 --- a/src/components/Location.vue +++ b/src/components/Location.vue @@ -5,7 +5,7 @@
{{ text }} + {{ + ` ยท #${instanceName}` + }} ({{ groupName }}) @@ -33,7 +36,13 @@ import { storeToRefs } from 'pinia'; import { useI18n } from 'vue-i18n'; - import { useGroupStore, useInstanceStore, useSearchStore, useWorldStore } from '../stores'; + import { + useAppearanceSettingsStore, + useGroupStore, + useInstanceStore, + useSearchStore, + useWorldStore + } from '../stores'; import { getGroupName, getWorldName, parseLocation } from '../shared/utils'; import { accessTypeLocaleKeyMap } from '../shared/constants'; @@ -45,6 +54,7 @@ const { verifyShortName } = useSearchStore(); const { cachedInstances } = useInstanceStore(); const { lastInstanceApplied } = storeToRefs(useInstanceStore()); + const { showInstanceIdInLocation } = storeToRefs(useAppearanceSettingsStore()); const props = defineProps({ location: String, diff --git a/src/localization/en.json b/src/localization/en.json index 38ba9477..4d5e843f 100644 --- a/src/localization/en.json +++ b/src/localization/en.json @@ -561,6 +561,7 @@ "zoom": "Zoom", "vrcplus_profile_icons": "VRCPlus Profile Icons", "tooltips": "Tooltips", + "show_instance_id": "Show Instance ID", "age_gated_instances": "Age Gated Instances", "nicknames": "Memo Nicknames", "sort_favorite_by": "Sort Favorites by", diff --git a/src/stores/settings/appearance.js b/src/stores/settings/appearance.js index 80ce599a..40fd1d7d 100644 --- a/src/stores/settings/appearance.js +++ b/src/stores/settings/appearance.js @@ -51,6 +51,7 @@ export const useAppearanceSettingsStore = defineStore( const isDarkMode = ref(false); const displayVRCPlusIconsAsAvatar = ref(false); const hideNicknames = ref(false); + const showInstanceIdInLocation = ref(false); const isAgeGatedInstancesVisible = ref(false); const sortFavorites = ref(true); const instanceUsersSortAlphabetical = ref(false); @@ -108,6 +109,7 @@ export const useAppearanceSettingsStore = defineStore( themeModeConfig, displayVRCPlusIconsAsAvatarConfig, hideNicknamesConfig, + showInstanceIdInLocationConfig, isAgeGatedInstancesVisibleConfig, sortFavoritesConfig, instanceUsersSortAlphabeticalConfig, @@ -133,6 +135,10 @@ export const useAppearanceSettingsStore = defineStore( configRepository.getString('VRCX_ThemeMode', 'system'), configRepository.getBool('displayVRCPlusIconsAsAvatar', true), configRepository.getBool('VRCX_hideNicknames', false), + configRepository.getBool( + 'VRCX_showInstanceIdInLocation', + false + ), configRepository.getBool( 'VRCX_isAgeGatedInstancesVisible', true @@ -211,6 +217,7 @@ export const useAppearanceSettingsStore = defineStore( displayVRCPlusIconsAsAvatar.value = displayVRCPlusIconsAsAvatarConfig; hideNicknames.value = hideNicknamesConfig; + showInstanceIdInLocation.value = showInstanceIdInLocationConfig; isAgeGatedInstancesVisible.value = isAgeGatedInstancesVisibleConfig; sortFavorites.value = sortFavoritesConfig; instanceUsersSortAlphabetical.value = @@ -491,6 +498,13 @@ export const useAppearanceSettingsStore = defineStore( hideNicknames.value = !hideNicknames.value; configRepository.setBool('VRCX_hideNicknames', hideNicknames.value); } + function setShowInstanceIdInLocation() { + showInstanceIdInLocation.value = !showInstanceIdInLocation.value; + configRepository.setBool( + 'VRCX_showInstanceIdInLocation', + showInstanceIdInLocation.value + ); + } function setIsAgeGatedInstancesVisible() { isAgeGatedInstancesVisible.value = !isAgeGatedInstancesVisible.value; @@ -801,6 +815,7 @@ export const useAppearanceSettingsStore = defineStore( isDarkMode, displayVRCPlusIconsAsAvatar, hideNicknames, + showInstanceIdInLocation, isAgeGatedInstancesVisible, sortFavorites, instanceUsersSortAlphabetical, @@ -830,6 +845,7 @@ export const useAppearanceSettingsStore = defineStore( setAppLanguage, setDisplayVRCPlusIconsAsAvatar, setHideNicknames, + setShowInstanceIdInLocation, setIsAgeGatedInstancesVisible, setSortFavorites, setInstanceUsersSortAlphabetical, diff --git a/src/views/Settings/components/Tabs/AppearanceTab.vue b/src/views/Settings/components/Tabs/AppearanceTab.vue index f741324f..4d93f978 100644 --- a/src/views/Settings/components/Tabs/AppearanceTab.vue +++ b/src/views/Settings/components/Tabs/AppearanceTab.vue @@ -67,6 +67,10 @@ setDisplayVRCPlusIconsAsAvatar(); saveOpenVROption(); " /> +