mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-03-07 15:31:00 +08:00
Add a message to the changelog validation rules (#1201)
This commit is contained in:
parent
e68d0508ae
commit
8c89a5d460
@ -24,6 +24,7 @@ const props = withDefaults(
|
||||
rules?: ValidationRule<string | undefined>[];
|
||||
noPaddingTop?: boolean;
|
||||
maxHeight?: string;
|
||||
label?: string;
|
||||
}>(),
|
||||
{
|
||||
maxlength: 30_000,
|
||||
@ -52,7 +53,7 @@ const internalEditing = computed({
|
||||
});
|
||||
|
||||
const errorMessages = computed(() => props.errorMessages);
|
||||
const { v, errors } = useValidation(undefined, props.rules, rawEdited, errorMessages);
|
||||
const { v, errors } = useValidation(props.label, props.rules, rawEdited, errorMessages);
|
||||
|
||||
if (process.client && props.editing) {
|
||||
onMounted(startEditing);
|
||||
|
@ -15,6 +15,7 @@ const props = withDefaults(
|
||||
rules?: ValidationRule<string | undefined>[];
|
||||
noPaddingTop?: boolean;
|
||||
maxHeight?: string;
|
||||
label?: string;
|
||||
}>(),
|
||||
{
|
||||
maxlength: 30_000,
|
||||
|
@ -15,6 +15,7 @@ import { useErrorRedirect } from "~/composables/useErrorRedirect";
|
||||
import TagComponent from "~/components/Tag.vue";
|
||||
import { hasPerms } from "~/composables/usePerm";
|
||||
import Button from "~/components/design/Button.vue";
|
||||
import { required } from "~/composables/useValidationHelpers";
|
||||
|
||||
import { MarkdownEditor } from "#components";
|
||||
import Markdown from "~/components/Markdown.vue";
|
||||
@ -184,6 +185,7 @@ async function restoreVersion() {
|
||||
:deletable="false"
|
||||
:cancellable="true"
|
||||
:saveable="true"
|
||||
:rules="[required()]"
|
||||
@save="savePage"
|
||||
/>
|
||||
<template #fallback>
|
||||
|
@ -407,7 +407,7 @@ useHead(useSeo(i18n.t("version.new.title") + " | " + props.project.name, props.p
|
||||
<ClientOnly>
|
||||
<MarkdownEditor
|
||||
ref="descriptionEditor"
|
||||
:title="t('version.new.form.release.bulletin')"
|
||||
:label="t('version.new.form.release.bulletin')"
|
||||
:raw="descriptionToLoad"
|
||||
editing
|
||||
no-padding-top
|
||||
|
Loading…
Reference in New Issue
Block a user