feat: fallback to unsplash cover when article contains no image
This commit is contained in:
@@ -10,12 +10,15 @@ export const updateAllRecommendations: MenuEntry = {
|
||||
state.activeState.value = "loading";
|
||||
|
||||
fetchStream("/api/recommendation/all", (chunk) => {
|
||||
if (chunk.toLowerCase().includes("finish")) {
|
||||
if (chunk.type === "error") {
|
||||
state.activeState.value = "error";
|
||||
state.loadingText.value = chunk.message;
|
||||
} else if (chunk.type === "finished") {
|
||||
setTimeout(() => {
|
||||
window.location.reload();
|
||||
globalThis.location.reload();
|
||||
}, 500);
|
||||
} else {
|
||||
state.loadingText.value = chunk;
|
||||
state.loadingText.value = chunk.message;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user