File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -413,6 +413,13 @@ function upgradeConfig (_config: Config): Config {
413
413
const settings = config . widgets . find ( w => w . wmType === 'settings' ) as widget . Widget
414
414
settings . wmTitle = '{icon=fa-cog}'
415
415
416
+ // make sure icon for settings comes first in the widget menu
417
+ config . widgets . sort ( ( a , b ) => {
418
+ if ( a . wmType === 'settings' ) return - 1
419
+ if ( b . wmType === 'settings' ) return 1
420
+ return 0
421
+ } )
422
+
416
423
config . configVersion = 17
417
424
}
418
425
Original file line number Diff line number Diff line change @@ -79,10 +79,7 @@ export default defineComponent({
79
79
const wm = inject <WidgetManager >(' wm' )!
80
80
81
81
const widgets = computed (() => {
82
- return [
83
- wm .widgets .value .find (widget => widget .wmType === ' settings' )! ,
84
- ... wm .widgets .value .filter (widget => widget .wmType !== ' settings' )
85
- ].filter (widget =>
82
+ return wm .widgets .value .filter (widget =>
86
83
! widget .wmFlags .includes (' menu::skip' ) &&
87
84
(props .config .alwaysShow || (widget .wmWants === ' hide' ))
88
85
).map ((widget ) => {
You can’t perform that action at this time.
0 commit comments