debian-mirror-gitlab/app/assets/javascripts/environments/components/environment_external_url.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
780 B
Vue
Raw Normal View History

2017-08-17 22:00:37 +05:30
<script>
2020-10-24 23:57:45 +05:30
import { GlTooltipDirective, GlButton } from '@gitlab/ui';
2019-02-15 15:39:39 +05:30
import { s__ } from '~/locale';
2017-09-10 17:25:29 +05:30
2018-11-18 11:00:15 +05:30
/**
* Renders the external url link in environments table.
*/
export default {
components: {
2020-10-24 23:57:45 +05:30
GlButton,
2018-11-18 11:00:15 +05:30
},
directives: {
2019-02-15 15:39:39 +05:30
GlTooltip: GlTooltipDirective,
2018-11-18 11:00:15 +05:30
},
props: {
externalUrl: {
type: String,
required: true,
2018-10-15 14:42:47 +05:30
},
2018-11-18 11:00:15 +05:30
},
2021-11-18 22:05:49 +05:30
i18n: {
title: s__('Environments|Open live environment'),
open: s__('Environments|Open'),
2018-11-18 11:00:15 +05:30
},
};
2017-08-17 22:00:37 +05:30
</script>
<template>
2020-10-24 23:57:45 +05:30
<gl-button
2019-02-15 15:39:39 +05:30
v-gl-tooltip
2021-11-18 22:05:49 +05:30
:title="$options.i18n.title"
:aria-label="$options.i18n.title"
2018-11-08 19:23:39 +05:30
:href="externalUrl"
2020-10-24 23:57:45 +05:30
class="external-url"
2017-08-17 22:00:37 +05:30
target="_blank"
2020-10-24 23:57:45 +05:30
icon="external-link"
2017-08-17 22:00:37 +05:30
rel="noopener noreferrer nofollow"
2021-11-18 22:05:49 +05:30
>
{{ $options.i18n.open }}
</gl-button>
2017-08-17 22:00:37 +05:30
</template>