Start work for the media menu refactor...
This commit is contained in:
51
modules/menus/media/components/mediainfo.js
Normal file
51
modules/menus/media/components/mediainfo.js
Normal file
@@ -0,0 +1,51 @@
|
||||
const MediaInfo = (curPlayer) => {
|
||||
return Widget.Box({
|
||||
class_name: "media-indicator-current-media-info",
|
||||
hpack: "center",
|
||||
hexpand: true,
|
||||
vertical: true,
|
||||
children: [
|
||||
Widget.Box({
|
||||
class_name: "media-indicator-current-song-name",
|
||||
hpack: "center",
|
||||
children: [
|
||||
Widget.Label({
|
||||
truncate: "end",
|
||||
max_width_chars: 21,
|
||||
wrap: true,
|
||||
class_name: "media-indicator-current-song-name-label",
|
||||
label: curPlayer["track-title"],
|
||||
}),
|
||||
],
|
||||
}),
|
||||
Widget.Box({
|
||||
class_name: "media-indicator-current-song-author",
|
||||
hpack: "center",
|
||||
children: [
|
||||
Widget.Label({
|
||||
truncate: "end",
|
||||
wrap: true,
|
||||
max_width_chars: 25,
|
||||
class_name: "media-indicator-current-song-author-label",
|
||||
label: curPlayer["track-artists"].join(", "),
|
||||
}),
|
||||
],
|
||||
}),
|
||||
Widget.Box({
|
||||
class_name: "media-indicator-current-song-album",
|
||||
hpack: "center",
|
||||
children: [
|
||||
Widget.Label({
|
||||
truncate: "end",
|
||||
wrap: true,
|
||||
max_width_chars: 25,
|
||||
class_name: "media-indicator-current-song-album-label",
|
||||
label: curPlayer["track-album"],
|
||||
}),
|
||||
],
|
||||
}),
|
||||
],
|
||||
});
|
||||
};
|
||||
|
||||
export { MediaInfo };
|
||||
Reference in New Issue
Block a user