Skip to content

Commit

Permalink
fix(tags): scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
antonreshetov committed Apr 8, 2022
1 parent 889624f commit b060225
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/renderer/components/sidebar/SidebarList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<div
class="sidebar-list"
:class="{
'is-scrollable': isScrollable
'is-scrollable': isScrollable || modelValue === 'tags',
'is-tags': modelValue === 'tags'
}"
>
<div class="sidebar-list__header">
Expand All @@ -25,10 +26,11 @@
</div>
</div>
<div
ref="listRef"
class="body"
:class="{ 'is-system': isSystem }"
>
<PerfectScrollbar v-if="isScrollable">
<PerfectScrollbar v-if="isScrollable || modelValue === 'tags'">
<div class="inner">
<slot />
</div>
Expand All @@ -53,6 +55,7 @@ interface Props {
modelValue?: Tab
isSystem?: boolean
isScrollable?: boolean
type?: 'folders' | 'tags'
}
interface Emits {
Expand Down Expand Up @@ -90,6 +93,11 @@ const onClickTab = (tab: Tab) => {
:deep(.ps) {
height: calc(100vh - 190px);
}
&.is-tags {
:deep(.ps) {
height: calc(100vh - 50px);
}
}
}
&__header {
display: flex;
Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/sidebar/TheSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
v-if="activeTab === 'library'"
:is-scrollable="true"
title="Folders"
type="folders"
>
<template #action>
<UniconsPlus @click="onAddNewFolder" />
Expand Down

0 comments on commit b060225

Please sign in to comment.