2019-03-13 08:50:54 +11:00
|
|
|
<template>
|
2019-05-02 22:21:02 +10:00
|
|
|
<div>
|
2019-07-05 17:17:44 +10:00
|
|
|
<nav
|
|
|
|
id="nav"
|
|
|
|
class="nav-bar container"
|
2020-07-08 04:43:46 +10:00
|
|
|
:class="{ 'mobile-hidden': isChat }"
|
2019-07-05 17:17:44 +10:00
|
|
|
>
|
|
|
|
<div
|
|
|
|
class="mobile-inner-nav"
|
|
|
|
@click="scrollToTop()"
|
|
|
|
>
|
|
|
|
<div class="item">
|
|
|
|
<a
|
|
|
|
href="#"
|
|
|
|
class="mobile-nav-button"
|
|
|
|
@click.stop.prevent="toggleMobileSidebar()"
|
|
|
|
>
|
2020-10-21 06:13:19 +11:00
|
|
|
<FAIcon size="lg" class="button-icon" icon="bars" />
|
2020-07-10 20:21:42 +10:00
|
|
|
<div
|
|
|
|
v-if="unreadChatCount"
|
|
|
|
class="alert-dot"
|
|
|
|
/>
|
2019-05-02 22:21:02 +10:00
|
|
|
</a>
|
2019-07-05 17:17:44 +10:00
|
|
|
<router-link
|
2019-12-02 11:34:01 +11:00
|
|
|
v-if="!hideSitename"
|
2019-07-05 17:17:44 +10:00
|
|
|
class="site-name"
|
|
|
|
:to="{ name: 'root' }"
|
|
|
|
active-class="home"
|
|
|
|
>
|
|
|
|
{{ sitename }}
|
|
|
|
</router-link>
|
2019-05-02 22:21:02 +10:00
|
|
|
</div>
|
2019-07-05 17:17:44 +10:00
|
|
|
<div class="item right">
|
|
|
|
<a
|
|
|
|
v-if="currentUser"
|
|
|
|
class="mobile-nav-button"
|
|
|
|
href="#"
|
|
|
|
@click.stop.prevent="openMobileNotifications()"
|
|
|
|
>
|
2020-10-21 06:13:19 +11:00
|
|
|
<FAIcon size="lg" class="button-icon" icon="bell" />
|
2019-07-05 17:17:44 +10:00
|
|
|
<div
|
|
|
|
v-if="unseenNotificationsCount"
|
|
|
|
class="alert-dot"
|
|
|
|
/>
|
2019-05-02 22:21:02 +10:00
|
|
|
</a>
|
|
|
|
</div>
|
2019-03-13 08:50:54 +11:00
|
|
|
</div>
|
2019-05-02 22:21:02 +10:00
|
|
|
</nav>
|
2019-07-05 17:17:44 +10:00
|
|
|
<div
|
|
|
|
v-if="currentUser"
|
2019-03-29 07:54:45 +11:00
|
|
|
class="mobile-notifications-drawer"
|
|
|
|
:class="{ 'closed': !notificationsOpen }"
|
2019-05-02 22:21:02 +10:00
|
|
|
@touchstart.stop="notificationsTouchStart"
|
|
|
|
@touchmove.stop="notificationsTouchMove"
|
2019-03-29 07:54:45 +11:00
|
|
|
>
|
2019-03-21 07:09:29 +11:00
|
|
|
<div class="mobile-notifications-header">
|
2019-07-05 17:17:44 +10:00
|
|
|
<span class="title">{{ $t('notifications.notifications') }}</span>
|
|
|
|
<a
|
|
|
|
class="mobile-nav-button"
|
|
|
|
@click.stop.prevent="closeMobileNotifications()"
|
|
|
|
>
|
2020-10-21 06:13:19 +11:00
|
|
|
<FAIcon size="lg" class="button-icon" icon="times" />
|
2019-03-21 07:09:29 +11:00
|
|
|
</a>
|
|
|
|
</div>
|
2019-07-05 17:17:44 +10:00
|
|
|
<div
|
|
|
|
class="mobile-notifications"
|
|
|
|
@scroll="onScroll"
|
|
|
|
>
|
|
|
|
<Notifications
|
|
|
|
ref="notifications"
|
|
|
|
:no-heading="true"
|
|
|
|
/>
|
2019-03-21 07:09:29 +11:00
|
|
|
</div>
|
2019-03-13 08:50:54 +11:00
|
|
|
</div>
|
2019-07-05 17:17:44 +10:00
|
|
|
<SideDrawer
|
|
|
|
ref="sideDrawer"
|
|
|
|
:logout="logout"
|
|
|
|
/>
|
2019-05-02 22:21:02 +10:00
|
|
|
</div>
|
2019-03-13 08:50:54 +11:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./mobile_nav.js"></script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2019-03-15 02:46:04 +11:00
|
|
|
@import '../../_variables.scss';
|
|
|
|
|
|
|
|
.mobile-inner-nav {
|
2019-03-21 07:09:29 +11:00
|
|
|
width: 100%;
|
2019-03-15 02:46:04 +11:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
2019-03-21 07:09:29 +11:00
|
|
|
.mobile-nav-button {
|
2020-10-21 06:13:19 +11:00
|
|
|
text-align: center;
|
|
|
|
margin: 0 1em;
|
2019-03-15 02:46:04 +11:00
|
|
|
position: relative;
|
2019-03-21 07:09:29 +11:00
|
|
|
cursor: pointer;
|
2019-03-15 02:46:04 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
.alert-dot {
|
|
|
|
border-radius: 100%;
|
|
|
|
height: 8px;
|
|
|
|
width: 8px;
|
|
|
|
position: absolute;
|
|
|
|
left: calc(50% - 4px);
|
|
|
|
top: calc(50% - 4px);
|
|
|
|
margin-left: 6px;
|
|
|
|
margin-top: -6px;
|
|
|
|
background-color: $fallback--cRed;
|
|
|
|
background-color: var(--badgeNotification, $fallback--cRed);
|
|
|
|
}
|
|
|
|
|
2019-03-21 07:09:29 +11:00
|
|
|
.mobile-notifications-drawer {
|
|
|
|
width: 100%;
|
|
|
|
height: 100vh;
|
|
|
|
overflow-x: hidden;
|
2019-03-15 02:46:04 +11:00
|
|
|
position: fixed;
|
2019-03-21 07:09:29 +11:00
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
box-shadow: 1px 1px 4px rgba(0,0,0,.6);
|
|
|
|
box-shadow: var(--panelShadow);
|
|
|
|
transition-property: transform;
|
|
|
|
transition-duration: 0.25s;
|
|
|
|
transform: translateX(0);
|
2019-05-02 22:21:02 +10:00
|
|
|
z-index: 1001;
|
|
|
|
-webkit-overflow-scrolling: touch;
|
2019-03-21 07:09:29 +11:00
|
|
|
|
|
|
|
&.closed {
|
|
|
|
transform: translateX(100%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.mobile-notifications-header {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
z-index: 1;
|
|
|
|
width: 100%;
|
|
|
|
height: 50px;
|
|
|
|
line-height: 50px;
|
|
|
|
position: absolute;
|
|
|
|
color: var(--topBarText);
|
|
|
|
background-color: $fallback--fg;
|
|
|
|
background-color: var(--topBar, $fallback--fg);
|
|
|
|
box-shadow: 0px 0px 4px rgba(0,0,0,.6);
|
|
|
|
box-shadow: var(--topBarShadow);
|
|
|
|
|
|
|
|
.title {
|
|
|
|
font-size: 1.3em;
|
|
|
|
margin-left: 0.6em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.mobile-notifications {
|
|
|
|
margin-top: 50px;
|
2019-03-15 02:46:04 +11:00
|
|
|
width: 100vw;
|
|
|
|
height: calc(100vh - 50px);
|
|
|
|
overflow-x: hidden;
|
|
|
|
overflow-y: scroll;
|
|
|
|
|
|
|
|
color: $fallback--text;
|
|
|
|
color: var(--text, $fallback--text);
|
|
|
|
background-color: $fallback--bg;
|
|
|
|
background-color: var(--bg, $fallback--bg);
|
|
|
|
|
|
|
|
.notifications {
|
|
|
|
padding: 0;
|
|
|
|
border-radius: 0;
|
|
|
|
box-shadow: none;
|
|
|
|
.panel {
|
|
|
|
border-radius: 0;
|
|
|
|
margin: 0;
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
.panel:after {
|
|
|
|
border-radius: 0;
|
|
|
|
}
|
|
|
|
.panel .panel-heading {
|
|
|
|
border-radius: 0;
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-03-13 08:50:54 +11:00
|
|
|
|
|
|
|
</style>
|