Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
pleroma-fe
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joseph Nuthalapati
pleroma-fe
Commits
4f743926
Commit
4f743926
authored
Jul 11, 2019
by
Tae Hoon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rewrite ModerationTools using v-tooltip
parent
b9c54782
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
19 deletions
+14
-19
src/components/moderation_tools/moderation_tools.js
src/components/moderation_tools/moderation_tools.js
+1
-6
src/components/moderation_tools/moderation_tools.vue
src/components/moderation_tools/moderation_tools.vue
+13
-13
No files found.
src/components/moderation_tools/moderation_tools.js
View file @
4f743926
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
)
},
...
...
src/components/moderation_tools/moderation_tools.vue
View file @
4f743926
<
template
>
<div>
<
Popp
er
<
v-popov
er
trigger=
"click"
append-to-body
:options=
"
{
placement: 'bottom-end',
modifiers: {
arrow: { enabled: true },
offset: { offset: '0, 5px' },
}
}"
class=
"moderation-tools-popover"
:container=
"false"
@
show=
"showDropDown = true"
@
hide=
"showDropDown = false"
>
<div
class=
"popper-wrapper"
>
<div
class=
"popper-wrapper"
slot=
"popover"
>
<div
class=
"dropdown-menu"
>
<span
v-if=
"user.is_local"
>
<button
...
...
@@ -127,14 +122,12 @@
</div>
</div>
<button
slot=
"reference"
class=
"btn btn-default btn-block"
:class=
"
{ pressed: showDropDown }"
@click="toggleMenu"
>
{{
$t
(
'
user_card.admin_menu.moderation
'
)
}}
</button>
</
Popp
er>
</
v-popov
er>
<portal
to=
"modal"
>
<DialogModal
v-if=
"showDeleteUserDialog"
...
...
@@ -188,4 +181,11 @@
}
}
.moderation-tools-popover
{
height
:
100%
;
.trigger
{
display
:
flex
!
important
;
height
:
100%
;
}
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment