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

45 lines
791 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.
*/
2018-10-15 14:42:47 +05:30
import Icon from '~/vue_shared/components/icon.vue';
2018-03-17 18:26:18 +05:30
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 {
2018-10-15 14:42:47 +05:30
components: {
Icon,
},
2018-03-17 18:26:18 +05:30
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: '',
},
},
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
2017-08-17 22:00:37 +05:30
:title="title"
:aria-label="title"
:href="terminalPath"
2018-11-08 19:23:39 +05:30
class="btn terminal-button d-none d-sm-none d-md-block"
data-container="body"
2018-03-17 18:26:18 +05:30
>
2018-10-15 14:42:47 +05:30
<icon
:size="12"
2018-11-08 19:23:39 +05:30
name="terminal"
2018-10-15 14:42:47 +05:30
/>
2017-08-17 22:00:37 +05:30
</a>
</template>