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

edit_form.vue « lock « components « sidebar « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c9e651370f9c7cd5f7ab8cf9d6c6ef4b959feff5 (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
56
57
58
59
<script>
import { GlSprintf } from '@gitlab/ui';
import EditFormButtons from './edit_form_buttons.vue';

export default {
  components: {
    EditFormButtons,
    GlSprintf,
  },
  props: {
    isLocked: {
      required: true,
      type: Boolean,
    },
    issuableDisplayName: {
      required: true,
      type: String,
    },
  },
};
</script>

<template>
  <div class="dropdown show">
    <div class="dropdown-menu sidebar-item-warning-message" data-testid="warning-text">
      <p v-if="isLocked" class="text">
        <gl-sprintf
          :message="
            __(
              'Unlock this %{issuableDisplayName}? %{strongStart}Everyone%{strongEnd} will be able to comment.',
            )
          "
        >
          <template #issuableDisplayName>{{ issuableDisplayName }}</template>
          <template #strong="{ content }"
            ><strong>{{ content }}</strong></template
          >
        </gl-sprintf>
      </p>

      <p v-else class="text">
        <gl-sprintf
          :message="
            __(
              'Lock this %{issuableDisplayName}? Only %{strongStart}project members%{strongEnd} will be able to comment.',
            )
          "
        >
          <template #issuableDisplayName>{{ issuableDisplayName }}</template>
          <template #strong="{ content }"
            ><strong>{{ content }}</strong></template
          >
        </gl-sprintf>
      </p>

      <edit-form-buttons :is-locked="isLocked" :issuable-display-name="issuableDisplayName" />
    </div>
  </div>
</template>