aboutsummaryrefslogtreecommitdiff
path: root/src/components/extra_buttons
diff options
context:
space:
mode:
authorSean King <seanking2919@protonmail.com>2022-08-22 19:08:58 -0600
committerSean King <seanking2919@protonmail.com>2022-08-22 19:08:58 -0600
commitee58e3868c2d58b889d8a32c1b6dfd3732df7584 (patch)
treeda8f8783734740df18cb5c1082d4756bfcf47489 /src/components/extra_buttons
parent325930eecb4943bb50344159646a7c62b4bf10b3 (diff)
parentcb6b96b9ba4e71310e823aecc4bb8c22d370397a (diff)
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma-fe into add/edit-status
Diffstat (limited to 'src/components/extra_buttons')
-rw-r--r--src/components/extra_buttons/extra_buttons.js19
-rw-r--r--src/components/extra_buttons/extra_buttons.vue40
2 files changed, 53 insertions, 6 deletions
diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js
index 8c6aca9b..2e495423 100644
--- a/src/components/extra_buttons/extra_buttons.js
+++ b/src/components/extra_buttons/extra_buttons.js
@@ -7,7 +7,9 @@ import {
faThumbtack,
faShareAlt,
faExternalLinkAlt,
- faHistory
+ faHistory,
+ faPlus,
+ faTimes
} from '@fortawesome/free-solid-svg-icons'
import {
faBookmark as faBookmarkReg,
@@ -23,13 +25,26 @@ library.add(
faShareAlt,
faExternalLinkAlt,
faFlag,
- faHistory
+ faHistory,
+ faPlus,
+ faTimes
)
const ExtraButtons = {
props: ['status'],
components: { Popover },
+ data () {
+ return {
+ expanded: false
+ }
+ },
methods: {
+ onShow () {
+ this.expanded = true
+ },
+ onClose () {
+ this.expanded = false
+ },
deleteStatus () {
const confirmed = window.confirm(this.$t('status.delete_confirm'))
if (confirmed) {
diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue
index b3e37dff..b2fad1c9 100644
--- a/src/components/extra_buttons/extra_buttons.vue
+++ b/src/components/extra_buttons/extra_buttons.vue
@@ -6,6 +6,8 @@
:offset="{ y: 5 }"
:bound-to="{ x: 'container' }"
remove-padding
+ @show="onShow"
+ @close="onClose"
>
<template #content="{close}">
<div class="dropdown-menu">
@@ -144,10 +146,24 @@
</template>
<template #trigger>
<span class="button-unstyled popover-trigger">
- <FAIcon
- class="fa-scale-110 fa-old-padding"
- icon="ellipsis-h"
- />
+ <FALayers class="fa-old-padding-layer">
+ <FAIcon
+ class="fa-scale-110 "
+ icon="ellipsis-h"
+ />
+ <FAIcon
+ v-show="!expanded"
+ class="focus-marker"
+ transform="shrink-6 up-8 right-16"
+ icon="plus"
+ />
+ <FAIcon
+ v-show="expanded"
+ class="focus-marker"
+ transform="shrink-6 up-8 right-16"
+ icon="times"
+ />
+ </FALayers>
</span>
</template>
</Popover>
@@ -157,6 +173,7 @@
<style lang="scss">
@import '../../_variables.scss';
+@import '../../_mixins.scss';
.ExtraButtons {
/* override of popover internal stuff */
@@ -173,6 +190,21 @@
color: $fallback--text;
color: var(--text, $fallback--text);
}
+
+ }
+
+ .popover-trigger-button {
+ @include unfocused-style {
+ .focus-marker {
+ visibility: hidden;
+ }
+ }
+
+ @include focused-style {
+ .focus-marker {
+ visibility: visible;
+ }
+ }
}
}
</style>