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";
|
||||
|
||||
defineProps<{
|
||||
emojis: (Emoji & { id: string; global: boolean })[];
|
||||
emojis: Emoji[];
|
||||
name: string;
|
||||
}>();
|
||||
|
||||
|
|
|
|||
|
|
@ -23,21 +23,14 @@ import TextInput from "~/components/inputs/text-input.vue";
|
|||
import Category from "./category.vue";
|
||||
|
||||
const emojis = computed(() =>
|
||||
(
|
||||
(identity.value?.emojis as
|
||||
| (Emoji & { id: string; global: boolean })[]
|
||||
| undefined) ?? []
|
||||
).filter((emoji) =>
|
||||
((identity.value?.emojis as Emoji[] | undefined) ?? []).filter((emoji) =>
|
||||
emoji.shortcode.toLowerCase().includes(search.value.toLowerCase()),
|
||||
),
|
||||
);
|
||||
const search = ref("");
|
||||
|
||||
const categories = computed(() => {
|
||||
const categories = new Map<
|
||||
string,
|
||||
(Emoji & { id: string; global: boolean })[]
|
||||
>();
|
||||
const categories = new Map<string, Emoji[]>();
|
||||
for (const emoji of emojis.value) {
|
||||
if (!emoji.category) {
|
||||
if (!categories.has("Uncategorized")) {
|
||||
|
|
|
|||
|
|
@ -28,6 +28,6 @@ import AdaptiveDropdown from "~/components/dropdowns/AdaptiveDropdown.vue";
|
|||
import Button from "~/packages/ui/components/buttons/button.vue";
|
||||
|
||||
defineProps<{
|
||||
emoji: Emoji & { id: string; global: boolean };
|
||||
emoji: Emoji;
|
||||
}>();
|
||||
</script>
|
||||
|
|
@ -12,6 +12,6 @@ import Avatar from "~/components/avatars/avatar.vue";
|
|||
import GridItemMenu from "./grid-item-menu.vue";
|
||||
|
||||
defineProps<{
|
||||
emoji: Emoji & { id: string; global: boolean };
|
||||
emoji: Emoji;
|
||||
}>();
|
||||
</script>
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
"@tailwindcss/typography": "^0.5.15",
|
||||
"@vee-validate/nuxt": "^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",
|
||||
"@vueuse/core": "^12.0.0",
|
||||
"@vueuse/nuxt": "^12.0.0",
|
||||
|
|
|
|||
Loading…
Reference in a new issue