Skip to content

Commit

Permalink
auto direct to results instead of settings
Browse files Browse the repository at this point in the history
  • Loading branch information
bjesus committed Dec 1, 2024
1 parent a8a5c87 commit d96b83a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 9 additions & 3 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 = [
Expand Down
6 changes: 2 additions & 4 deletions components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d96b83a

Please sign in to comment.