Start work for the media menu refactor...

This commit is contained in:
Jas Singh
2024-06-30 16:46:09 -07:00
parent 9cf5b0f5ea
commit 6b98da2145
19 changed files with 807 additions and 900 deletions

View 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 };