diff options
author | Phil Hughes <me@iamphill.com> | 2018-03-20 17:12:48 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-03-20 17:12:48 +0300 |
commit | f527e6e1855f30cf5ca5cb834b2d20438299a70e (patch) | |
tree | 9d5dd3e33f86cf43c0b445822341896e20027f94 /app/assets/javascripts/ide/components/repo_file_status_icon.vue | |
parent | 68b914c9371e6e3fffc6afde23ca77a77ca688f2 (diff) |
Move IDE to CE
This also makes the IDE generally available
Diffstat (limited to 'app/assets/javascripts/ide/components/repo_file_status_icon.vue')
-rw-r--r-- | app/assets/javascripts/ide/components/repo_file_status_icon.vue | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/app/assets/javascripts/ide/components/repo_file_status_icon.vue b/app/assets/javascripts/ide/components/repo_file_status_icon.vue new file mode 100644 index 00000000000..25d311142d5 --- /dev/null +++ b/app/assets/javascripts/ide/components/repo_file_status_icon.vue @@ -0,0 +1,39 @@ +<script> + import icon from '~/vue_shared/components/icon.vue'; + import tooltip from '~/vue_shared/directives/tooltip'; + import '~/lib/utils/datetime_utility'; + + export default { + components: { + icon, + }, + directives: { + tooltip, + }, + props: { + file: { + type: Object, + required: true, + }, + }, + computed: { + lockTooltip() { + return `Locked by ${this.file.file_lock.user.name}`; + }, + }, + }; +</script> + +<template> + <span + v-if="file.file_lock" + v-tooltip + :title="lockTooltip" + data-container="body" + > + <icon + name="lock" + css-classes="file-status-icon" + /> + </span> +</template> |