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.

70 lines
1.5 KiB
Vue
Raw Normal View History

2018-11-08 19:23:39 +05:30
<script>
2023-06-20 00:43:36 +05:30
import { GlAlert, GlButton, GlSprintf } from '@gitlab/ui';
2022-05-07 20:08:51 +05:30
import { __ } from '~/locale';
export const i18n = {
2023-06-20 00:43:36 +05:30
title: __('Some changes are not shown.'),
2022-05-07 20:08:51 +05:30
plainDiff: __('Plain diff'),
2023-06-20 00:43:36 +05:30
emailPatch: __('Patches'),
2022-05-07 20:08:51 +05:30
};
2018-11-08 19:23:39 +05:30
export default {
2022-05-07 20:08:51 +05:30
i18n,
components: {
GlAlert,
2023-06-20 00:43:36 +05:30
GlButton,
2022-05-07 20:08:51 +05:30
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"
2023-06-20 00:43:36 +05:30
class="gl-mx-5 gl-mb-4 gl-mt-3"
2022-05-07 20:08:51 +05:30
:title="$options.i18n.title"
:dismissible="false"
>
<gl-sprintf
:message="
sprintf(
__(
2023-06-20 00:43:36 +05:30
'For a faster browsing experience, only %{strongStart}%{visible} of %{total}%{strongEnd} files are shown. Download one of the files below to see all changes.',
2022-05-07 20:08:51 +05:30
),
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>
2023-06-20 00:43:36 +05:30
<template #actions>
<gl-button :href="plainDiffPath" class="gl-mr-3 gl-alert-action">
{{ $options.i18n.plainDiff }}
</gl-button>
<gl-button :href="emailPatchPath" class="gl-alert-action">
{{ $options.i18n.emailPatch }}
</gl-button>
</template>
2022-05-07 20:08:51 +05:30
</gl-alert>
2018-11-08 19:23:39 +05:30
</template>