debian-mirror-gitlab/app/assets/javascripts/diffs/components/hidden_files_warning.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.3 KiB
Vue
Raw Normal View History

2018-11-08 19:23:39 +05:30
<script>
2022-05-07 20:08:51 +05:30
import { GlAlert, GlSprintf } from '@gitlab/ui';
import { __ } from '~/locale';
export const i18n = {
title: __('Too many changes to show.'),
plainDiff: __('Plain diff'),
emailPatch: __('Email patch'),
};
2018-11-08 19:23:39 +05:30
export default {
2022-05-07 20:08:51 +05:30
i18n,
components: {
GlAlert,
GlSprintf,
},
2018-11-08 19:23:39 +05:30
props: {
total: {
type: String,
required: true,
},
visible: {
type: Number,
required: true,
},
plainDiffPath: {
type: String,
required: true,
},
emailPatchPath: {
type: String,
required: true,
},
},
};
</script>
<template>
2022-05-07 20:08:51 +05:30
<gl-alert
variant="warning"
:title="$options.i18n.title"
:primary-button-text="$options.i18n.plainDiff"
:primary-button-link="plainDiffPath"
:secondary-button-text="$options.i18n.emailPatch"
:secondary-button-link="emailPatchPath"
:dismissible="false"
>
<gl-sprintf
:message="
sprintf(
__(
'To preserve performance only %{strongStart}%{visible} of %{total}%{strongEnd} files are displayed.',
),
2022-07-16 23:28:13 +05:30
{ visible, total } /* eslint-disable-line @gitlab/vue-no-new-non-primitive-in-template */,
2022-05-07 20:08:51 +05:30
)
"
>
<template #strong="{ content }">
<strong>{{ content }}</strong>
</template>
</gl-sprintf>
</gl-alert>
2018-11-08 19:23:39 +05:30
</template>