diff options
Diffstat (limited to 'app/ui')
-rw-r--r-- | app/ui/listing.php | 34 | ||||
-rw-r--r-- | app/ui/player-mobile.php | 8 | ||||
-rw-r--r-- | app/ui/player.php | 8 | ||||
-rw-r--r-- | app/ui/settings.php | 17 | ||||
-rw-r--r-- | app/ui/stella.php | 7 |
5 files changed, 69 insertions, 5 deletions
diff --git a/app/ui/listing.php b/app/ui/listing.php index d29b355..29a1bce 100644 --- a/app/ui/listing.php +++ b/app/ui/listing.php @@ -37,6 +37,27 @@ if (!$presetList) { } } +if (!isset($onlyStella)) $onlyStella = false; + +if ($onlyStella) { + $hasAlbum = false; + $list = $songs; + + foreach ($albums as $id => $album) { + foreach ($album["tracks"] as $track) { + $list[$track]["_albumID"] = $id; + } + } + + uasort($list, function ($a, $b) { + return strcmp($a["title"], $b["title"]); + }); + + $list = array_filter($list, function ($i) { + return file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/content/" . $i . ".stella"); + }, ARRAY_FILTER_USE_KEY); +} + ?> <!doctype html> <html lang="en"> @@ -55,6 +76,8 @@ if (!$presetList) { Favorites <?php elseif ($hasAlbum): ?> <?= $albums[$_GET["a"]]["title"] ?> + <?php elseif ($onlyStella): ?> + Mist Stella <?php else: ?> Songs <?php endif; ?> @@ -74,7 +97,7 @@ if (!$presetList) { <div id="ui-back-button" onclick="history.back();" style="display: flex; align-items: center; justify-content: center; text-align: center;<?php if (!$hasAlbum): ?>pointer-events: none; opacity: 0;<?php endif; ?>"> <img src="/assets/icons/back.svg" alt="Back" class="icon"> </div> - <div style="display: flex; align-items: center; justify-content: center; text-align: center;"><b><?php if (!$hasAlbum && !isset($favoritesList)): ?>Songs<?php endif; ?></b></div> + <div style="display: flex; align-items: center; justify-content: center; text-align: center;"><b><?php if (!$hasAlbum && !isset($favoritesList) && !$onlyStella): ?>Songs<?php elseif ($onlyStella): ?>Mist Stella<?php endif; ?></b></div> <?php if (!$hasAlbum): ?> <div> <input placeholder="Filter" id="filter" class="form-control" style="width: 256px;height: 32px;border-top: none;" onchange="updateFilter();" onkeyup="updateFilter();"> @@ -145,9 +168,16 @@ if (!$presetList) { <img src='/assets/icons/lossless.svg' alt='' class='icon player-badge-icon'>Hi-Res Lossless <?php if ($albums[$_GET["a"]]["stella"]): ?><span class="mist-stella"> ยท </span><?php endif; ?> <?php endif; if ($albums[$_GET["a"]]["stella"]): ?> - <span class="mist-stella"><img src='/assets/icons/stella.svg' alt='' style="height: 14.4px !important; width: 14.4px !important;" class='icon player-badge-icon'>Mist Stella</span> + <span class="mist-stella"><img src='/assets/icons/stella.svg' alt='' style="height: 14.4px !important; width: 14.4px !important;" class='icon player-badge-icon'><img src='/assets/icons/stella-full.svg' alt='' class='mist-stella-text icon player-badge-icon'></span> <?php endif; ?> </div> + <style> + .mist-stella-text { + width: 68px !important; + position: relative !important; + top: -1px !important; + } + </style> </div> <div id="album-info-buttons" <?php if (!in_array($_GET["a"], $library)): ?>class="nolibrary"<?php endif; ?>> <?php if (in_array($_GET["a"], $library)): ?> diff --git a/app/ui/player-mobile.php b/app/ui/player-mobile.php index e49e852..80c39d4 100644 --- a/app/ui/player-mobile.php +++ b/app/ui/player-mobile.php @@ -138,7 +138,13 @@ </span> <span id="badge-stella" style="display: block;border: 1px solid transparent;color: rgba(255, 255, 255, .5);background-color: rgba(255, 255, 255, .1);padding: 2px 5px;border-radius: 5px;font-size: 12px;position: fixed;margin-left: auto;margin-right: auto;width: max-content;left: 0;right: 0;bottom: calc(120px + var(--android-navigation-bar));"> <span style="display: grid; grid-template-columns: max-content max-content"> - <span><img src="/assets/icons/stella.svg" alt="" class="player-badge-icon" style="height: 14.4px; width: 14.4px !important; filter: invert(1); opacity: .5;">Mist Stella</span> + <span><img src="/assets/icons/stella.svg" alt="" class="player-badge-icon" style="height: 14.4px; width: 14.4px !important; filter: invert(1); opacity: .5;"><img src='/assets/icons/stella-full.svg' class='stella-logo-full'></span> + <style> + .stella-logo-full { + height: 12px; + filter: invert(1); + } + </style> </span> </span> </div> diff --git a/app/ui/player.php b/app/ui/player.php index 4c5298c..47526f5 100644 --- a/app/ui/player.php +++ b/app/ui/player.php @@ -97,7 +97,13 @@ <div> <span class="player-badge-desktop" data-bs-html="true" data-bs-toggle="tooltip" id="badge-cd" style="z-index: 9999; display: none;position: absolute;margin-left: 71px;"><img src="/assets/icons/lossless.svg" alt="" style="height: 12px;opacity: .5;" class="icon"></span> <span class="player-badge-desktop" data-bs-html="true" data-bs-toggle="tooltip" id="badge-hires" style="z-index: 9999; display: none;position: absolute;margin-left: 71px;"><img src="/assets/icons/lossless.svg" alt="" style="height: 12px;opacity: .5;" class="icon"></span> - <span class="player-badge-desktop" data-bs-html="true" title="<b>Mist Stella</b>" data-bs-toggle="tooltip" id="badge-stella" style="z-index: 9999; display: none;position: absolute;margin-left: 71px;"><img src="/assets/icons/stella.svg" alt="" style="height: 12px;opacity: .5;" class="icon"></span> + <span class="player-badge-desktop" data-bs-html="true" title="<img src='/assets/icons/stella-full.svg' class='stella-logo-full'>" data-bs-toggle="tooltip" id="badge-stella" style="z-index: 9999; display: none;position: absolute;margin-left: 71px;"><img src="/assets/icons/stella.svg" alt="" style="height: 12px;opacity: .5;" class="icon"></span> + <style> + .stella-logo-full { + height: 12px; + filter: invert(1); + } + </style> <div id="info" style="display: none; grid-template-columns: 64px 1fr; height: 64px; border-left: 1px solid rgba(0, 0, 0, .25); border-right: 1px solid rgba(0, 0, 0, .25);"> <img alt="" id="album-art" style="background-color: rgba(0, 0, 0, .1); height: 64px; width: 64px;"> <div id="info-grid" style="z-index: 9; display: grid; grid-template-rows: 2px 22px 22px 12px 6px;"> diff --git a/app/ui/settings.php b/app/ui/settings.php index fe421a0..26217f0 100644 --- a/app/ui/settings.php +++ b/app/ui/settings.php @@ -45,6 +45,21 @@ </script> <div class="form-check form-switch" style="margin-top: 10px;"> + <input onchange="saveOA();" class="form-check-input" type="checkbox" role="switch" id="noamp"> + <label class="form-check-label" for="noamp"> + Disable audio amplification + <div class="text-muted small">By default, Mist makes your music louder, so it doesn't otherwise seem too quiet. If you have issues with clipping, or this feature does not otherwise play nicely with your device, you might want to turn on this option.</div> + </label> + </div> + <script> + if (localStorage.getItem("noamp") === "true") document.getElementById("noamp").checked = true; + function saveOA() { + localStorage.setItem("noamp", document.getElementById("noamp").checked ? "true" : "false"); + window.parent.location.reload(); + } + </script> + + <div class="form-check form-switch" style="margin-top: 10px;"> <input onchange="saveN();" class="form-check-input" type="checkbox" role="switch" id="normalize"> <label class="form-check-label" for="normalize"> Normalize loudness @@ -63,7 +78,7 @@ <input onchange="saveST();" class="form-check-input" type="checkbox" role="switch" id="enable-stella"> <label class="form-check-label" for="enable-stella"> Mist Stella - <div class="text-muted small">Enjoy your music is a unique way thanks to the Mist Stella spatial audio technology. Stella makes your music feel like it's coming from all around you, giving you a concert-like experience. Note that Stella uses slightly more bandwidth than lossless streaming.</div> + <div class="text-muted small">Enjoy your music is a unique way thanks to the Mist Stella spatial audio technology. Stella makes your music feel like it's coming from all around you, giving you a concert-like experience. Note that Stella uses slightly more bandwidth than lossless streaming. <a href="#" onclick="window.parent.location.hash = '#/stella';">See compatible songs.</a></div> </label> </div> <script> diff --git a/app/ui/stella.php b/app/ui/stella.php new file mode 100644 index 0000000..143a172 --- /dev/null +++ b/app/ui/stella.php @@ -0,0 +1,7 @@ +<?php + +header("X-Frame-Options: SAMEORIGIN"); +unset($_GET["a"]); +$onlyStella = true; +global $onlyStella; +require_once "./listing.php";
\ No newline at end of file |