Skip to content

Commit

Permalink
Merge pull request #2265 from nextcloud/fix/2264/appsidebar-star
Browse files Browse the repository at this point in the history
Use material design icon for AppSidebar star
  • Loading branch information
marcoambrosini authored Sep 20, 2021
2 parents 52df1cb + 6bc5ca1 commit bc0f5d1
Show file tree
Hide file tree
Showing 65 changed files with 38 additions and 7 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 38 additions & 7 deletions src/components/AppSidebar/AppSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,18 @@ include a standard-header like it's used by the files app.
<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" />
@click.prevent="toggleStarred">
<span v-if="starLoading" class="icon-loading-small" />
<Star v-else
:class="{
'star--starred': isStarred,
'star--star': !isStarred,
}"
class="star"
:size="20"
decorative />
</a>
</slot>
</div>

Expand Down Expand Up @@ -269,6 +274,7 @@ import { t } from '../../l10n'
import { directive as ClickOutside } from 'v-click-outside'
import Close from 'vue-material-design-icons/Close.vue'
import Star from 'vue-material-design-icons/Star.vue'
export default {
name: 'AppSidebar',
Expand All @@ -278,6 +284,7 @@ export default {
AppSidebarTabs,
EmptyContent,
Close,
Star,
},
directives: {
Expand Down Expand Up @@ -791,7 +798,31 @@ $top-buttons-spacing: 6px;
display: block;
width: $clickable-area;
height: $clickable-area;
padding: $icon-margin;
.icon-loading-small {
display: block;
width: $clickable-area;
height: $clickable-area;
}
.star {
width: $clickable-area;
height: $clickable-area;
&--star {
color: #000;
opacity: .5;
&:hover {
color: #FC0;
}
}
&--starred {
color: #FC0;
&:hover {
color: #000;
opacity: .5;
}
}
}
}
}
Expand Down

0 comments on commit bc0f5d1

Please sign in to comment.