logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://anongit.hacktivis.me/git/pleroma-fe.git/

desktop_nav.vue (2495B)


  1. <template>
  2. <nav
  3. id="nav"
  4. class="DesktopNav"
  5. :class="{ '-logoLeft': logoLeft }"
  6. @click="scrollToTop()"
  7. >
  8. <div class="inner-nav">
  9. <div class="item sitename">
  10. <router-link
  11. v-if="!hideSitename"
  12. class="site-name"
  13. :to="{ name: 'root' }"
  14. active-class="home"
  15. >
  16. {{ sitename }}
  17. </router-link>
  18. </div>
  19. <router-link
  20. class="logo"
  21. :to="{ name: 'root' }"
  22. :style="logoBgStyle"
  23. :title="sitename"
  24. >
  25. <div
  26. class="mask"
  27. :style="logoMaskStyle"
  28. />
  29. <img
  30. :src="logo"
  31. :style="logoStyle"
  32. >
  33. </router-link>
  34. <div class="item right actions">
  35. <search-bar
  36. v-if="currentUser || !privateMode"
  37. @toggled="onSearchBarToggled"
  38. @click.stop
  39. />
  40. <button
  41. class="button-unstyled nav-icon"
  42. :title="$t('nav.preferences')"
  43. @click.stop="openSettingsModal"
  44. >
  45. <FAIcon
  46. fixed-width
  47. class="fa-scale-110 fa-old-padding"
  48. icon="cog"
  49. />
  50. </button>
  51. <button
  52. v-if="currentUser && currentUser.role === 'admin'"
  53. class="button-unstyled nav-icon"
  54. target="_blank"
  55. :title="$t('nav.administration')"
  56. @click.stop="openAdminModal"
  57. >
  58. <FAIcon
  59. fixed-width
  60. class="fa-scale-110 fa-old-padding"
  61. icon="tachometer-alt"
  62. />
  63. </button>
  64. <span class="spacer" />
  65. <button
  66. v-if="currentUser"
  67. class="button-unstyled nav-icon"
  68. :title="$t('login.logout')"
  69. @click.stop.prevent="logout"
  70. >
  71. <FAIcon
  72. fixed-width
  73. class="fa-scale-110 fa-old-padding"
  74. icon="sign-out-alt"
  75. />
  76. </button>
  77. </div>
  78. </div>
  79. <teleport to="#modal">
  80. <confirm-modal
  81. v-if="showingConfirmLogout"
  82. :title="$t('login.logout_confirm_title')"
  83. :confirm-text="$t('login.logout_confirm_accept_button')"
  84. :cancel-text="$t('login.logout_confirm_cancel_button')"
  85. @accepted="doLogout"
  86. @cancelled="hideConfirmLogout"
  87. >
  88. {{ $t('login.logout_confirm') }}
  89. </confirm-modal>
  90. </teleport>
  91. </nav>
  92. </template>
  93. <script src="./desktop_nav.js"></script>
  94. <style src="./desktop_nav.scss" lang="scss"></style>