diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-14 21:08:38 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-14 21:08:38 +0300 |
commit | 14160fad80415337f8c08755af53ee994b4a7518 (patch) | |
tree | bfe1bf6bad8cda3e3bbf905c9d8ac742420dd8a3 /app/assets/javascripts/vue_shared/components/clone_dropdown.vue | |
parent | 7a33080fff9a735cbe77968d67b13ffa92c0ffae (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/clone_dropdown.vue')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/clone_dropdown.vue | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/app/assets/javascripts/vue_shared/components/clone_dropdown.vue b/app/assets/javascripts/vue_shared/components/clone_dropdown.vue deleted file mode 100644 index 69fce23ede4..00000000000 --- a/app/assets/javascripts/vue_shared/components/clone_dropdown.vue +++ /dev/null @@ -1,91 +0,0 @@ -<script> -import { - GlButton, - GlDisclosureDropdown, - GlDisclosureDropdownItem, - GlFormGroup, - GlFormInputGroup, - GlTooltipDirective, -} from '@gitlab/ui'; -import { getHTTPProtocol } from '~/lib/utils/url_utility'; -import { __, sprintf } from '~/locale'; - -export default { - components: { - GlDisclosureDropdown, - GlDisclosureDropdownItem, - GlFormGroup, - GlFormInputGroup, - GlButton, - }, - directives: { - GlTooltip: GlTooltipDirective, - }, - props: { - sshLink: { - type: String, - required: false, - default: '', - }, - httpLink: { - type: String, - required: false, - default: '', - }, - }, - computed: { - httpLabel() { - const protocol = this.httpLink ? getHTTPProtocol(this.httpLink)?.toUpperCase() : ''; - return sprintf(__('Clone with %{protocol}'), { protocol }); - }, - }, - labels: { - defaultLabel: __('Clone'), - ssh: __('Clone with SSH'), - }, - copyURLTooltip: __('Copy URL'), -}; -</script> -<template> - <gl-disclosure-dropdown - :toggle-text="$options.labels.defaultLabel" - category="primary" - variant="confirm" - placement="right" - > - <gl-disclosure-dropdown-item v-if="sshLink"> - <gl-form-group :label="$options.labels.ssh" class="gl-px-3 gl-my-3"> - <gl-form-input-group :value="sshLink" readonly select-on-click> - <template #append> - <gl-button - v-gl-tooltip.hover - :title="$options.copyURLTooltip" - :aria-label="$options.copyURLTooltip" - :data-clipboard-text="sshLink" - data-qa-selector="copy_ssh_url_button" - icon="copy-to-clipboard" - class="gl-display-inline-flex" - /> - </template> - </gl-form-input-group> - </gl-form-group> - </gl-disclosure-dropdown-item> - <gl-disclosure-dropdown-item v-if="httpLink"> - <gl-form-group :label="httpLabel" class="gl-px-3 gl-mb-3"> - <gl-form-input-group :value="httpLink" readonly select-on-click> - <template #append> - <gl-button - v-gl-tooltip.hover - :title="$options.copyURLTooltip" - :aria-label="$options.copyURLTooltip" - :data-clipboard-text="httpLink" - data-qa-selector="copy_http_url_button" - icon="copy-to-clipboard" - class="gl-display-inline-flex" - /> - </template> - </gl-form-input-group> - </gl-form-group> - </gl-disclosure-dropdown-item> - </gl-disclosure-dropdown> -</template> |