titlebar.vue 1.19 KB
Newer Older
schneider210's avatar
schneider210 committed
1
<template>
nwindis's avatar
nwindis committed
2
  <div>
3
4
5
6
7
    <h1
      v-if="collectiontitle"
      class="text-h5 text-bold text-uppercase q-mb-none q-mt-xs"
    >
      {{ collectiontitle }}
nwindis's avatar
nwindis committed
8
    </h1>
9

10
    <h2 class="text-h6 text-bold text-uppercase q-mt-none q-mb-none">
nwindis's avatar
nwindis committed
11
      <span>{{ manifesttitle }}</span>
12

nwindis's avatar
nwindis committed
13
      <q-icon
nwindis's avatar
nwindis committed
14
        class="q-pb-xs q-pl-sm q-pr-sm"
15
        size="xs"
nwindis's avatar
nwindis committed
16
17
        :color="$q.dark.isActive ? 'white' : 'accent'"
        :name="fasChevronRight"
nwindis's avatar
nwindis committed
18
      />
19

20
      <span>{{ $t('Sheet') }} {{ item.n }}</span>
nwindis's avatar
nwindis committed
21
    </h2>
22
  </div>
schneider210's avatar
schneider210 committed
23
24
25
</template>

<script>
26
27
import { fasChevronRight } from '@quasar/extras/fontawesome-v5';

schneider210's avatar
schneider210 committed
28
export default {
29
  name: 'Titlebar',
schneider210's avatar
schneider210 committed
30
  props: {
schneider210's avatar
schneider210 committed
31
32
33
34
    collectiontitle: {
      type: String,
      default: () => '',
    },
35
36
37
    item: {
      type: Object,
      default: () => {},
schneider210's avatar
schneider210 committed
38
39
40
41
42
    },
    manifests: {
      type: Array,
      default: () => [],
    },
schneider210's avatar
schneider210 committed
43
44
45
46
47
48
49
50
51
52
53
  },
  data() {
    return {
      sequenceindex: 0,
    };
  },
  computed: {
    manifesttitle() {
      return this.manifests[this.sequenceindex].label;
    },
  },
54
55
56
  created() {
    this.fasChevronRight = fasChevronRight;
  },
schneider210's avatar
schneider210 committed
57
  mounted() {
58
59
    this.$root.$on('update-sequence-index', (index) => {
      this.sequenceindex = index;
schneider210's avatar
schneider210 committed
60
61
62
63
    });
  },
};
</script>