Skip to content

Commit f1ddb92

Browse files
committed
nit: prettier
1 parent 77e24f4 commit f1ddb92

File tree

2 files changed

+22
-20
lines changed

2 files changed

+22
-20
lines changed

plugins/notifications/back.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
const {Notification} = require('electron');
1+
const { Notification } = require("electron");
22

33
const notify = info => {
44
let notificationImage = 'assets/youtube-music.png';
55

66
if (info.image) {
7-
notificationImage = info.image.resize({height: 256, width: 256});
7+
notificationImage = info.image.resize({ height: 256, width: 256 });
88
}
99

1010
// Fill the notification with content
1111
const notification = {
12-
title: info.title || 'Playing',
12+
title: info.title || "Playing",
1313
body: info.artist,
1414
icon: notificationImage,
15-
silent: true
15+
silent: true,
1616
};
1717
// Send the notification
1818
new Notification(notification).show();

plugins/touchbar/back.js

+18-16
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
const {TouchBar} = require('electron');
1+
const { TouchBar } = require("electron");
22
const {
33
TouchBarButton,
44
TouchBarLabel,
55
TouchBarSpacer,
66
TouchBarSegmentedControl,
7-
TouchBarScrubber
7+
TouchBarScrubber,
88
} = TouchBar;
99

1010
// Songtitle label
1111
const songTitle = new TouchBarLabel({
12-
label: ''
12+
label: "",
1313
});
1414
// This will store the song controls once available
1515
let controls = [];
@@ -22,37 +22,37 @@ const pausePlayButton = new TouchBarButton();
2222

2323
// The song control buttons (control functions are in the same order)
2424
const buttons = new TouchBarSegmentedControl({
25-
mode: 'buttons',
25+
mode: "buttons",
2626
segments: [
2727
new TouchBarButton({
28-
label: '⏮'
28+
label: "⏮",
2929
}),
3030
pausePlayButton,
3131
new TouchBarButton({
32-
label: '⏭'
32+
label: "⏭",
3333
}),
3434
new TouchBarButton({
35-
label: '👎'
35+
label: "👎",
3636
}),
3737
new TouchBarButton({
38-
label: '👍'
39-
})
38+
label: "👍",
39+
}),
4040
],
41-
change: i => controls[i]()
41+
change: (i) => controls[i](),
4242
});
4343

4444
// This is the touchbar object, this combines everything with proper layout
4545
const touchBar = new TouchBar({
4646
items: [
4747
new TouchBarScrubber({
4848
items: [songImage, songTitle],
49-
continuous: false
49+
continuous: false,
5050
}),
5151
new TouchBarSpacer({
52-
size: 'flexible'
52+
size: "flexible",
5353
}),
54-
buttons
55-
]
54+
buttons,
55+
],
5656
});
5757

5858
module.exports = win => {
@@ -74,10 +74,12 @@ module.exports = win => {
7474
songTitle.label = songInfo.title;
7575

7676
// Changes the pause button if paused
77-
pausePlayButton.label = songInfo.isPaused ? '▶️' : '⏸';
77+
pausePlayButton.label = songInfo.isPaused ? "▶️" : "⏸";
7878

7979
// Get image source
80-
songImage.icon = songInfo.image ? songInfo.image.resize({height: 23}) : null;
80+
songImage.icon = songInfo.image
81+
? songInfo.image.resize({ height: 23 })
82+
: null;
8183

8284
win.setTouchBar(touchBar);
8385
});

0 commit comments

Comments
 (0)