logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 8ab30545b2b792ddae9cc439c3e617195e22d3ca
parent 6f696874bbfa4edd6daf4d1c5f1970b9a391e7db
Author: Henry Jameson <me@hjkos.com>
Date:   Sun, 31 Jul 2022 01:45:38 +0300

pinned no longer needed

Diffstat:

Msrc/components/popover/popover.js11++---------
Msrc/components/popover/popover.vue20--------------------
2 files changed, 2 insertions(+), 29 deletions(-)

diff --git a/src/components/popover/popover.js b/src/components/popover/popover.js @@ -53,7 +53,6 @@ const Popover = { // with popovers refusing to be hidden when user wants to interact with something in below popover lockReEntry: false, hidden: true, - pinned: false, styles: {}, oldSize: { width: 0, height: 0 }, scrollable: null, @@ -202,7 +201,6 @@ const Popover = { }, showPopover () { if (this.disabled) return - this.pinned = false const wasHidden = this.hidden this.hidden = false this.parentPopover && this.parentPopover.onChildPopoverState(this, true) @@ -236,7 +234,7 @@ const Popover = { } }, onMouseleave (e) { - if (this.trigger === 'hover' && !this.pinned && this.childrenShown.size > 0) { + if (this.trigger === 'hover' && this.childrenShown.size > 0) { this.graceTimeout = setTimeout(() => this.hidePopover(), 1) } }, @@ -249,7 +247,7 @@ const Popover = { } }, onMouseleaveContent (e) { - if (this.trigger === 'hover' && !this.pinned && this.childrenShown.size > 0) { + if (this.trigger === 'hover' && this.childrenShown.size === 0) { this.graceTimeout = setTimeout(() => this.hidePopover(), 1) } }, @@ -270,11 +268,6 @@ const Popover = { this.hidePopover() if (this.parentPopover) this.parentPopover.onClickOutside(e) }, - onClickContent (e) { - if (this.trigger === 'hover' && this.stayOnClick) { - this.pinned = true - } - }, onScroll (e) { this.updateStyles() }, diff --git a/src/components/popover/popover.vue b/src/components/popover/popover.vue @@ -28,15 +28,6 @@ class="popover-inner" :close="hidePopover" /> - <div - v-if="stayOnClick && pinned" - class="pinned-tooltip-icon popover popover-default" - > - <FAIcon - icon="thumbtack" - class="faint" - /> - </div> </div> </transition> </teleport> @@ -61,17 +52,6 @@ box-shadow: var(--popupShadow); } -.pinned-tooltip-icon { - position: absolute; - top: -1em; - left: -1em; - width: 2em; - height: 2em; - display: flex; - justify-content: center; - align-items: center; -} - .popover-default { &:after { content: '';