Cache worlds from search

This commit is contained in:
Natsumi
2021-12-31 23:56:28 +13:00
parent 11062e6ed4
commit b8b996997a
2 changed files with 11 additions and 0 deletions

View File

@@ -17207,6 +17207,16 @@ speechSynthesis.getVoices();
});
};
$app.methods.downloadSearchPage = function () {
this.searchWorldResults.forEach((ref) => {
API.getWorld({
worldId: ref.id
}).then((args) => {
this.queueCacheDownload(args.ref, 'Search');
});
});
};
$app.data.downloadProgress = 0;
$app.data.downloadInProgress = false;
$app.data.downloadIsProcessing = false;

View File

@@ -377,6 +377,7 @@ html
el-dropdown-menu(#default="dropdown")
el-dropdown-item(v-for="row in API.cachedConfig.dynamicWorldRows" :key="row.index" v-text="row.name" :command="row")
el-checkbox(v-model="searchWorldLabs" style="margin-left:10px") Include community labs
el-button(v-if="searchWorldResults.length > 0" @click="downloadSearchPage" icon="el-icon-download" size="small" style="margin-left:10px") Download All
.x-friend-list
.x-friend-item(v-for="world in searchWorldResults" :key="world.id" @click="showWorldDialog(world.id)")
template(v-once)