gitlab-ce/app/assets/javascripts/repository/components/fork_suggestion.vue

47 lines
1.0 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<script>
import { GlButton } from '@gitlab/ui';
import { __ } from '~/locale';
export default {
i18n: {
message: __(
'You cant edit files directly in this project. Fork this project and submit a merge request with your changes.',
),
fork: __('Fork'),
cancel: __('Cancel'),
},
components: {
GlButton,
},
props: {
forkPath: {
type: String,
required: true,
},
},
};
</script>
<template>
<div
class="gl-display-flex gl-justify-content-end gl-align-items-center gl-bg-gray-10 gl-px-5 gl-py-2 gl-border-1 gl-border-b-solid gl-border-gray-100"
>
<span class="gl-mr-6" data-testid="message">{{ $options.i18n.message }}</span>
<gl-button
class="gl-mr-3"
category="secondary"
variant="confirm"
data-method="post"
:href="forkPath"
data-testid="fork"
>
{{ $options.i18n.fork }}
</gl-button>
<gl-button data-testid="cancel" @click="$emit('cancel')">
{{ $options.i18n.cancel }}
</gl-button>
</div>
</template>