Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4b263d80
Commit
4b263d80
authored
Sep 11, 2020
by
Kev
Committed by
Natalia Tepluhina
Sep 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace v-html with v-safe-html in no_changes.vue
parent
b6e5b641
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
20 deletions
+16
-20
app/assets/javascripts/diffs/components/no_changes.vue
app/assets/javascripts/diffs/components/no_changes.vue
+10
-19
changelogs/unreleased/241867-Replace-v-html.yml
changelogs/unreleased/241867-Replace-v-html.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+1
-1
No files found.
app/assets/javascripts/diffs/components/no_changes.vue
View file @
4b263d80
<
script
>
<
script
>
/* eslint-disable vue/no-v-html */
import
{
mapGetters
}
from
'
vuex
'
;
import
{
mapGetters
}
from
'
vuex
'
;
import
{
escape
}
from
'
lodash
'
;
import
{
GlButton
,
GlSprintf
}
from
'
@gitlab/ui
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
{
__
,
sprintf
}
from
'
~/locale
'
;
export
default
{
export
default
{
components
:
{
components
:
{
GlButton
,
GlButton
,
GlSprintf
,
},
},
props
:
{
props
:
{
changesEmptyStateIllustration
:
{
changesEmptyStateIllustration
:
{
...
@@ -17,20 +15,6 @@ export default {
...
@@ -17,20 +15,6 @@ export default {
},
},
computed
:
{
computed
:
{
...
mapGetters
([
'
getNoteableData
'
]),
...
mapGetters
([
'
getNoteableData
'
]),
emptyStateText
()
{
return
sprintf
(
__
(
'
No changes between %{ref_start}%{source_branch}%{ref_end} and %{ref_start}%{target_branch}%{ref_end}
'
,
),
{
ref_start
:
'
<span class="ref-name">
'
,
ref_end
:
'
</span>
'
,
source_branch
:
escape
(
this
.
getNoteableData
.
source_branch
),
target_branch
:
escape
(
this
.
getNoteableData
.
target_branch
),
},
false
,
);
},
},
},
};
};
</
script
>
</
script
>
...
@@ -42,7 +26,14 @@ export default {
...
@@ -42,7 +26,14 @@ export default {
</div>
</div>
<div
class=
"col-12"
>
<div
class=
"col-12"
>
<div
class=
"text-content text-center"
>
<div
class=
"text-content text-center"
>
<span
v-html=
"emptyStateText"
></span>
<gl-sprintf
:message=
"__('No changes between %
{sourceBranch} and %{targetBranch}')">
<template
#sourceBranch
>
<span
class=
"ref-name"
>
{{
getNoteableData
.
source_branch
}}
</span>
</
template
>
<
template
#targetBranch
>
<span
class=
"ref-name"
>
{{
getNoteableData
.
target_branch
}}
</span>
</
template
>
</gl-sprintf>
<div
class=
"text-center"
>
<div
class=
"text-center"
>
<gl-button
:href=
"getNoteableData.new_blob_path"
variant=
"success"
category=
"primary"
>
{{
<gl-button
:href=
"getNoteableData.new_blob_path"
variant=
"success"
category=
"primary"
>
{{
__('Create commit')
__('Create commit')
...
...
changelogs/unreleased/241867-Replace-v-html.yml
0 → 100644
View file @
4b263d80
---
title
:
Replace v-html with v-safe-html in no_changes.vue
merge_request
:
41471
author
:
Kev @KevSlashNull
type
:
other
locale/gitlab.pot
View file @
4b263d80
...
@@ -16780,7 +16780,7 @@ msgstr ""
...
@@ -16780,7 +16780,7 @@ msgstr ""
msgid "No changes"
msgid "No changes"
msgstr ""
msgstr ""
msgid "No changes between %{
ref_start}%{source_branch}%{ref_end} and %{ref_start}%{target_branch}%{ref_end
}"
msgid "No changes between %{
sourceBranch} and %{targetBranch
}"
msgstr ""
msgstr ""
msgid "No child epics match applied filters"
msgid "No child epics match applied filters"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment