mirror of
https://github.com/truewhile/MeBox.git
synced 2026-11-16 12:54:22 +08:00
优化
This commit is contained in:
@@ -464,7 +464,9 @@ export function HomeLibrariesSection({
|
||||
pinned={pinnedIds.includes(lib.id)}
|
||||
onTogglePin={onTogglePin ? () => onTogglePin(lib.id) : undefined}
|
||||
onVisible={() => {
|
||||
if (!lib.cover_url) {
|
||||
// 服务端会生成库封面时不必再为首屏卡片拉成员预览;
|
||||
// 远程挂载库的封面仍由卡片拼图兜底。
|
||||
if (!lib.cover_url && !lib.cover_image_url) {
|
||||
queuePreview(lib.id)
|
||||
}
|
||||
}}
|
||||
|
||||
@@ -43,5 +43,12 @@ export function getLibraryArtworks(
|
||||
if (library.cover_url) {
|
||||
return [{ src: library.cover_url, version: library.updated_at }]
|
||||
}
|
||||
// 服务端生成的库封面(成员海报竖切拼图):所有客户端共用一张图,
|
||||
// 不再由前端拿两张卡片自己拼格子。
|
||||
// version 里带一个版次后缀:接口地址是固定的,靠它让浏览器在拼图规则
|
||||
// 调整(如田字格改成竖切)后丢掉旧缓存重新拉图。
|
||||
if (library.cover_image_url) {
|
||||
return [{ src: library.cover_image_url, version: `${library.updated_at}-c3` }]
|
||||
}
|
||||
return libraryArtworkItems(cards)
|
||||
}
|
||||
|
||||
@@ -130,14 +130,6 @@ export const generalSettingsGroup: SettingGroup = {
|
||||
defaultValue: '256',
|
||||
placeholder: '256',
|
||||
},
|
||||
{
|
||||
key: 'cache.images_originals_ttl_hours',
|
||||
label: '原图保留时长 (小时)',
|
||||
type: 'number',
|
||||
hint: '原图缓存的最长保留时间,超过即删除(默认 168 小时 = 7 天)。缩略图都已生成时原图就不再需要,缩短它可以让原图缓存保持在一个滚动窗口内。设为 0 表示不按时间淘汰',
|
||||
defaultValue: '168',
|
||||
placeholder: '168',
|
||||
},
|
||||
{
|
||||
key: 'https.enabled',
|
||||
label: '启用 HTTPS',
|
||||
|
||||
Reference in New Issue
Block a user