Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
:is-nested-element="true"
:nested-parent-ref="parentDropRef"
mode="hover"
class="w-auto oc-files-context-action-drop"
class="w-3xs oc-files-context-action-drop"
padding-size="small"
position="auto-start"
close-on-click
Expand Down
11 changes: 11 additions & 0 deletions packages/web-pkg/src/components/FilesList/ResourceTiles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ import {
import { useInterceptModifierClick } from '../../composables/keyboardActions'
import { SizeType } from '@opencloud-eu/design-system/helpers'
import ResourceStatusIndicators from './ResourceStatusIndicators.vue'
import { useIsMobile } from '@opencloud-eu/design-system/composables'

type ResourceTileRef = ComponentPublicInstance<typeof ResourceTile>
type ContextMenuQuickActionRef = ComponentPublicInstance<typeof ContextMenuQuickAction>
Expand Down Expand Up @@ -237,6 +238,7 @@ const { getDefaultAction } = useFileActions()
const { getMatchingSpace } = useGetMatchingSpace()
const { interceptModifierClick } = useInterceptModifierClick()
const { canBeOpenedWithSecureView } = useCanBeOpenedWithSecureView()
const { isMobile } = useIsMobile()
const {
isEnabled: isEmbedModeEnabled,
fileTypes: embedModeFileTypes,
Expand Down Expand Up @@ -439,6 +441,15 @@ const showContextMenu = (
if (!isResourceSelected(item)) {
emitSelect([item.id])
}

if (unref(isMobile)) {
// we can't use displayPositionedDropdown() on mobile because we need to open the bottom drawer.
// this can be triggered by clicking the context menu button of the current row.
const el = document.getElementById(`context-menu-trigger-${item.getDomSelector()}`)
el?.click()
return
}

displayPositionedDropdown(drop._tippy, event, reference)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports[`ActionMenuDropItem component > renders drop menu with actions 1`] = `
return svg;
}" aria-hidden="true" focusable="false" class="size-4"></svg></span>
</button>
<div id="oc-files-context-actions-actions-drop-1" class="oc-drop shadow-md/20 rounded-sm w-auto oc-files-context-action-drop">
<div id="oc-files-context-actions-actions-drop-1" class="oc-drop shadow-md/20 rounded-sm w-3xs oc-files-context-action-drop">
<div class="oc-card">
<!--v-if-->
<div class="oc-card-body p-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ exports[`ContextActionMenu component > renders the menu with drop menu items 1`]
return svg;
}" aria-hidden="true" focusable="false" class="size-4"></svg></span>
</button>
<div id="oc-files-context-actions-apps-drop-1" class="oc-drop shadow-md/20 rounded-sm w-auto oc-files-context-action-drop">
<div id="oc-files-context-actions-apps-drop-1" class="oc-drop shadow-md/20 rounded-sm w-3xs oc-files-context-action-drop">
<div class="oc-card">
<!--v-if-->
<div class="oc-card-body p-2">
Expand Down Expand Up @@ -81,7 +81,7 @@ exports[`ContextActionMenu component > renders the menu with drop menu items 1`]
return svg;
}" aria-hidden="true" focusable="false" class="size-4"></svg></span>
</button>
<div id="oc-files-context-actions-actions-drop-3" class="oc-drop shadow-md/20 rounded-sm w-auto oc-files-context-action-drop">
<div id="oc-files-context-actions-actions-drop-3" class="oc-drop shadow-md/20 rounded-sm w-3xs oc-files-context-action-drop">
<div class="oc-card">
<!--v-if-->
<div class="oc-card-body p-2">
Expand Down Expand Up @@ -124,7 +124,7 @@ exports[`ContextActionMenu component > renders the menu with drop menu items 1`]
return svg;
}" aria-hidden="true" focusable="false" class="size-4"></svg></span>
</button>
<div id="oc-files-context-actions-delete-drop-5" class="oc-drop shadow-md/20 rounded-sm w-auto oc-files-context-action-drop">
<div id="oc-files-context-actions-delete-drop-5" class="oc-drop shadow-md/20 rounded-sm w-3xs oc-files-context-action-drop">
<div class="oc-card">
<!--v-if-->
<div class="oc-card-body p-2">
Expand Down