Skip to content

Commit

Permalink
refactor(scrollbar): fixed slimbar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomBos authored and ThomBos committed Jun 14, 2022
1 parent ae550fc commit 68cbcf4
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 37 deletions.
9 changes: 9 additions & 0 deletions components/interactables/Close/Close.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,18 @@
cursor: pointer;
}

.wrapper .close-button {
right: 0;
top: 0;
}

@media only screen and (max-width: @mobile-breakpoint) {
.close-button {
right: @normal-spacing;
top: @normal-spacing;
}

.wrapper .close-button {
top: @large-spacing;
}
}
1 change: 1 addition & 0 deletions components/ui/SimpleScroll/SimpleScroll.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
pointer-events: auto;
width: @full;
height: fit-content;
height: -moz-fit-content;
margin: auto;
position: relative;
white-space: normal;
Expand Down
55 changes: 33 additions & 22 deletions components/views/navigation/slimbar/Slimbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,28 @@
</UiCircle>
</div>

<div v-on:click="$router.push('/chat/direct')" class="circle-group">
<div
v-on:click="$router.push('/chat/direct')"
class="circle-group"
v-if="horizontal"
>
<UiCircle type="icon" :size="40">
<satellite-icon size="0.75x" />
</UiCircle>
</div>
<div id="list-container-vertical" v-if="!horizontal">

<div id="list-container-vertical" v-else>
<div v-on:click="$router.push('/chat/direct')" class="circle-group">
<UiCircle type="icon" :size="40">
<satellite-icon size="0.75x" />
</UiCircle>
</div>

<UiHorizontalRule
class="horizontal-rule-padding"
v-if="friendsWithUnreadMessages.length && friendsDS !== DataStateType.Loading"
/>

<div class="slimbar-spinner" v-if="friendsDS === DataStateType.Loading">
<UiLoadersSpinner :spinning="true" />
</div>
Expand Down Expand Up @@ -49,6 +61,25 @@
</div>
</UiComingSoon>
</UiSimpleScroll>
<div
class="circle-group"
v-tooltip.right="$t('servers.new_server')"
@click="toggleModal(ModalWindows.CALL_TO_ACTION)"
>
<UiCircle type="icon" :size="40">
<plus-icon size="0.75x" />
</UiCircle>
</div>
<div
class="circle-group"
data-cy="settings"
v-tooltip.right="$t('pages.settings.settings')"
v-on:click="$store.commit('ui/toggleSettings', { show: true })"
>
<UiCircle type="icon" :size="40">
<settings-icon size="0.75x" />
</UiCircle>
</div>
</div>
<div id="list-container" v-else>
<div class="unreads" v-for="user in friendsWithUnreadMessages">
Expand Down Expand Up @@ -80,24 +111,4 @@
</div>
</UiComingSoon>
</div>
<div
v-if="!horizontal"
class="circle-group"
v-tooltip.right="$t('servers.new_server')"
@click="toggleModal(ModalWindows.CALL_TO_ACTION)"
>
<UiCircle type="icon" :size="40">
<plus-icon size="0.75x" />
</UiCircle>
</div>
<div
class="circle-group"
data-cy="settings"
v-tooltip.right="$t('pages.settings.settings')"
v-on:click="$store.commit('ui/toggleSettings', { show: true })"
>
<UiCircle type="icon" :size="40">
<settings-icon size="0.75x" />
</UiCircle>
</div>
</div>
24 changes: 9 additions & 15 deletions components/views/navigation/slimbar/Slimbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
flex-direction: column;
justify-content: flex-start;
pointer-events: none;
padding-left: 0.5rem;
padding-top: @normal-spacing;
box-sizing: border-box;

.circle-group {
margin: @normal-spacing 0;
Expand All @@ -27,14 +26,14 @@
}

.circle {
margin: 0.25rem 0;
margin: @xlight-spacing 0;
&:extend(.first-layer);
}

.unreads {
position: relative;
.unread {
padding: 0.25rem 0;
padding: @xlight-spacing 0;
}
}

Expand All @@ -45,26 +44,21 @@
&:extend(.first-layer);
}

.scroll-area {
height: auto;
max-height: calc(@full - 10rem);
width: 200px;
overflow: hidden;
display: flex;
}
#list-container-vertical {
height: fit-content;
max-height: calc(@full - 11rem);
display: flex;
flex-direction: column;
height: @full;
pointer-events: auto;
box-sizing: border-box;
padding-left: @light-spacing;
padding-top: @normal-spacing;

#simple-scrollbar {
max-height: calc(@full - 3rem);
height: auto;
}
}
#list-container {
height: fit-content;
max-height: calc(@full - 10rem);
position: relative;
pointer-events: auto;
}
Expand Down

0 comments on commit 68cbcf4

Please sign in to comment.