Combined fixes (#116)

* fix: missing CheckIcon import in LanguageSelector

* fix: #114 and error handling

* fix: #97

* fix: lint

* feat: #104

* fix: #72
This commit is contained in:
DecDuck
2025-06-10 10:08:01 +10:00
committed by GitHub
parent 60abc03091
commit 1bfdd73e4c
10 changed files with 53 additions and 47 deletions

View File

@ -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();

View File

@ -193,6 +193,7 @@
<LoadingButton
:loading="loading"
class="bg-blue-600 text-white hover:bg-blue-500"
:disabled="!isValidArticle"
@click="() => createArticle()"
>
{{ $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