File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " TikLocal"
3- version = " 0.8.15 "
3+ version = " 0.8.16 "
44description = " A local media server that combines the features of TikTok and Pinterest"
55authors = [" ChanMo <chan.mo@outlook.com>" ]
66readme = " README.md"
Original file line number Diff line number Diff line change 7676 [data-theme = "dark" ] .collection-cover {
7777 background : linear-gradient (135deg , # 1e293b, # 334155 );
7878 }
79- .collection-cover img {
79+ .collection-cover img ,
80+ .collection-cover video {
8081 width : 100% ;
8182 height : 100% ;
8283 object-fit : cover;
@@ -354,9 +355,15 @@ <h3 class="text-sm font-semibold text-slate-900 dark:text-slate-100 mb-3">重命
354355 const count = Number ( item . item_count || 0 ) ;
355356 const detail = String ( item . detail_url || '#' ) ;
356357 const name = escapeHtml ( item . name || '未命名集合' ) ;
357- const coverHtml = cover
358- ? `<img src="${ cover } " alt="" loading="lazy" />`
359- : `<div class="collection-cover-empty"><i data-feather="folder"></i></div>` ;
358+ const coverType = String ( item . cover_type || 'image' ) ;
359+ let coverHtml ;
360+ if ( ! cover ) {
361+ coverHtml = `<div class="collection-cover-empty"><i data-feather="folder"></i></div>` ;
362+ } else if ( coverType === 'video' ) {
363+ coverHtml = `<video src="${ cover } " muted preload="metadata" playsinline></video>` ;
364+ } else {
365+ coverHtml = `<img src="${ cover } " alt="" loading="lazy" />` ;
366+ }
360367 return `
361368 <article class="collection-item" data-collection-id="${ id } ">
362369 <a class="collection-card" href="${ detail } ">
Original file line number Diff line number Diff line change @@ -1527,7 +1527,6 @@ <h3>加入集合</h3>
15271527 const removeCount = 30 ;
15281528 const removed = flowSession . dropHead ( removeCount ) ;
15291529 removed . forEach ( ( entry ) => entry . el . remove ( ) ) ;
1530- setCurrentIndex ( Math . max ( 0 , getCurrentIndex ( ) - removeCount ) ) ;
15311530 }
15321531 } catch ( error ) {
15331532 flowSession . setHasMore ( false ) ;
You can’t perform that action at this time.
0 commit comments