Skip to content

Commit 80b8ff8

Browse files
author
Jannik Stehle
committed
fix: collapsible cern table
The collapsible table for CERN needs to be implemented via a runtime check since the ODS is now being published and we can't overwrite the import via the build anymore.
1 parent 6c43a24 commit 80b8ff8

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

packages/web-pkg/src/components/FilesList/ResourceTable.vue

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<template>
2-
<oc-table
2+
<component
3+
:is="configOptions.cernFeatures ? 'collapsible-oc-table' : 'oc-table'"
34
v-bind="$attrs"
45
id="files-space-table"
56
:class="[
@@ -235,7 +236,7 @@
235236
<!-- @slot Footer of the files table -->
236237
<slot name="footer" />
237238
</template>
238-
</oc-table>
239+
</component>
239240
<Teleport v-if="dragItem" to="body">
240241
<resource-ghost-element ref="ghostElement" :preview-items="[dragItem, ...dragSelection]" />
241242
</Teleport>
@@ -301,22 +302,21 @@ import { determineResourceTableSortFields } from '../../helpers/ui/resourceTable
301302
import { useFileActionsRename } from '../../composables/actions'
302303
import { createLocationCommon } from '../../router'
303304
import get from 'lodash-es/get'
304-
305-
// ODS component import is necessary here for CERN to overwrite OcTable
306-
import { OcTable } from '@ownclouders/design-system/components'
305+
import CollapsibleOcTable from './../../cern/components/CollapsibleOcTable.vue'
307306
import { storeToRefs } from 'pinia'
308-
import { OcButton } from '@ownclouders/design-system/components'
307+
import { OcButton, OcTable } from '@ownclouders/design-system/components'
309308
import { FieldType } from '@ownclouders/design-system/helpers'
310309
311310
const TAGS_MINIMUM_SCREEN_WIDTH = 850
312311
313312
export default defineComponent({
314313
components: {
315314
ContextMenuQuickAction,
315+
CollapsibleOcTable,
316316
ResourceGhostElement,
317-
OcTable,
318317
ResourceListItem,
319-
ResourceSize
318+
ResourceSize,
319+
OcTable
320320
},
321321
props: {
322322
/**

vite.cern.config.ts

-4
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ export default defineConfig(async (args) => {
2424
strictPort: true
2525
}
2626

27-
// collapsible table
28-
// FIXME: how to handle?
29-
;(config.resolve.alias as any)['@ownclouders/design-system/src/components/OcTable/OcTable.vue'] =
30-
join(projectRootDir, 'packages/web-pkg/src/cern/components/CollapsibleOcTable.vue')
3127
// create space component
3228
;(config.resolve.alias as any)['../../components/AppBar/CreateSpace.vue'] = join(
3329
projectRootDir,

0 commit comments

Comments
 (0)