Commit 93ebd272 authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera

Merge branch '225652-update-file-table-in-package-details-ui' into 'master'

Updates to file table in Package details UI

Closes #225652

See merge request gitlab-org/gitlab!36723
parents 4291fd79 4d5b3b54
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
import { import {
GlBadge, GlBadge,
GlButton, GlButton,
GlIcon,
GlModal, GlModal,
GlModalDirective, GlModalDirective,
GlTooltipDirective, GlTooltipDirective,
...@@ -27,6 +26,7 @@ import PackageListRow from '../../shared/components/package_list_row.vue'; ...@@ -27,6 +26,7 @@ import PackageListRow from '../../shared/components/package_list_row.vue';
import DependencyRow from './dependency_row.vue'; import DependencyRow from './dependency_row.vue';
import { numberToHumanSize } from '~/lib/utils/number_utils'; import { numberToHumanSize } from '~/lib/utils/number_utils';
import timeagoMixin from '~/vue_shared/mixins/timeago'; import timeagoMixin from '~/vue_shared/mixins/timeago';
import FileIcon from '~/vue_shared/components/file_icon.vue';
import { generatePackageInfo } from '../utils'; import { generatePackageInfo } from '../utils';
import { __, s__ } from '~/locale'; import { __, s__ } from '~/locale';
import { PackageType, TrackingActions } from '../../shared/constants'; import { PackageType, TrackingActions } from '../../shared/constants';
...@@ -44,7 +44,7 @@ export default { ...@@ -44,7 +44,7 @@ export default {
GlTab, GlTab,
GlTabs, GlTabs,
GlTable, GlTable,
GlIcon, FileIcon,
GlSprintf, GlSprintf,
PackageActivity, PackageActivity,
PackageInformation, PackageInformation,
...@@ -243,19 +243,24 @@ export default { ...@@ -243,19 +243,24 @@ export default {
<package-activity /> <package-activity />
<h3 class="gl-font-lg">{{ __('Files') }}</h3>
<gl-table <gl-table
:fields="$options.filesTableHeaderFields" :fields="$options.filesTableHeaderFields"
:items="filesTableRows" :items="filesTableRows"
tbody-tr-class="js-file-row" tbody-tr-class="js-file-row"
> >
<template #cell(name)="items"> <template #cell(name)="items">
<gl-icon name="doc-code" class="space-right" />
<gl-link <gl-link
:href="items.item.downloadPath" :href="items.item.downloadPath"
class="js-file-download" class="js-file-download gl-relative"
@click="track($options.trackingActions.PULL_PACKAGE)" @click="track($options.trackingActions.PULL_PACKAGE)"
> >
{{ items.item.name }} <file-icon
:file-name="items.item.name"
css-classes="gl-relative file-icon"
class="gl-mr-1 gl-relative"
/>
<span class="gl-relative">{{ items.item.name }}</span>
</gl-link> </gl-link>
</template> </template>
......
---
title: Updates to file table in package details UI
merge_request: 36723
author: Adam Alvis (@adamalvis)
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment