Skip to content

Commit

Permalink
feat: add booru selector
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Jun 8, 2021
1 parent 21665b5 commit 65f6aa4
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions pages/premium/saved-posts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,30 @@
<main class="flex flex-col max-w-3xl min-h-screen p-4 mx-auto sm:p-6 lg:p-8">
<ContentSeparator title="Saved posts" />

<select
id="booru-selector"
name="booru"
aria-label="Change the domain where the saved posts are shown"
@change="booruChangeListener"
>
<option value="all" selected>&lt;All&gt;</option>

<template v-for="booru in availableBoorusWithSavedPosts">
<option :value="booru" :key="booru" :selected="selectedBooru === booru">
{{ booru }}
</option>
</template>
</select>

<ul class="mt-4 space-y-4">
<!-- TODO: separate with title if they are from different boorus -->
<!-- TODO: use the same booru by the default that is active -->

<template v-if="savedPostsFromCurrentBooru.length">
<li v-for="post in savedPostsFromCurrentBooru" :key="post.data.id">
<template v-if="savedPostsFromSelectedBooru.length">
<li v-for="POST in savedPostsFromSelectedBooru" :key="POST.data.id">
<Post
:post-domain="getActiveBooru.domain"
:post-data="post.data"
:post-domain="POST.meta_data.booru_domain"
:post-data="POST.data"
:view-only="true"
/>
</li>
Expand Down

0 comments on commit 65f6aa4

Please sign in to comment.