initial implementation of open world cache directory (#598)

This commit is contained in:
BoatFloater
2023-07-15 01:26:14 +09:00
committed by GitHub
parent 65cc5bd9d1
commit 0b10406d87
2 changed files with 13 additions and 2 deletions

View File

@@ -21897,6 +21897,7 @@ speechSynthesis.getVoices();
if (cacheInfo[0] > 0) {
D.inCache = true;
D.cacheSize = `${(cacheInfo[0] / 1048576).toFixed(2)} MiB`;
D.cachePath = cacheInfo[2];
}
if (cacheInfo[1] === 1) {
D.cacheLocked = true;
@@ -21944,7 +21945,12 @@ speechSynthesis.getVoices();
if (!id || !version) {
return [-1, 0];
}
return AssetBundleCacher.CheckVRChatCache(id, version);
let cacheData = await AssetBundleCacher.CheckVRChatCache(id, version);
let fullPath = await AssetBundleCacher.GetVRChatCacheFullLocation(id, version);
cacheData.push(fullPath);
return cacheData;
};
API.getBundles = function (fileId) {
@@ -27248,6 +27254,11 @@ speechSynthesis.getVoices();
}
API.getFileAnalysis({ fileId, version });
};
$app.methods.openFolderGeneric = function (path) {
AppApi.OpenFolderAndSelectItem(path, true);
};
// #endregion
$app = new Vue($app);

View File

@@ -572,7 +572,7 @@ html
el-tag.x-tag-platform-ios(v-if="worldDialog.isIos" type="info" effect="plain" size="mini" style="margin-right:5px;margin-top:5px") iOS
el-tag(v-if="worldDialog.avatarScalingDisabled" type="warning" effect="plain" size="mini" style="margin-right:5px;margin-top:5px") {{ $t('dialog.world.tags.avatar_scaling_disabled') }}
el-tag(type="info" effect="plain" size="mini" v-text="worldDialog.fileSize" style="margin-right:5px;margin-top:5px")
el-tag(v-if="worldDialog.inCache" type="info" effect="plain" size="mini" style="margin-right:5px;margin-top:5px")
el-tag(v-if="worldDialog.inCache" type="info" effect="plain" size="mini" style="margin-right:5px;margin-top:5px" @click="openFolderGeneric(worldDialog.cachePath)")
span(v-text="worldDialog.cacheSize")
| {{ $t('dialog.world.tags.cache')}}
div(style="margin-top:5px")