2018-12-16 04:13:01 +11:00
|
|
|
<template>
|
2019-07-05 17:17:44 +10:00
|
|
|
<div
|
|
|
|
class="side-drawer-container"
|
2018-12-29 21:44:21 +11:00
|
|
|
:class="{ 'side-drawer-container-closed': closed, 'side-drawer-container-open': !closed }"
|
|
|
|
>
|
2019-07-05 17:17:44 +10:00
|
|
|
<div
|
|
|
|
class="side-drawer-darken"
|
|
|
|
:class="{ 'side-drawer-darken-closed': closed}"
|
|
|
|
/>
|
|
|
|
<div
|
|
|
|
class="side-drawer"
|
2018-12-24 05:14:40 +11:00
|
|
|
:class="{'side-drawer-closed': closed}"
|
|
|
|
@touchstart="touchStart"
|
2018-12-29 06:39:54 +11:00
|
|
|
@touchmove="touchMove"
|
2018-12-24 05:14:40 +11:00
|
|
|
>
|
2019-07-05 17:17:44 +10:00
|
|
|
<div
|
|
|
|
class="side-drawer-heading"
|
|
|
|
@click="toggleDrawer"
|
|
|
|
>
|
|
|
|
<UserCard
|
|
|
|
v-if="currentUser"
|
2020-04-23 21:27:27 +10:00
|
|
|
:user-id="currentUser.id"
|
2019-07-05 17:17:44 +10:00
|
|
|
:hide-bio="true"
|
|
|
|
/>
|
|
|
|
<div
|
|
|
|
v-else
|
|
|
|
class="side-drawer-logo-wrapper"
|
|
|
|
>
|
|
|
|
<img :src="logo">
|
2019-12-02 11:34:01 +11:00
|
|
|
<span v-if="!hideSitename">{{ sitename }}</span>
|
2019-02-04 06:47:02 +11:00
|
|
|
</div>
|
2018-12-24 04:50:19 +11:00
|
|
|
</div>
|
2018-12-16 04:13:01 +11:00
|
|
|
<ul>
|
2019-07-05 17:17:44 +10:00
|
|
|
<li
|
|
|
|
v-if="!currentUser"
|
|
|
|
@click="toggleDrawer"
|
|
|
|
>
|
2018-12-29 06:39:54 +11:00
|
|
|
<router-link :to="{ name: 'login' }">
|
2020-10-21 08:31:16 +11:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
2020-10-29 06:31:16 +11:00
|
|
|
class="fa-scale-110 fa-old-padding"
|
2020-10-21 08:31:16 +11:00
|
|
|
icon="sign-in-alt"
|
|
|
|
/> {{ $t("login.login") }}
|
2018-12-29 06:39:54 +11:00
|
|
|
</router-link>
|
2018-12-21 07:20:04 +11:00
|
|
|
</li>
|
2019-07-05 17:17:44 +10:00
|
|
|
<li
|
2020-07-08 01:20:37 +10:00
|
|
|
v-if="currentUser || !privateMode"
|
2019-07-05 17:17:44 +10:00
|
|
|
@click="toggleDrawer"
|
|
|
|
>
|
2020-07-08 01:20:37 +10:00
|
|
|
<router-link :to="{ name: timelinesRoute }">
|
2020-10-21 08:31:16 +11:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
2020-10-29 06:31:16 +11:00
|
|
|
class="fa-scale-110 fa-old-padding"
|
2020-10-21 08:31:16 +11:00
|
|
|
icon="home"
|
|
|
|
/> {{ $t("nav.timelines") }}
|
2019-05-16 03:44:35 +10:00
|
|
|
</router-link>
|
|
|
|
</li>
|
2020-07-14 18:44:06 +10:00
|
|
|
<li
|
|
|
|
v-if="currentUser && pleromaChatMessagesAvailable"
|
|
|
|
@click="toggleDrawer"
|
|
|
|
>
|
2020-05-07 23:10:53 +10:00
|
|
|
<router-link
|
|
|
|
:to="{ name: 'chats', params: { username: currentUser.screen_name } }"
|
|
|
|
style="position: relative"
|
|
|
|
>
|
2020-10-21 08:31:16 +11:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
2020-10-29 06:31:16 +11:00
|
|
|
class="fa-scale-110 fa-old-padding"
|
2020-10-21 08:31:16 +11:00
|
|
|
icon="comments"
|
|
|
|
/> {{ $t("nav.chats") }}
|
2020-05-07 23:10:53 +10:00
|
|
|
<span
|
|
|
|
v-if="unreadChatCount"
|
2020-11-03 05:51:38 +11:00
|
|
|
class="badge badge-notification"
|
2020-05-07 23:10:53 +10:00
|
|
|
>
|
|
|
|
{{ unreadChatCount }}
|
|
|
|
</span>
|
|
|
|
</router-link>
|
2018-12-16 04:13:01 +11:00
|
|
|
</li>
|
2018-12-29 21:44:21 +11:00
|
|
|
</ul>
|
2020-07-03 19:56:31 +10:00
|
|
|
<ul v-if="currentUser">
|
|
|
|
<li @click="toggleDrawer">
|
|
|
|
<router-link :to="{ name: 'interactions', params: { username: currentUser.screen_name } }">
|
2020-10-21 08:31:16 +11:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
2020-10-29 06:31:16 +11:00
|
|
|
class="fa-scale-110 fa-old-padding"
|
2020-10-21 08:31:16 +11:00
|
|
|
icon="bell"
|
|
|
|
/> {{ $t("nav.interactions") }}
|
2018-12-29 06:39:54 +11:00
|
|
|
</router-link>
|
|
|
|
</li>
|
2019-07-05 17:17:44 +10:00
|
|
|
<li
|
2020-07-03 19:56:31 +10:00
|
|
|
v-if="currentUser.locked"
|
2019-07-05 17:17:44 +10:00
|
|
|
@click="toggleDrawer"
|
|
|
|
>
|
|
|
|
<router-link to="/friend-requests">
|
2020-10-21 08:31:16 +11:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
2020-10-29 06:31:16 +11:00
|
|
|
class="fa-scale-110 fa-old-padding"
|
2020-10-21 08:31:16 +11:00
|
|
|
icon="user-plus"
|
|
|
|
/> {{ $t("nav.friend_requests") }}
|
2019-07-05 17:17:44 +10:00
|
|
|
<span
|
|
|
|
v-if="followRequestCount > 0"
|
2020-11-03 05:51:38 +11:00
|
|
|
class="badge badge-notification"
|
2019-07-05 17:17:44 +10:00
|
|
|
>
|
|
|
|
{{ followRequestCount }}
|
2019-02-11 20:41:17 +11:00
|
|
|
</span>
|
2018-12-16 04:13:01 +11:00
|
|
|
</router-link>
|
|
|
|
</li>
|
2019-12-13 06:46:07 +11:00
|
|
|
<li
|
2020-07-03 19:56:31 +10:00
|
|
|
v-if="chat"
|
2019-07-05 17:17:44 +10:00
|
|
|
@click="toggleDrawer"
|
|
|
|
>
|
2018-12-29 06:39:54 +11:00
|
|
|
<router-link :to="{ name: 'chat' }">
|
2020-10-21 08:31:16 +11:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
2020-10-29 06:31:16 +11:00
|
|
|
class="fa-scale-110 fa-old-padding"
|
2020-10-21 08:31:16 +11:00
|
|
|
icon="bullhorn"
|
|
|
|
/> {{ $t("shoutbox.title") }}
|
2018-12-29 06:39:54 +11:00
|
|
|
</router-link>
|
|
|
|
</li>
|
2018-12-29 21:44:21 +11:00
|
|
|
</ul>
|
|
|
|
<ul>
|
2019-12-13 06:46:07 +11:00
|
|
|
<li
|
|
|
|
v-if="currentUser || !privateMode"
|
|
|
|
@click="toggleDrawer"
|
|
|
|
>
|
2019-07-16 02:42:27 +10:00
|
|
|
<router-link :to="{ name: 'search' }">
|
2020-10-21 08:31:16 +11:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
2020-10-29 06:31:16 +11:00
|
|
|
class="fa-scale-110 fa-old-padding"
|
2020-10-21 08:31:16 +11:00
|
|
|
icon="search"
|
|
|
|
/> {{ $t("nav.search") }}
|
2018-12-29 06:39:54 +11:00
|
|
|
</router-link>
|
|
|
|
</li>
|
2019-07-05 17:17:44 +10:00
|
|
|
<li
|
|
|
|
v-if="currentUser && suggestionsEnabled"
|
|
|
|
@click="toggleDrawer"
|
|
|
|
>
|
2019-01-16 13:33:08 +11:00
|
|
|
<router-link :to="{ name: 'who-to-follow' }">
|
2020-10-21 08:31:16 +11:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
2020-10-29 06:31:16 +11:00
|
|
|
class="fa-scale-110 fa-old-padding"
|
2020-10-21 08:31:16 +11:00
|
|
|
icon="user-plus"
|
|
|
|
/> {{ $t("nav.who_to_follow") }}
|
2019-01-16 13:33:08 +11:00
|
|
|
</router-link>
|
|
|
|
</li>
|
2018-12-29 06:39:54 +11:00
|
|
|
<li @click="toggleDrawer">
|
2020-05-25 23:16:30 +10:00
|
|
|
<a
|
|
|
|
href="#"
|
2020-05-26 00:05:30 +10:00
|
|
|
@click="openSettingsModal"
|
2020-05-25 23:16:30 +10:00
|
|
|
>
|
2020-10-21 08:31:16 +11:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
2020-10-29 06:31:16 +11:00
|
|
|
class="fa-scale-110 fa-old-padding"
|
2020-10-21 08:31:16 +11:00
|
|
|
icon="cog"
|
|
|
|
/> {{ $t("settings.settings") }}
|
2020-05-25 23:16:30 +10:00
|
|
|
</a>
|
2018-12-23 02:32:07 +11:00
|
|
|
</li>
|
2019-01-08 04:26:47 +11:00
|
|
|
<li @click="toggleDrawer">
|
|
|
|
<router-link :to="{ name: 'about'}">
|
2020-10-21 08:31:16 +11:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
2020-10-29 06:31:16 +11:00
|
|
|
class="fa-scale-110 fa-old-padding"
|
2020-10-21 08:31:16 +11:00
|
|
|
icon="info-circle"
|
|
|
|
/> {{ $t("nav.about") }}
|
2019-01-08 04:26:47 +11:00
|
|
|
</router-link>
|
|
|
|
</li>
|
2019-09-15 03:53:03 +10:00
|
|
|
<li
|
|
|
|
v-if="currentUser && currentUser.role === 'admin'"
|
|
|
|
@click="toggleDrawer"
|
|
|
|
>
|
2019-09-16 22:03:10 +10:00
|
|
|
<a
|
2019-10-03 03:28:16 +10:00
|
|
|
href="/pleroma/admin/#/login-pleroma"
|
2019-09-16 22:03:10 +10:00
|
|
|
target="_blank"
|
|
|
|
>
|
2020-10-21 08:31:16 +11:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
2020-10-29 06:31:16 +11:00
|
|
|
class="fa-scale-110 fa-old-padding"
|
2020-10-21 08:31:16 +11:00
|
|
|
icon="tachometer-alt"
|
|
|
|
/> {{ $t("nav.administration") }}
|
2019-09-15 03:53:03 +10:00
|
|
|
</a>
|
|
|
|
</li>
|
2019-07-05 17:17:44 +10:00
|
|
|
<li
|
|
|
|
v-if="currentUser"
|
|
|
|
@click="toggleDrawer"
|
|
|
|
>
|
|
|
|
<a
|
|
|
|
href="#"
|
|
|
|
@click="doLogout"
|
|
|
|
>
|
2020-10-21 08:31:16 +11:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
2020-10-29 06:31:16 +11:00
|
|
|
class="fa-scale-110 fa-old-padding"
|
2020-10-21 08:31:16 +11:00
|
|
|
icon="sign-out-alt"
|
|
|
|
/> {{ $t("login.logout") }}
|
2018-12-23 02:32:07 +11:00
|
|
|
</a>
|
|
|
|
</li>
|
2018-12-16 04:13:01 +11:00
|
|
|
</ul>
|
|
|
|
</div>
|
2019-07-05 17:17:44 +10:00
|
|
|
<div
|
|
|
|
class="side-drawer-click-outside"
|
2018-12-29 21:44:21 +11:00
|
|
|
:class="{'side-drawer-click-outside-closed': closed}"
|
2019-07-05 17:17:44 +10:00
|
|
|
@click.stop.prevent="toggleDrawer"
|
|
|
|
/>
|
2018-12-16 04:13:01 +11:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./side_drawer.js" ></script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
@import '../../_variables.scss';
|
|
|
|
|
2018-12-21 07:20:04 +11:00
|
|
|
.side-drawer-container {
|
|
|
|
position: fixed;
|
|
|
|
z-index: 1000;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
display: flex;
|
|
|
|
align-items: stretch;
|
2019-03-28 07:44:25 +11:00
|
|
|
transition-duration: 0s;
|
|
|
|
transition-property: transform;
|
2018-12-21 07:20:04 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
.side-drawer-container-open {
|
2019-03-28 07:44:25 +11:00
|
|
|
transform: translate(0%);
|
|
|
|
}
|
|
|
|
|
|
|
|
.side-drawer-container-closed {
|
|
|
|
transition-delay: 0.35s;
|
|
|
|
transform: translate(-100%);
|
|
|
|
}
|
|
|
|
|
|
|
|
.side-drawer-darken {
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100vw;
|
|
|
|
height: 100vh;
|
|
|
|
position: fixed;
|
|
|
|
z-index: -1;
|
2019-03-12 03:51:37 +11:00
|
|
|
transition: 0.35s;
|
|
|
|
transition-property: background-color;
|
|
|
|
background-color: rgba(0, 0, 0, 0.5);
|
2018-12-21 07:20:04 +11:00
|
|
|
}
|
|
|
|
|
2019-03-28 07:44:25 +11:00
|
|
|
.side-drawer-darken-closed {
|
2019-03-12 03:51:37 +11:00
|
|
|
background-color: rgba(0, 0, 0, 0);
|
2018-12-21 07:20:04 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
.side-drawer-click-outside {
|
|
|
|
flex: 1 1 100%;
|
|
|
|
}
|
|
|
|
|
2018-12-16 04:13:01 +11:00
|
|
|
.side-drawer {
|
2018-12-29 21:44:21 +11:00
|
|
|
overflow-x: hidden;
|
2018-12-16 04:13:01 +11:00
|
|
|
transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
|
2019-03-28 07:44:25 +11:00
|
|
|
transition: 0.35s;
|
|
|
|
transition-property: transform;
|
2018-12-21 07:20:04 +11:00
|
|
|
margin: 0 0 0 -100px;
|
2018-12-29 06:39:54 +11:00
|
|
|
padding: 0 0 1em 100px;
|
|
|
|
width: 80%;
|
|
|
|
max-width: 20em;
|
|
|
|
flex: 0 0 80%;
|
|
|
|
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
|
|
|
|
box-shadow: var(--panelShadow);
|
|
|
|
background-color: $fallback--bg;
|
2020-01-24 09:02:16 +11:00
|
|
|
background-color: var(--popover, $fallback--bg);
|
|
|
|
color: $fallback--link;
|
|
|
|
color: var(--popoverText, $fallback--link);
|
|
|
|
--faint: var(--popoverFaintText, $fallback--faint);
|
|
|
|
--faintLink: var(--popoverFaintLink, $fallback--faint);
|
2020-01-24 09:36:32 +11:00
|
|
|
--lightText: var(--popoverLightText, $fallback--lightText);
|
2020-01-24 09:02:16 +11:00
|
|
|
--icon: var(--popoverIcon, $fallback--icon);
|
2020-11-04 03:45:23 +11:00
|
|
|
|
|
|
|
.badge {
|
|
|
|
position: absolute;
|
|
|
|
right: 0.7rem;
|
|
|
|
top: 1em;
|
|
|
|
}
|
2019-02-05 05:34:07 +11:00
|
|
|
}
|
2019-02-04 06:47:02 +11:00
|
|
|
|
2019-02-05 05:34:07 +11:00
|
|
|
.side-drawer-logo-wrapper {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
padding: 0.85em;
|
2019-02-04 06:47:02 +11:00
|
|
|
|
2019-02-05 05:34:07 +11:00
|
|
|
img {
|
|
|
|
flex: none;
|
|
|
|
height: 50px;
|
|
|
|
margin-right: 0.85em;
|
|
|
|
}
|
2019-02-04 06:47:02 +11:00
|
|
|
|
2019-02-05 05:34:07 +11:00
|
|
|
span {
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
white-space: nowrap;
|
2019-02-04 06:47:02 +11:00
|
|
|
}
|
2018-12-21 07:20:04 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
.side-drawer-click-outside-closed {
|
|
|
|
flex: 0 0 0;
|
2018-12-16 04:13:01 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
.side-drawer-closed {
|
2019-01-27 17:27:41 +11:00
|
|
|
transform: translate(-100%);
|
2018-12-16 04:13:01 +11:00
|
|
|
}
|
|
|
|
|
2018-12-24 04:50:19 +11:00
|
|
|
.side-drawer-heading {
|
|
|
|
background: transparent;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: stretch;
|
|
|
|
display: flex;
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
2018-12-16 04:13:01 +11:00
|
|
|
}
|
2018-12-24 04:50:19 +11:00
|
|
|
|
2018-12-16 04:13:01 +11:00
|
|
|
.side-drawer ul {
|
|
|
|
list-style: none;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
2018-12-29 21:44:21 +11:00
|
|
|
|
|
|
|
border-bottom: 1px solid;
|
|
|
|
border-color: $fallback--border;
|
|
|
|
border-color: var(--border, $fallback--border);
|
|
|
|
}
|
|
|
|
|
|
|
|
.side-drawer ul:last-child {
|
|
|
|
border: 0;
|
2018-12-16 04:13:01 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
.side-drawer li {
|
|
|
|
padding: 0;
|
|
|
|
|
2018-12-24 04:50:19 +11:00
|
|
|
a {
|
2020-10-29 06:41:42 +11:00
|
|
|
box-sizing: border-box;
|
2018-12-24 04:50:19 +11:00
|
|
|
display: block;
|
2020-10-29 06:41:42 +11:00
|
|
|
height: 3em;
|
2020-10-29 06:47:42 +11:00
|
|
|
line-height: 3em;
|
|
|
|
padding: 0 0.7em;
|
2018-12-16 04:13:01 +11:00
|
|
|
|
2018-12-24 04:50:19 +11:00
|
|
|
&:hover {
|
|
|
|
background-color: $fallback--lightBg;
|
2020-01-24 09:36:32 +11:00
|
|
|
background-color: var(--selectedMenuPopover, $fallback--lightBg);
|
2020-01-13 09:33:04 +11:00
|
|
|
color: $fallback--text;
|
2020-01-24 09:36:32 +11:00
|
|
|
color: var(--selectedMenuPopoverText, $fallback--text);
|
|
|
|
--faint: var(--selectedMenuPopoverFaintText, $fallback--faint);
|
|
|
|
--faintLink: var(--selectedMenuPopoverFaintLink, $fallback--faint);
|
|
|
|
--lightText: var(--selectedMenuPopoverLightText, $fallback--lightText);
|
|
|
|
--icon: var(--selectedMenuPopoverIcon, $fallback--icon);
|
2018-12-24 04:50:19 +11:00
|
|
|
}
|
2018-12-16 04:13:01 +11:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|