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

47 lines
794 B
Vue
Raw Normal View History

2017-08-17 22:00:37 +05:30
<script>
2018-03-17 18:26:18 +05:30
/**
* Renders a terminal button to open a web terminal.
* Used in environments table.
*/
import terminalIconSvg from 'icons/_icon_terminal.svg';
import tooltip from '../../vue_shared/directives/tooltip';
2017-08-17 22:00:37 +05:30
2018-03-17 18:26:18 +05:30
export default {
directives: {
tooltip,
2017-08-17 22:00:37 +05:30
},
2018-03-17 18:26:18 +05:30
props: {
terminalPath: {
type: String,
required: false,
default: '',
},
},
2017-09-10 17:25:29 +05:30
2018-03-17 18:26:18 +05:30
data() {
return {
terminalIconSvg,
};
},
2017-08-17 22:00:37 +05:30
2018-03-17 18:26:18 +05:30
computed: {
title() {
return 'Terminal';
},
2017-08-17 22:00:37 +05:30
},
2018-03-17 18:26:18 +05:30
};
2017-08-17 22:00:37 +05:30
</script>
<template>
<a
2017-09-10 17:25:29 +05:30
v-tooltip
class="btn terminal-button hidden-xs hidden-sm"
2017-08-17 22:00:37 +05:30
data-container="body"
:title="title"
:aria-label="title"
:href="terminalPath"
2018-03-17 18:26:18 +05:30
v-html="terminalIconSvg"
>
2017-08-17 22:00:37 +05:30
</a>
</template>