Skip to content
Snippets Groups Projects
App.vue 3.68 KiB
Newer Older
  • Learn to ignore specific revisions
  • lain's avatar
    lain committed
    <template>
    
    HJ's avatar
    HJ committed
      <div
        id="app"
        :style="bgAppStyle"
      >
        <div
    
    Tae Hoon's avatar
    Tae Hoon committed
          id="app_bg_wrapper"
    
    HJ's avatar
    HJ committed
          class="app-bg-wrapper"
          :style="bgStyle"
        />
    
        <MobileNav v-if="isMobileLayout" />
    
    HJ's avatar
    HJ committed
        <nav
          v-else
          id="nav"
          class="nav-bar container"
          @click="scrollToTop()"
        >
    
          <div class="inner-nav">
    
    HJ's avatar
    HJ committed
            <div
    
              class="logo"
              :style="logoBgStyle"
    
    HJ's avatar
    HJ committed
            >
    
              <div
                class="mask"
                :style="logoMaskStyle"
              />
              <img
                :src="logo"
                :style="logoStyle"
              >
            </div>
    
    HJ's avatar
    HJ committed
            <div class="item">
              <router-link
    
    HJ's avatar
    HJ committed
                class="site-name"
                :to="{ name: 'root' }"
                active-class="home"
              >
                {{ sitename }}
              </router-link>
    
    lain's avatar
    lain committed
            </div>
    
    HJ's avatar
    HJ committed
            <div class="item right">
    
    Eugenij's avatar
    Eugenij committed
              <search-bar
    
    feld's avatar
    feld committed
                v-if="currentUser || !privateMode"
    
    Eugenij's avatar
    Eugenij committed
                class="nav-icon mobile-hidden"
                @toggled="onSearchBarToggled"
    
    feld's avatar
    feld committed
                @click.stop.native
    
    HJ's avatar
    HJ committed
              />
    
    HJ's avatar
    HJ committed
              <a
    
    HJ's avatar
    HJ committed
                class="mobile-hidden"
    
    HJ's avatar
    HJ committed
                @click.stop="openSettingsModal"
    
    HJ's avatar
    HJ committed
              >
                <i
                  class="button-icon icon-cog nav-icon"
                  :title="$t('nav.preferences')"
                />
    
    HJ's avatar
    HJ committed
              </a>
    
    Tae Hoon's avatar
    Tae Hoon committed
              <a
                v-if="currentUser && currentUser.role === 'admin'"
    
    Tae Hoon's avatar
    Tae Hoon committed
                href="/pleroma/admin/#/login-pleroma"
    
    Tae Hoon's avatar
    Tae Hoon committed
                class="mobile-hidden"
    
    Tae Hoon's avatar
    Tae Hoon committed
                target="_blank"
    
    Tae Hoon's avatar
    Tae Hoon committed
              ><i
                class="button-icon icon-gauge nav-icon"
    
    Tae Hoon's avatar
    Tae Hoon committed
                :title="$t('nav.administration')"
    
    Tae Hoon's avatar
    Tae Hoon committed
              /></a>
    
    HJ's avatar
    HJ committed
              <a
                v-if="currentUser"
                href="#"
                class="mobile-hidden"
                @click.prevent="logout"
              ><i
                class="button-icon icon-logout nav-icon"
                :title="$t('login.logout')"
              /></a>
    
    lain's avatar
    lain committed
            </div>
    
    lain's avatar
    lain committed
          </div>
        </nav>
    
    HJ's avatar
    HJ committed
        <div
          id="content"
    
          class="container underlay"
    
    HJ's avatar
    HJ committed
        >
    
          <div
            class="sidebar-flexer mobile-hidden"
            :style="sidebarAlign"
          >
    
            <div class="sidebar-bounds">
              <div class="sidebar-scroller">
                <div class="sidebar">
    
    HJ's avatar
    HJ committed
                  <user-panel />
    
                  <div v-if="!isMobileLayout">
    
    HJ's avatar
    HJ committed
                    <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" />
    
    lain's avatar
    lain committed
          </div>
    
            <div
              v-if="showStorageError"
              class="alert error storage-error-notice"
            >
              {{ $t("errors.storage_unavailable") }}
              <i
                class="icon-cancel"
                @click="hideStorageError"
              />
            </div>
    
    HJ's avatar
    HJ committed
            <div
              v-if="!currentUser"
              class="login-hint panel panel-default"
            >
              <router-link
                :to="{ name: 'login' }"
                class="panel-body"
              >
    
    Xiaofeng An's avatar
    Xiaofeng An committed
                {{ $t("login.hint") }}
              </router-link>
    
    lain's avatar
    lain committed
            <transition name="fade">
    
    HJ's avatar
    HJ committed
              <router-view />
    
    lain's avatar
    lain committed
            </transition>
          </div>
    
    HJ's avatar
    HJ committed
          <media-modal />
    
    lain's avatar
    lain committed
        </div>
    
    HJ's avatar
    HJ committed
        <chat-panel
          v-if="currentUser && chat"
          :floating="true"
          class="floating-chat mobile-hidden"
        />
    
    Tae Hoon's avatar
    Tae Hoon committed
        <MobilePostStatusButton />
    
    Tae Hoon's avatar
    Tae Hoon committed
        <UserReportingModal />
    
        <PostStatusModal />
    
    HJ's avatar
    HJ committed
        <SettingsModal />
    
        <portal-target name="modal" />
    
    lain's avatar
    lain committed
      </div>
    </template>
    
    lain's avatar
    lain committed
    
    
    lain's avatar
    .  
    lain committed
    <script src="./App.js"></script>
    <style lang="scss" src="./App.scss"></style>