Commit dd3463d0 authored by Takuya Noguchi's avatar Takuya Noguchi

Replace v-html with gl-sprintf in releases/.../app_edit_new.vue

Signed-off-by: default avatarTakuya Noguchi <takninnovationresearch@gmail.com>
parent 117df1e9
<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