Skip to content

Commit

Permalink
Allow to specify custom action instead of star
Browse files Browse the repository at this point in the history
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
  • Loading branch information
raimund-schluessler committed Aug 19, 2020
1 parent 1890dd0 commit 8c298e8
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/components/AppSidebar/AppSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,17 @@
}"
class="app-sidebar-header__desc">
<!-- favourite icon -->
<div v-if="canStar" class="app-sidebar-header__star-action">
<a :class="{
'icon-starred': isStarred && !starLoading,
'icon-star': !isStarred && !starLoading,
'icon-loading-small': starLoading
}"
class="app-sidebar-header__star"
@click.prevent="toggleStarred" />
<div v-if="canStar || $slots['tertiary-actions']" class="app-sidebar-header__tertiary-actions">
<slot name="tertiary-actions">
<a v-if="canStar"
:class="{
'icon-starred': isStarred && !starLoading,
'icon-star': !isStarred && !starLoading,
'icon-loading-small': starLoading
}"
class="app-sidebar-header__star"
@click.prevent="toggleStarred" />
</slot>
</div>

<!-- main title -->
Expand Down Expand Up @@ -480,7 +483,7 @@ $top-buttons-spacing: 6px;
box-sizing: content-box;
padding: #{$desc-vertical-padding} 0 #{$desc-vertical-padding} #{$desc-vertical-padding / 2};
.app-sidebar-header__star-action {
.app-sidebar-header__tertiary-actions {
display: flex;
height: $clickable-area;
width: $clickable-area;
Expand Down

0 comments on commit 8c298e8

Please sign in to comment.