Skip to content

armgit / peach

Public Imported from GitHub
0

Peach: Local-first video metadata scraper and media manager.

perf(web): 首页打开不再等顶部两排的聚合

longmeidaoe083a9e27dcf
diff --git a/frontend/src/application/composition.js b/frontend/src/application/composition.js
index e0c7cfee5..0bde585c3 100644
--- a/frontend/src/application/composition.js
+++ b/frontend/src/application/composition.js
@@ -200,9 +200,10 @@ mountManageHeader();
mountBatchDock();
buildManageBar();
Promise.all([loadSourceStatus(),loadSyncedSettings(),loadingState.entityShapesReady])
- .then(()=>effects.isActive&&loadingState.wantsDiscoveryBars()?buildBars():null)
.then(()=>{
if(!effects.isActive)return;
+ /* 顶部两排与筛选栏的两个聚合自带骨架、取回后自己落位,页面打开不等它们:作品列表与它们同时去取。 */
+ if(loadingState.wantsDiscoveryBars())buildBars().catch(error=>console.error('首页横条装载失败',error));
syncNavigation();wireAllDrag();
// 路由树里按匹配打开的页面等这一下才开始打开:壳的状态到这时才齐。
compositionState.routing=true;writeShell({pageOpens:1});syncRouteChrome();
diff --git a/web/dist/peach-app.js b/web/dist/peach-app.js
index be08d9c9f..0b232bd98 100644
--- a/web/dist/peach-app.js
+++ b/web/dist/peach-app.js
@@ -2,7 +2,7 @@
(function() {
try {
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, t = new e.Error().stack;
- t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "5b8ec9f1-41d8-4128-8f95-555ca3931b53", e._sentryDebugIdIdentifier = "sentry-dbid-5b8ec9f1-41d8-4128-8f95-555ca3931b53");
+ t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "1d51c903-9e86-4830-9e32-834523c3443d", e._sentryDebugIdIdentifier = "sentry-dbid-1d51c903-9e86-4830-9e32-834523c3443d");
} catch {}
})();
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, n) => {
@@ -116399,8 +116399,8 @@ function ESt() {
p9(),
Ibt(),
w7.entityShapesReady
- ]).then(() => e.isActive && w7.wantsDiscoveryBars() ? n9() : null).then(() => {
- e.isActive && (T9(), Rxt(), U9.routing = !0, wl({ pageOpens: 1 }), O9(), q7());
+ ]).then(() => {
+ e.isActive && (w7.wantsDiscoveryBars() && n9().catch((e) => console.error("首页横条装载失败", e)), T9(), Rxt(), U9.routing = !0, wl({ pageOpens: 1 }), O9(), q7());
}).catch((t) => {
e.isActive && console.error("应用启动失败", t);
});
@@ -116878,4 +116878,4 @@ JSt(YSt);
//#endregion
export { JT as applyTheme, hP as peachHistory, Zo as popCount, Tvt as showToast };
-//# debugId=5b8ec9f1-41d8-4128-8f95-555ca3931b53
\ No newline at end of file
+//# debugId=1d51c903-9e86-4830-9e32-834523c3443d
\ No newline at end of file