@youtyan/code-viewer 0.1.2 → 0.1.3
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/package.json +1 -1
- package/web/app.js +11 -3
package/package.json
CHANGED
package/web/app.js
CHANGED
|
@@ -764,8 +764,13 @@
|
|
|
764
764
|
const target = $("#diff");
|
|
765
765
|
const empty = $("#empty");
|
|
766
766
|
if (!newFiles.length) {
|
|
767
|
-
|
|
768
|
-
|
|
767
|
+
if (STATE.route.screen === "file") {
|
|
768
|
+
empty.classList.add("hidden");
|
|
769
|
+
applySourceRouteToShell();
|
|
770
|
+
} else {
|
|
771
|
+
empty.classList.remove("hidden");
|
|
772
|
+
target.replaceChildren();
|
|
773
|
+
}
|
|
769
774
|
LOAD_QUEUE.length = 0;
|
|
770
775
|
return;
|
|
771
776
|
}
|
|
@@ -2693,7 +2698,10 @@
|
|
|
2693
2698
|
}
|
|
2694
2699
|
if (STATE.route.screen === "repo")
|
|
2695
2700
|
loadRepo();
|
|
2696
|
-
else
|
|
2701
|
+
else if (STATE.route.screen === "file" && STATE.route.view === "blob") {
|
|
2702
|
+
setStatus("live");
|
|
2703
|
+
applySourceRouteToShell();
|
|
2704
|
+
} else
|
|
2697
2705
|
load();
|
|
2698
2706
|
function syncRefInputs() {
|
|
2699
2707
|
const fi = $("#ref-from"), ti = $("#ref-to");
|