mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-02 21:16:07 +02:00
Pending offline delay option
This commit is contained in:
+45
-3
@@ -7085,7 +7085,7 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
// delayed second check to prevent status flapping
|
// delayed second check to prevent status flapping
|
||||||
var date = this.updateFriendInProgress.get(id);
|
var date = this.updateFriendInProgress.get(id);
|
||||||
if (date && date > Date.now() - 120000) {
|
if (date && date > Date.now() - this.pendingOfflineDelay + 5000) {
|
||||||
// check if already waiting
|
// check if already waiting
|
||||||
if (this.debugFriendState) {
|
if (this.debugFriendState) {
|
||||||
console.log(
|
console.log(
|
||||||
@@ -7111,7 +7111,7 @@ speechSynthesis.getVoices();
|
|||||||
location,
|
location,
|
||||||
$location_at
|
$location_at
|
||||||
);
|
);
|
||||||
}, 110000);
|
}, this.pendingOfflineDelay);
|
||||||
} else {
|
} else {
|
||||||
ctx.ref = ref;
|
ctx.ref = ref;
|
||||||
ctx.isVIP = isVIP;
|
ctx.isVIP = isVIP;
|
||||||
@@ -12247,6 +12247,16 @@ speechSynthesis.getVoices();
|
|||||||
configRepository.getString('VRCX_avatarRemoteDatabaseProviderList')
|
configRepository.getString('VRCX_avatarRemoteDatabaseProviderList')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
$app.data.pendingOfflineDelay = configRepository.getInt(
|
||||||
|
'VRCX_pendingOfflineDelay'
|
||||||
|
);
|
||||||
|
if (!configRepository.getInt('VRCX_pendingOfflineDelay')) {
|
||||||
|
$app.data.pendingOfflineDelay = 110000;
|
||||||
|
configRepository.setInt(
|
||||||
|
'VRCX_pendingOfflineDelay',
|
||||||
|
$app.data.pendingOfflineDelay
|
||||||
|
);
|
||||||
|
}
|
||||||
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(
|
||||||
@@ -12536,7 +12546,7 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
if (!configRepository.getInt('VRCX_maxTableSize')) {
|
if (!configRepository.getInt('VRCX_maxTableSize')) {
|
||||||
$app.data.maxTableSize = 1000;
|
$app.data.maxTableSize = 1000;
|
||||||
configRepository.getInt('VRCX_maxTableSize', $app.data.maxTableSize);
|
configRepository.setInt('VRCX_maxTableSize', $app.data.maxTableSize);
|
||||||
database.setmaxTableSize($app.data.maxTableSize);
|
database.setmaxTableSize($app.data.maxTableSize);
|
||||||
}
|
}
|
||||||
if (!configRepository.getString('VRCX_photonLobbyTimeoutThreshold')) {
|
if (!configRepository.getString('VRCX_photonLobbyTimeoutThreshold')) {
|
||||||
@@ -21888,6 +21898,38 @@ speechSynthesis.getVoices();
|
|||||||
$app.getLocalWorldFavorites();
|
$app.getLocalWorldFavorites();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// pending offline timer
|
||||||
|
|
||||||
|
$app.methods.promptSetPendingOffline = function () {
|
||||||
|
this.$prompt(
|
||||||
|
'Set pending offline delay in seconds (default: 110)',
|
||||||
|
'Pending Offline',
|
||||||
|
{
|
||||||
|
distinguishCancelAndClose: true,
|
||||||
|
confirmButtonText: 'Save',
|
||||||
|
cancelButtonText: 'Cancel',
|
||||||
|
inputValue: this.pendingOfflineDelay,
|
||||||
|
inputPattern: /\d+$/,
|
||||||
|
inputErrorMessage: 'Valid number is required',
|
||||||
|
callback: (action, instance) => {
|
||||||
|
if (
|
||||||
|
action === 'confirm' &&
|
||||||
|
instance.inputValue &&
|
||||||
|
!isNaN(instance.inputValue)
|
||||||
|
) {
|
||||||
|
this.pendingOfflineDelay = Math.trunc(
|
||||||
|
Number(instance.inputValue) * 1000
|
||||||
|
);
|
||||||
|
configRepository.setInt(
|
||||||
|
'VRCX_pendingOfflineDelay',
|
||||||
|
this.pendingOfflineDelay
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
$app = new Vue($app);
|
$app = new Vue($app);
|
||||||
window.$app = $app;
|
window.$app = $app;
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -1301,6 +1301,11 @@ html
|
|||||||
el-button(size="small" icon="el-icon-s-operation" @click="showVRChatConfig()") VRChat config.json
|
el-button(size="small" icon="el-icon-s-operation" @click="showVRChatConfig()") VRChat config.json
|
||||||
el-button(size="small" icon="el-icon-s-operation" @click="showLaunchOptions()") Launch Options
|
el-button(size="small" icon="el-icon-s-operation" @click="showLaunchOptions()") Launch Options
|
||||||
div.options-container
|
div.options-container
|
||||||
|
span.sub-header Pending Offline
|
||||||
|
div.options-container-item
|
||||||
|
span.name Delay before marking user as offline (fixes false positives)
|
||||||
|
el-button-group(style="display:block")
|
||||||
|
el-button(size="small" icon="el-icon-s-operation" @click="promptSetPendingOffline") Set Delay
|
||||||
span.sub-header Primary password
|
span.sub-header Primary password
|
||||||
div.options-container-item
|
div.options-container-item
|
||||||
span.name(style="min-width:300px") Encrypt password (disables auto login)
|
span.name(style="min-width:300px") Encrypt password (disables auto login)
|
||||||
|
|||||||
Reference in New Issue
Block a user