-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support tag filters and pump to v0.1.1
- Loading branch information
Showing
12 changed files
with
125 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<script setup lang="ts"> | ||
import {ref} from 'vue' | ||
import Button from 'primevue/button' | ||
import Checkbox from 'primevue/checkbox' | ||
import TagInput from './TagInput.vue' | ||
const emit = defineEmits<{ | ||
(e: 'filter', value: { tags: string[], exclude: boolean }): void | ||
}>() | ||
let tags: string[] = [] | ||
let exclude = ref(false) | ||
</script> | ||
|
||
<template> | ||
<div class="tag-input-container"> | ||
<tag-input class="tag-input" | ||
placeholder="Enter tags and filter images" | ||
v-on:updateTags="x => tags = x"/> | ||
<checkbox v-model="exclude" :binary="true" inputId="image-filter-checkbox"/> | ||
<label for="image-filter-checkbox">exclude</label> | ||
<Button rounded v-on:click="emit('filter', {tags: tags, exclude: exclude})"> | ||
Filter | ||
</Button> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
.tag-input-container { | ||
display: flex; | ||
align-items: center; | ||
gap: 0.5em; | ||
} | ||
.tag-input { | ||
flex-grow: 1; | ||
} | ||
label { | ||
-webkit-user-select: none; /* Safari */ | ||
-ms-user-select: none; /* IE 10 and IE 11 */ | ||
user-select: none; /* Standard syntax */ | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters