Welcome to mirror list, hosted at ThFree Co, Russian Federation.

repo_file_status_icon.vue « components « ide « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 25d311142d54200e15843ab1e954c84d42308376 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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>