Commit 736e7a6d authored by Fernando's avatar Fernando

Add tooltip to No Target text in corpus management

* Add text copy to tooltip

Changelog: added
parent 94120bc6
<script>
import { GlIcon } from '@gitlab/ui';
import { GlIcon, GlTooltipDirective } from '@gitlab/ui';
import { s__ } from '~/locale';
export default {
components: {
GlIcon,
},
directives: {
GlTooltip: GlTooltipDirective,
},
props: {
target: {
type: String,
......@@ -14,6 +17,7 @@ export default {
},
i18n: {
notSet: s__('CorpusManagement|Not Set'),
noSetInfo: s__('CorpusManagement|To use this corpus, edit the corresponding YAML file'),
},
computed: {
hasTarget() {
......@@ -24,7 +28,7 @@ export default {
</script>
<template>
<span v-if="hasTarget" class="gl-text-gray-900"> {{ target }} </span>
<span v-else class="gl-text-gray-900">
<span v-else v-gl-tooltip.hover class="gl-text-gray-900" :title="$options.i18n.noSetInfo">
<gl-icon class="gl-mr-1" :size="16" name="information-o" />
{{ this.$options.i18n.notSet }}
</span>
......
......@@ -11,6 +11,7 @@ exports[`Target component renders target 1`] = `
exports[`Target component without target renders Not Set with icon 1`] = `
<span
class="gl-text-gray-900"
title="To use this corpus, edit the corresponding YAML file"
>
<gl-icon-stub
class="gl-mr-1"
......
......@@ -9169,6 +9169,9 @@ msgstr ""
msgid "CorpusManagement|Target"
msgstr ""
msgid "CorpusManagement|To use this corpus, edit the corresponding YAML file"
msgstr ""
msgid "CorpusManagement|Total Size: %{totalSize}"
msgstr ""
......
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