Change VRCX default settings

This commit is contained in:
Natsumi
2023-06-01 10:37:34 +12:00
parent 44d63c2f32
commit 47ddea756f
4 changed files with 361 additions and 427 deletions

View File

@@ -47,37 +47,6 @@ speechSynthesis.getVoices();
await configRepository.init(); await configRepository.init();
// #region | Init: Migrate old legacy database data to new format
if (configRepository.getBool('migrate_config_20201101') === null) {
var legacyConfigKeys = [
'orderFriendGroup0',
'orderFriendGroup1',
'orderFriendGroup2',
'orderFriendGroup3',
'discordActive',
'discordInstance',
'openVR',
'openVRAlways',
'VRCX_hidePrivateFromFeed',
'VRCX_hideLoginsFromFeed',
'VRCX_hideDevicesFromFeed',
'VRCX_VIPNotifications',
'VRCX_minimalFeed',
'isDarkMode',
'VRCX_StartAtWindowsStartup',
'VRCX_StartAsMinimizedState',
'VRCX_CloseToTray',
'launchAsDesktop'
];
for (var _key of legacyConfigKeys) {
configRepository.setBool(
_key,
(await VRCXStorage.Get(_key)) === 'true'
);
}
configRepository.setBool('migrate_config_20201101', true);
}
// #endregion // #endregion
// #region | Init: drop/keyup event listeners // #region | Init: drop/keyup event listeners
// Make sure file drops outside of the screenshot manager don't navigate to the file path dropped. // Make sure file drops outside of the screenshot manager don't navigate to the file path dropped.
@@ -5134,7 +5103,10 @@ speechSynthesis.getVoices();
if (!this.appVersion) { if (!this.appVersion) {
return; return;
} }
var lastVersion = configRepository.getString('VRCX_lastVRCXVersion'); var lastVersion = configRepository.getString(
'VRCX_lastVRCXVersion',
''
);
if (!lastVersion) { if (!lastVersion) {
configRepository.setString('VRCX_lastVRCXVersion', this.appVersion); configRepository.setString('VRCX_lastVRCXVersion', this.appVersion);
return; return;
@@ -7052,7 +7024,8 @@ speechSynthesis.getVoices();
}; };
$app.data.enablePrimaryPassword = configRepository.getBool( $app.data.enablePrimaryPassword = configRepository.getBool(
'enablePrimaryPassword' 'enablePrimaryPassword',
false
); );
$app.data.enablePrimaryPasswordDialog = { $app.data.enablePrimaryPasswordDialog = {
visible: false, visible: false,
@@ -7552,43 +7525,6 @@ speechSynthesis.getVoices();
$app.data.sortFriendsGroup1 = false; $app.data.sortFriendsGroup1 = false;
$app.data.sortFriendsGroup2 = false; $app.data.sortFriendsGroup2 = false;
$app.data.sortFriendsGroup3 = false; $app.data.sortFriendsGroup3 = false;
$app.data.orderFriendsGroup0 =
configRepository.getBool('orderFriendGroup0');
$app.data.orderFriendsGroup1 =
configRepository.getBool('orderFriendGroup1');
$app.data.orderFriendsGroup2 =
configRepository.getBool('orderFriendGroup2');
$app.data.orderFriendsGroup3 =
configRepository.getBool('orderFriendGroup3');
$app.data.orderFriendsGroupPrivate = configRepository.getBool(
'orderFriendGroupPrivate'
);
$app.data.orderFriendsGroupStatus = configRepository.getBool(
'orderFriendsGroupStatus'
);
$app.data.orderFriendsGroupGPS = configRepository.getBool(
'orderFriendGroupGPS'
);
$app.methods.saveOrderFriendGroup = function () {
configRepository.setBool('orderFriendGroup0', this.orderFriendsGroup0);
configRepository.setBool('orderFriendGroup1', this.orderFriendsGroup1);
configRepository.setBool('orderFriendGroup2', this.orderFriendsGroup2);
configRepository.setBool('orderFriendGroup3', this.orderFriendsGroup3);
configRepository.setBool(
'orderFriendGroupPrivate',
this.orderFriendsGroupPrivate
);
configRepository.setBool(
'orderFriendsGroupStatus',
this.orderFriendsGroupStatus
);
configRepository.setBool(
'orderFriendGroupGPS',
this.orderFriendsGroupGPS
);
this.sortFriendsGroup0 = true;
this.sortFriendsGroup1 = true;
};
$app.methods.fetchActiveFriend = function (userId) { $app.methods.fetchActiveFriend = function (userId) {
this.pendingActiveFriends.add(userId); this.pendingActiveFriends.add(userId);
@@ -8700,10 +8636,7 @@ speechSynthesis.getVoices();
return true; return true;
}; };
$app.data.tablePageSize = 10; $app.data.tablePageSize = configRepository.getInt('VRCX_tablePageSize', 15);
if (configRepository.getInt('VRCX_tablePageSize')) {
$app.data.tablePageSize = configRepository.getInt('VRCX_tablePageSize');
}
$app.data.feedTable = { $app.data.feedTable = {
data: [], data: [],
@@ -8786,6 +8719,7 @@ speechSynthesis.getVoices();
throw err; throw err;
} }
} }
$app.getAvatarHistory();
$app.getAllMemos(); $app.getAllMemos();
if ($app.randomUserColours) { if ($app.randomUserColours) {
$app.getNameColour(this.currentUser.id).then((colour) => { $app.getNameColour(this.currentUser.id).then((colour) => {
@@ -9241,21 +9175,6 @@ speechSynthesis.getVoices();
statusName: '', statusName: '',
statusImage: '' statusImage: ''
}; };
$app.data.discordActive = configRepository.getBool('discordActive');
$app.data.discordInstance = configRepository.getBool('discordInstance');
$app.data.discordJoinButton = configRepository.getBool('discordJoinButton');
$app.data.discordHideInvite = configRepository.getBool('discordHideInvite');
$app.data.discordHideImage = configRepository.getBool('discordHideImage');
$app.methods.saveDiscordOption = function () {
configRepository.setBool('discordActive', this.discordActive);
configRepository.setBool('discordInstance', this.discordInstance);
configRepository.setBool('discordJoinButton', this.discordJoinButton);
configRepository.setBool('discordHideInvite', this.discordHideInvite);
configRepository.setBool('discordHideImage', this.discordHideImage);
this.lastLocation$.tag = '';
this.nextDiscordUpdate = 7;
this.updateDiscord();
};
$app.methods.gameLogSearch = function (row) { $app.methods.gameLogSearch = function (row) {
var value = this.gameLogTable.search.toUpperCase(); var value = this.gameLogTable.search.toUpperCase();
@@ -13274,48 +13193,35 @@ speechSynthesis.getVoices();
JSON.stringify(this.notificationTable.filters[0].value) JSON.stringify(this.notificationTable.filters[0].value)
); );
}; };
if (configRepository.getString('VRCX_feedTableFilters')) {
$app.data.feedTable.filter = JSON.parse( $app.data.feedTable.filter = JSON.parse(
configRepository.getString('VRCX_feedTableFilters') configRepository.getString('VRCX_feedTableFilters', '[]')
); );
$app.data.feedTable.vip = configRepository.getBool( $app.data.feedTable.vip = configRepository.getBool(
'VRCX_feedTableVIPFilter' 'VRCX_feedTableVIPFilter',
false
); );
}
if (configRepository.getString('VRCX_gameLogTableFilters')) {
$app.data.gameLogTable.filter = JSON.parse( $app.data.gameLogTable.filter = JSON.parse(
configRepository.getString('VRCX_gameLogTableFilters') configRepository.getString('VRCX_gameLogTableFilters', '[]')
); );
}
if (configRepository.getString('VRCX_friendLogTableFilters')) {
$app.data.friendLogTable.filters[0].value = JSON.parse( $app.data.friendLogTable.filters[0].value = JSON.parse(
configRepository.getString('VRCX_friendLogTableFilters') configRepository.getString('VRCX_friendLogTableFilters', '[]')
); );
}
if (configRepository.getString('VRCX_playerModerationTableFilters')) {
$app.data.playerModerationTable.filters[0].value = JSON.parse( $app.data.playerModerationTable.filters[0].value = JSON.parse(
configRepository.getString('VRCX_playerModerationTableFilters') configRepository.getString('VRCX_playerModerationTableFilters', '[]')
); );
}
if (configRepository.getString('VRCX_notificationTableFilters')) {
$app.data.notificationTable.filters[0].value = JSON.parse( $app.data.notificationTable.filters[0].value = JSON.parse(
configRepository.getString('VRCX_notificationTableFilters') configRepository.getString('VRCX_notificationTableFilters', '[]')
); );
}
if (configRepository.getString('VRCX_photonEventTypeFilter')) {
$app.data.photonEventTableTypeFilter = JSON.parse( $app.data.photonEventTableTypeFilter = JSON.parse(
configRepository.getString('VRCX_photonEventTypeFilter') configRepository.getString('VRCX_photonEventTypeFilter', '[]')
); );
$app.data.photonEventTable.filters[1].value = $app.data.photonEventTable.filters[1].value =
$app.data.photonEventTableTypeFilter; $app.data.photonEventTableTypeFilter;
$app.data.photonEventTablePrevious.filters[1].value = $app.data.photonEventTablePrevious.filters[1].value =
$app.data.photonEventTableTypeFilter; $app.data.photonEventTableTypeFilter;
}
if (configRepository.getString('VRCX_photonEventTypeOverlayFilter')) {
$app.data.photonEventTableTypeOverlayFilter = JSON.parse( $app.data.photonEventTableTypeOverlayFilter = JSON.parse(
configRepository.getString('VRCX_photonEventTypeOverlayFilter') configRepository.getString('VRCX_photonEventTypeOverlayFilter', '[]')
); );
}
// #endregion // #endregion
// #region | App: Profile + Settings // #region | App: Profile + Settings
@@ -13432,100 +13338,121 @@ speechSynthesis.getVoices();
layout: 'table' layout: 'table'
}; };
$app.data.visits = 0; $app.data.visits = 0;
$app.data.openVR = configRepository.getBool('openVR'); $app.data.openVR = configRepository.getBool('openVR', false);
$app.data.openVRAlways = configRepository.getBool('openVRAlways'); $app.data.openVRAlways = configRepository.getBool('openVRAlways', false);
$app.data.overlaybutton = configRepository.getBool('VRCX_overlaybutton'); $app.data.overlaybutton = configRepository.getBool(
$app.data.overlayHand = configRepository.getInt('VRCX_overlayHand'); 'VRCX_overlaybutton',
if (typeof $app.data.overlayHand !== 'number') { false
$app.data.overlayHand = 0; );
} $app.data.overlayHand = configRepository.getInt('VRCX_overlayHand', 0);
$app.data.hidePrivateFromFeed = configRepository.getBool( $app.data.hidePrivateFromFeed = configRepository.getBool(
'VRCX_hidePrivateFromFeed' 'VRCX_hidePrivateFromFeed',
false
); );
$app.data.hideDevicesFromFeed = configRepository.getBool( $app.data.hideDevicesFromFeed = configRepository.getBool(
'VRCX_hideDevicesFromFeed' 'VRCX_hideDevicesFromFeed',
false
); );
$app.data.hideCpuUsageFromFeed = configRepository.getBool( $app.data.hideCpuUsageFromFeed = configRepository.getBool(
'VRCX_hideCpuUsageFromFeed' 'VRCX_hideCpuUsageFromFeed',
false
); );
$app.data.hideUptimeFromFeed = configRepository.getBool( $app.data.hideUptimeFromFeed = configRepository.getBool(
'VRCX_hideUptimeFromFeed' 'VRCX_hideUptimeFromFeed',
false
);
$app.data.pcUptimeOnFeed = configRepository.getBool(
'VRCX_pcUptimeOnFeed',
false
); );
$app.data.pcUptimeOnFeed = configRepository.getBool('VRCX_pcUptimeOnFeed');
$app.data.overlayNotifications = configRepository.getBool( $app.data.overlayNotifications = configRepository.getBool(
'VRCX_overlayNotifications' 'VRCX_overlayNotifications',
true
);
$app.data.overlayWrist = configRepository.getBool(
'VRCX_overlayWrist',
false
); );
$app.data.overlayWrist = configRepository.getBool('VRCX_overlayWrist');
$app.data.xsNotifications = configRepository.getBool( $app.data.xsNotifications = configRepository.getBool(
'VRCX_xsNotifications' 'VRCX_xsNotifications',
true
); );
$app.data.imageNotifications = configRepository.getBool( $app.data.imageNotifications = configRepository.getBool(
'VRCX_imageNotifications' 'VRCX_imageNotifications',
true
); );
$app.data.desktopToast = configRepository.getString('VRCX_desktopToast'); $app.data.desktopToast = configRepository.getString(
$app.data.minimalFeed = configRepository.getBool('VRCX_minimalFeed'); 'VRCX_desktopToast',
'Never'
);
$app.data.minimalFeed = configRepository.getBool('VRCX_minimalFeed', false);
$app.data.displayVRCPlusIconsAsAvatar = configRepository.getBool( $app.data.displayVRCPlusIconsAsAvatar = configRepository.getBool(
'displayVRCPlusIconsAsAvatar' 'displayVRCPlusIconsAsAvatar',
true
);
$app.data.hideTooltips = configRepository.getBool(
'VRCX_hideTooltips',
false
); );
$app.data.hideTooltips = configRepository.getBool('VRCX_hideTooltips');
$app.data.notificationTTS = configRepository.getString( $app.data.notificationTTS = configRepository.getString(
'VRCX_notificationTTS' 'VRCX_notificationTTS',
'Never'
); );
$app.data.notificationTTSVoice = configRepository.getString( $app.data.notificationTTSVoice = configRepository.getString(
'VRCX_notificationTTSVoice' 'VRCX_notificationTTSVoice',
'0'
); );
$app.data.notificationTimeout = configRepository.getString( $app.data.notificationTimeout = configRepository.getString(
'VRCX_notificationTimeout' 'VRCX_notificationTimeout',
'3000'
); );
$app.data.autoSweepVRChatCache = configRepository.getBool( $app.data.autoSweepVRChatCache = configRepository.getBool(
'VRCX_autoSweepVRChatCache' 'VRCX_autoSweepVRChatCache',
false
); );
$app.data.relaunchVRChatAfterCrash = configRepository.getBool( $app.data.relaunchVRChatAfterCrash = configRepository.getBool(
'VRCX_relaunchVRChatAfterCrash' 'VRCX_relaunchVRChatAfterCrash',
false
); );
$app.data.vrcQuitFix = configRepository.getBool('VRCX_vrcQuitFix'); $app.data.vrcQuitFix = configRepository.getBool('VRCX_vrcQuitFix', true);
$app.data.vrBackgroundEnabled = configRepository.getBool( $app.data.vrBackgroundEnabled = configRepository.getBool(
'VRCX_vrBackgroundEnabled' 'VRCX_vrBackgroundEnabled',
false
); );
$app.data.asideWidth = configRepository.getInt('VRCX_asidewidth'); $app.data.asideWidth = configRepository.getInt('VRCX_asidewidth', 350);
$app.data.autoUpdateVRCX = configRepository.getString( $app.data.autoUpdateVRCX = configRepository.getString(
'VRCX_autoUpdateVRCX' 'VRCX_autoUpdateVRCX',
'Auto Download'
); );
$app.data.branch = configRepository.getString('VRCX_branch'); $app.data.branch = configRepository.getString('VRCX_branch', 'Stable');
$app.data.maxTableSize = configRepository.getInt('VRCX_maxTableSize'); $app.data.maxTableSize = configRepository.getInt('VRCX_maxTableSize', 1000);
if ($app.data.maxTableSize > 10000) { if ($app.data.maxTableSize > 10000) {
$app.data.maxTableSize = 1000; $app.data.maxTableSize = 1000;
} }
database.setmaxTableSize($app.data.maxTableSize); database.setmaxTableSize($app.data.maxTableSize);
$app.data.photonLobbyTimeoutThreshold = configRepository.getString( $app.data.photonLobbyTimeoutThreshold = configRepository.getString(
'VRCX_photonLobbyTimeoutThreshold' 'VRCX_photonLobbyTimeoutThreshold',
6000
); );
$app.data.clearVRCXCacheFrequency = configRepository.getString( $app.data.clearVRCXCacheFrequency = configRepository.getString(
'VRCX_clearVRCXCacheFrequency' 'VRCX_clearVRCXCacheFrequency',
); '172800'
$app.data.nextClearVRCXCacheCheck = configRepository.getString(
'VRCX_clearVRCXCacheFrequency'
); );
$app.data.avatarRemoteDatabase = configRepository.getBool( $app.data.avatarRemoteDatabase = configRepository.getBool(
'VRCX_avatarRemoteDatabase' 'VRCX_avatarRemoteDatabase',
true
); );
$app.data.avatarRemoteDatabaseProvider = ''; $app.data.avatarRemoteDatabaseProvider = '';
$app.data.avatarRemoteDatabaseProviderList = [];
if (configRepository.getString('VRCX_avatarRemoteDatabaseProviderList')) {
$app.data.avatarRemoteDatabaseProviderList = JSON.parse( $app.data.avatarRemoteDatabaseProviderList = JSON.parse(
configRepository.getString('VRCX_avatarRemoteDatabaseProviderList') configRepository.getString(
'VRCX_avatarRemoteDatabaseProviderList',
'[]'
)
); );
}
$app.data.pendingOfflineDelay = configRepository.getInt( $app.data.pendingOfflineDelay = configRepository.getInt(
'VRCX_pendingOfflineDelay'
);
if (!configRepository.getInt('VRCX_pendingOfflineDelay')) {
$app.data.pendingOfflineDelay = 110000;
configRepository.setInt(
'VRCX_pendingOfflineDelay', 'VRCX_pendingOfflineDelay',
$app.data.pendingOfflineDelay 110000
); );
}
if (configRepository.getString('VRCX_avatarRemoteDatabaseProvider')) { if (configRepository.getString('VRCX_avatarRemoteDatabaseProvider')) {
// move existing provider to new list // move existing provider to new list
var avatarRemoteDatabaseProvider = configRepository.getString( var avatarRemoteDatabaseProvider = configRepository.getString(
@@ -13550,12 +13477,22 @@ speechSynthesis.getVoices();
$app.data.avatarRemoteDatabaseProvider = $app.data.avatarRemoteDatabaseProvider =
$app.data.avatarRemoteDatabaseProviderList[0]; $app.data.avatarRemoteDatabaseProviderList[0];
} }
$app.data.sortFavorites = configRepository.getBool('VRCX_sortFavorites'); $app.data.sortFavorites = configRepository.getBool(
$app.data.randomUserColours = configRepository.getBool( 'VRCX_sortFavorites',
'VRCX_randomUserColours' true
);
$app.data.randomUserColours = configRepository.getBool(
'VRCX_randomUserColours',
false
);
$app.data.hideUserNotes = configRepository.getBool(
'VRCX_hideUserNotes',
false
);
$app.data.hideUserMemos = configRepository.getBool(
'VRCX_hideUserMemos',
false
); );
$app.data.hideUserNotes = configRepository.getBool('VRCX_hideUserNotes');
$app.data.hideUserMemos = configRepository.getBool('VRCX_hideUserMemos');
$app.methods.saveOpenVROption = function () { $app.methods.saveOpenVROption = function () {
configRepository.setBool('openVR', this.openVR); configRepository.setBool('openVR', this.openVR);
configRepository.setBool('openVRAlways', this.openVRAlways); configRepository.setBool('openVRAlways', this.openVRAlways);
@@ -13657,10 +13594,10 @@ speechSynthesis.getVoices();
); );
this.updateVRConfigVars(); this.updateVRConfigVars();
}; };
$app.data.themeMode = configRepository.getString('VRCX_ThemeMode'); $app.data.themeMode = configRepository.getString(
if (!$app.data.themeMode) { 'VRCX_ThemeMode',
$app.data.themeMode = 'system'; 'system'
} );
var systemIsDarkMode = () => var systemIsDarkMode = () =>
window.matchMedia('(prefers-color-scheme: dark)').matches; window.matchMedia('(prefers-color-scheme: dark)').matches;
$app.data.isDarkMode = $app.data.isDarkMode =
@@ -13698,7 +13635,8 @@ speechSynthesis.getVoices();
} }
}; };
$app.data.isStartAtWindowsStartup = configRepository.getBool( $app.data.isStartAtWindowsStartup = configRepository.getBool(
'VRCX_StartAtWindowsStartup' 'VRCX_StartAtWindowsStartup',
false
); );
$app.data.isStartAsMinimizedState = false; $app.data.isStartAsMinimizedState = false;
$app.data.isCloseToTray = false; $app.data.isCloseToTray = false;
@@ -13732,29 +13670,36 @@ speechSynthesis.getVoices();
AppApi.SetStartup(this.isStartAtWindowsStartup); AppApi.SetStartup(this.isStartAtWindowsStartup);
}; };
$app.data.photonEventOverlay = configRepository.getBool( $app.data.photonEventOverlay = configRepository.getBool(
'VRCX_PhotonEventOverlay' 'VRCX_PhotonEventOverlay',
false
); );
$app.data.timeoutHudOverlay = configRepository.getBool( $app.data.timeoutHudOverlay = configRepository.getBool(
'VRCX_TimeoutHudOverlay' 'VRCX_TimeoutHudOverlay',
false
); );
$app.data.timeoutHudOverlayFilter = configRepository.getString( $app.data.timeoutHudOverlayFilter = configRepository.getString(
'VRCX_TimeoutHudOverlayFilter' 'VRCX_TimeoutHudOverlayFilter',
'Everyone'
); );
$app.data.photonEventOverlayFilter = configRepository.getString( $app.data.photonEventOverlayFilter = configRepository.getString(
'VRCX_PhotonEventOverlayFilter' 'VRCX_PhotonEventOverlayFilter',
'Everyone'
); );
$app.data.photonOverlayMessageTimeout = Number( $app.data.photonOverlayMessageTimeout = Number(
configRepository.getString('VRCX_photonOverlayMessageTimeout') configRepository.getString('VRCX_photonOverlayMessageTimeout', 6000)
); );
$app.data.photonLoggingEnabled = false; $app.data.photonLoggingEnabled = false;
$app.data.gameLogDisabled = configRepository.getBool( $app.data.gameLogDisabled = configRepository.getBool(
'VRCX_gameLogDisabled' 'VRCX_gameLogDisabled',
false
); );
$app.data.udonExceptionLogging = configRepository.getBool( $app.data.udonExceptionLogging = configRepository.getBool(
'VRCX_udonExceptionLogging' 'VRCX_udonExceptionLogging',
false
); );
$app.data.instanceUsersSortAlphabetical = configRepository.getBool( $app.data.instanceUsersSortAlphabetical = configRepository.getBool(
'VRCX_instanceUsersSortAlphabetical' 'VRCX_instanceUsersSortAlphabetical',
false
); );
$app.methods.saveEventOverlay = function () { $app.methods.saveEventOverlay = function () {
configRepository.setBool( configRepository.setBool(
@@ -13780,115 +13725,89 @@ speechSynthesis.getVoices();
this.updateVRConfigVars(); this.updateVRConfigVars();
}; };
$app.data.logResourceLoad = configRepository.getBool( $app.data.logResourceLoad = configRepository.getBool(
'VRCX_logResourceLoad' 'VRCX_logResourceLoad',
false
); );
$app.methods.saveGameLogOptions = function () { $app.methods.saveGameLogOptions = function () {
configRepository.setBool('VRCX_logResourceLoad', this.logResourceLoad); configRepository.setBool('VRCX_logResourceLoad', this.logResourceLoad);
}; };
$app.data.orderFriendsGroup0 = configRepository.getBool(
'orderFriendGroup0',
true
);
$app.data.orderFriendsGroup1 = configRepository.getBool(
'orderFriendGroup1',
true
);
$app.data.orderFriendsGroup2 = configRepository.getBool(
'orderFriendGroup2',
true
);
$app.data.orderFriendsGroup3 = configRepository.getBool(
'orderFriendGroup3',
true
);
$app.data.orderFriendsGroupPrivate = configRepository.getBool(
'orderFriendGroupPrivate',
false
);
$app.data.orderFriendsGroupStatus = configRepository.getBool(
'orderFriendsGroupStatus',
false
);
$app.data.orderFriendsGroupGPS = configRepository.getBool(
'orderFriendGroupGPS',
true
);
$app.methods.saveOrderFriendGroup = function () {
configRepository.setBool('orderFriendGroup0', this.orderFriendsGroup0);
configRepository.setBool('orderFriendGroup1', this.orderFriendsGroup1);
configRepository.setBool('orderFriendGroup2', this.orderFriendsGroup2);
configRepository.setBool('orderFriendGroup3', this.orderFriendsGroup3);
configRepository.setBool(
'orderFriendGroupPrivate',
this.orderFriendsGroupPrivate
);
configRepository.setBool(
'orderFriendsGroupStatus',
this.orderFriendsGroupStatus
);
configRepository.setBool(
'orderFriendGroupGPS',
this.orderFriendsGroupGPS
);
this.sortFriendsGroup0 = true;
this.sortFriendsGroup1 = true;
};
$app.data.discordActive = configRepository.getBool('discordActive', false);
$app.data.discordInstance = configRepository.getBool(
'discordInstance',
true
);
$app.data.discordJoinButton = configRepository.getBool(
'discordJoinButton',
false
);
$app.data.discordHideInvite = configRepository.getBool(
'discordHideInvite',
true
);
$app.data.discordHideImage = configRepository.getBool(
'discordHideImage',
false
);
$app.methods.saveDiscordOption = function () {
configRepository.setBool('discordActive', this.discordActive);
configRepository.setBool('discordInstance', this.discordInstance);
configRepository.setBool('discordJoinButton', this.discordJoinButton);
configRepository.setBool('discordHideInvite', this.discordHideInvite);
configRepository.setBool('discordHideImage', this.discordHideImage);
this.lastLocation$.tag = '';
this.nextDiscordUpdate = 7;
this.updateDiscord();
};
// setting defaults // setting defaults
if (!configRepository.getString('VRCX_notificationPosition')) {
$app.data.notificationPosition = 'topCenter';
configRepository.setString(
'VRCX_notificationPosition',
$app.data.notificationPosition
);
}
if (!configRepository.getString('VRCX_notificationTimeout')) {
$app.data.notificationTimeout = 3000;
configRepository.setString(
'VRCX_notificationTimeout',
$app.data.notificationTimeout
);
}
if (!configRepository.getString('VRCX_notificationTTSVoice')) {
$app.data.notificationTTSVoice = '0';
configRepository.setString(
'VRCX_notificationTTSVoice',
$app.data.notificationTTSVoice
);
}
if (!configRepository.getString('VRCX_desktopToast')) {
$app.data.desktopToast = 'Never';
configRepository.setString('VRCX_desktopToast', $app.data.desktopToast);
}
if (!configRepository.getString('VRCX_notificationTTS')) {
$app.data.notificationTTS = 'Never';
configRepository.setString(
'VRCX_notificationTTS',
$app.data.notificationTTS
);
}
if (!configRepository.getBool('VRCX_vrBackgroundEnabled')) {
$app.data.vrBackgroundEnabled = false;
configRepository.setBool(
'VRCX_vrBackgroundEnabled',
$app.data.vrBackgroundEnabled
);
}
if (!configRepository.getInt('VRCX_asidewidth')) {
$app.data.asideWidth = 236;
configRepository.setInt('VRCX_asidewidth', $app.data.asideWidth);
}
if (!configRepository.getString('VRCX_autoUpdateVRCX')) {
$app.data.autoUpdateVRCX = 'Auto Download';
configRepository.setString(
'VRCX_autoUpdateVRCX',
$app.data.autoUpdateVRCX
);
}
if (!configRepository.getString('VRCX_branch')) {
$app.data.branch = 'Stable';
configRepository.setString('VRCX_branch', $app.data.branch);
}
if (!configRepository.getInt('VRCX_maxTableSize')) {
$app.data.maxTableSize = 1000;
configRepository.setInt('VRCX_maxTableSize', $app.data.maxTableSize);
database.setmaxTableSize($app.data.maxTableSize);
}
if (!configRepository.getString('VRCX_photonLobbyTimeoutThreshold')) {
$app.data.photonLobbyTimeoutThreshold = 3000;
configRepository.setString(
'VRCX_photonLobbyTimeoutThreshold',
$app.data.photonLobbyTimeoutThreshold
);
}
if (!configRepository.getString('VRCX_clearVRCXCacheFrequency')) {
$app.data.clearVRCXCacheFrequency = 172800; // 24 hours
configRepository.setString(
'VRCX_clearVRCXCacheFrequency',
$app.data.clearVRCXCacheFrequency
);
}
if (!configRepository.getString('VRCX_TimeoutHudOverlayFilter')) {
$app.data.timeoutHudOverlayFilter = 'Everyone';
configRepository.setString(
'VRCX_TimeoutHudOverlayFilter',
$app.data.timeoutHudOverlayFilter
);
}
if (!configRepository.getString('VRCX_PhotonEventOverlayFilter')) {
$app.data.photonEventOverlayFilter = 'Everyone';
configRepository.setString(
'VRCX_PhotonEventOverlayFilter',
$app.data.photonEventOverlayFilter
);
}
if (!configRepository.getString('VRCX_photonOverlayMessageTimeout')) {
$app.data.photonOverlayMessageTimeout = 6000;
configRepository.setString(
'VRCX_photonOverlayMessageTimeout',
$app.data.photonOverlayMessageTimeout
);
}
if (!configRepository.getBool('VRCX_instanceUsersSortAlphabetical')) {
$app.data.instanceUsersSortAlphabetical = false;
configRepository.setBool(
'VRCX_instanceUsersSortAlphabetical',
$app.data.instanceUsersSortAlphabetical
);
}
if (!configRepository.getString('sharedFeedFilters')) {
var sharedFeedFilters = { var sharedFeedFilters = {
noty: { noty: {
Location: 'Off', Location: 'Off',
@@ -13963,13 +13882,11 @@ speechSynthesis.getVoices();
Unmuted: 'On' Unmuted: 'On'
} }
}; };
configRepository.setString( $app.data.sharedFeedFilters = JSON.parse(
configRepository.getString(
'sharedFeedFilters', 'sharedFeedFilters',
JSON.stringify(sharedFeedFilters) JSON.stringify(sharedFeedFilters)
); )
}
$app.data.sharedFeedFilters = JSON.parse(
configRepository.getString('sharedFeedFilters')
); );
if (!$app.data.sharedFeedFilters.noty.Blocked) { if (!$app.data.sharedFeedFilters.noty.Blocked) {
$app.data.sharedFeedFilters.noty.Blocked = 'Off'; $app.data.sharedFeedFilters.noty.Blocked = 'Off';
@@ -13992,8 +13909,8 @@ speechSynthesis.getVoices();
$app.data.sharedFeedFilters.wrist['group.joinRequest'] = 'On'; $app.data.sharedFeedFilters.wrist['group.joinRequest'] = 'On';
} }
if (!configRepository.getString('VRCX_trustColor')) { $app.data.trustColor = JSON.parse(
configRepository.setString( configRepository.getString(
'VRCX_trustColor', 'VRCX_trustColor',
JSON.stringify({ JSON.stringify({
untrusted: '#CCCCCC', untrusted: '#CCCCCC',
@@ -14004,10 +13921,7 @@ speechSynthesis.getVoices();
vip: '#FF2626', vip: '#FF2626',
troll: '#782F2F' troll: '#782F2F'
}) })
); )
}
$app.data.trustColor = JSON.parse(
configRepository.getString('VRCX_trustColor')
); );
$app.methods.updatetrustColor = function () { $app.methods.updatetrustColor = function () {
@@ -14015,12 +13929,10 @@ speechSynthesis.getVoices();
'VRCX_randomUserColours', 'VRCX_randomUserColours',
this.randomUserColours this.randomUserColours
); );
if (this.trustColor) {
configRepository.setString( configRepository.setString(
'VRCX_trustColor', 'VRCX_trustColor',
JSON.stringify(this.trustColor) JSON.stringify(this.trustColor)
); );
}
if (this.randomUserColours) { if (this.randomUserColours) {
this.getNameColour(API.currentUser.id).then((colour) => { this.getNameColour(API.currentUser.id).then((colour) => {
API.currentUser.$userColour = colour; API.currentUser.$userColour = colour;
@@ -14037,7 +13949,18 @@ speechSynthesis.getVoices();
$app.methods.updatetrustColorClasses = function () { $app.methods.updatetrustColorClasses = function () {
var trustColor = JSON.parse( var trustColor = JSON.parse(
configRepository.getString('VRCX_trustColor') configRepository.getString(
'VRCX_trustColor',
JSON.stringify({
untrusted: '#CCCCCC',
basic: '#1778FF',
known: '#2BCF5C',
trusted: '#FF7B42',
veteran: '#B18FFF',
vip: '#FF2626',
troll: '#782F2F'
})
)
); );
if (document.getElementById('trustColor') !== null) { if (document.getElementById('trustColor') !== null) {
document.getElementById('trustColor').outerHTML = ''; document.getElementById('trustColor').outerHTML = '';
@@ -14073,7 +13996,8 @@ speechSynthesis.getVoices();
}; };
$app.data.notificationPosition = configRepository.getString( $app.data.notificationPosition = configRepository.getString(
'VRCX_notificationPosition' 'VRCX_notificationPosition',
'topCenter'
); );
$app.methods.changeNotificationPosition = function () { $app.methods.changeNotificationPosition = function () {
configRepository.setString( configRepository.setString(
@@ -14083,12 +14007,16 @@ speechSynthesis.getVoices();
this.updateVRConfigVars(); this.updateVRConfigVars();
}; };
$app.data.youTubeApi = configRepository.getBool('VRCX_youtubeAPI'); $app.data.youTubeApi = configRepository.getBool('VRCX_youtubeAPI', true);
$app.data.youTubeApiKey = configRepository.getString('VRCX_youtubeAPIKey'); $app.data.youTubeApiKey = configRepository.getString(
'VRCX_youtubeAPIKey',
''
);
$app.data.progressPie = configRepository.getBool('VRCX_progressPie'); $app.data.progressPie = configRepository.getBool('VRCX_progressPie', false);
$app.data.progressPieFilter = configRepository.getBool( $app.data.progressPieFilter = configRepository.getBool(
'VRCX_progressPieFilter' 'VRCX_progressPieFilter',
true
); );
$app.data.screenshotHelper = configRepository.getBool( $app.data.screenshotHelper = configRepository.getBool(
@@ -14097,7 +14025,8 @@ speechSynthesis.getVoices();
); );
$app.data.screenshotHelperModifyFilename = configRepository.getBool( $app.data.screenshotHelperModifyFilename = configRepository.getBool(
'VRCX_screenshotHelperModifyFilename' 'VRCX_screenshotHelperModifyFilename',
false
); );
$app.data.enableAppLauncher = configRepository.getBool( $app.data.enableAppLauncher = configRepository.getBool(
@@ -22888,8 +22817,8 @@ speechSynthesis.getVoices();
}); });
}; };
$app.data.dtHour12 = configRepository.getBool('VRCX_dtHour12'); $app.data.dtHour12 = configRepository.getBool('VRCX_dtHour12', false);
$app.data.dtIsoFormat = configRepository.getBool('VRCX_dtIsoFormat'); $app.data.dtIsoFormat = configRepository.getBool('VRCX_dtIsoFormat', false);
$app.methods.setDatetimeFormat = async function () { $app.methods.setDatetimeFormat = async function () {
var currentCulture = await AppApi.CurrentCulture(); var currentCulture = await AppApi.CurrentCulture();
var hour12 = configRepository.getBool('VRCX_dtHour12'); var hour12 = configRepository.getBool('VRCX_dtHour12');
@@ -22966,7 +22895,8 @@ speechSynthesis.getVoices();
$app.methods.setDatetimeFormat(); $app.methods.setDatetimeFormat();
$app.data.enableCustomEndpoint = configRepository.getBool( $app.data.enableCustomEndpoint = configRepository.getBool(
'VRCX_enableCustomEndpoint' 'VRCX_enableCustomEndpoint',
false
); );
$app.methods.toggleCustomEndpoint = function () { $app.methods.toggleCustomEndpoint = function () {
configRepository.setBool( configRepository.setBool(
@@ -23205,15 +23135,15 @@ speechSynthesis.getVoices();
$app.data.avatarHistory = new Set(); $app.data.avatarHistory = new Set();
$app.data.avatarHistoryArray = []; $app.data.avatarHistoryArray = [];
API.$on('LOGIN', async function () { $app.methods.getAvatarHistory = async function () {
$app.avatarHistory = new Set(); this.avatarHistory = new Set();
var historyArray = await database.getAvatarHistory(API.currentUser.id); var historyArray = await database.getAvatarHistory(API.currentUser.id);
$app.avatarHistoryArray = historyArray; this.avatarHistoryArray = historyArray;
for (var i = 0; i < historyArray.length; i++) { for (var i = 0; i < historyArray.length; i++) {
$app.avatarHistory.add(historyArray[i].id); this.avatarHistory.add(historyArray[i].id);
this.applyAvatar(historyArray[i]); API.applyAvatar(historyArray[i]);
} }
}); };
$app.methods.addAvatarToHistory = function (avatarId) { $app.methods.addAvatarToHistory = function (avatarId) {
API.getAvatar({ avatarId }).then((args) => { API.getAvatar({ avatarId }).then((args) => {
@@ -23255,16 +23185,22 @@ speechSynthesis.getVoices();
database.clearAvatarHistory(); database.clearAvatarHistory();
}; };
$app.data.databaseVersion = configRepository.getInt('VRCX_databaseVersion'); $app.data.databaseVersion = configRepository.getInt(
'VRCX_databaseVersion',
0
);
$app.methods.updateDatabaseVersion = async function () { $app.methods.updateDatabaseVersion = async function () {
var databaseVersion = 5; var databaseVersion = 5;
if (this.databaseVersion !== databaseVersion) { if (this.databaseVersion !== databaseVersion) {
if (this.databaseVersion) {
var msgBox = this.$message({ var msgBox = this.$message({
message: 'DO NOT CLOSE VRCX, database upgrade in process...', message:
'DO NOT CLOSE VRCX, database upgrade in process...',
type: 'warning', type: 'warning',
duration: 0 duration: 0
}); });
}
console.log( console.log(
`Updating database from ${this.databaseVersion} to ${databaseVersion}...` `Updating database from ${this.databaseVersion} to ${databaseVersion}...`
); );
@@ -23276,13 +23212,12 @@ speechSynthesis.getVoices();
await database.fixBrokenGroupInvites(); // fix notification v2 in wrong table await database.fixBrokenGroupInvites(); // fix notification v2 in wrong table
await database.updateTableForGroupNames(); // alter tables to include group name await database.updateTableForGroupNames(); // alter tables to include group name
database.fixBrokenNotifications(); // fix notifications being null database.fixBrokenNotifications(); // fix notifications being null
this.databaseVersion = databaseVersion;
configRepository.setInt( configRepository.setInt(
'VRCX_databaseVersion', 'VRCX_databaseVersion',
databaseVersion databaseVersion
); );
console.log('Database update complete.'); console.log('Database update complete.');
msgBox.close(); msgBox?.close();
if (this.databaseVersion) { if (this.databaseVersion) {
// only display when database exists // only display when database exists
this.$message({ this.$message({
@@ -23290,9 +23225,10 @@ speechSynthesis.getVoices();
type: 'success' type: 'success'
}); });
} }
this.databaseVersion = databaseVersion;
} catch (err) { } catch (err) {
console.error(err); console.error(err);
msgBox.close(); msgBox?.close();
this.$message({ this.$message({
message: message:
'Database upgrade failed, check console for details', 'Database upgrade failed, check console for details',

View File

@@ -389,7 +389,7 @@
"header": "Progress pie overlay for videos", "header": "Progress pie overlay for videos",
"enable": "Enable", "enable": "Enable",
"enable_tooltip": "Requires SteamVR overlay to be enabled", "enable_tooltip": "Requires SteamVR overlay to be enabled",
"dance_world_only": "Dance worlds only" "dance_world_only": "Supported world only"
}, },
"screenshot_helper": { "screenshot_helper": {
"header": "Screenshot Helper", "header": "Screenshot Helper",

View File

@@ -165,7 +165,7 @@ mixin settingsTab()
el-switch(v-model="orderFriendsGroup3" :inactive-text="$t('view.settings.appearance.side_panel.sorting.sort_offline_by_alphabet')" :active-text="$t('view.settings.appearance.side_panel.sorting.sort_offline_by_offline_time')" @change="saveOrderFriendGroup") el-switch(v-model="orderFriendsGroup3" :inactive-text="$t('view.settings.appearance.side_panel.sorting.sort_offline_by_alphabet')" :active-text="$t('view.settings.appearance.side_panel.sorting.sort_offline_by_offline_time')" @change="saveOrderFriendGroup")
span.sub-header {{ $t('view.settings.appearance.side_panel.width') }} span.sub-header {{ $t('view.settings.appearance.side_panel.width') }}
div.options-container-item div.options-container-item
el-slider(v-model="asideWidth" @input="setAsideWidth" :show-tooltip="false" :marks="{236: ''}" :min="141" :max="500" style="width:300px") el-slider(v-model="asideWidth" @input="setAsideWidth" :show-tooltip="false" :marks="{350: ''}" :min="141" :max="500" style="width:300px")
//- Appearance | User Dialog //- Appearance | User Dialog
div.options-container div.options-container
span.header {{ $t('view.settings.appearance.user_dialog.header') }} span.header {{ $t('view.settings.appearance.user_dialog.header') }}
@@ -332,12 +332,12 @@ mixin settingsTab()
div.options-container-item div.options-container-item
span.name {{ $t('view.settings.discord_presence.discord_presence.instance_type_player_count') }} span.name {{ $t('view.settings.discord_presence.discord_presence.instance_type_player_count') }}
el-switch(v-model="discordInstance" @change="saveDiscordOption" :disabled="!discordActive") el-switch(v-model="discordInstance" @change="saveDiscordOption" :disabled="!discordActive")
div.options-container-item
span.name {{ $t('view.settings.discord_presence.discord_presence.join_button') }}
el-switch(v-model="discordJoinButton" @change="saveDiscordOption" :disabled="!discordActive")
div.options-container-item div.options-container-item
span.name {{ $t('view.settings.discord_presence.discord_presence.hide_details_in_private') }} span.name {{ $t('view.settings.discord_presence.discord_presence.hide_details_in_private') }}
el-switch(v-model="discordHideInvite" @change="saveDiscordOption" :disabled="!discordActive") el-switch(v-model="discordHideInvite" @change="saveDiscordOption" :disabled="!discordActive")
div.options-container-item
span.name {{ $t('view.settings.discord_presence.discord_presence.join_button') }}
el-switch(v-model="discordJoinButton" @change="saveDiscordOption" :disabled="!discordActive")
div.options-container-item div.options-container-item
span.name {{ $t('view.settings.discord_presence.discord_presence.hide_images') }} span.name {{ $t('view.settings.discord_presence.discord_presence.hide_images') }}
el-switch(v-model="discordHideImage" @change="saveDiscordOption" :disabled="!discordActive") el-switch(v-model="discordHideImage" @change="saveDiscordOption" :disabled="!discordActive")

View File

@@ -12,8 +12,6 @@ class SharedRepository {
getString(key, defaultValue = null) { getString(key, defaultValue = null) {
var _key = transformKey(key); var _key = transformKey(key);
// var get = SharedVariable.Get(_key);
// var value = waitSynchronous(get);
var value = SharedVariable.Get(_key); var value = SharedVariable.Get(_key);
if (value === null) { if (value === null) {
return defaultValue; return defaultValue;