Skip to content

Commit

Permalink
Implement lock in files-table (ugly)
Browse files Browse the repository at this point in the history
  • Loading branch information
lookacat committed Aug 10, 2023
1 parent 78d7756 commit 0ebda0a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
:class="{ 'resource-table-resource-cut': isResourceCut(item) }"
@click="emitFileClick(item)"
/>
<span>{{ item.locked }}</span>
<oc-button
v-if="hasRenameAction(item)"
class="resource-table-edit-name"
Expand Down Expand Up @@ -149,6 +148,9 @@
:indicators="item.indicators"
/>
</template>
<template #locked="{ item }">
<oc-icon v-if="item.locked" name="lock" size="small" class="oc-flex oc-flex-right" />
</template>
<template #sdate="{ item }">
<span
v-oc-tooltip="formatDate(item.sdate)"
Expand Down Expand Up @@ -562,6 +564,14 @@ export default defineComponent({
wrap: 'nowrap',
width: 'shrink'
},
{
name: 'locked',
title: this.$gettext('Locked'),
type: 'slot',
alignH: 'right',
wrap: 'nowrap',
width: 'shrink'
},
{
name: 'size',
title: this.$gettext('Size'),
Expand Down
2 changes: 1 addition & 1 deletion packages/web-client/src/helpers/resource/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export function buildResource(resource): Resource {
webDavPath: resource.name,
type: isFolder ? 'folder' : resource.type,
isFolder,
locked: resource.fileInfo[DavProperty.LockDiscovery] || false,
locked: resource.fileInfo[DavProperty.LockDiscovery] ? true : false,
processing: resource.processing || false,
mdate: resource.fileInfo[DavProperty.LastModifiedDate],
size: isFolder
Expand Down

0 comments on commit 0ebda0a

Please sign in to comment.