diff options
Diffstat (limited to 'app/assets/javascripts/environments/components/environment_terminal_button.vue')
-rw-r--r-- | app/assets/javascripts/environments/components/environment_terminal_button.vue | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/app/assets/javascripts/environments/components/environment_terminal_button.vue b/app/assets/javascripts/environments/components/environment_terminal_button.vue new file mode 100644 index 00000000000..c8c1f17d4d8 --- /dev/null +++ b/app/assets/javascripts/environments/components/environment_terminal_button.vue @@ -0,0 +1,39 @@ +<script> +/** + * Renders a terminal button to open a web terminal. + * Used in environments table. + */ +import terminalIconSvg from 'icons/_icon_terminal.svg'; + +export default { + props: { + terminalPath: { + type: String, + required: false, + default: '', + }, + }, + + data() { + return { + terminalIconSvg, + }; + }, + + computed: { + title() { + return 'Terminal'; + }, + }, +}; +</script> +<template> + <a + class="btn terminal-button has-tooltip" + data-container="body" + :title="title" + :aria-label="title" + :href="terminalPath" + v-html="terminalIconSvg"> + </a> +</template> |