Commit 2aff10f1 authored by Nathan Friend's avatar Nathan Friend

Merge branch...

Merge branch '241926-remove-v-html-from-app-assets-javascripts-releases-components-app_edit_new-vue' into 'master'

Replace v-html with gl-sprintf in app/assets/javascripts/releases/components/app_edit_new.vue

Closes #241926

See merge request gitlab-org/gitlab!41508
parents 5f5c0dae dd3463d0
<script>
/* eslint-disable vue/no-v-html */
import { mapState, mapActions, mapGetters } from 'vuex';
import { GlButton, GlFormInput, GlFormGroup } from '@gitlab/ui';
import { __, sprintf } from '~/locale';
import { GlButton, GlFormInput, GlFormGroup, GlSprintf } from '@gitlab/ui';
import { __ } from '~/locale';
import MarkdownField from '~/vue_shared/components/markdown/field.vue';
import { BACK_URL_PARAM } from '~/releases/constants';
import { getParameterByName } from '~/lib/utils/common_utils';
......@@ -17,6 +16,7 @@ export default {
GlFormInput,
GlFormGroup,
GlButton,
GlSprintf,
MarkdownField,
AssetLinksForm,
MilestoneCombobox,
......@@ -41,18 +41,6 @@ export default {
showForm() {
return Boolean(!this.isFetchingRelease && !this.fetchError && this.release);
},
subtitleText() {
return sprintf(
__(
'Releases are based on Git tags. We recommend tags that use semantic versioning, for example %{codeStart}v1.0%{codeEnd}, %{codeStart}v2.0-pre%{codeEnd}.',
),
{
codeStart: '<code>',
codeEnd: '</code>',
},
false,
);
},
releaseTitle: {
get() {
return this.$store.state.detail.release.name;
......@@ -127,7 +115,19 @@ export default {
</script>
<template>
<div class="d-flex flex-column">
<p class="pt-3 js-subtitle-text" v-html="subtitleText"></p>
<p class="pt-3 js-subtitle-text">
<gl-sprintf
:message="
__(
'Releases are based on Git tags. We recommend tags that use semantic versioning, for example %{codeStart}v1.0%{codeEnd}, %{codeStart}v2.0-pre%{codeEnd}.',
)
"
>
<template #code="{ content }">
<code>{{ content }}</code>
</template>
</gl-sprintf>
</p>
<form v-if="showForm" class="js-quick-submit" @submit.prevent="submitForm">
<tag-field />
<gl-form-group>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment