pleroma-fe/src/App.vue

136 lines
3.4 KiB
Vue
Raw Normal View History

2016-11-08 04:03:36 +11:00
<template>
2019-07-05 17:17:44 +10:00
<div
id="app"
:style="bgAppStyle"
>
<div
2019-07-20 02:36:07 +10:00
id="app_bg_wrapper"
2019-07-05 17:17:44 +10:00
class="app-bg-wrapper"
:style="bgStyle"
/>
<MobileNav v-if="isMobileLayout" />
2019-07-05 17:17:44 +10:00
<nav
v-else
id="nav"
class="nav-bar container"
@click="scrollToTop()"
>
<div class="inner-nav">
2019-07-05 17:17:44 +10:00
<div
class="logo"
:style="logoBgStyle"
2019-07-05 17:17:44 +10:00
>
<div
class="mask"
:style="logoMaskStyle"
/>
<img
:src="logo"
:style="logoStyle"
>
</div>
2019-07-05 17:17:44 +10:00
<div class="item">
<router-link
v-if="!hideSitename"
2019-07-05 17:17:44 +10:00
class="site-name"
:to="{ name: 'root' }"
active-class="home"
>
{{ sitename }}
</router-link>
2017-01-17 04:57:03 +11:00
</div>
2019-07-05 17:17:44 +10:00
<div class="item right">
2019-07-16 02:42:27 +10:00
<search-bar
2019-12-13 06:46:07 +11:00
v-if="currentUser || !privateMode"
2019-07-16 02:42:27 +10:00
class="nav-icon mobile-hidden"
@toggled="onSearchBarToggled"
2019-12-13 06:37:32 +11:00
@click.stop.native
2019-07-05 17:17:44 +10:00
/>
2020-05-04 00:36:12 +10:00
<a
href="#"
2019-07-05 17:17:44 +10:00
class="mobile-hidden"
2020-05-04 00:36:12 +10:00
@click.stop="openSettingsModal"
2019-07-05 17:17:44 +10:00
>
<i
class="button-icon icon-cog nav-icon"
:title="$t('nav.preferences')"
/>
2020-05-04 00:36:12 +10:00
</a>
2019-09-15 03:50:03 +10:00
<a
v-if="currentUser && currentUser.role === 'admin'"
2019-10-03 03:28:16 +10:00
href="/pleroma/admin/#/login-pleroma"
2019-09-15 03:50:03 +10:00
class="mobile-hidden"
2019-09-16 22:03:10 +10:00
target="_blank"
2019-09-15 03:50:03 +10:00
><i
class="button-icon icon-gauge nav-icon"
2019-09-27 11:29:51 +10:00
:title="$t('nav.administration')"
2019-09-15 03:50:03 +10:00
/></a>
2019-07-05 17:17:44 +10:00
<a
v-if="currentUser"
href="#"
class="mobile-hidden"
@click.prevent="logout"
><i
class="button-icon icon-logout nav-icon"
:title="$t('login.logout')"
/></a>
2017-02-17 08:25:41 +11:00
</div>
2016-11-08 04:03:36 +11:00
</div>
</nav>
2020-05-07 23:10:53 +10:00
<div class="app-bg-wrapper app-container-wrapper" />
2019-07-05 17:17:44 +10:00
<div
id="content"
class="container underlay"
2019-07-05 17:17:44 +10:00
>
<div
class="sidebar-flexer mobile-hidden"
:style="sidebarAlign"
>
<div class="sidebar-bounds">
<div class="sidebar-scroller">
<div class="sidebar">
2019-07-05 17:17:44 +10:00
<user-panel />
<div v-if="!isMobileLayout">
2019-07-05 17:17:44 +10:00
<nav-panel />
<instance-specific-panel v-if="showInstanceSpecificPanel" />
<features-panel v-if="!currentUser && showFeaturesPanel" />
<who-to-follow-panel v-if="currentUser && suggestionsEnabled" />
<notifications v-if="currentUser" />
</div>
</div>
</div>
</div>
2016-12-03 00:33:03 +11:00
</div>
<div class="main">
2019-07-05 17:17:44 +10:00
<div
v-if="!currentUser"
class="login-hint panel panel-default"
>
<router-link
:to="{ name: 'login' }"
class="panel-body"
>
2019-02-07 03:53:51 +11:00
{{ $t("login.hint") }}
</router-link>
2019-02-06 21:01:32 +11:00
</div>
<router-view />
2016-12-03 00:33:03 +11:00
</div>
2019-07-05 17:17:44 +10:00
<media-modal />
2016-11-08 04:03:36 +11:00
</div>
2019-07-05 17:17:44 +10:00
<chat-panel
v-if="currentUser && chat"
:floating="true"
class="floating-chat mobile-hidden"
/>
2019-09-20 03:59:34 +10:00
<MobilePostStatusButton />
2019-03-19 19:53:11 +11:00
<UserReportingModal />
<PostStatusModal />
2020-05-04 00:36:12 +10:00
<SettingsModal />
<portal-target name="modal" />
<GlobalNoticeList />
2016-11-08 04:03:36 +11:00
</div>
</template>
2016-10-27 01:46:32 +11:00
2016-10-27 04:03:55 +11:00
<script src="./App.js"></script>
<style lang="scss" src="./App.scss"></style>