logo

pleroma-fe

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

timeline_menu.vue (2164B)


  1. <template>
  2. <Popover
  3. trigger="click"
  4. class="TimelineMenu"
  5. :class="{ 'open': isOpen }"
  6. :bound-to="{ x: 'container' }"
  7. bound-to-selector=".Timeline"
  8. popover-class="timeline-menu-popover popover-default"
  9. @show="openMenu"
  10. @close="() => isOpen = false"
  11. >
  12. <template #content>
  13. <ListsMenuContent
  14. v-if="useListsMenu"
  15. :show-pin="false"
  16. class="timelines"
  17. />
  18. <BookmarkFoldersMenuContent
  19. v-else-if="useBookmarkFoldersMenu"
  20. class="timelines"
  21. />
  22. <ul v-else>
  23. <NavigationEntry
  24. v-for="item in timelinesList"
  25. :key="item.name"
  26. :show-pin="false"
  27. :item="item"
  28. />
  29. </ul>
  30. </template>
  31. <template #trigger>
  32. <span class="button-unstyled timeline-menu-title">
  33. <h1 class="title timeline-title">{{ timelineName() }}</h1>
  34. <span>
  35. <FAIcon
  36. size="sm"
  37. icon="chevron-down"
  38. />
  39. </span>
  40. <span
  41. class="click-blocker"
  42. @click="blockOpen"
  43. />
  44. </span>
  45. </template>
  46. </Popover>
  47. </template>
  48. <script src="./timeline_menu.js"></script>
  49. <style lang="scss">
  50. .timeline-menu-popover {
  51. min-width: 24rem;
  52. max-width: 100vw;
  53. margin-top: 0.6rem;
  54. font-size: 1rem;
  55. border-top-right-radius: 0;
  56. border-top-left-radius: 0;
  57. ul {
  58. list-style: none;
  59. margin: 0;
  60. padding: 0;
  61. }
  62. }
  63. .TimelineMenu {
  64. margin-right: auto;
  65. min-width: 0;
  66. .popover-trigger-button {
  67. vertical-align: bottom;
  68. }
  69. .panel::after {
  70. border-top-right-radius: 0;
  71. border-top-left-radius: 0;
  72. }
  73. .timeline-menu-title {
  74. margin: 0;
  75. cursor: pointer;
  76. user-select: none;
  77. width: 100%;
  78. display: flex;
  79. .timeline-menu-name {
  80. overflow: hidden;
  81. text-overflow: ellipsis;
  82. white-space: nowrap;
  83. }
  84. svg {
  85. margin-left: 0.6em;
  86. transition: transform 100ms;
  87. }
  88. .click-blocker {
  89. cursor: default;
  90. flex-grow: 1;
  91. }
  92. }
  93. &.open .timeline-menu-title svg {
  94. transform: rotate(180deg);
  95. }
  96. .panel {
  97. box-shadow: var(--popoverShadow);
  98. }
  99. }
  100. </style>