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

file_row_header.vue « components « vue_shared « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2c3e2a3a4337fb91a9d7fed5d71efbabd2fe7cd8 (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
<script>
import { truncatePathMiddleToLength } from '~/lib/utils/text_utility';

const MAX_PATH_LENGTH = 40;

export default {
  props: {
    path: {
      type: String,
      required: true,
    },
  },
  computed: {
    truncatedPath() {
      return truncatePathMiddleToLength(this.path, MAX_PATH_LENGTH);
    },
  },
};
</script>

<template>
  <div class="file-row-header bg-white sticky-top p-2 js-file-row-header" :title="path">
    <span class="bold">{{ truncatedPath }}</span>
  </div>
</template>