feat(bar-audio): added interface nickname in tooltip

This commit is contained in:
Lemmy
2026-03-10 20:40:09 -04:00
parent 6eacb55f43
commit cc9dea142f
2 changed files with 18 additions and 14 deletions
+9 -7
View File
@@ -147,13 +147,15 @@ Item {
if (PanelService.getPanel("audioPanel", screen)?.isPanelOpen) {
return "";
} else {
return I18n.tr("tooltips.microphone-volume-at", {
"volume": (() => {
const maxVolume = Settings.data.audio.volumeOverdrive ? 1.5 : 1.0;
const displayVolume = Math.min(maxVolume, AudioService.inputVolume);
return Math.round(displayVolume * 100);
})()
});
const nick = AudioService.source?.nickname ?? "";
const volumeText = I18n.tr("tooltips.microphone-volume-at", {
"volume": (() => {
const maxVolume = Settings.data.audio.volumeOverdrive ? 1.5 : 1.0;
const displayVolume = Math.min(maxVolume, AudioService.inputVolume);
return Math.round(displayVolume * 100);
})()
});
return nick ? volumeText + "\n" + nick : volumeText;
}
}
+9 -7
View File
@@ -140,13 +140,15 @@ Item {
if (PanelService.getPanel("audioPanel", screen)?.isPanelOpen) {
return "";
} else {
I18n.tr("tooltips.volume-at", {
"volume": (() => {
const maxVolume = Settings.data.audio.volumeOverdrive ? 1.5 : 1.0;
const displayVolume = Math.min(maxVolume, AudioService.volume);
return Math.round(displayVolume * 100);
})()
});
const nick = AudioService.sink?.nickname ?? "";
const volumeText = I18n.tr("tooltips.volume-at", {
"volume": (() => {
const maxVolume = Settings.data.audio.volumeOverdrive ? 1.5 : 1.0;
const displayVolume = Math.min(maxVolume, AudioService.volume);
return Math.round(displayVolume * 100);
})()
});
return nick ? volumeText + "\n" + nick : volumeText;
}
}