Always show play all button

This commit is contained in:
the1812 2020-06-08 23:58:58 +08:00
parent 7841dee610
commit 8e8f26e667
8 changed files with 9 additions and 9 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -53,7 +53,7 @@
"custom-navbar-upload.min.js": "0CDEEA46DCF0D6187C86BB12DE8CD36737116EF171AA1F63AB20C5DC7549C976", "custom-navbar-upload.min.js": "0CDEEA46DCF0D6187C86BB12DE8CD36737116EF171AA1F63AB20C5DC7549C976",
"custom-navbar-user-info.min.js": "86C30E3AD71C99630933B231861A271A647D9D6625CB46AB61D65F5F9560F188", "custom-navbar-user-info.min.js": "86C30E3AD71C99630933B231861A271A647D9D6625CB46AB61D65F5F9560F188",
"custom-navbar-video-list.min.js": "08D6713144E910C1303CB610A5890A5663B92BE82630BDA3C8E6299FB4A429E2", "custom-navbar-video-list.min.js": "08D6713144E910C1303CB610A5890A5663B92BE82630BDA3C8E6299FB4A429E2",
"custom-navbar-watchlater-list.min.js": "E9D98431DB15E3CA31CE29B5480B1A71BCD9178E783BF8BDF8F68333130DD403", "custom-navbar-watchlater-list.min.js": "1ED83050F1966EC229B006CEE97F74E98430F658B4636BDDD774B7455E53A012",
"danmaku-converter.min.js": "6C844406F060DCF2483F9CC4C7329911ED77BC77097F2BC5B925B6F12C990820", "danmaku-converter.min.js": "6C844406F060DCF2483F9CC4C7329911ED77BC77097F2BC5B925B6F12C990820",
"danmaku-send-bar.min.css": "3FA93C0897014E89A8F904407CD6404AB9A15148D6BEB1334939F69A87ADF845", "danmaku-send-bar.min.css": "3FA93C0897014E89A8F904407CD6404AB9A15148D6BEB1334939F69A87ADF845",
"danmaku-send-bar.min.js": "7108E72F00C169F26E20409F4AA79F05553310375BABC392EB7E2166224B800A", "danmaku-send-bar.min.js": "7108E72F00C169F26E20409F4AA79F05553310375BABC392EB7E2166224B800A",

Binary file not shown.

View File

@ -1 +1 @@
(()=>{return(t,i)=>{const{NavbarComponent:a}=i.import("custom-navbar-component");class e extends a{constructor(){super();this.boundingWidth=380;this.noPadding=true;this.href="https://www.bilibili.com/watchlater/#/list";this.html="稍后再看";this.active=document.URL.startsWith("https://www.bilibili.com/watchlater/");this.popupHtml=`\n<div class="watchlater-list loading">\n<div class="loading-tip">\n 加载中...\n</div>\n<div class="empty-tip" v-if="filteredCards.length === 0">\n 空空如也哦 = ̄ω ̄=\n</div>\n<div class="header">\n \x3c!--<div class="operations">\n<div v-if="!redirect" class="round-button" title="播放全部"><i class="mdi mdi-play-circle-outline"></i></div>\n<div class="round-button" title="移除已观看"><i class="mdi mdi-eye-check-outline"></i></div>\n<div class="round-button" title="清空全部"><i class="mdi mdi-trash-can-outline"></i></div>\n</div>--\x3e\n<div class="search">\n<input type="text" placeholder="搜索" v-model="search">\n</div>\n<a v-if="!redirect" class="round-button" target="_blank" href="https://www.bilibili.com/watchlater/#" title="播放全部">\n<i class="mdi mdi-play"></i>\n</a>\n<a class="round-button" href="https://www.bilibili.com/watchlater/#/list" title="查看更多" target="_blank">\n<i class="mdi mdi-dots-horizontal"></i>\n</a>\n</div>\n<transition-group name="cards" tag="div" class="cards">\n<div class="watchlater-card" v-for="(card, index) of filteredCards" :key="card.aid">\n<a class="cover-container" target="_blank" :href="card.href">\n<dpi-img class="cover" :src="card.coverUrl" :size="{width: 130, height: 85}"></dpi-img>\n<div class="floating remove" title="移除" @click.prevent="remove(card.aid, index)"><i class="mdi mdi-close"></i></div>\n<div class="floating duration">{{card.durationText}}</div>\n<div class="floating viewed" v-if="card.complete">\n 已观看\n</div>\n</a>\n<a class="title" target="_blank" :href="card.href" :title="card.title">{{card.title}}</a>\n<a class="up" target="_blank" :href="'https://space.bilibili.com/' + card.upID" :title="card.upName">\n<dpi-img class="face" :src="card.upFaceUrl" :size="20"></dpi-img>\n<div class="name">{{card.upName}}</div>\n</a>\n</div>\n</transition-group>\n \x3c!--<div class="undo round-button">\n<i class="mdi mdi-undo-variant"></i>\n 撤销\n</div>--\x3e\n</div>\n`;this.initialPopup=(()=>{this.init()})}async init(){new Vue({el:await SpinQuery.select(`.custom-navbar [data-name="${this.name}"] .watchlater-list`),store:store,components:{DpiImg:()=>i.importAsync("dpi-img.vue")},data:{cards:[],filteredCards:[],search:"",lastRemovedAid:0,redirect:t.watchLaterRedirect&&t.watchLaterRedirectNavbar},computed:{...Vuex.mapState(["watchlaterList"])},watch:{watchlaterList(){this.updateList()},search(){this.updateFilteredCards()}},methods:{...Vuex.mapActions(["toggleWatchlater"]),async updateList(){const{getWatchlaterList:t}=await i.importAsync("watchlater-api");const a=await t(true);if(!a){this.cards=[];return}const e=t=>{if(this.redirect){return`https://www.bilibili.com/video/av${t.aid}`}if(t.bvid){return`https://www.bilibili.com/watchlater/#/${t.bvid}`}return`https://www.bilibili.com/watchlater/#/av${t.aid}`};const s=a.map(t=>{const i=(()=>{if(t.pages===undefined){return e(t)}const i=t.pages.map(t=>t.cid);const a=t.cid===0?1:i.indexOf(t.cid)+1;return this.redirect?`${e(t)}?p=${a}`:`${e(t)}/p${a}`})();const a=Math.round(1e3*t.progress/t.duration)/1e3;return{aid:t.aid,href:i,coverUrl:t.pic.replace("http:","https:"),durationText:formatDuration(t.duration),duration:t.duration,complete:t.progress<0||a>.95,title:t.title,upName:t.owner.name,upFaceUrl:t.owner.face.replace("http:","https:"),upID:t.owner.mid}});this.cards=s;if(this.search){this.updateFilteredCards()}else{this.filteredCards=s}},async remove(t,i){this.cards.splice(i,1);await this.toggleWatchlater(t);this.lastRemovedAid=t},async undo(){const t=this.lastRemovedAid;if(t!==0){await this.toggleWatchlater(t)}},updateFilteredCards:_.debounce(function(){const t=this.search.toLowerCase();const i=this.$el.querySelector(".cards");i.scrollTo(0,0);this.filteredCards=this.cards.filter(i=>{return i.title.toLowerCase().includes(t)||i.upName.toLowerCase().includes(t)})},100)},async mounted(){try{await this.updateList()}finally{this.$el.classList.remove("loading")}}})}get name(){return"watchlaterList"}}return{export:{WatchlaterList:e}}}})(); (()=>{return(t,i)=>{const{NavbarComponent:a}=i.import("custom-navbar-component");class e extends a{constructor(){super();this.boundingWidth=380;this.noPadding=true;this.href="https://www.bilibili.com/watchlater/#/list";this.html="稍后再看";this.active=document.URL.startsWith("https://www.bilibili.com/watchlater/");this.popupHtml=`\n<div class="watchlater-list loading">\n<div class="loading-tip">\n 加载中...\n</div>\n<div class="empty-tip" v-if="filteredCards.length === 0">\n 空空如也哦 = ̄ω ̄=\n</div>\n<div class="header">\n \x3c!--<div class="operations">\n<div v-if="!redirect" class="round-button" title="播放全部"><i class="mdi mdi-play-circle-outline"></i></div>\n<div class="round-button" title="移除已观看"><i class="mdi mdi-eye-check-outline"></i></div>\n<div class="round-button" title="清空全部"><i class="mdi mdi-trash-can-outline"></i></div>\n</div>--\x3e\n<div class="search">\n<input type="text" placeholder="搜索" v-model="search">\n</div>\n<a class="round-button" target="_blank" href="https://www.bilibili.com/watchlater/#" title="播放全部">\n<i class="mdi mdi-play"></i>\n</a>\n<a class="round-button" href="https://www.bilibili.com/watchlater/#/list" title="查看更多" target="_blank">\n<i class="mdi mdi-dots-horizontal"></i>\n</a>\n</div>\n<transition-group name="cards" tag="div" class="cards">\n<div class="watchlater-card" v-for="(card, index) of filteredCards" :key="card.aid">\n<a class="cover-container" target="_blank" :href="card.href">\n<dpi-img class="cover" :src="card.coverUrl" :size="{width: 130, height: 85}"></dpi-img>\n<div class="floating remove" title="移除" @click.prevent="remove(card.aid, index)"><i class="mdi mdi-close"></i></div>\n<div class="floating duration">{{card.durationText}}</div>\n<div class="floating viewed" v-if="card.complete">\n 已观看\n</div>\n</a>\n<a class="title" target="_blank" :href="card.href" :title="card.title">{{card.title}}</a>\n<a class="up" target="_blank" :href="'https://space.bilibili.com/' + card.upID" :title="card.upName">\n<dpi-img class="face" :src="card.upFaceUrl" :size="20"></dpi-img>\n<div class="name">{{card.upName}}</div>\n</a>\n</div>\n</transition-group>\n \x3c!--<div class="undo round-button">\n<i class="mdi mdi-undo-variant"></i>\n 撤销\n</div>--\x3e\n</div>\n`;this.initialPopup=(()=>{this.init()})}async init(){new Vue({el:await SpinQuery.select(`.custom-navbar [data-name="${this.name}"] .watchlater-list`),store:store,components:{DpiImg:()=>i.importAsync("dpi-img.vue")},data:{cards:[],filteredCards:[],search:"",lastRemovedAid:0,redirect:t.watchLaterRedirect&&t.watchLaterRedirectNavbar},computed:{...Vuex.mapState(["watchlaterList"])},watch:{watchlaterList(){this.updateList()},search(){this.updateFilteredCards()}},methods:{...Vuex.mapActions(["toggleWatchlater"]),async updateList(){const{getWatchlaterList:t}=await i.importAsync("watchlater-api");const a=await t(true);if(!a){this.cards=[];return}const e=t=>{if(this.redirect){return`https://www.bilibili.com/video/av${t.aid}`}if(t.bvid){return`https://www.bilibili.com/watchlater/#/${t.bvid}`}return`https://www.bilibili.com/watchlater/#/av${t.aid}`};const s=a.map(t=>{const i=(()=>{if(t.pages===undefined){return e(t)}const i=t.pages.map(t=>t.cid);const a=t.cid===0?1:i.indexOf(t.cid)+1;return this.redirect?`${e(t)}?p=${a}`:`${e(t)}/p${a}`})();const a=Math.round(1e3*t.progress/t.duration)/1e3;return{aid:t.aid,href:i,coverUrl:t.pic.replace("http:","https:"),durationText:formatDuration(t.duration),duration:t.duration,complete:t.progress<0||a>.95,title:t.title,upName:t.owner.name,upFaceUrl:t.owner.face.replace("http:","https:"),upID:t.owner.mid}});this.cards=s;if(this.search){this.updateFilteredCards()}else{this.filteredCards=s}},async remove(t,i){this.cards.splice(i,1);await this.toggleWatchlater(t);this.lastRemovedAid=t},async undo(){const t=this.lastRemovedAid;if(t!==0){await this.toggleWatchlater(t)}},updateFilteredCards:_.debounce(function(){const t=this.search.toLowerCase();const i=this.$el.querySelector(".cards");i.scrollTo(0,0);this.filteredCards=this.cards.filter(i=>{return i.title.toLowerCase().includes(t)||i.upName.toLowerCase().includes(t)})},100)},async mounted(){try{await this.updateList()}finally{this.$el.classList.remove("loading")}}})}get name(){return"watchlaterList"}}return{export:{WatchlaterList:e}}}})();

View File

@ -37,7 +37,7 @@ export class WatchlaterList extends NavbarComponent {
<div class="search"> <div class="search">
<input type="text" placeholder="搜索" v-model="search"> <input type="text" placeholder="搜索" v-model="search">
</div> </div>
<a v-if="!redirect" class="round-button" target="_blank" href="https://www.bilibili.com/watchlater/#" title="播放全部"> <a class="round-button" target="_blank" href="https://www.bilibili.com/watchlater/#" title="播放全部">
<i class="mdi mdi-play"></i> <i class="mdi mdi-play"></i>
</a> </a>
<a class="round-button" href="https://www.bilibili.com/watchlater/#/list" title="查看更多" target="_blank"> <a class="round-button" href="https://www.bilibili.com/watchlater/#/list" title="查看更多" target="_blank">