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

project_empty_state.vue « list_page « components « explorer « registry « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5aa04419ca077e5b451e0d7b9d5a4bb8e56dab19 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<script>
import { GlEmptyState, GlSprintf, GlLink, GlFormInputGroup, GlFormInput } from '@gitlab/ui';
import { s__ } from '~/locale';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import {
  COPY_LOGIN_TITLE,
  COPY_BUILD_TITLE,
  COPY_PUSH_TITLE,
  QUICK_START,
} from '../../constants/index';

export default {
  name: 'ProjectEmptyState',
  components: {
    ClipboardButton,
    GlEmptyState,
    GlSprintf,
    GlLink,
    GlFormInputGroup,
    GlFormInput,
  },
  inject: ['config', 'dockerBuildCommand', 'dockerPushCommand', 'dockerLoginCommand'],
  i18n: {
    quickStart: QUICK_START,
    copyLoginTitle: COPY_LOGIN_TITLE,
    copyBuildTitle: COPY_BUILD_TITLE,
    copyPushTitle: COPY_PUSH_TITLE,
    introText: s__(
      `ContainerRegistry|With the Container Registry, every project can have its own space to store its Docker images. %{docLinkStart}More Information%{docLinkEnd}`,
    ),
    notLoggedInMessage: s__(
      `ContainerRegistry|If you are not already logged in, you need to authenticate to the Container Registry by using your GitLab username and password. If you have %{twofaDocLinkStart}Two-Factor Authentication%{twofaDocLinkEnd} enabled, use a %{personalAccessTokensDocLinkStart}Personal Access Token%{personalAccessTokensDocLinkEnd} instead of a password.`,
    ),
    addImageText: s__(
      'ContainerRegistry|You can add an image to this registry with the following commands:',
    ),
  },
};
</script>
<template>
  <gl-empty-state
    :title="s__('ContainerRegistry|There are no container images stored for this project')"
    :svg-path="config.noContainersImage"
  >
    <template #description>
      <p>
        <gl-sprintf :message="$options.i18n.introText">
          <template #docLink="{ content }">
            <gl-link :href="config.helpPagePath" target="_blank">{{ content }}</gl-link>
          </template>
        </gl-sprintf>
      </p>
      <h5>{{ $options.i18n.quickStart }}</h5>
      <p>
        <gl-sprintf :message="$options.i18n.notLoggedInMessage">
          <template #twofaDocLink="{ content }">
            <gl-link :href="config.twoFactorAuthHelpLink" target="_blank">{{ content }}</gl-link>
          </template>
          <template #personalAccessTokensDocLink="{ content }">
            <gl-link :href="config.personalAccessTokensHelpLink" target="_blank">{{
              content
            }}</gl-link>
          </template>
        </gl-sprintf>
      </p>
      <gl-form-input-group class="gl-mb-4">
        <gl-form-input
          :value="dockerLoginCommand"
          readonly
          type="text"
          class="gl-font-monospace!"
        />
        <template #append>
          <clipboard-button
            :text="dockerLoginCommand"
            :title="$options.i18n.copyLoginTitle"
            class="gl-m-0!"
          />
        </template>
      </gl-form-input-group>
      <p class="gl-mb-4">
        {{ $options.i18n.addImageText }}
      </p>
      <gl-form-input-group class="gl-mb-4">
        <gl-form-input
          :value="dockerBuildCommand"
          readonly
          type="text"
          class="gl-font-monospace!"
        />
        <template #append>
          <clipboard-button
            :text="dockerBuildCommand"
            :title="$options.i18n.copyBuildTitle"
            class="gl-m-0!"
          />
        </template>
      </gl-form-input-group>
      <gl-form-input-group>
        <gl-form-input :value="dockerPushCommand" readonly type="text" class="gl-font-monospace!" />
        <template #append>
          <clipboard-button
            :text="dockerPushCommand"
            :title="$options.i18n.copyPushTitle"
            class="gl-m-0!"
          />
        </template>
      </gl-form-input-group>
    </template>
  </gl-empty-state>
</template>