@musnows/scriverse 0.3.3 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +9 -1
- package/README.md +9 -1
- package/dist/app.js +14 -2
- package/dist/app.js.map +1 -1
- package/dist/public/app.js +184 -14
- package/dist/public/index.html +25 -21
- package/dist/public/page-route.js +5 -1
- package/dist/public/relationship-keywords.js +34 -0
- package/dist/public/styles.css +51 -2
- package/dist/public/theme-init.js +15 -0
- package/dist/store.js +3 -4
- package/dist/store.js.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -5,4 +5,19 @@
|
|
|
5
5
|
const theme = storedTheme === "dark" || storedTheme === "light" ? storedTheme : prefersDark ? "dark" : "light";
|
|
6
6
|
document.documentElement.dataset.theme = theme;
|
|
7
7
|
document.documentElement.style.colorScheme = theme;
|
|
8
|
+
// 登录页路由首帧直接显示登录卡片,避免出现"骨架屏 → 登录页"的跳变
|
|
9
|
+
const routeParams = new URLSearchParams(window.location.hash.replace(/^#/, ""));
|
|
10
|
+
const routeView = routeParams.get("view") ?? "";
|
|
11
|
+
if (routeView === "login") {
|
|
12
|
+
document.documentElement.classList.add("login-route");
|
|
13
|
+
} else {
|
|
14
|
+
// 会话恢复期间按目标路由预显示对应视图的骨架屏
|
|
15
|
+
const pendingView = ["editor", "module", "welcome"].includes(routeView) && routeParams.get("work")
|
|
16
|
+
? routeView
|
|
17
|
+
: ["settings", "platform-ai"].includes(routeView) ? routeView : "shelf";
|
|
18
|
+
document.documentElement.dataset.pendingView = pendingView;
|
|
19
|
+
if (["shelf", "settings", "platform-ai"].includes(pendingView)) {
|
|
20
|
+
document.documentElement.classList.add("pending-shelf-mode");
|
|
21
|
+
}
|
|
22
|
+
}
|
|
8
23
|
})();
|
package/dist/store.js
CHANGED
|
@@ -531,7 +531,7 @@ export class Store {
|
|
|
531
531
|
return {
|
|
532
532
|
fileVersionId: restorePointId,
|
|
533
533
|
restoredFrom: fileVersionId,
|
|
534
|
-
tree: this.
|
|
534
|
+
tree: this.getWorkDirectory(workId)
|
|
535
535
|
};
|
|
536
536
|
});
|
|
537
537
|
}
|
|
@@ -539,7 +539,7 @@ export class Store {
|
|
|
539
539
|
this.getWork(workId);
|
|
540
540
|
let result = {};
|
|
541
541
|
this.db.transaction(() => { result = this.importNovelInTransaction(workId, fileName, fileType, parsed); });
|
|
542
|
-
return result;
|
|
542
|
+
return { ...result, tree: this.getWorkDirectory(workId) };
|
|
543
543
|
}
|
|
544
544
|
createImportedWork(input, fileName, fileType, parsed) {
|
|
545
545
|
return this.db.transaction(() => {
|
|
@@ -573,8 +573,7 @@ export class Store {
|
|
|
573
573
|
fileVersionId,
|
|
574
574
|
warnings: parsed.warnings,
|
|
575
575
|
wordCount: parsed.wordCount,
|
|
576
|
-
paragraphCount: parsed.paragraphCount
|
|
577
|
-
tree: this.getWorkTree(workId)
|
|
576
|
+
paragraphCount: parsed.paragraphCount
|
|
578
577
|
};
|
|
579
578
|
}
|
|
580
579
|
createVolume(workId, input) {
|