aboutsummaryrefslogtreecommitdiff
path: root/src/components/mobile_nav/mobile_nav.vue
diff options
context:
space:
mode:
authortusooa <tusooa@kazv.moe>2022-11-05 19:20:54 +0000
committertusooa <tusooa@kazv.moe>2022-11-05 19:20:54 +0000
commitf000eea0bf9c8d1f4035db607f5465b42525ac71 (patch)
tree44101ecd7a3e1de050fa5954ccfd31ae5d222cdf /src/components/mobile_nav/mobile_nav.vue
parente256ac9d08963d3b682f007f33a76bcf142fc26a (diff)
parente80bf50a363f3dea5a4b55bce03e1f1b510ae8cc (diff)
Merge branch 'scrolltotop' into 'develop'
add "scroll to top" button to timelines and notifications See merge request pleroma/pleroma-fe!1605
Diffstat (limited to 'src/components/mobile_nav/mobile_nav.vue')
-rw-r--r--src/components/mobile_nav/mobile_nav.vue27
1 files changed, 23 insertions, 4 deletions
diff --git a/src/components/mobile_nav/mobile_nav.vue b/src/components/mobile_nav/mobile_nav.vue
index 9152879c..264bc713 100644
--- a/src/components/mobile_nav/mobile_nav.vue
+++ b/src/components/mobile_nav/mobile_nav.vue
@@ -48,19 +48,34 @@
>
<div class="mobile-notifications-header">
<span class="title">{{ $t('notifications.notifications') }}</span>
- <a
- class="mobile-nav-button"
- @click.stop.prevent="closeMobileNotifications()"
+ <span class="spacer"/>
+ <button
+ v-if="notificationsAtTop"
+ class="button-unstyled mobile-nav-button"
+ @click.stop.prevent="scrollMobileNotificationsToTop"
+ >
+ <FALayers class="fa-scale-110 fa-old-padding-layer">
+ <FAIcon icon="arrow-up" />
+ <FAIcon
+ icon="minus"
+ transform="up-7"
+ />
+ </FALayers>
+ </button>
+ <button
+ class="button-unstyled mobile-nav-button"
+ @click.stop.prevent="closeMobileNotifications(true)"
>
<FAIcon
class="fa-scale-110 fa-old-padding"
icon="times"
/>
- </a>
+ </button>
</div>
<div
id="mobile-notifications"
class="mobile-notifications"
+ ref="mobileNotifications"
@scroll="onScroll"
/>
</div>
@@ -165,6 +180,10 @@
box-shadow: 0px 0px 4px rgba(0,0,0,.6);
box-shadow: var(--topBarShadow);
+ .spacer {
+ flex: 1;
+ }
+
.title {
font-size: 1.3em;
margin-left: 0.6em;