diff --git a/components/LanguageSelector.vue b/components/LanguageSelector.vue index 523b8e4..496f8e1 100644 --- a/components/LanguageSelector.vue +++ b/components/LanguageSelector.vue @@ -107,7 +107,10 @@ import { ListboxOptions, } from "@headlessui/vue"; import { ChevronUpDownIcon } from "@heroicons/vue/16/solid"; -import { ArrowTopRightOnSquareIcon } from "@heroicons/vue/24/outline"; +import { + ArrowTopRightOnSquareIcon, + CheckIcon, +} from "@heroicons/vue/24/outline"; import type { Locale } from "vue-i18n"; const { locales, locale: currLocale, setLocale } = useI18n(); diff --git a/components/NewsArticleCreateButton.vue b/components/NewsArticleCreateButton.vue index efe9312..5925d03 100644 --- a/components/NewsArticleCreateButton.vue +++ b/components/NewsArticleCreateButton.vue @@ -193,6 +193,7 @@ {{ $t("news.article.submit") }} @@ -235,6 +236,13 @@ const newArticle = ref({ tags: [] as string[], }); +const isValidArticle = computed( + () => + newArticle.value.title && + newArticle.value.description && + newArticle.value.content, +); + const markdownPreview = computed(() => { // TODO: maybe?? add https://github.com/cure53/DOMPurify // micromark says its safe, but this is straight html we are injecting diff --git a/error.vue b/error.vue index 3e2e31a..94c0cf1 100644 --- a/error.vue +++ b/error.vue @@ -21,13 +21,18 @@ async function signIn() { redirect: `/auth/signin?redirect=${encodeURIComponent(route.fullPath)}`, }); } +switch (statusCode) { + case 401: + case 403: + await signIn(); +} useHead({ title: t("errors.pageTitle", [statusCode ?? message]), }); if (import.meta.client) { - console.log(props.error); + console.warn(props.error); } diff --git a/nuxt.config.ts b/nuxt.config.ts index c0eeb5b..f872521 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -254,5 +254,6 @@ export default defineNuxtConfig({ }, rateLimiter: false, xssValidator: false, + requestSizeLimiter: false, }, }); diff --git a/pages/account/notifications.vue b/pages/account/notifications.vue index 7f69106..2a60d6d 100644 --- a/pages/account/notifications.vue +++ b/pages/account/notifications.vue @@ -9,7 +9,7 @@