diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2023-12-27 16:26:13 +0100 |
---|---|---|
committer | Eduardo Morales <emoral435@gmail.com> | 2024-01-03 13:59:28 -0600 |
commit | 820b2beb6b90cb891ee5edecb65b9b4214cb7500 (patch) | |
tree | 2d5f0502cef8be1679e7053ae981f92224e5f215 /apps/files/src/components/FileEntry/FileEntryActions.vue | |
parent | c8104266f823ddba5eebca5447acd8502cc4ac4e (diff) | |
download | nextcloud-server-820b2beb6b90cb891ee5edecb65b9b4214cb7500.tar.gz nextcloud-server-820b2beb6b90cb891ee5edecb65b9b4214cb7500.zip |
fix(files): open menu on right click position
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/src/components/FileEntry/FileEntryActions.vue')
-rw-r--r-- | apps/files/src/components/FileEntry/FileEntryActions.vue | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/apps/files/src/components/FileEntry/FileEntryActions.vue b/apps/files/src/components/FileEntry/FileEntryActions.vue index d4693b7d8e6..1e453fec706 100644 --- a/apps/files/src/components/FileEntry/FileEntryActions.vue +++ b/apps/files/src/components/FileEntry/FileEntryActions.vue @@ -327,8 +327,24 @@ export default Vue.extend({ }) </script> -<style lang="scss" scoped> +<style lang="scss"> +// Allow right click to define the position of the menu +// only if defined +.app-content[style*="mouse-pos-x"] .v-popper__popper { + transform: translate3d(var(--mouse-pos-x), var(--mouse-pos-y), 0px) !important; + + // If the menu is too close to the bottom, we move it up + &[data-popper-placement="top"] { + transform: translate3d(var(--mouse-pos-x), calc(var(--mouse-pos-y) - 50vh), 0px) !important; + } + // Hide arrow if floating + .v-popper__arrow-container { + display: none; + } +} +</style> +<style lang="scss" scoped> :deep(.button-vue--icon-and-text, .files-list__row-action-sharing-status) { .button-vue__text { color: var(--color-primary-element); |