mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
Create VRConfigVars
This commit is contained in:
@@ -5769,7 +5769,7 @@ speechSynthesis.getVoices();
|
||||
configRepository.setBool('VRCX_desktopToast', this.desktopToast);
|
||||
configRepository.setBool('VRCX_minimalFeed', this.minimalFeed);
|
||||
configRepository.setBool('displayVRCPlusIconsAsAvatar', this.displayVRCPlusIconsAsAvatar);
|
||||
AppApi.RefreshVR();
|
||||
this.updateVRConfigVars();
|
||||
};
|
||||
$app.data.TTSvoices = speechSynthesis.getVoices();
|
||||
var saveNotificationTTS = function () {
|
||||
@@ -5778,7 +5778,7 @@ speechSynthesis.getVoices();
|
||||
if (this.notificationTTS) {
|
||||
this.speak('Notification text-to-speech enabled');
|
||||
}
|
||||
AppApi.RefreshVR();
|
||||
this.updateVRConfigVars();
|
||||
};
|
||||
$app.watch.openVR = saveOpenVROption;
|
||||
$app.watch.openVRAlways = saveOpenVROption;
|
||||
@@ -5796,7 +5796,7 @@ speechSynthesis.getVoices();
|
||||
$app.watch.isDarkMode = function () {
|
||||
configRepository.setBool('isDarkMode', this.isDarkMode);
|
||||
$appDarkStyle.disabled = this.isDarkMode === false;
|
||||
AppApi.RefreshVR();
|
||||
this.updateVRConfigVars();
|
||||
};
|
||||
$app.data.isStartAtWindowsStartup = configRepository.getBool('VRCX_StartAtWindowsStartup');
|
||||
$app.data.isStartAsMinimizedState = (VRCXStorage.Get('VRCX_StartAsMinimizedState') === 'true');
|
||||
@@ -5946,7 +5946,7 @@ speechSynthesis.getVoices();
|
||||
this.notyFeedFiltersDialog.visible = false;
|
||||
this.wristFeedFiltersDialog.visible = false;
|
||||
configRepository.setString('sharedFeedFilters', JSON.stringify(this.sharedFeedFilters));
|
||||
AppApi.RefreshVR();
|
||||
this.updateVRConfigVars();
|
||||
}
|
||||
|
||||
$app.methods.cancelSharedFeedFilters = function () {
|
||||
@@ -5958,7 +5958,7 @@ speechSynthesis.getVoices();
|
||||
$app.data.notificationPosition = configRepository.getString('VRCX_notificationPosition');
|
||||
$app.methods.changeNotificationPosition = function () {
|
||||
configRepository.setString('VRCX_notificationPosition', this.notificationPosition);
|
||||
AppApi.RefreshVR();
|
||||
this.updateVRConfigVars();
|
||||
};
|
||||
|
||||
sharedRepository.setBool('is_game_running', false);
|
||||
@@ -5987,6 +5987,34 @@ speechSynthesis.getVoices();
|
||||
}
|
||||
$app.watch.lastLocation = lastLocationStateChange;
|
||||
|
||||
$app.methods.updateVRConfigVars = function () {
|
||||
if (configRepository.getBool('isDarkMode')) {
|
||||
var notificationTheme = 'sunset';
|
||||
} else {
|
||||
var notificationTheme = 'relax';
|
||||
}
|
||||
var VRConfigVars = {
|
||||
notificationTTS: this.notificationTTS,
|
||||
notificationTTSVoice: this.notificationTTSVoice,
|
||||
overlayNotifications: this.overlayNotifications,
|
||||
desktopToast: this.desktopToast,
|
||||
hidePrivateFromFeed: this.hidePrivateFromFeed,
|
||||
hideOnPlayerJoined: this.hideOnPlayerJoined,
|
||||
hideDevicesFromFeed: this.hideDevicesFromFeed,
|
||||
minimalFeed: this.minimalFeed,
|
||||
displayVRCPlusIconsAsAvatar: this.displayVRCPlusIconsAsAvatar,
|
||||
sharedFeedFilters: this.sharedFeedFilters,
|
||||
notificationPosition: this.notificationPosition,
|
||||
notificationTimeout: this.notificationTimeout,
|
||||
notificationTheme: notificationTheme
|
||||
}
|
||||
sharedRepository.setObject('VRConfigVars', VRConfigVars);
|
||||
}
|
||||
|
||||
API.$on('LOGIN', function () {
|
||||
$app.updateVRConfigVars();
|
||||
});
|
||||
|
||||
API.$on('LOGIN', function () {
|
||||
$app.currentUserTreeData = [];
|
||||
$app.pastDisplayNameTable.data = [];
|
||||
@@ -6053,7 +6081,7 @@ speechSynthesis.getVoices();
|
||||
var voiceName = voices[index].name;
|
||||
speechSynthesis.cancel();
|
||||
this.speak(voiceName);
|
||||
AppApi.RefreshVR();
|
||||
this.updateVRConfigVars();
|
||||
};
|
||||
|
||||
$app.methods.speak = function (text) {
|
||||
|
||||
Reference in New Issue
Block a user