summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/sidebar/components/time_tracking/help_state.vue
blob: 19ec0f05a266f3765cfa67c1f834d828e99ca727 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<script>
import { sprintf, s__ } from '../../../locale';

export default {
  name: 'TimeTrackingHelpState',
  props: {
    rootPath: {
      type: String,
      required: true,
    },
  },
  computed: {
    href() {
      return `${this.rootPath}help/workflow/time_tracking.md`;
    },
    estimateText() {
      return sprintf(
        s__('estimateCommand|%{slash_command} will update the estimated time with the latest command.'), {
          slash_command: '<code>/estimate</code>',
        }, false,
      );
    },
    spendText() {
      return sprintf(
        s__('spendCommand|%{slash_command} will update the sum of the time spent.'), {
          slash_command: '<code>/spend</code>',
        }, false,
      );
    },
  },
};
</script>

<template>
  <div class="time-tracking-help-state">
    <div class="time-tracking-info">
      <h4>
        {{ __('Track time with quick actions') }}
      </h4>
      <p>
        {{ __('Quick actions can be used in the issues description and comment boxes.') }}
      </p>
      <p v-html="estimateText">
      </p>
      <p v-html="spendText">
      </p>
      <a
        :href="href"
        class="btn btn-default learn-more-button"
      >
        {{ __('Learn more') }}
      </a>
    </div>
  </div>
</template>