Skip to content

Commit 98b6c81

Browse files
authored
Merge pull request #603 from nextcloud/backport/586/stable31
[stable31] fix: Hide empty inline menu entry in grid view
2 parents 4e31736 + 4fac541 commit 98b6c81

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/main.ts

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
import { getCurrentUser } from '@nextcloud/auth'
2525

2626
import '@nextcloud/dialogs/style.css'
27+
import './styles.css'
2728

2829
import LockSvg from '@mdi/svg/svg/lock.svg?raw'
2930
import LockOpenSvg from '@mdi/svg/svg/lock-open-variant.svg?raw'
@@ -97,6 +98,7 @@ const inlineAction = new FileAction({
9798

9899
// FIXME: Currently enabled is not re-evaluated when emitting an updated node object through files:node:updated
99100
// Therefor we need to also have a unlocked state as the inline action is then always rendered
101+
// We currently hide them for the grid view via css
100102
return true
101103

102104
const node = nodes[0]

src/styles.css

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
3+
* SPDX-License-Identifier: AGPL-3.0-or-later
4+
*/
5+
6+
/* The grid view currently does not properly handle inline actions, we hide them for now */
7+
.action-item__popper .action.files-list__row-action-lock_inline,
8+
.files-list--grid .action.files-list__row-action-lock_inline {
9+
display: none;
10+
}

0 commit comments

Comments
 (0)