feat showInstanceIdInLocation option

This commit is contained in:
pa
2026-01-05 20:11:08 +09:00
committed by Natsumi
parent 531d6e43c1
commit bb92f6a4b1
4 changed files with 36 additions and 3 deletions
+12 -2
View File
@@ -5,7 +5,7 @@
<div v-if="region" :class="['flags', 'mr-1.5', region]"></div> <div v-if="region" :class="['flags', 'mr-1.5', region]"></div>
<el-tooltip <el-tooltip
:content="`${t('dialog.new_instance.instance_id')}: #${instanceName}`" :content="`${t('dialog.new_instance.instance_id')}: #${instanceName}`"
:disabled="!instanceName" :disabled="!instanceName || showInstanceIdInLocation"
:show-after="300" :show-after="300"
placement="top"> placement="top">
<div <div
@@ -14,6 +14,9 @@
@click="handleShowWorldDialog"> @click="handleShowWorldDialog">
<el-icon :class="['is-loading']" class="mr-1" v-if="isTraveling"><Loading /></el-icon> <el-icon :class="['is-loading']" class="mr-1" v-if="isTraveling"><Loading /></el-icon>
<span class="min-w-0 truncate">{{ text }}</span> <span class="min-w-0 truncate">{{ text }}</span>
<span v-if="showInstanceIdInLocation && instanceName" class="ml-1 whitespace-nowrap">{{
` · #${instanceName}`
}}</span>
<span v-if="groupName" class="ml-0.5 whitespace-nowrap x-link" @click.stop="handleShowGroupDialog"> <span v-if="groupName" class="ml-0.5 whitespace-nowrap x-link" @click.stop="handleShowGroupDialog">
({{ groupName }}) ({{ groupName }})
</span> </span>
@@ -33,7 +36,13 @@
import { storeToRefs } from 'pinia'; import { storeToRefs } from 'pinia';
import { useI18n } from 'vue-i18n'; 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 { getGroupName, getWorldName, parseLocation } from '../shared/utils';
import { accessTypeLocaleKeyMap } from '../shared/constants'; import { accessTypeLocaleKeyMap } from '../shared/constants';
@@ -45,6 +54,7 @@
const { verifyShortName } = useSearchStore(); const { verifyShortName } = useSearchStore();
const { cachedInstances } = useInstanceStore(); const { cachedInstances } = useInstanceStore();
const { lastInstanceApplied } = storeToRefs(useInstanceStore()); const { lastInstanceApplied } = storeToRefs(useInstanceStore());
const { showInstanceIdInLocation } = storeToRefs(useAppearanceSettingsStore());
const props = defineProps({ const props = defineProps({
location: String, location: String,
+1
View File
@@ -561,6 +561,7 @@
"zoom": "Zoom", "zoom": "Zoom",
"vrcplus_profile_icons": "VRCPlus Profile Icons", "vrcplus_profile_icons": "VRCPlus Profile Icons",
"tooltips": "Tooltips", "tooltips": "Tooltips",
"show_instance_id": "Show Instance ID",
"age_gated_instances": "Age Gated Instances", "age_gated_instances": "Age Gated Instances",
"nicknames": "Memo Nicknames", "nicknames": "Memo Nicknames",
"sort_favorite_by": "Sort Favorites by", "sort_favorite_by": "Sort Favorites by",
+16
View File
@@ -51,6 +51,7 @@ export const useAppearanceSettingsStore = defineStore(
const isDarkMode = ref(false); const isDarkMode = ref(false);
const displayVRCPlusIconsAsAvatar = ref(false); const displayVRCPlusIconsAsAvatar = ref(false);
const hideNicknames = ref(false); const hideNicknames = ref(false);
const showInstanceIdInLocation = ref(false);
const isAgeGatedInstancesVisible = ref(false); const isAgeGatedInstancesVisible = ref(false);
const sortFavorites = ref(true); const sortFavorites = ref(true);
const instanceUsersSortAlphabetical = ref(false); const instanceUsersSortAlphabetical = ref(false);
@@ -108,6 +109,7 @@ export const useAppearanceSettingsStore = defineStore(
themeModeConfig, themeModeConfig,
displayVRCPlusIconsAsAvatarConfig, displayVRCPlusIconsAsAvatarConfig,
hideNicknamesConfig, hideNicknamesConfig,
showInstanceIdInLocationConfig,
isAgeGatedInstancesVisibleConfig, isAgeGatedInstancesVisibleConfig,
sortFavoritesConfig, sortFavoritesConfig,
instanceUsersSortAlphabeticalConfig, instanceUsersSortAlphabeticalConfig,
@@ -133,6 +135,10 @@ export const useAppearanceSettingsStore = defineStore(
configRepository.getString('VRCX_ThemeMode', 'system'), configRepository.getString('VRCX_ThemeMode', 'system'),
configRepository.getBool('displayVRCPlusIconsAsAvatar', true), configRepository.getBool('displayVRCPlusIconsAsAvatar', true),
configRepository.getBool('VRCX_hideNicknames', false), configRepository.getBool('VRCX_hideNicknames', false),
configRepository.getBool(
'VRCX_showInstanceIdInLocation',
false
),
configRepository.getBool( configRepository.getBool(
'VRCX_isAgeGatedInstancesVisible', 'VRCX_isAgeGatedInstancesVisible',
true true
@@ -211,6 +217,7 @@ export const useAppearanceSettingsStore = defineStore(
displayVRCPlusIconsAsAvatar.value = displayVRCPlusIconsAsAvatar.value =
displayVRCPlusIconsAsAvatarConfig; displayVRCPlusIconsAsAvatarConfig;
hideNicknames.value = hideNicknamesConfig; hideNicknames.value = hideNicknamesConfig;
showInstanceIdInLocation.value = showInstanceIdInLocationConfig;
isAgeGatedInstancesVisible.value = isAgeGatedInstancesVisibleConfig; isAgeGatedInstancesVisible.value = isAgeGatedInstancesVisibleConfig;
sortFavorites.value = sortFavoritesConfig; sortFavorites.value = sortFavoritesConfig;
instanceUsersSortAlphabetical.value = instanceUsersSortAlphabetical.value =
@@ -491,6 +498,13 @@ export const useAppearanceSettingsStore = defineStore(
hideNicknames.value = !hideNicknames.value; hideNicknames.value = !hideNicknames.value;
configRepository.setBool('VRCX_hideNicknames', hideNicknames.value); configRepository.setBool('VRCX_hideNicknames', hideNicknames.value);
} }
function setShowInstanceIdInLocation() {
showInstanceIdInLocation.value = !showInstanceIdInLocation.value;
configRepository.setBool(
'VRCX_showInstanceIdInLocation',
showInstanceIdInLocation.value
);
}
function setIsAgeGatedInstancesVisible() { function setIsAgeGatedInstancesVisible() {
isAgeGatedInstancesVisible.value = isAgeGatedInstancesVisible.value =
!isAgeGatedInstancesVisible.value; !isAgeGatedInstancesVisible.value;
@@ -801,6 +815,7 @@ export const useAppearanceSettingsStore = defineStore(
isDarkMode, isDarkMode,
displayVRCPlusIconsAsAvatar, displayVRCPlusIconsAsAvatar,
hideNicknames, hideNicknames,
showInstanceIdInLocation,
isAgeGatedInstancesVisible, isAgeGatedInstancesVisible,
sortFavorites, sortFavorites,
instanceUsersSortAlphabetical, instanceUsersSortAlphabetical,
@@ -830,6 +845,7 @@ export const useAppearanceSettingsStore = defineStore(
setAppLanguage, setAppLanguage,
setDisplayVRCPlusIconsAsAvatar, setDisplayVRCPlusIconsAsAvatar,
setHideNicknames, setHideNicknames,
setShowInstanceIdInLocation,
setIsAgeGatedInstancesVisible, setIsAgeGatedInstancesVisible,
setSortFavorites, setSortFavorites,
setInstanceUsersSortAlphabetical, setInstanceUsersSortAlphabetical,
@@ -67,6 +67,10 @@
setDisplayVRCPlusIconsAsAvatar(); setDisplayVRCPlusIconsAsAvatar();
saveOpenVROption(); saveOpenVROption();
" /> " />
<simple-switch
:label="t('view.settings.appearance.appearance.show_instance_id')"
:value="showInstanceIdInLocation"
@change="setShowInstanceIdInLocation" />
<simple-switch <simple-switch
:label="t('view.settings.appearance.appearance.nicknames')" :label="t('view.settings.appearance.appearance.nicknames')"
:value="!hideNicknames" :value="!hideNicknames"
@@ -387,8 +391,8 @@
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useAppearanceSettingsStore, useFavoriteStore, useVrStore } from '../../../../stores'; import { useAppearanceSettingsStore, useFavoriteStore, useVrStore } from '../../../../stores';
import { THEME_CONFIG } from '../../../../shared/constants';
import { getLanguageName, languageCodes } from '../../../../localization'; import { getLanguageName, languageCodes } from '../../../../localization';
import { THEME_CONFIG } from '../../../../shared/constants';
import SimpleSwitch from '../SimpleSwitch.vue'; import SimpleSwitch from '../SimpleSwitch.vue';
@@ -402,6 +406,7 @@
themeMode, themeMode,
displayVRCPlusIconsAsAvatar, displayVRCPlusIconsAsAvatar,
hideNicknames, hideNicknames,
showInstanceIdInLocation,
isAgeGatedInstancesVisible, isAgeGatedInstancesVisible,
sortFavorites, sortFavorites,
instanceUsersSortAlphabetical, instanceUsersSortAlphabetical,
@@ -428,6 +433,7 @@
const { const {
setDisplayVRCPlusIconsAsAvatar, setDisplayVRCPlusIconsAsAvatar,
setHideNicknames, setHideNicknames,
setShowInstanceIdInLocation,
setIsAgeGatedInstancesVisible, setIsAgeGatedInstancesVisible,
setInstanceUsersSortAlphabetical, setInstanceUsersSortAlphabetical,
setDtHour12, setDtHour12,