mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 08:28:20 +01:00
fix: 🐛 Update Emoji types
This commit is contained in:
parent
e50a6d6f2b
commit
0fe13cbeee
|
|
@ -25,7 +25,7 @@ import Icon from "~/packages/ui/components/icons/icon.vue";
|
||||||
import GridItem from "./grid-item.vue";
|
import GridItem from "./grid-item.vue";
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
emojis: (Emoji & { id: string; global: boolean })[];
|
emojis: Emoji[];
|
||||||
name: string;
|
name: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,21 +23,14 @@ import TextInput from "~/components/inputs/text-input.vue";
|
||||||
import Category from "./category.vue";
|
import Category from "./category.vue";
|
||||||
|
|
||||||
const emojis = computed(() =>
|
const emojis = computed(() =>
|
||||||
(
|
((identity.value?.emojis as Emoji[] | undefined) ?? []).filter((emoji) =>
|
||||||
(identity.value?.emojis as
|
|
||||||
| (Emoji & { id: string; global: boolean })[]
|
|
||||||
| undefined) ?? []
|
|
||||||
).filter((emoji) =>
|
|
||||||
emoji.shortcode.toLowerCase().includes(search.value.toLowerCase()),
|
emoji.shortcode.toLowerCase().includes(search.value.toLowerCase()),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
const search = ref("");
|
const search = ref("");
|
||||||
|
|
||||||
const categories = computed(() => {
|
const categories = computed(() => {
|
||||||
const categories = new Map<
|
const categories = new Map<string, Emoji[]>();
|
||||||
string,
|
|
||||||
(Emoji & { id: string; global: boolean })[]
|
|
||||||
>();
|
|
||||||
for (const emoji of emojis.value) {
|
for (const emoji of emojis.value) {
|
||||||
if (!emoji.category) {
|
if (!emoji.category) {
|
||||||
if (!categories.has("Uncategorized")) {
|
if (!categories.has("Uncategorized")) {
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,6 @@ import AdaptiveDropdown from "~/components/dropdowns/AdaptiveDropdown.vue";
|
||||||
import Button from "~/packages/ui/components/buttons/button.vue";
|
import Button from "~/packages/ui/components/buttons/button.vue";
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
emoji: Emoji & { id: string; global: boolean };
|
emoji: Emoji;
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -12,6 +12,6 @@ import Avatar from "~/components/avatars/avatar.vue";
|
||||||
import GridItemMenu from "./grid-item-menu.vue";
|
import GridItemMenu from "./grid-item-menu.vue";
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
emoji: Emoji & { id: string; global: boolean };
|
emoji: Emoji;
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
"@tailwindcss/typography": "^0.5.15",
|
"@tailwindcss/typography": "^0.5.15",
|
||||||
"@vee-validate/nuxt": "^4.14.7",
|
"@vee-validate/nuxt": "^4.14.7",
|
||||||
"@vee-validate/zod": "^4.14.7",
|
"@vee-validate/zod": "^4.14.7",
|
||||||
"@versia/client": "^0.1.1",
|
"@versia/client": "^0.1.2",
|
||||||
"@vite-pwa/nuxt": "^0.10.6",
|
"@vite-pwa/nuxt": "^0.10.6",
|
||||||
"@vueuse/core": "^12.0.0",
|
"@vueuse/core": "^12.0.0",
|
||||||
"@vueuse/nuxt": "^12.0.0",
|
"@vueuse/nuxt": "^12.0.0",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue