1 line
11 KiB
JavaScript
1 line
11 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[2,3,5,6,7,11],{254:function(t,e,o){var content=o(272);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(15).default)("40803e79",content,!0,{sourceMap:!1})},257:function(t,e,o){"use strict";o.r(e);o(101),o(34),o(268),o(51);var r=o(258),n=o(261),l=o(259),d=o(260),c=o(7),f=o.n(c),v={components:{IconDownload:r.default,IconX:n.default,IconFilm:l.default,IconMusic:d.default},props:{downloadEntry:{type:Object}},methods:{getQueuedDateString:function(t){var e=new Date(1e3*t);return("0"+e.getDate()).slice(-2)+"."+("0"+(e.getMonth()+1)).slice(-2)+"."+e.getFullYear()},getDurationString:function(t){if(t<0)return"";if(t>36e4)return"";var e=Math.floor(t/3600),o=Math.floor(t%3600/60),s=Math.floor(t%3600%60),r="";return e>0&&(r=String(e).padStart(2,"0")+":"),r+=String(o).padStart(2,"0")+":"+String(s).padStart(2,"0")},linebreaksToBrTags:function(t){return t.replace("\n","<br />")},removeDownload:function(){var t=this;f.a.post("/api",{request:"remove_download_entry",id:this.downloadEntry.tubio_id}).then((function(e){"OK"===e.data.status&&t.$store.dispatch("dlcache/update",t)}))}}},h=(o(271),o(9)),component=Object(h.a)(v,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"frame mb-6 pt-2 pb-4"},[o("div",{staticClass:"flex flex-col"},[o("div",{staticClass:"flex items-end justify-between w-full md:w-auto"},[o("div",{staticClass:"flex flex-row"},[o("div",{staticClass:"icon--mode"},["video"===t.downloadEntry.mode?o("IconFilm"):o("IconMusic")],1),t._v(" "),o("div",{staticClass:"smalltext-metadata ml-1"},[t._v("\n "+t._s(void 0!==t.downloadEntry.quality?t.downloadEntry.quality:"best")+" ")]),t._v(" "),o("div",{staticClass:"smalltext-metadata ml-1"},[t._v("\n "+t._s(t.getQueuedDateString(t.downloadEntry.queued_timestamp))+"\n ")])]),t._v(" "),o("div",{staticClass:"button-remove",on:{click:t.removeDownload}},[o("IconX")],1)]),t._v(" "),o("div",{staticClass:"flex flex-col-reverse md:flex-row w-full mt-2"},[o("div",{staticClass:"flex flex-col"},[o("a",{attrs:{href:t.downloadEntry.webpage_url,target:"_blank",title:"To the original source"}},[o("div",{staticClass:"thumbnail flex-shrink-0",style:"--thumbnail: url('"+t.downloadEntry.thumbnail_url+"')"},[o("div",{staticClass:"thumbnail__vignette"}),t._v(" "),o("div",{staticClass:"thumbnail__duration"},[t._v(t._s(t.getDurationString(t.downloadEntry.duration)))])])]),t._v(" "),"downloading"===t.downloadEntry.status?o("div",[o("div",{staticClass:"status--progressbar flex w-full mt-3"},[o("div",{staticClass:"status--progressbar__good items-stretch",style:"--download-progress: "+t.downloadEntry.download_progress+"%;"})]),t._v(" "),o("div",{staticClass:"status--progressbar__text"},[t._v("\n "+t._s(t.downloadEntry.download_progress)+"%\n ")])]):"finished"===t.downloadEntry.status?o("a",{attrs:{href:t.downloadEntry.download_url,title:"download"}},[o("div",{staticClass:"status--ready mt-3 button flex justify-center w-full"},[o("div",[o("IconDownload")],1)])]):"queued"===t.downloadEntry.status?o("div",[o("div",{staticClass:"status--queued mt-3"},[t._v("\n Queued\n ")])]):"failed"===t.downloadEntry.status?o("div",[o("div",{staticClass:"status--failed mt-3"},[t._v("\n Failed!\n ")])]):t._e()]),t._v(" "),o("div",{staticClass:"flex flex-col md:ml-4 w-full overflow-x-hidden overflow-y-visible"},[o("h1",{staticClass:"title"},[t._v(t._s(t.downloadEntry.title))]),t._v(" "),o("div",{staticClass:"relative my-4"},[""!=t.downloadEntry.description?o("div",[o("p",{staticClass:"description p-2"},[o("span",{domProps:{innerHTML:t._s(t.linebreaksToBrTags(t.downloadEntry.description))}})]),t._v(" "),o("div",{staticClass:"description__decobox description__decobox--left"}),t._v(" "),o("div",{staticClass:"description__decobox description__decobox--right"})]):t._e()])])])])])}),[],!1,null,"1c500fb6",null);e.default=component.exports},258:function(t,e,o){"use strict";o.r(e);var r=o(9),component=Object(r.a)({},(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("svg",{staticClass:"bi bi-download",attrs:{viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"}},[o("path",{attrs:{"fill-rule":"evenodd",d:"M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5z"}}),t._v(" "),o("path",{attrs:{"fill-rule":"evenodd",d:"M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3z"}})])}),[],!1,null,null,null);e.default=component.exports},259:function(t,e,o){"use strict";o.r(e);var r=o(9),component=Object(r.a)({},(function(){var t=this.$createElement,e=this._self._c||t;return e("svg",{staticClass:"bi bi-film",attrs:{viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{"fill-rule":"evenodd",d:"M0 1a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1zm4 0h8v6H4V1zm8 8H4v6h8V9zM1 1h2v2H1V1zm2 3H1v2h2V4zM1 7h2v2H1V7zm2 3H1v2h2v-2zm-2 3h2v2H1v-2zM15 1h-2v2h2V1zm-2 3h2v2h-2V4zm2 3h-2v2h2V7zm-2 3h2v2h-2v-2zm2 3h-2v2h2v-2z"}})])}),[],!1,null,null,null);e.default=component.exports},260:function(t,e,o){"use strict";o.r(e);var r=o(9),component=Object(r.a)({},(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("svg",{staticClass:"bi bi-music-note-beamed",attrs:{viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"}},[o("path",{attrs:{d:"M6 13c0 1.105-1.12 2-2.5 2S1 14.105 1 13c0-1.104 1.12-2 2.5-2s2.5.896 2.5 2zm9-2c0 1.105-1.12 2-2.5 2s-2.5-.895-2.5-2 1.12-2 2.5-2 2.5.895 2.5 2z"}}),t._v(" "),o("path",{attrs:{"fill-rule":"evenodd",d:"M14 11V2h1v9h-1zM6 3v10H5V3h1z"}}),t._v(" "),o("path",{attrs:{d:"M5 2.905a1 1 0 0 1 .9-.995l8-.8a1 1 0 0 1 1.1.995V3L5 4V2.905z"}})])}),[],!1,null,null,null);e.default=component.exports},261:function(t,e,o){"use strict";o.r(e);var r=o(9),component=Object(r.a)({},(function(){var t=this.$createElement,e=this._self._c||t;return e("svg",{staticClass:"bi bi-x",attrs:{viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{"fill-rule":"evenodd",d:"M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"}})])}),[],!1,null,null,null);e.default=component.exports},268:function(t,e,o){"use strict";var r=o(4),n=o(269).start;r({target:"String",proto:!0,forced:o(270)},{padStart:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}})},269:function(t,e,o){var r=o(17),n=o(164),l=o(16),d=Math.ceil,c=function(t){return function(e,o,c){var f,v,h=String(l(e)),m=h.length,w=void 0===c?" ":String(c),x=r(o);return x<=m||""==w?h:(f=x-m,(v=n.call(w,d(f/w.length))).length>f&&(v=v.slice(0,f)),t?h+v:v+h)}};t.exports={start:c(!1),end:c(!0)}},270:function(t,e,o){var r=o(50);t.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r)},271:function(t,e,o){"use strict";o(254)},272:function(t,e,o){var r=o(14)(!1);r.push([t.i,'.frame[data-v-1c500fb6]{width:100%;border-bottom:2px solid #888}.frame .smalltext-metadata[data-v-1c500fb6]{font-family:ZillaSlab,serif;font-size:12pt;color:#bbb}.frame .smalltext-metadata[data-v-1c500fb6]:before{content:"|"}.frame .thumbnail[data-v-1c500fb6]{background-image:var(--thumbnail);background-size:cover;background-position:50%;background-repeat:no-repeat;width:150px;height:84.375px;position:relative;cursor:pointer;scrollbar-width:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0);transform-style:preserve-3d;transition:transform .2s ease}@media(max-width:768px){.frame .thumbnail[data-v-1c500fb6]{width:100%;height:130px}}.frame .thumbnail[data-v-1c500fb6]:hover{transform:scale(1.05)}.frame .thumbnail__vignette[data-v-1c500fb6]{position:absolute;top:0;bottom:0;right:0;left:0;box-shadow:0 0 15px 2px #000}.frame .thumbnail__duration[data-v-1c500fb6]{position:absolute;bottom:0;right:0;padding:0 3px 3px 0;text-align:right;font-size:12pt;color:#bbb;background-color:rgba(0,0,0,.66667)}.frame .title[data-v-1c500fb6]{color:#bbb;font-size:22pt;max-height:1.3em;overflow-y:hidden;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.frame .description[data-v-1c500fb6]{color:#bbb;font-size:14pt;height:100px;overflow-x:hidden;overflow-y:scroll;position:relative;background-color:rgba(0,0,0,.2)}@media(max-width:768px){.frame .description[data-v-1c500fb6]{overflow:scroll}}.frame .description__decobox[data-v-1c500fb6]{position:absolute}.frame .description__decobox--left[data-v-1c500fb6]{top:0;left:0;width:40px;height:40px;border-top:2px solid #888;border-left:2px solid #888;pointer-events:none}.frame .description__decobox--right[data-v-1c500fb6]{bottom:0;right:0;width:40px;height:40px;border-bottom:2px solid #888;border-right:2px solid #888;pointer-events:none}.frame .status--progressbar[data-v-1c500fb6]{background-color:#900;height:5px}.frame .status--progressbar__good[data-v-1c500fb6]{background-color:#0b0;width:var(--download-progress);transition:width 1s}.frame .status--progressbar__text[data-v-1c500fb6]{font-size:24pt;color:#bbb}.frame .status--ready[data-v-1c500fb6]{height:45px;background-color:#bbb;transition:background-color .2s,border .2s}.frame .status--ready[data-v-1c500fb6]:hover{background-color:#5954a4;color:#fff}.frame .status--ready svg[data-v-1c500fb6]{height:35px}.frame .status--queued[data-v-1c500fb6]{font-family:ZillaSlab,serif;font-size:24pt;color:#bbb}.frame .status--failed[data-v-1c500fb6]{font-family:ZillaSlab,serif;font-size:24pt;color:#d40}.frame .button-remove[data-v-1c500fb6]{width:35px;height:35px;fill:#333;stroke:#333;cursor:pointer;transition:background-color .2s,border-radius .2s}.frame .button-remove[data-v-1c500fb6]:hover{background-color:#d40;border-radius:50%}.frame[data-v-1c500fb6]::-webkit-scrollbar,.frame[data-v-1c500fb6] ::-webkit-scrollbar{display:none}.frame .icon--mode[data-v-1c500fb6]{width:20px}',""]),t.exports=r},273:function(t,e,o){var content=o(282);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(15).default)("2feed4f0",content,!0,{sourceMap:!1})},281:function(t,e,o){"use strict";o(273)},282:function(t,e,o){var r=o(14)(!1);r.push([t.i,".download-box[data-v-8061dfc4]{width:100%;min-height:600px;border-radius:5px;padding:20px;background-color:hsla(0,0%,100%,.33333)}.no-dls-yet[data-v-8061dfc4]{color:#bbb;font-size:34pt;text-align:center}",""]),t.exports=r},288:function(t,e,o){"use strict";o.r(e);o(39);var r=o(257),n=(o(7),{components:{DownloadEntry:r.default},computed:{dlcache:function(){return this.$store.state.dlcache.cache}},data:function(){return{downloads:{type:Array}}},mounted:function(){var t=this;this.$store.dispatch("dlcache/update"),setInterval((function(){t.$store.dispatch("dlcache/update")}),1e3)}}),l=(o(281),o(9)),component=Object(l.a)(n,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"download-box"},[t._e(),t._v(" "),t._l(t.dlcache,(function(t,e){return o("DownloadEntry",{key:e,attrs:{downloadEntry:t}})}))],2)}),[],!1,null,"8061dfc4",null);e.default=component.exports;installComponents(component,{DownloadEntry:o(257).default})}}]); |