debian-mirror-gitlab/app/assets/javascripts/environments/components/environment_external_url.vue
2023-07-09 08:55:56 +05:30

41 lines
799 B
Vue

<script>
import { GlTooltipDirective, GlButton } from '@gitlab/ui';
import { s__ } from '~/locale';
/**
* Renders the external url link in environments table.
*/
export default {
components: {
GlButton,
},
directives: {
GlTooltip: GlTooltipDirective,
},
props: {
externalUrl: {
type: String,
required: true,
},
},
i18n: {
title: s__('Environments|Open live environment'),
open: s__('Environments|Open'),
},
};
</script>
<template>
<gl-button
v-gl-tooltip
:title="$options.i18n.title"
:aria-label="$options.i18n.title"
:href="externalUrl"
is-unsafe-link
class="external-url"
target="_blank"
icon="external-link"
rel="noopener noreferrer nofollow"
>
{{ $options.i18n.open }}
</gl-button>
</template>