new key-combo: ESC for goto parent folder (#4)
Merge branch 'master' of destiny.zotan.network:ctucx/webmusic click on back element instead of window.location override add id to back button, use list elements Merge branch 'master' into master new key-combo: ESC for goto parent folder Co-authored-by: Leah (ctucx) <leah@ctu.cx> Co-authored-by: Laura Hausmann <laura@hausmann.dev> Reviewed-on: https://git.zotan.services/zotan/webmusic/pulls/4 Co-Authored-By: Leah <leah@antifa.jetzt> Co-Committed-By: Leah <leah@antifa.jetzt>
This commit is contained in:
parent
e4d9bed6be
commit
0000568e2b
|
@ -16,16 +16,17 @@ else {
|
|||
@Model.Displaypath <span id="state"></span> <span id="flags"></span>
|
||||
</h2>
|
||||
<a class="action-muted">[..]</a>
|
||||
<a href="?@Model.PathOneup" class="entry-muted cfont"> Go back</a>
|
||||
<a href="?@Model.PathOneup" id="back" class="entry-muted cfont"> Go back</a>
|
||||
<br/>
|
||||
<a class="action-muted">[--]</a>
|
||||
<a href="/playlist/@(Request.QueryString).m3u" class="entry-muted cfont"> Download playlist</a>
|
||||
<br/>
|
||||
<br/>
|
||||
@foreach (var dir in Model.Dirs) {
|
||||
<li>
|
||||
<a class="action" href="#">[--]</a>
|
||||
<a href="?@Model.Path/@dir"> @dir</a>
|
||||
<br/>
|
||||
</li>
|
||||
}
|
||||
@foreach (var file in Model.Files) {
|
||||
var jspath = IndexModel.Encode(Model.Fullpath);
|
||||
|
@ -34,6 +35,7 @@ else {
|
|||
var lrcfile = basename + ".lrc";
|
||||
var lrcpath = System.IO.Path.Combine(Model.Fullpath, lrcfile);
|
||||
|
||||
<li>
|
||||
<script>queue.push('@Html.Raw(jsfile)')</script>
|
||||
<a class="action" href="@Html.Raw(IndexModel.Encode(Model.Fullpath + "/" + file))" download>[DL]</a>
|
||||
@if (System.IO.File.Exists(lrcpath)) {
|
||||
|
@ -43,6 +45,6 @@ else {
|
|||
<a class="action">[---]</a>
|
||||
}
|
||||
<a href="#" onclick="playSong('@Html.Raw(jsfile)')"> @file</a>
|
||||
<br/>
|
||||
</li>
|
||||
}
|
||||
}
|
|
@ -41,3 +41,7 @@ h2, h2 a {
|
|||
margin-left: 10%;
|
||||
margin-right: 10%;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style: none;
|
||||
}
|
||||
|
|
|
@ -50,6 +50,9 @@ window.onkeyup = function (event) {
|
|||
else if (event.key === "ArrowRight") {
|
||||
sound.seek(sound.seek()+10);
|
||||
}
|
||||
else if (event.key === "Escape") {
|
||||
document.getElementById("back").click();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
@ -80,6 +83,7 @@ function playSong(url) {
|
|||
src: [url],
|
||||
html5: true
|
||||
});
|
||||
|
||||
setState("loading");
|
||||
sound.play();
|
||||
sound.loop(repeat);
|
||||
|
|
Loading…
Reference in a new issue