-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add filter select + base settings sheet
- Loading branch information
Showing
13 changed files
with
303 additions
and
64 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<script setup lang="ts"> | ||
import { computed, reactive } from 'vue'; | ||
import { useLocalStorage } from '@vueuse/core'; | ||
import { useI18n } from 'vue-i18n'; | ||
import { UiSelect } from '@/shared/ui'; | ||
const { t, locale } = useI18n(); | ||
const filterStore = useLocalStorage('kanban-sort-condition', 'all'); | ||
const options = reactive([ | ||
{ name: `📄 ${t('kanban.sorting.all')}`, value: 'all' }, | ||
{ name: `💬 ${t('kanban.sorting.activity')}`, value: 'activity' }, | ||
{ name: `👥 ${t('kanban.sorting.workload')}`, value: 'workload' } | ||
]); | ||
const filter = computed({ | ||
get() { | ||
const selected = options.find((option) => option.value === filterStore.value); | ||
return selected && selected.name; | ||
}, | ||
set(newValue) { | ||
const selected = options.find((option) => option.name === newValue); | ||
if (selected) { | ||
filterStore.value = selected.value; | ||
} | ||
} | ||
}); | ||
const width = computed(() => (locale.value === 'ru-RU' ? '168px' : '152px')); | ||
</script> | ||
|
||
<template> | ||
<UiSelect v-model="filter" :options="options" :class="$style.filter_tasks" /> | ||
</template> | ||
|
||
<style module lang="scss"> | ||
.filter_tasks { | ||
position: relative; | ||
height: 30px; | ||
width: v-bind('width'); | ||
border: 1px dashed var(--zinc-200); | ||
} | ||
:global(html.dark) { | ||
.filter_tasks { | ||
border: 1px dashed var(--zinc-600); | ||
background-color: transparent; | ||
} | ||
} | ||
</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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.