Skip to content

Commit 4a1f684

Browse files
committed
fix: 🐛 Misc fixes
1 parent 643dd17 commit 4a1f684

File tree

3 files changed

+21
-20
lines changed

3 files changed

+21
-20
lines changed

app.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ useSeoMeta({
5353
return titleChunk ? `${titleChunk} · Versia` : "Versia";
5454
},
5555
title: computed(() => instance.value?.title ?? ""),
56-
ogImage: computed(() => instance.value?.banner.url),
56+
ogImage: computed(() => instance.value?.banner?.url),
5757
twitterTitle: computed(() => instance.value?.title ?? ""),
5858
twitterDescription: computed(() =>
5959
convert(description.value?.content ?? ""),
6060
),
61-
twitterImage: computed(() => instance.value?.banner.url),
61+
twitterImage: computed(() => instance.value?.banner?.url),
6262
description: computed(() => convert(description.value?.content ?? "")),
6363
ogDescription: computed(() => convert(description.value?.content ?? "")),
6464
ogSiteName: "Versia",

components/preferences/emojis/uploader.vue

+16-16
Original file line numberDiff line numberDiff line change
@@ -163,26 +163,25 @@ const formSchema = toTypedSchema(
163163
.refine(
164164
(v) =>
165165
v.size <=
166-
// @ts-expect-error Types aren't updated with this new value yet
167166
(identity.value?.instance.configuration.emojis
168-
.emoji_size_limit ?? 0),
167+
.emoji_size_limit ?? Number.POSITIVE_INFINITY),
169168
m.orange_weird_parakeet_hug({
170-
// @ts-expect-error Types aren't updated with this new value yet
171-
count: identity.value?.instance.configuration.emojis
172-
.emoji_size_limit,
169+
count:
170+
identity.value?.instance.configuration.emojis
171+
.emoji_size_limit ?? Number.POSITIVE_INFINITY,
173172
}),
174173
),
175174
shortcode: z
176175
.string()
177176
.min(1)
178177
.max(
179-
// @ts-expect-error Types aren't updated with this new value yet
180178
identity.value?.instance.configuration.emojis
181-
.max_emoji_shortcode_characters,
179+
.max_emoji_shortcode_characters ?? Number.POSITIVE_INFINITY,
182180
m.solid_inclusive_owl_hug({
183-
// @ts-expect-error Types aren't updated with this new value yet
184-
count: identity.value?.instance.configuration.emojis
185-
.max_emoji_shortcode_characters,
181+
count:
182+
identity.value?.instance.configuration.emojis
183+
.max_emoji_shortcode_characters ??
184+
Number.POSITIVE_INFINITY,
186185
}),
187186
)
188187
.regex(emojiValidator),
@@ -199,13 +198,14 @@ const formSchema = toTypedSchema(
199198
alt: z
200199
.string()
201200
.max(
202-
// @ts-expect-error Types aren't updated with this new value yet
203201
identity.value?.instance.configuration.emojis
204-
.max_emoji_description_characters,
202+
.max_emoji_description_characters ??
203+
Number.POSITIVE_INFINITY,
205204
m.key_ago_hound_emerge({
206-
// @ts-expect-error Types aren't updated with this new value yet
207-
count: identity.value?.instance.configuration.emojis
208-
.max_emoji_description_characters,
205+
count:
206+
identity.value?.instance.configuration.emojis
207+
.max_emoji_description_characters ??
208+
Number.POSITIVE_INFINITY,
209209
}),
210210
)
211211
.optional(),
@@ -242,4 +242,4 @@ const submit = handleSubmit(async (values) => {
242242
toast.dismiss(id);
243243
}
244244
});
245-
</script>
245+
</script>

components/preferences/profile/editor.vue

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<FormControl>
2525
<ImageUploader v-model:image="identity.account.avatar" @submit-file="file => setValue(file)" @submit-url="url => setValue(url)" />
2626
</FormControl>
27+
<FormMessage />
2728
</FormItem>
2829
</FormField>
2930

@@ -195,7 +196,7 @@ const formSchema = toTypedSchema(
195196
(v) =>
196197
v.size <=
197198
(identity.value?.instance.configuration.accounts
198-
.header_size_limit ?? 0),
199+
.header_size_limit ?? Number.POSITIVE_INFINITY),
199200
m.civil_icy_ant_mend({
200201
size: identity.value?.instance.configuration.accounts
201202
.header_size_limit,
@@ -208,7 +209,7 @@ const formSchema = toTypedSchema(
208209
(v) =>
209210
v.size <=
210211
(identity.value?.instance.configuration.accounts
211-
.avatar_size_limit ?? 0),
212+
.avatar_size_limit ?? Number.POSITIVE_INFINITY),
212213
m.zippy_caring_raven_edit({
213214
size: identity.value?.instance.configuration.accounts
214215
.avatar_size_limit,

0 commit comments

Comments
 (0)