Sfoglia il codice sorgente

fix: better slider lock icon styling

Sv443 1 anno fa
parent
commit
08839c9bf7
2 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  1. 1 1
      assets/translations/en_US.json
  2. 5 0
      src/features/layout.ts

+ 1 - 1
assets/translations/en_US.json

@@ -140,7 +140,7 @@
     "feature_helptext_rememberSongTime-n": "Sometimes when reloading the page or restoring it after accidentally closing it, you want to resume listening at the same point. This feature allows you to do that.\nIn order to record the song's time, you need to play it for %1 seconds, then its time will be remembered and be restorable for a short while.",
     "feature_desc_rememberSongTimeSites": "On which sites should the song time be remembered and restored?",
     "feature_desc_lockVolume": "Force the volume slider to stay at a specific level",
-    "feature_desc_lockVolumeLevel": "What volume level to lock the slider at",
+    "feature_desc_lockVolumeLevel": "What volume level to lock the volume slider at",
 
     "feature_desc_arrowKeySupport": "Use arrow keys to skip forwards and backwards in the currently playing song",
     "feature_helptext_arrowKeySupport": "Normally you can only skip forwards and backwards by a fixed 10 second interval with the keys \"H\" and \"L\". This feature allows you to use the arrow keys too.\nTo change the amount of seconds to skip, use the option below.",

+ 5 - 0
src/features/layout.ts

@@ -256,6 +256,11 @@ async function addVolumeSliderLabel(sliderElem: HTMLInputElement, sliderContaine
     lockIconElem.title = lockIconElem.ariaLabel = t("volume_locked", getFeatures().lockVolumeLevel);
     lockIconElem.innerHTML = lockIconHtml;
   }
+  else {
+    lockIconElem = document.createElement("div");
+    lockIconElem.textContent = " ";
+    lockIconElem.style.minWidth = "32px";
+  }
 
   onSelectorOld("#bytm-vol-slider-cont", {
     listener: (volumeCont) => {