mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-17 13:53:52 +02:00
Toggle notification tray icon dot
This commit is contained in:
@@ -519,7 +519,8 @@
|
||||
"sort_instance_users_by": "Sort Instance Users by",
|
||||
"sort_instance_users_by_time": "time",
|
||||
"sort_instance_users_by_alphabet": "alphabetical",
|
||||
"table_max_size": "Table Max Size"
|
||||
"table_max_size": "Table Max Size",
|
||||
"show_notification_icon_dot": "Show Tray Notification Dot"
|
||||
},
|
||||
"timedate": {
|
||||
"header": "Time/Date",
|
||||
|
||||
@@ -19,6 +19,7 @@ import { useFriendStore } from '../friend';
|
||||
import { useGameLogStore } from '../gameLog';
|
||||
import { useModerationStore } from '../moderation';
|
||||
import { useNotificationStore } from '../notification';
|
||||
import { useUiStore } from '../ui';
|
||||
import { useUserStore } from '../user';
|
||||
import { useVrStore } from '../vr';
|
||||
import { useVrcxStore } from '../vrcx';
|
||||
@@ -39,6 +40,7 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
const vrcxStore = useVrcxStore();
|
||||
const userStore = useUserStore();
|
||||
const router = useRouter();
|
||||
const uiStore = useUiStore();
|
||||
|
||||
const { t, availableLocales, locale } = useI18n();
|
||||
|
||||
@@ -79,6 +81,7 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
troll: '#782F2F'
|
||||
});
|
||||
const currentCulture = ref('');
|
||||
const notificationIconDot = ref(false);
|
||||
const isSideBarTabShow = computed(() => {
|
||||
const currentRouteName = router.currentRoute.value?.name;
|
||||
return !(
|
||||
@@ -109,7 +112,8 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
hideUserMemosConfig,
|
||||
hideUnfriendsConfig,
|
||||
randomUserColoursConfig,
|
||||
trustColorConfig
|
||||
trustColorConfig,
|
||||
notificationIconDotConfig
|
||||
] = await Promise.all([
|
||||
configRepository.getString('VRCX_appLanguage'),
|
||||
configRepository.getString('VRCX_ThemeMode', 'system'),
|
||||
@@ -160,7 +164,8 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
vip: '#FF2626',
|
||||
troll: '#782F2F'
|
||||
})
|
||||
)
|
||||
),
|
||||
configRepository.getBool('VRCX_notificationIconDot', true)
|
||||
]);
|
||||
|
||||
if (!appLanguageConfig) {
|
||||
@@ -213,6 +218,7 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
hideUserMemos.value = hideUserMemosConfig;
|
||||
hideUnfriends.value = hideUnfriendsConfig;
|
||||
randomUserColours.value = randomUserColoursConfig;
|
||||
notificationIconDot.value = notificationIconDotConfig;
|
||||
|
||||
// Migrate old settings
|
||||
// Assume all exist if one does
|
||||
@@ -424,6 +430,14 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
displayVRCPlusIconsAsAvatar.value
|
||||
);
|
||||
}
|
||||
function setNotificationIconDot() {
|
||||
notificationIconDot.value = !notificationIconDot.value;
|
||||
configRepository.setBool(
|
||||
'VRCX_notificationIconDot',
|
||||
notificationIconDot.value
|
||||
);
|
||||
uiStore.updateTrayIconNotify();
|
||||
}
|
||||
function setHideNicknames() {
|
||||
hideNicknames.value = !hideNicknames.value;
|
||||
configRepository.setBool('VRCX_hideNicknames', hideNicknames.value);
|
||||
@@ -711,6 +725,7 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
trustColor,
|
||||
currentCulture,
|
||||
isSideBarTabShow,
|
||||
notificationIconDot,
|
||||
|
||||
setAppLanguage,
|
||||
setDisplayVRCPlusIconsAsAvatar,
|
||||
@@ -741,7 +756,8 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
userColourInit,
|
||||
applyUserTrustLevel,
|
||||
changeAppLanguage,
|
||||
promptMaxTableSizeDialog
|
||||
promptMaxTableSizeDialog,
|
||||
setNotificationIconDot
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
@@ -7,6 +7,7 @@ import { useRouter } from 'vue-router';
|
||||
import { AppDebug } from '../service/appConfig';
|
||||
import { refreshCustomCss } from '../shared/utils/base/ui';
|
||||
import { updateLocalizedStrings } from '../plugin/i18n';
|
||||
import { useAppearanceSettingsStore } from './settings/appearance';
|
||||
import { useNotificationStore } from './notification';
|
||||
import { useSearchStore } from './search';
|
||||
|
||||
@@ -15,6 +16,7 @@ export const useUiStore = defineStore('Ui', () => {
|
||||
const router = useRouter();
|
||||
const keys = useMagicKeys();
|
||||
const { directAccessPaste } = useSearchStore();
|
||||
const appearanceSettings = useAppearanceSettingsStore();
|
||||
|
||||
const ctrlR = keys['Ctrl+R'];
|
||||
const ctrlD = keys['Ctrl+D'];
|
||||
@@ -116,8 +118,9 @@ export const useUiStore = defineStore('Ui', () => {
|
||||
|
||||
function updateTrayIconNotify(force = false) {
|
||||
const newState =
|
||||
notifiedMenus.value.includes('notification') ||
|
||||
notifiedMenus.value.includes('friend-log');
|
||||
appearanceSettings.notificationIconDot &&
|
||||
(notifiedMenus.value.includes('notification') ||
|
||||
notifiedMenus.value.includes('friend-log'));
|
||||
|
||||
if (trayIconNotify.value !== newState || force) {
|
||||
trayIconNotify.value = newState;
|
||||
@@ -136,6 +139,7 @@ export const useUiStore = defineStore('Ui', () => {
|
||||
|
||||
notifyMenu,
|
||||
removeNotify,
|
||||
showConsole
|
||||
showConsole,
|
||||
updateTrayIconNotify
|
||||
};
|
||||
});
|
||||
|
||||
@@ -54,6 +54,13 @@
|
||||
style="width: 128px"
|
||||
@change="setZoomLevel" />
|
||||
</div>
|
||||
<simple-switch
|
||||
:label="t('view.settings.appearance.appearance.show_notification_icon_dot')"
|
||||
:value="notificationIconDot"
|
||||
@change="
|
||||
setNotificationIconDot();
|
||||
saveOpenVROption();
|
||||
" />
|
||||
<simple-switch
|
||||
:label="t('view.settings.appearance.appearance.vrcplus_profile_icons')"
|
||||
:value="displayVRCPlusIconsAsAvatar"
|
||||
@@ -391,7 +398,8 @@
|
||||
hideUserMemos,
|
||||
hideUnfriends,
|
||||
randomUserColours,
|
||||
trustColor
|
||||
trustColor,
|
||||
notificationIconDot
|
||||
} = storeToRefs(appearanceSettingsStore);
|
||||
|
||||
const { saveSortFavoritesOption } = useFavoriteStore();
|
||||
@@ -415,7 +423,8 @@
|
||||
updateTrustColor,
|
||||
saveThemeMode,
|
||||
changeAppLanguage,
|
||||
promptMaxTableSizeDialog
|
||||
promptMaxTableSizeDialog,
|
||||
setNotificationIconDot
|
||||
} = appearanceSettingsStore;
|
||||
|
||||
const zoomLevel = ref(100);
|
||||
|
||||
Reference in New Issue
Block a user