Skip to content

Commit fcb9c03

Browse files
Merge pull request #7012 from nextcloud/show-favourite-action-as-the-first-one
Show favourite action as the first one in the file actions menu
2 parents c8323f8 + 446a3d2 commit fcb9c03

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

apps/files/js/tagsplugin.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,17 @@
103103
return t('files', 'Add to favorites');
104104
},
105105
mime: 'all',
106-
order: -23,
106+
order: -100,
107107
permissions: OC.PERMISSION_READ,
108108
iconClass: function(fileName, context) {
109109
var $file = context.$file;
110110
var isFavorite = $file.data('favorite') === true;
111111

112112
if (isFavorite) {
113-
return 'icon-starred';
113+
return 'icon-star-dark';
114114
}
115115

116-
return 'icon-star';
116+
return 'icon-starred';
117117
},
118118
actionHandler: function(fileName, context) {
119119
var $favoriteMarkEl = context.$file.find('.favorite-mark');

core/css/icons.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,10 @@ img, object, video, button, textarea, input, select {
348348
background-image: url('../img/actions/star.svg?v=1');
349349
}
350350

351+
.icon-star-dark {
352+
background-image: url('../img/actions/star-dark.svg?v=1');
353+
}
354+
351355
.icon-starred {
352356
&:hover, &:focus {
353357
background-image: url('../img/actions/star.svg?v=1');

0 commit comments

Comments
 (0)