summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/sidebar/components/time_tracking/spent_only_pane.vue
blob: b2b3b289c5c45b117f751753c19d79b37d35d656 (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>
/* eslint-disable vue/no-v-html */
import { sprintf, s__ } from '~/locale';

export default {
  name: 'TimeTrackingSpentOnlyPane',
  props: {
    timeSpentHumanReadable: {
      type: String,
      required: true,
    },
  },
  computed: {
    timeSpent() {
      return sprintf(
        s__('TimeTracking|%{startTag}Spent: %{endTag}%{timeSpentHumanReadable}'),
        {
          startTag: '<span class="bold">',
          endTag: '</span>',
          timeSpentHumanReadable: this.timeSpentHumanReadable,
        },
        false,
      );
    },
  },
};
</script>

<template>
  <div class="time-tracking-spend-only-pane" v-html="timeSpent"></div>
</template>