dsh-vidi 0.8.0 → 0.8.1
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/lib/client.js +42 -6
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -34799,6 +34799,7 @@ function Settings(props) {
|
|
|
34799
34799
|
const installUpdate = async () => {
|
|
34800
34800
|
setInstalling(true);
|
|
34801
34801
|
setInstalled(null);
|
|
34802
|
+
const target = update?.latest;
|
|
34802
34803
|
try {
|
|
34803
34804
|
const j = await (await fetch("/live/api/update", {
|
|
34804
34805
|
method: "POST",
|
|
@@ -34806,13 +34807,31 @@ function Settings(props) {
|
|
|
34806
34807
|
body: "{}"
|
|
34807
34808
|
})).json();
|
|
34808
34809
|
setInstalled(j);
|
|
34809
|
-
if (j.status === "applied")
|
|
34810
|
-
|
|
34811
|
-
|
|
34812
|
-
|
|
34813
|
-
|
|
34814
|
-
}
|
|
34810
|
+
if (j.status === "applied") {
|
|
34811
|
+
try {
|
|
34812
|
+
sessionStorage.setItem("dsh-vidi.reopen", "1");
|
|
34813
|
+
} catch {}
|
|
34814
|
+
setTimeout(() => location.reload(), 800);
|
|
34815
|
+
}
|
|
34816
|
+
setInstalling(false);
|
|
34817
|
+
return;
|
|
34818
|
+
} catch {}
|
|
34819
|
+
for (let i = 0; i < 60; i++) {
|
|
34820
|
+
await new Promise((res) => setTimeout(res, 1500));
|
|
34821
|
+
try {
|
|
34822
|
+
if ((await (await fetch("/live/api/version")).json()).current === target) {
|
|
34823
|
+
try {
|
|
34824
|
+
sessionStorage.setItem("dsh-vidi.reopen", "1");
|
|
34825
|
+
} catch {}
|
|
34826
|
+
location.reload();
|
|
34827
|
+
return;
|
|
34828
|
+
}
|
|
34829
|
+
} catch {}
|
|
34815
34830
|
}
|
|
34831
|
+
setInstalled({
|
|
34832
|
+
status: "failed",
|
|
34833
|
+
message: "no answer"
|
|
34834
|
+
});
|
|
34816
34835
|
setInstalling(false);
|
|
34817
34836
|
};
|
|
34818
34837
|
const box = (0, react.useRef)(null);
|
|
@@ -39052,6 +39071,23 @@ function apply(ctx) {
|
|
|
39052
39071
|
subscribe: (fn) => c.layout.panelInfo.subscribe(fn)
|
|
39053
39072
|
}
|
|
39054
39073
|
}), "dsh-vidi: main panel host");
|
|
39074
|
+
c.effect(() => {
|
|
39075
|
+
let back = false;
|
|
39076
|
+
try {
|
|
39077
|
+
back = sessionStorage.getItem("dsh-vidi.reopen") === "1";
|
|
39078
|
+
sessionStorage.removeItem("dsh-vidi.reopen");
|
|
39079
|
+
} catch {}
|
|
39080
|
+
if (!back) return () => {};
|
|
39081
|
+
let tries = 0;
|
|
39082
|
+
const timer = setInterval(() => {
|
|
39083
|
+
const s = sessions(), cur = s?.current();
|
|
39084
|
+
if (s && cur) {
|
|
39085
|
+
clearInterval(timer);
|
|
39086
|
+
openPage(s, { sessionId: cur });
|
|
39087
|
+
} else if (++tries > 40) clearInterval(timer);
|
|
39088
|
+
}, 250);
|
|
39089
|
+
return () => clearInterval(timer);
|
|
39090
|
+
}, "dsh-vidi: reopen after update");
|
|
39055
39091
|
c.slots.inject("main", () => c.slots.register({
|
|
39056
39092
|
name: "main",
|
|
39057
39093
|
key: PANEL_ID,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-vidi",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "A video tool for DeepSeek Harness: watch live streams, videos and podcasts with real-time subtitles in any language, then clip and download",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "PolyForm-Noncommercial-1.0.0",
|