aboutsummaryrefslogtreecommitdiff
path: root/src/components/moderation_tools
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2019-07-16 20:49:49 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2019-07-16 20:49:49 +0000
commitcc2e35f4999a16a6647887f1c4f09e2b19a54b3e (patch)
treedc4d3e5aa3de812ce546e3a206a1f97fa4dc7f24 /src/components/moderation_tools
parentf734a721165537b587495498c3e7c3d80eb179e7 (diff)
parent051b3b5141b7da8fd5c73af20848d6546ff43248 (diff)
Merge branch '609' into 'develop'
Fix popper issues using another popper library Closes #612 and #609 See merge request pleroma/pleroma-fe!881
Diffstat (limited to 'src/components/moderation_tools')
-rw-r--r--src/components/moderation_tools/moderation_tools.js7
-rw-r--r--src/components/moderation_tools/moderation_tools.vue28
2 files changed, 16 insertions, 19 deletions
diff --git a/src/components/moderation_tools/moderation_tools.js b/src/components/moderation_tools/moderation_tools.js
index 11de9f93..8aadc8c5 100644
--- a/src/components/moderation_tools/moderation_tools.js
+++ b/src/components/moderation_tools/moderation_tools.js
@@ -1,5 +1,4 @@
import DialogModal from '../dialog_modal/dialog_modal.vue'
-import Popper from 'vue-popperjs/src/component/popper.js.vue'
const FORCE_NSFW = 'mrf_tag:media-force-nsfw'
const STRIP_MEDIA = 'mrf_tag:media-strip'
@@ -29,8 +28,7 @@ const ModerationTools = {
}
},
components: {
- DialogModal,
- Popper
+ DialogModal
},
computed: {
tagsSet () {
@@ -41,9 +39,6 @@ const ModerationTools = {
}
},
methods: {
- toggleMenu () {
- this.showDropDown = !this.showDropDown
- },
hasTag (tagName) {
return this.tagsSet.has(tagName)
},
diff --git a/src/components/moderation_tools/moderation_tools.vue b/src/components/moderation_tools/moderation_tools.vue
index f1ab67a6..d97ca3aa 100644
--- a/src/components/moderation_tools/moderation_tools.vue
+++ b/src/components/moderation_tools/moderation_tools.vue
@@ -1,18 +1,15 @@
<template>
<div>
- <Popper
+ <v-popover
trigger="click"
- append-to-body
- :options="{
- placement: 'bottom-end',
- modifiers: {
- arrow: { enabled: true },
- offset: { offset: '0, 5px' },
- }
- }"
+ class="moderation-tools-popover"
+ :container="false"
+ placement="bottom-end"
+ :offset="5"
+ @show="showDropDown = true"
@hide="showDropDown = false"
>
- <div class="popper-wrapper">
+ <div slot="popover">
<div class="dropdown-menu">
<span v-if="user.is_local">
<button
@@ -127,14 +124,12 @@
</div>
</div>
<button
- slot="reference"
class="btn btn-default btn-block"
:class="{ pressed: showDropDown }"
- @click="toggleMenu"
>
{{ $t('user_card.admin_menu.moderation') }}
</button>
- </Popper>
+ </v-popover>
<portal to="modal">
<DialogModal
v-if="showDeleteUserDialog"
@@ -188,4 +183,11 @@
}
}
+.moderation-tools-popover {
+ height: 100%;
+ .trigger {
+ display: flex !important;
+ height: 100%;
+ }
+}
</style>