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

token.vue « components « access_tokens « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 23803e82476e5786a774b20d1f2b87352bc15cf9 (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
<script>
import InputCopyToggleVisibility from '~/vue_shared/components/form/input_copy_toggle_visibility.vue';

export default {
  components: { InputCopyToggleVisibility },
  props: {
    token: {
      type: String,
      required: true,
    },
    inputId: {
      type: String,
      required: true,
    },
    inputLabel: {
      type: String,
      required: true,
    },
    copyButtonTitle: {
      type: String,
      required: true,
    },
  },
  computed: {
    formInputGroupProps() {
      return { id: this.inputId };
    },
  },
};
</script>

<template>
  <div>
    <h4 class="gl-my-0"><slot name="title"></slot></h4>
    <slot name="description"></slot>
    <input-copy-toggle-visibility
      :label="inputLabel"
      :label-for="inputId"
      :form-input-group-props="formInputGroupProps"
      :value="token"
      :copy-button-title="copyButtonTitle"
    >
      <template #description>
        <slot name="input-description"></slot>
      </template>
    </input-copy-toggle-visibility>
  </div>
</template>