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

lfs_viewer.vue « blob_viewers « components « repository « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6dc7e10662ee0f5f3cf6325ba9e0e910b80a3574 (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
<script>
import { GlLink, GlSprintf } from '@gitlab/ui';
import { __ } from '~/locale';

export default {
  i18n: {
    lfsText: __(
      'This content could not be displayed because it is stored in LFS. You can %{linkStart}download it%{linkEnd} instead.',
    ),
  },
  components: {
    GlLink,
    GlSprintf,
  },
  props: {
    blob: {
      type: Object,
      required: true,
    },
  },
  data() {
    return {
      fileName: this.blob.name,
      filePath: this.blob.rawPath,
    };
  },
};
</script>

<template>
  <div class="gl-text-center gl-py-13 gl-bg-gray-50" data-type="lfs">
    <gl-sprintf :message="$options.i18n.lfsText">
      <template #link="{ content }">
        <gl-link :href="filePath" :download="fileName" target="_blank">{{ content }}</gl-link>
      </template>
    </gl-sprintf>
  </div>
</template>