diff --git a/static/js/main.js b/static/js/main.js
index 04d9bd9..d420acb 100644
--- a/static/js/main.js
+++ b/static/js/main.js
@@ -57,4 +57,4 @@ var c="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typ
* https://js.foundation/
*
* Date: 2020-03-14
- */!function(i){var a,r,o,s,l,f,h,u,p,v,m,d,g,z,y,x,C,M,H,b="sizzle"+1*new Date,V=i.document,L=0,w=0,N=ue(),S=ue(),A=ue(),T=ue(),_=function(e,t){return e===t&&(m=!0),0},E={}.hasOwnProperty,k=[],j=k.pop,D=k.push,O=k.push,P=k.slice,I=function(e,t){for(var c=0,n=e.length;c+~]|"+R+")"+R+"*"),G=new RegExp(R+"|>"),X=new RegExp(Q),Y=new RegExp("^"+F+"$"),K={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+q+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},J=/HTML$/i,ee=/^(?:input|select|textarea|button)$/i,te=/^h\d$/i,ce=/^[^{]+\{\s*\[native \w/,ne=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ie=/[+~]/,ae=new RegExp("\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\([^\\r\\n\\f])","g"),re=function(e,t){var c="0x"+e.slice(1)-65536;return t||(c<0?String.fromCharCode(c+65536):String.fromCharCode(c>>10|55296,1023&c|56320))},oe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,se=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},le=function(){d()},fe=be((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{O.apply(k=P.call(V.childNodes),V.childNodes),k[V.childNodes.length].nodeType}catch(e){O={apply:k.length?function(e,t){D.apply(e,P.call(t))}:function(e,t){for(var c=e.length,n=0;e[c++]=t[n++];);e.length=c-1}}}function he(e,t,c,n){var i,a,o,s,l,h,p,v=t&&t.ownerDocument,m=t?t.nodeType:9;if(c=c||[],"string"!=typeof e||!e||1!==m&&9!==m&&11!==m)return c;if(!n&&(d(t),t=t||g,y)){if(11!==m&&(l=ne.exec(e)))if(i=l[1]){if(9===m){if(!(o=t.getElementById(i)))return c;if(o.id===i)return c.push(o),c}else if(v&&(o=v.getElementById(i))&&H(t,o)&&o.id===i)return c.push(o),c}else{if(l[2])return O.apply(c,t.getElementsByTagName(e)),c;if((i=l[3])&&r.getElementsByClassName&&t.getElementsByClassName)return O.apply(c,t.getElementsByClassName(i)),c}if(r.qsa&&!T[e+" "]&&(!x||!x.test(e))&&(1!==m||"object"!==t.nodeName.toLowerCase())){if(p=e,v=t,1===m&&(G.test(e)||U.test(e))){for((v=ie.test(e)&&Ce(t.parentNode)||t)===t&&r.scope||((s=t.getAttribute("id"))?s=s.replace(oe,se):t.setAttribute("id",s=b)),a=(h=f(e)).length;a--;)h[a]=(s?"#"+s:":scope")+" "+He(h[a]);p=h.join(",")}try{return O.apply(c,v.querySelectorAll(p)),c}catch(t){T(e,!0)}finally{s===b&&t.removeAttribute("id")}}}return u(e.replace(W,"$1"),t,c,n)}function ue(){var e=[];return function t(c,n){return e.push(c+" ")>o.cacheLength&&delete t[e.shift()],t[c+" "]=n}}function pe(e){return e[b]=!0,e}function ve(e){var t=g.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function me(e,t){for(var c=e.split("|"),n=c.length;n--;)o.attrHandle[c[n]]=t}function de(e,t){var c=t&&e,n=c&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(n)return n;if(c)for(;c=c.nextSibling;)if(c===t)return-1;return e?1:-1}function ge(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function ze(e){return function(t){var c=t.nodeName.toLowerCase();return("input"===c||"button"===c)&&t.type===e}}function ye(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&fe(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function xe(e){return pe((function(t){return t=+t,pe((function(c,n){for(var i,a=e([],c.length,t),r=a.length;r--;)c[i=a[r]]&&(c[i]=!(n[i]=c[i]))}))}))}function Ce(e){return e&&void 0!==e.getElementsByTagName&&e}for(a in r=he.support={},l=he.isXML=function(e){var t=e.namespaceURI,c=(e.ownerDocument||e).documentElement;return!J.test(t||c&&c.nodeName||"HTML")},d=he.setDocument=function(e){var t,c,n=e?e.ownerDocument||e:V;return n!=g&&9===n.nodeType&&n.documentElement?(z=(g=n).documentElement,y=!l(g),V!=g&&(c=g.defaultView)&&c.top!==c&&(c.addEventListener?c.addEventListener("unload",le,!1):c.attachEvent&&c.attachEvent("onunload",le)),r.scope=ve((function(e){return z.appendChild(e).appendChild(g.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),r.attributes=ve((function(e){return e.className="i",!e.getAttribute("className")})),r.getElementsByTagName=ve((function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length})),r.getElementsByClassName=ce.test(g.getElementsByClassName),r.getById=ve((function(e){return z.appendChild(e).id=b,!g.getElementsByName||!g.getElementsByName(b).length})),r.getById?(o.filter.ID=function(e){var t=e.replace(ae,re);return function(e){return e.getAttribute("id")===t}},o.find.ID=function(e,t){if(void 0!==t.getElementById&&y){var c=t.getElementById(e);return c?[c]:[]}}):(o.filter.ID=function(e){var t=e.replace(ae,re);return function(e){var c=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return c&&c.value===t}},o.find.ID=function(e,t){if(void 0!==t.getElementById&&y){var c,n,i,a=t.getElementById(e);if(a){if((c=a.getAttributeNode("id"))&&c.value===e)return[a];for(i=t.getElementsByName(e),n=0;a=i[n++];)if((c=a.getAttributeNode("id"))&&c.value===e)return[a]}return[]}}),o.find.TAG=r.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):r.qsa?t.querySelectorAll(e):void 0}:function(e,t){var c,n=[],i=0,a=t.getElementsByTagName(e);if("*"===e){for(;c=a[i++];)1===c.nodeType&&n.push(c);return n}return a},o.find.CLASS=r.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&y)return t.getElementsByClassName(e)},C=[],x=[],(r.qsa=ce.test(g.querySelectorAll))&&(ve((function(e){var t;z.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&x.push("[*^$]="+R+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||x.push("\\["+R+"*(?:value|"+q+")"),e.querySelectorAll("[id~="+b+"-]").length||x.push("~="),(t=g.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||x.push("\\["+R+"*name"+R+"*="+R+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||x.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||x.push(".#.+[+~]"),e.querySelectorAll("\\\f"),x.push("[\\r\\n\\f]")})),ve((function(e){e.innerHTML="";var t=g.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&x.push("name"+R+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&x.push(":enabled",":disabled"),z.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&x.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),x.push(",.*:")}))),(r.matchesSelector=ce.test(M=z.matches||z.webkitMatchesSelector||z.mozMatchesSelector||z.oMatchesSelector||z.msMatchesSelector))&&ve((function(e){r.disconnectedMatch=M.call(e,"*"),M.call(e,"[s!='']:x"),C.push("!=",Q)})),x=x.length&&new RegExp(x.join("|")),C=C.length&&new RegExp(C.join("|")),t=ce.test(z.compareDocumentPosition),H=t||ce.test(z.contains)?function(e,t){var c=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(c.contains?c.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},_=t?function(e,t){if(e===t)return m=!0,0;var c=!e.compareDocumentPosition-!t.compareDocumentPosition;return c||(1&(c=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!r.sortDetached&&t.compareDocumentPosition(e)===c?e==g||e.ownerDocument==V&&H(V,e)?-1:t==g||t.ownerDocument==V&&H(V,t)?1:v?I(v,e)-I(v,t):0:4&c?-1:1)}:function(e,t){if(e===t)return m=!0,0;var c,n=0,i=e.parentNode,a=t.parentNode,r=[e],o=[t];if(!i||!a)return e==g?-1:t==g?1:i?-1:a?1:v?I(v,e)-I(v,t):0;if(i===a)return de(e,t);for(c=e;c=c.parentNode;)r.unshift(c);for(c=t;c=c.parentNode;)o.unshift(c);for(;r[n]===o[n];)n++;return n?de(r[n],o[n]):r[n]==V?-1:o[n]==V?1:0},g):g},he.matches=function(e,t){return he(e,null,null,t)},he.matchesSelector=function(e,t){if(d(e),r.matchesSelector&&y&&!T[t+" "]&&(!C||!C.test(t))&&(!x||!x.test(t)))try{var c=M.call(e,t);if(c||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return c}catch(e){T(t,!0)}return he(t,g,null,[e]).length>0},he.contains=function(e,t){return(e.ownerDocument||e)!=g&&d(e),H(e,t)},he.attr=function(e,t){(e.ownerDocument||e)!=g&&d(e);var c=o.attrHandle[t.toLowerCase()],n=c&&E.call(o.attrHandle,t.toLowerCase())?c(e,t,!y):void 0;return void 0!==n?n:r.attributes||!y?e.getAttribute(t):(n=e.getAttributeNode(t))&&n.specified?n.value:null},he.escape=function(e){return(e+"").replace(oe,se)},he.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},he.uniqueSort=function(e){var t,c=[],n=0,i=0;if(m=!r.detectDuplicates,v=!r.sortStable&&e.slice(0),e.sort(_),m){for(;t=e[i++];)t===e[i]&&(n=c.push(i));for(;n--;)e.splice(c[n],1)}return v=null,e},s=he.getText=function(e){var t,c="",n=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)c+=s(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[n++];)c+=s(t);return c},(o=he.selectors={cacheLength:50,createPseudo:pe,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ae,re),e[3]=(e[3]||e[4]||e[5]||"").replace(ae,re),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||he.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&he.error(e[0]),e},PSEUDO:function(e){var t,c=!e[6]&&e[2];return K.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":c&&X.test(c)&&(t=f(c,!0))&&(t=c.indexOf(")",c.length-t)-c.length)&&(e[0]=e[0].slice(0,t),e[2]=c.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ae,re).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=new RegExp("(^|"+R+")"+e+"("+R+"|$)"))&&N(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,c){return function(n){var i=he.attr(n,e);return null==i?"!="===t:!t||(i+="","="===t?i===c:"!="===t?i!==c:"^="===t?c&&0===i.indexOf(c):"*="===t?c&&i.indexOf(c)>-1:"$="===t?c&&i.slice(-c.length)===c:"~="===t?(" "+i.replace($," ")+" ").indexOf(c)>-1:"|="===t&&(i===c||i.slice(0,c.length+1)===c+"-"))}},CHILD:function(e,t,c,n,i){var a="nth"!==e.slice(0,3),r="last"!==e.slice(-4),o="of-type"===t;return 1===n&&0===i?function(e){return!!e.parentNode}:function(t,c,s){var l,f,h,u,p,v,m=a!==r?"nextSibling":"previousSibling",d=t.parentNode,g=o&&t.nodeName.toLowerCase(),z=!s&&!o,y=!1;if(d){if(a){for(;m;){for(u=t;u=u[m];)if(o?u.nodeName.toLowerCase()===g:1===u.nodeType)return!1;v=m="only"===e&&!v&&"nextSibling"}return!0}if(v=[r?d.firstChild:d.lastChild],r&&z){for(y=(p=(l=(f=(h=(u=d)[b]||(u[b]={}))[u.uniqueID]||(h[u.uniqueID]={}))[e]||[])[0]===L&&l[1])&&l[2],u=p&&d.childNodes[p];u=++p&&u&&u[m]||(y=p=0)||v.pop();)if(1===u.nodeType&&++y&&u===t){f[e]=[L,p,y];break}}else if(z&&(y=p=(l=(f=(h=(u=t)[b]||(u[b]={}))[u.uniqueID]||(h[u.uniqueID]={}))[e]||[])[0]===L&&l[1]),!1===y)for(;(u=++p&&u&&u[m]||(y=p=0)||v.pop())&&((o?u.nodeName.toLowerCase()!==g:1!==u.nodeType)||!++y||(z&&((f=(h=u[b]||(u[b]={}))[u.uniqueID]||(h[u.uniqueID]={}))[e]=[L,y]),u!==t)););return(y-=i)===n||y%n==0&&y/n>=0}}},PSEUDO:function(e,t){var c,n=o.pseudos[e]||o.setFilters[e.toLowerCase()]||he.error("unsupported pseudo: "+e);return n[b]?n(t):n.length>1?(c=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?pe((function(e,c){for(var i,a=n(e,t),r=a.length;r--;)e[i=I(e,a[r])]=!(c[i]=a[r])})):function(e){return n(e,0,c)}):n}},pseudos:{not:pe((function(e){var t=[],c=[],n=h(e.replace(W,"$1"));return n[b]?pe((function(e,t,c,i){for(var a,r=n(e,null,i,[]),o=e.length;o--;)(a=r[o])&&(e[o]=!(t[o]=a))})):function(e,i,a){return t[0]=e,n(t,null,a,c),t[0]=null,!c.pop()}})),has:pe((function(e){return function(t){return he(e,t).length>0}})),contains:pe((function(e){return e=e.replace(ae,re),function(t){return(t.textContent||s(t)).indexOf(e)>-1}})),lang:pe((function(e){return Y.test(e||"")||he.error("unsupported lang: "+e),e=e.replace(ae,re).toLowerCase(),function(t){var c;do{if(c=y?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(c=c.toLowerCase())===e||0===c.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(e){var t=i.location&&i.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===z},focus:function(e){return e===g.activeElement&&(!g.hasFocus||g.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ye(!1),disabled:ye(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return te.test(e.nodeName)},input:function(e){return ee.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:xe((function(){return[0]})),last:xe((function(e,t){return[t-1]})),eq:xe((function(e,t,c){return[c<0?c+t:c]})),even:xe((function(e,t){for(var c=0;ct?t:c;--n>=0;)e.push(n);return e})),gt:xe((function(e,t,c){for(var n=c<0?c+t:c;++n1?function(t,c,n){for(var i=e.length;i--;)if(!e[i](t,c,n))return!1;return!0}:e[0]}function Le(e,t,c,n,i){for(var a,r=[],o=0,s=e.length,l=null!=t;o-1&&(a[l]=!(r[l]=h))}}else g=Le(g===r?g.splice(v,g.length):g),i?i(null,r,g,s):O.apply(r,g)}))}function Ne(e){for(var t,c,n,i=e.length,a=o.relative[e[0].type],r=a||o.relative[" "],s=a?1:0,l=be((function(e){return e===t}),r,!0),f=be((function(e){return I(t,e)>-1}),r,!0),h=[function(e,c,n){var i=!a&&(n||c!==p)||((t=c).nodeType?l(e,c,n):f(e,c,n));return t=null,i}];s1&&Ve(h),s>1&&He(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(W,"$1"),c,s0,n=e.length>0,i=function(i,a,r,s,l){var f,h,u,v=0,m="0",z=i&&[],x=[],C=p,M=i||n&&o.find.TAG("*",l),H=L+=null==C?1:Math.random()||.1,b=M.length;for(l&&(p=a==g||a||l);m!==b&&null!=(f=M[m]);m++){if(n&&f){for(h=0,a||f.ownerDocument==g||(d(f),r=!y);u=e[h++];)if(u(f,a||g,r)){s.push(f);break}l&&(L=H)}c&&((f=!u&&f)&&v--,i&&z.push(f))}if(v+=m,c&&m!==v){for(h=0;u=t[h++];)u(z,x,a,r);if(i){if(v>0)for(;m--;)z[m]||x[m]||(x[m]=j.call(s));x=Le(x)}O.apply(s,x),l&&!i&&x.length>0&&v+t.length>1&&he.uniqueSort(s)}return l&&(L=H,p=C),z};return c?pe(i):i}(i,n))).selector=e}return a},u=he.select=function(e,t,c,n){var i,a,r,s,l,u="function"==typeof e&&e,p=!n&&f(e=u.selector||e);if(c=c||[],1===p.length){if((a=p[0]=p[0].slice(0)).length>2&&"ID"===(r=a[0]).type&&9===t.nodeType&&y&&o.relative[a[1].type]){if(!(t=(o.find.ID(r.matches[0].replace(ae,re),t)||[])[0]))return c;u&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(i=K.needsContext.test(e)?0:a.length;i--&&(r=a[i],!o.relative[s=r.type]);)if((l=o.find[s])&&(n=l(r.matches[0].replace(ae,re),ie.test(a[0].type)&&Ce(t.parentNode)||t))){if(a.splice(i,1),!(e=n.length&&He(a)))return O.apply(c,n),c;break}}return(u||h(e,p))(n,t,!y,c,!t||ie.test(e)&&Ce(t.parentNode)||t),c},r.sortStable=b.split("").sort(_).join("")===b,r.detectDuplicates=!!m,d(),r.sortDetached=ve((function(e){return 1&e.compareDocumentPosition(g.createElement("fieldset"))})),ve((function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")}))||me("type|href|height|width",(function(e,t,c){if(!c)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),r.attributes&&ve((function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||me("value",(function(e,t,c){if(!c&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ve((function(e){return null==e.getAttribute("disabled")}))||me(q,(function(e,t,c){var n;if(!c)return!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null}));var Se=i.Sizzle;he.noConflict=function(){return i.Sizzle===he&&(i.Sizzle=Se),he},void 0===(n=function(){return he}.call(t,c,t,e))||(e.exports=n)}(window)},function(e,t,c){var n,i;n=[c(1)],void 0===(i=function(e){"use strict";return function(t,c,n){for(var i=[],a=void 0!==n;(t=t[c])&&9!==t.nodeType;)if(1===t.nodeType){if(a&&e(t).is(n))break;i.push(t)}return i}}.apply(t,n))||(e.exports=i)},function(e,t,c){var n;void 0===(n=function(){"use strict";return function(e,t){for(var c=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&c.push(e);return c}}.call(t,c,t,e))||(e.exports=n)},function(e,t,c){var n,i;n=[c(1),c(27)],void 0===(i=function(e){"use strict";var t=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;e.Deferred.exceptionHook=function(e,c){window.console&&window.console.warn&&e&&t.test(e.name)&&window.console.warn("jQuery.Deferred exception: "+e.message,e.stack,c)}}.apply(t,n))||(e.exports=i)},function(e,t,c){var n,i;n=[c(1)],void 0===(i=function(e){"use strict";e.readyException=function(e){window.setTimeout((function(){throw e}))}}.apply(t,n))||(e.exports=i)},function(e,t,c){var n,i;n=[c(1),c(21),c(33),c(14),c(97)],void 0===(i=function(e,t,c,n,i){"use strict";var a=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,r=/[A-Z]/g;function o(e,t,c){var n;if(void 0===c&&1===e.nodeType)if(n="data-"+t.replace(r,"-$&").toLowerCase(),"string"==typeof(c=e.getAttribute(n))){try{c=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:a.test(e)?JSON.parse(e):e)}(c)}catch(e){}i.set(e,t,c)}else c=void 0;return c}return e.extend({hasData:function(e){return i.hasData(e)||n.hasData(e)},data:function(e,t,c){return i.access(e,t,c)},removeData:function(e,t){i.remove(e,t)},_data:function(e,t,c){return n.access(e,t,c)},_removeData:function(e,t){n.remove(e,t)}}),e.fn.extend({data:function(e,a){var r,s,l,f=this[0],h=f&&f.attributes;if(void 0===e){if(this.length&&(l=i.get(f),1===f.nodeType&&!n.get(f,"hasDataAttrs"))){for(r=h.length;r--;)h[r]&&0===(s=h[r].name).indexOf("data-")&&(s=c(s.slice(5)),o(f,s,l[s]));n.set(f,"hasDataAttrs",!0)}return l}return"object"==typeof e?this.each((function(){i.set(this,e)})):t(this,(function(t){var c;if(f&&void 0===t)return void 0!==(c=i.get(f,e))||void 0!==(c=o(f,e))?c:void 0;this.each((function(){i.set(this,e,t)}))}),null,a,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){i.remove(this,e)}))}}),e}.apply(t,n))||(e.exports=i)},function(e,t,c){var n,i;n=[c(1),c(60),c(61)],void 0===(i=function(e){"use strict";return e.fn.delay=function(t,c){return t=e.fx&&e.fx.speeds[t]||t,c=c||"fx",this.queue(c,(function(e,c){var n=window.setTimeout(e,t);c.stop=function(){window.clearTimeout(n)}}))},e.fn.delay}.apply(t,n))||(e.exports=i)},function(e,t,c){var n,i;n=[c(1),c(14),c(99)],void 0===(i=function(e,t,c){"use strict";var n={};function i(t){var c,i=t.ownerDocument,a=t.nodeName,r=n[a];return r||(c=i.body.appendChild(i.createElement(a)),r=e.css(c,"display"),c.parentNode.removeChild(c),"none"===r&&(r="block"),n[a]=r,r)}function a(e,n){for(var a,r,o=[],s=0,l=e.length;s1)},removeAttr:function(t){return this.each((function(){e.removeAttr(this,t)}))}}),e.extend({attr:function(t,c,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?e.prop(t,c,n):(1===o&&e.isXMLDoc(t)||(r=e.attrHooks[c.toLowerCase()]||(e.expr.match.bool.test(c)?a:void 0)),void 0!==n?null===n?void e.removeAttr(t,c):r&&"set"in r&&void 0!==(i=r.set(t,n,c))?i:(t.setAttribute(c,n+""),n):r&&"get"in r&&null!==(i=r.get(t,c))?i:null==(i=e.find.attr(t,c))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!n.radioValue&&"radio"===t&&c(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}},removeAttr:function(e,t){var c,n=0,a=t&&t.match(i);if(a&&1===e.nodeType)for(;c=a[n++];)e.removeAttribute(c)}}),a={set:function(t,c,n){return!1===c?e.removeAttr(t,n):t.setAttribute(n,n),n}},e.each(e.expr.match.bool.source.match(/\w+/g),(function(t,c){var n=r[c]||e.find.attr;r[c]=function(e,t,c){var i,a,o=t.toLowerCase();return c||(a=r[o],r[o]=i,i=null!=n(e,t,c)?o:null,r[o]=a),i}}))}.apply(t,n))||(e.exports=i)},function(e,t,c){var n,i;n=[c(1),c(68),c(2),c(19),c(14),c(11)],void 0===(i=function(e,t,c,n,i){"use strict";function a(e){return e.getAttribute&&e.getAttribute("class")||""}function r(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(n)||[]}e.fn.extend({addClass:function(n){var i,o,s,l,f,h,u,p=0;if(c(n))return this.each((function(t){e(this).addClass(n.call(this,t,a(this)))}));if((i=r(n)).length)for(;o=this[p++];)if(l=a(o),s=1===o.nodeType&&" "+t(l)+" "){for(h=0;f=i[h++];)s.indexOf(" "+f+" ")<0&&(s+=f+" ");l!==(u=t(s))&&o.setAttribute("class",u)}return this},removeClass:function(n){var i,o,s,l,f,h,u,p=0;if(c(n))return this.each((function(t){e(this).removeClass(n.call(this,t,a(this)))}));if(!arguments.length)return this.attr("class","");if((i=r(n)).length)for(;o=this[p++];)if(l=a(o),s=1===o.nodeType&&" "+t(l)+" "){for(h=0;f=i[h++];)for(;s.indexOf(" "+f+" ")>-1;)s=s.replace(" "+f+" "," ");l!==(u=t(s))&&o.setAttribute("class",u)}return this},toggleClass:function(t,n){var o=typeof t,s="string"===o||Array.isArray(t);return"boolean"==typeof n&&s?n?this.addClass(t):this.removeClass(t):c(t)?this.each((function(c){e(this).toggleClass(t.call(this,c,a(this),n),n)})):this.each((function(){var c,n,l,f;if(s)for(n=0,l=e(this),f=r(t);c=f[n++];)l.hasClass(c)?l.removeClass(c):l.addClass(c);else void 0!==t&&"boolean"!==o||((c=a(this))&&i.set(this,"__className__",c),this.setAttribute&&this.setAttribute("class",c||!1===t?"":i.get(this,"__className__")||""))}))},hasClass:function(e){var c,n,i=0;for(c=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+t(a(n))+" ").indexOf(c)>-1)return!0;return!1}})}.apply(t,n))||(e.exports=i)},function(e,t,c){var n,i;n=[c(1),c(68),c(67),c(18),c(2),c(11)],void 0===(i=function(e,t,c,n,i){"use strict";var a=/\r/g;e.fn.extend({val:function(t){var c,n,r,o=this[0];return arguments.length?(r=i(t),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,e(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=e.map(i,(function(e){return null==e?"":e+""}))),(c=e.valHooks[this.type]||e.valHooks[this.nodeName.toLowerCase()])&&"set"in c&&void 0!==c.set(this,i,"value")||(this.value=i))}))):o?(c=e.valHooks[o.type]||e.valHooks[o.nodeName.toLowerCase()])&&"get"in c&&void 0!==(n=c.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(a,""):null==n?"":n:void 0}}),e.extend({valHooks:{option:{get:function(c){var n=e.find.attr(c,"value");return null!=n?n:t(e.text(c))}},select:{get:function(t){var c,i,a,r=t.options,o=t.selectedIndex,s="select-one"===t.type,l=s?null:[],f=s?o+1:r.length;for(a=o<0?f:s?o:0;a-1)&&(n=!0);return n||(t.selectedIndex=-1),r}}}}),e.each(["radio","checkbox"],(function(){e.valHooks[this]={set:function(t,c){if(Array.isArray(c))return t.checked=e.inArray(e(t).val(),c)>-1}},c.checkOn||(e.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}))}.apply(t,n))||(e.exports=i)},function(e,t,c){var n,i;n=[c(1),c(14),c(176),c(28),c(69)],void 0===(i=function(e,t,c){"use strict";return c.focusin||e.each({focus:"focusin",blur:"focusout"},(function(c,n){var i=function(t){e.event.simulate(n,t.target,e.event.fix(t))};e.event.special[n]={setup:function(){var e=this.ownerDocument||this.document||this,a=t.access(e,n);a||e.addEventListener(c,i,!0),t.access(e,n,(a||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,a=t.access(e,n)-1;a?t.access(e,n,a):(e.removeEventListener(c,i,!0),t.remove(e,n))}}})),e}.apply(t,n))||(e.exports=i)},function(e,t,c){var n,i;n=[c(20)],void 0===(i=function(e){"use strict";return e.focusin="onfocusin"in window,e}.apply(t,n))||(e.exports=i)},function(e,t,c){var n,i;n=[c(22)],void 0===(i=function(e){"use strict";return e._evalUrl=function(t,c,n){return e.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){e.globalEval(t,c,n)}})},e._evalUrl}.apply(t,n))||(e.exports=i)},function(e,t,c){var n;void 0===(n=function(){"use strict";return window.location}.call(t,c,t,e))||(e.exports=n)},function(e,t,c){var n,i;n=[c(1),c(2),c(11),c(46),c(26)],void 0===(i=function(e,t){"use strict";return e.fn.extend({wrapAll:function(c){var n;return this[0]&&(t(c)&&(c=c.call(this[0])),n=e(c,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&n.insertBefore(this[0]),n.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(c){return t(c)?this.each((function(t){e(this).wrapInner(c.call(this,t))})):this.each((function(){var t=e(this),n=t.contents();n.length?n.wrapAll(c):t.append(c)}))},wrap:function(c){var n=t(c);return this.each((function(t){e(this).wrapAll(n?c.call(this,t):c)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){e(this).replaceWith(this.childNodes)})),this}}),e}.apply(t,n))||(e.exports=i)},function(e,t,c){var n,i;n=[c(1),c(8)],void 0===(i=function(e){"use strict";e.expr.pseudos.hidden=function(t){return!e.expr.pseudos.visible(t)},e.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}}.apply(t,n))||(e.exports=i)},function(e,t,c){var n,i;n=[c(1),c(20),c(22)],void 0===(i=function(e,t){"use strict";e.ajaxSettings.xhr=function(){try{return new window.XMLHttpRequest}catch(e){}};var c={0:200,1223:204},n=e.ajaxSettings.xhr();t.cors=!!n&&"withCredentials"in n,t.ajax=n=!!n,e.ajaxTransport((function(e){var i,a;if(t.cors||n&&!e.crossDomain)return{send:function(t,n){var r,o=e.xhr();if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)o[r]=e.xhrFields[r];for(r in e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||t["X-Requested-With"]||(t["X-Requested-With"]="XMLHttpRequest"),t)o.setRequestHeader(r,t[r]);i=function(e){return function(){i&&(i=a=o.onload=o.onerror=o.onabort=o.ontimeout=o.onreadystatechange=null,"abort"===e?o.abort():"error"===e?"number"!=typeof o.status?n(0,"error"):n(o.status,o.statusText):n(c[o.status]||o.status,o.statusText,"text"!==(o.responseType||"text")||"string"!=typeof o.responseText?{binary:o.response}:{text:o.responseText},o.getAllResponseHeaders()))}},o.onload=i(),a=o.onerror=o.ontimeout=i("error"),void 0!==o.onabort?o.onabort=a:o.onreadystatechange=function(){4===o.readyState&&window.setTimeout((function(){i&&a()}))},i=i("abort");try{o.send(e.hasContent&&e.data||null)}catch(e){if(i)throw e}},abort:function(){i&&i()}}}))}.apply(t,n))||(e.exports=i)},function(e,t,c){var n,i;n=[c(1),c(6),c(22)],void 0===(i=function(e,t){"use strict";e.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),e.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return e.globalEval(t),t}}}),e.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),e.ajaxTransport("script",(function(c){var n,i;if(c.crossDomain||c.scriptAttrs)return{send:function(a,r){n=e("
All files listed here, include files on other pages, will be deleted from your hard-drive. Is that what you want?
{% if upload_enabled %}
\ No newline at end of file
diff --git a/web/src/js/main.mjs b/web/src/js/main.mjs
index 44af668..54d146d 100644
--- a/web/src/js/main.mjs
+++ b/web/src/js/main.mjs
@@ -1,4 +1,8 @@
-import {isOverflown, setProgressBar, secondsToStr} from './util';
+import {
+ isOverflown,
+ setProgressBar,
+ secondsToStr,
+} from './util';
$('#uploadSelectFile').on('change', function() {
// get the file name
@@ -47,6 +51,7 @@ let playing = false;
const playPauseBtn = $('#play-pause-btn');
const fastForwardBtn = $('#fast-forward-btn');
+const volumeSlider = document.getElementById('volume-slider');
const playModeBtns = {
'one-shot': $('#one-shot-mode-btn'),
@@ -61,6 +66,25 @@ const playModeIcon = {
'autoplay': 'fa-robot',
};
+playPauseBtn.on('click', togglePlayPause);
+
+fastForwardBtn.on('click', () => {
+ request('post', {
+ action: 'next',
+ });
+});
+
+document.getElementById('clear-playlist-btn').addEventListener('click', () => {
+ request('post', {action: 'clear'});
+});
+
+// eslint-disable-next-line guard-for-in
+for (const playMode in playModeBtns) {
+ playModeBtns[playMode].on('click', () => {
+ changePlayMode(playMode);
+ });
+}
+
function request(_url, _data, refresh = false) {
console.log(_data);
$.ajax({
@@ -123,7 +147,9 @@ function addPlaylistItem(item) {
}
function displayPlaylist(data) {
- playlist_table.animate({opacity: 0}, 200, function() {
+ playlist_table.animate({
+ opacity: 0,
+ }, 200, function() {
playlist_loading.hide();
$('.playlist-item').remove();
const items = data.items;
@@ -163,7 +189,9 @@ function displayPlaylist(data) {
displayActiveItem(data.current_index);
updatePlayerInfo(playlist_items[data.current_index]);
bindPlaylistEvent();
- playlist_table.animate({opacity: 1}, 200);
+ playlist_table.animate({
+ opacity: 1,
+ }, 200);
});
}
@@ -178,7 +206,7 @@ function insertExpandPrompt(real_from, real_to, display_from, display_to, total_
expand_copy.removeClass('d-none');
if (display_from !== display_to) {
expand_copy.find('.playlist-expand-item-range').html((display_from + 1) + '~' + (display_to + 1) +
- ' of ' + (total_length) + ' items');
+ ' of ' + (total_length) + ' items');
} else {
expand_copy.find('.playlist-expand-item-range').html(display_from + ' of ' + (total_length) + ' items');
}
@@ -193,7 +221,9 @@ function insertExpandPrompt(real_from, real_to, display_from, display_to, total_
}
function updatePlaylist() {
- playlist_table.animate({opacity: 0}, 200, function() {
+ playlist_table.animate({
+ opacity: 0,
+ }, 200, function() {
playlist_empty.addClass('d-none');
playlist_loading.show();
playlist_table.find('.playlist-item').css('opacity', 0);
@@ -217,7 +247,9 @@ function updatePlaylist() {
},
},
});
- playlist_table.animate({opacity: 1}, 200);
+ playlist_table.animate({
+ opacity: 1,
+ }, 200);
});
}
@@ -303,25 +335,31 @@ function updateControls(empty, play, mode, volume) {
if (volume !== last_volume) {
last_volume = volume;
if (volume > 1) {
- document.getElementById('volume-slider').value = 1;
+ volumeSlider.value = 1;
} else if (volume < 0) {
- document.getElementById('volume-slider').value = 0;
+ volumeSlider.value = 0;
} else {
- document.getElementById('volume-slider').value = volume;
+ volumeSlider.value = volume;
}
}
}
function togglePlayPause() {
if (playing) {
- request('post', {action: 'pause'});
+ request('post', {
+ action: 'pause',
+ });
} else {
- request('post', {action: 'resume'});
+ request('post', {
+ action: 'resume',
+ });
}
}
function changePlayMode(mode) {
- request('post', {action: mode});
+ request('post', {
+ action: mode,
+ });
}
@@ -337,6 +375,13 @@ const filters = {
const filter_dir = $('#filter-dir');
const filter_keywords = $('#filter-keywords');
+// eslint-disable-next-line guard-for-in
+for (const filter in filters) {
+ filters[filter].on('click', (e) => {
+ setFilterType(e, filter);
+ });
+}
+
function setFilterType(event, type) {
event.preventDefault();
@@ -522,7 +567,9 @@ function updateResults(dest_page = 1) {
const data = getFilters(dest_page);
data.action = 'query';
- lib_group.animate({opacity: 0}, 200, function() {
+ lib_group.animate({
+ opacity: 0,
+ }, 200, function() {
$.ajax({
type: 'POST',
url: 'library',
@@ -543,7 +590,9 @@ function updateResults(dest_page = 1) {
$('.library-item-active').remove();
lib_empty.hide();
lib_loading.show();
- lib_group.animate({opacity: 1}, 200);
+ lib_group.animate({
+ opacity: 1,
+ }, 200);
});
}
@@ -609,7 +658,9 @@ const page_li = $('.library-page-li');
const page_no = $('.library-page-no');
function processResults(data) {
- lib_group.animate({opacity: 0}, 200, function() {
+ lib_group.animate({
+ opacity: 0,
+ }, 200, function() {
lib_loading.hide();
const total_pages = data.total_pages;
const active_page = data.active_page;
@@ -674,7 +725,9 @@ function processResults(data) {
page_li_copy.appendTo(page_ul);
}
- lib_group.animate({opacity: 1}, 200);
+ lib_group.animate({
+ opacity: 1,
+ }, 200);
});
}
@@ -750,30 +803,27 @@ function addTagModalSubmit() {
// ------- Volume ------
// ---------------------
-const volume_popover_btn = document.querySelector('#volume-popover-btn');
-const volume_popover_div = document.querySelector('#volume-popover');
+const volumePopoverBtn = document.querySelector('#volume-popover-btn');
+const volumePopoverDiv = document.querySelector('#volume-popover');
let volume_popover_instance = null;
let volume_popover_show = false;
+let volume_update_timer;
-volume_popover_btn.addEventListener('click', function(e) {
+volumePopoverBtn.addEventListener('click', function(e) {
e.stopPropagation();
-});
-volume_popover_div.addEventListener('click', function(e) {
- e.stopPropagation();
-});
-
-function toggleVolumePopover() {
if (!volume_popover_show) {
- volume_popover_instance = new Popper(volume_popover_btn, volume_popover_div, {
+ volume_popover_instance = new Popper(volumePopoverBtn, volumePopoverDiv, {
placement: 'top',
modifiers: {
- offset: {offset: '0, 8'},
+ offset: {
+ offset: '0, 8',
+ },
},
- } );
- volume_popover_div.setAttribute('data-show', '');
+ });
+ volumePopoverDiv.setAttribute('data-show', '');
} else {
- volume_popover_div.removeAttribute('data-show');
+ volumePopoverDiv.removeAttribute('data-show');
if (volume_popover_instance) {
volume_popover_instance.destroy();
volume_popover_instance = null;
@@ -782,22 +832,39 @@ function toggleVolumePopover() {
volume_popover_show = !volume_popover_show;
document.addEventListener('click', function() {
- volume_popover_div.removeAttribute('data-show');
+ volumePopoverDiv.removeAttribute('data-show');
if (volume_popover_instance) {
volume_popover_instance.destroy();
volume_popover_instance = null;
volume_popover_show = !volume_popover_show;
}
- }, {once: true} );
-}
+ }, {
+ once: true,
+ });
+});
-let volume_update_timer;
-function setVolumeDelayed(new_volume_value) {
+volumePopoverBtn.addEventListener('click', function(e) {
+ e.stopPropagation();
+});
+
+volumeSlider.addEventListener('change', (e) => {
window.clearTimeout(volume_update_timer);
- volume_update_timer = window.setTimeout(function() {
- request('post', {action: 'volume_set_value', new_volume: new_volume_value});
+
+ volume_update_timer = window.setTimeout(() => {
+ request('post', {
+ action: 'volume_set_value',
+ new_volume: volumePopoverDiv.value,
+ });
}, 500); // delay in milliseconds
-}
+});
+
+document.getElementById('volume-down-btn').addEventListener('click', () => {
+ request('post', {action: 'volume_down'});
+});
+
+document.getElementById('volume-up-btn').addEventListener('click', () => {
+ request('post', {action: 'volume_up'});
+});
// ---------------------
// ------- Upload ------
@@ -872,7 +939,11 @@ function generateUploadProgressItem(file) {
const progress = item_clone.querySelector('.uploadProgress');
item_clone.style.display = 'block';
- const item = {title: title, error: error, progress: progress};
+ const item = {
+ title: title,
+ error: error,
+ progress: progress,
+ };
filesProgressItem[file.name] = item;
uploadModalList.appendChild(item_clone);
@@ -913,7 +984,9 @@ function uploadNextFile() {
uploadCancelBtn.style.display = 'none';
uploadCloseBtn.style.display = 'block';
- request('post', {action: 'rescan'});
+ request('post', {
+ action: 'rescan',
+ });
updateResults();
}
});
@@ -921,7 +994,7 @@ function uploadNextFile() {
req.upload.addEventListener('progress', function(e) {
if (e.lengthComputable) {
const percent = e.loaded / e.total;
- setProgressBar(file_progress_item.progress, percent, Math.floor(percent*100) + '%');
+ setProgressBar(file_progress_item.progress, percent, Math.floor(percent * 100) + '%');
}
});
@@ -948,7 +1021,9 @@ function uploadCancel() {
runningXHR.abort();
filesToProceed = [];
uploadFileInput.value = '';
- request('post', {action: 'rescan'});
+ request('post', {
+ action: 'rescan',
+ });
updateResults();
}
@@ -977,8 +1052,8 @@ function togglePlayer() {
}
function playerSetIdle() {
- playerArtwork.style.display ='none';
- playerArtworkIdle.style.display ='block';
+ playerArtwork.style.display = 'none';
+ playerArtworkIdle.style.display = 'block';
playerTitle.textContent = '-- IDLE --';
playerArtist.textContent = '';
setProgressBar(playerBar, 0);
@@ -988,8 +1063,8 @@ function updatePlayerInfo(item) {
if (!item) {
playerSetIdle();
}
- playerArtwork.style.display ='block';
- playerArtworkIdle.style.display ='none';
+ playerArtwork.style.display = 'block';
+ playerArtworkIdle.style.display = 'none';
currentPlayingItem = item;
playerTitle.textContent = item.title;
playerArtist.textContent = item.artist;
@@ -1020,7 +1095,7 @@ function updatePlayerControls(play, empty) {
playerSkipBtn.removeAttribute('disabled');
}
if (play) {
- playerPlayBtn.style.display ='none';
+ playerPlayBtn.style.display = 'none';
playerPauseBtn.style.display = 'block';
} else {
playerPlayBtn.style.display = 'block';
@@ -1031,6 +1106,7 @@ function updatePlayerControls(play, empty) {
let playhead_timer;
let player_playhead_position;
let playhead_dragging = false;
+
function updatePlayerPlayhead(playhead) {
if (!currentPlayingItem || playhead_dragging) {
return;
@@ -1067,7 +1143,9 @@ playerBarBox.addEventListener('mousedown', function() {
playerBarBox.addEventListener('mouseup', function(event) {
playerBarBox.removeEventListener('mousemove', playheadDragged);
const percent = event.offsetX / playerBarBox.clientWidth;
- request('post', {move_playhead: percent * currentPlayingItem.duration});
+ request('post', {
+ move_playhead: percent * currentPlayingItem.duration,
+ });
playhead_dragging = false;
});
diff --git a/web/src/templates/index.html b/web/src/templates/index.html
index 7461188..449aeec 100644
--- a/web/src/templates/index.html
+++ b/web/src/templates/index.html
@@ -25,10 +25,10 @@