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

sketch_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: b48af02e541b5b6e62eb571f8d5fea4ee6abb744 (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
<script>
import { GlLoadingIcon } from '@gitlab/ui';
import SketchLoader from '~/blob/sketch';

export default {
  components: {
    GlLoadingIcon,
  },
  props: {
    blob: {
      type: Object,
      required: true,
    },
  },
  data() {
    return {
      url: this.blob.rawPath,
    };
  },
  mounted() {
    // eslint-disable-next-line no-new
    new SketchLoader(this.$refs.viewer);
  },
};
</script>

<template>
  <div ref="viewer" class="file-content" :data-endpoint="url" data-testid="sketch">
    <gl-loading-icon class="my-4 js-loading-icon" size="lg" />
  </div>
</template>