From d96b83ad74d03b6dead7f687e602dc078614e05c Mon Sep 17 00:00:00 2001 From: Yo'av Moshe Date: Sun, 1 Dec 2024 12:20:12 +0100 Subject: [PATCH] auto direct to results instead of settings --- app.vue | 12 +++++++++--- components/Header.vue | 6 ++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app.vue b/app.vue index 8ad349e..5788ce9 100644 --- a/app.vue +++ b/app.vue @@ -155,9 +155,7 @@ const searchQuery = useState("searchQuery", () => ""); const offset = useState("offset", () => 0); const isLoading = useState("isLoading", () => false); const directLink = useState("directLink", () => false); -const view = useState("view", () => - remoteConfig.value ? "welcome" : "settings", -); +const view = useState("view", () => "welcome"); const darkMode = useState("darkMode", () => false); const bookURL = useState("bookURL", () => ""); const title = useState("title", () => appConfig.title); @@ -177,6 +175,14 @@ const booksList = computed(() => { : results; }); +onMounted(async () => { + if (!remoteConfig.value) { + view.value = "settings"; + } else { + fetchResults("", true); + } +}); + const setResults = (books, append) => { const { images = "", columns = {} } = JSON.parse(remoteConfig.value); results.value = [ diff --git a/components/Header.vue b/components/Header.vue index 5b0575a..ccccca2 100644 --- a/components/Header.vue +++ b/components/Header.vue @@ -111,10 +111,8 @@ header { &.loading { background: repeating-linear-gradient( 45deg, - #b9ebff, - #b9ebff 10px, - #acb8ff 10px, - #acb8ff 20px + #ddf5ff 100px, + #b0bbff 200px ); background-size: calc(20px / sin(45deg)) 100%; animation: move-stripes 10s linear infinite;