Confirm button for cache deletion

This commit is contained in:
Natsumi
2021-05-25 18:22:03 +12:00
parent ec1e42245f
commit b7cb6439c2
3 changed files with 22 additions and 3 deletions

View File

@@ -11725,9 +11725,23 @@ speechSynthesis.getVoices();
cacheDirectory = this.VRChatConfigFile.cache_directory;
}
await AssetBundleCacher.DeleteCache(cacheDirectory, ref.id, ref.version);
this.getVRChatCacheSize();
this.updateVRChatCache();
};
$app.methods.showDeleteAllVRChatCacheConfirm = function () {
this.$confirm(`Continue? Delete all VRChat cache`, 'Confirm', {
confirmButtonText: 'Confirm',
cancelButtonText: 'Cancel',
type: 'info',
callback: (action) => {
if (action === 'confirm') {
this.deleteAllVRChatCache();
}
}
});
};
$app.methods.deleteAllVRChatCache = async function () {
await this.readVRChatConfigFile();
var cacheDirectory = '';