react-os-shell 0.2.55 → 0.2.57
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/dist/{Browser-4WIA5UFC.js → Browser-XDEBFFH5.js} +3 -3
- package/dist/{Browser-4WIA5UFC.js.map → Browser-XDEBFFH5.js.map} +1 -1
- package/dist/{Calculator-WJSLOXOC.js → Calculator-CSVNNWA3.js} +4 -4
- package/dist/{Calculator-WJSLOXOC.js.map → Calculator-CSVNNWA3.js.map} +1 -1
- package/dist/{Calendar-PNKZHKKU.js → Calendar-SGDRB5L7.js} +3 -3
- package/dist/{Calendar-PNKZHKKU.js.map → Calendar-SGDRB5L7.js.map} +1 -1
- package/dist/{CurrencyConverter-23WT33SH.js → CurrencyConverter-AXZ6EWU4.js} +4 -4
- package/dist/{CurrencyConverter-23WT33SH.js.map → CurrencyConverter-AXZ6EWU4.js.map} +1 -1
- package/dist/{Documents-QT3EIB6G.js → Documents-S5PXDWTK.js} +3 -3
- package/dist/{Documents-QT3EIB6G.js.map → Documents-S5PXDWTK.js.map} +1 -1
- package/dist/{Email-2LZXT2UA.js → Email-3DXXEIFE.js} +3 -3
- package/dist/{Email-2LZXT2UA.js.map → Email-3DXXEIFE.js.map} +1 -1
- package/dist/Files-Y7KYQHEO.js +8 -0
- package/dist/{Files-6NSYXV5B.js.map → Files-Y7KYQHEO.js.map} +1 -1
- package/dist/{Minesweeper-BOCFOG5R.js → Minesweeper-L7YLY73F.js} +3 -3
- package/dist/{Minesweeper-BOCFOG5R.js.map → Minesweeper-L7YLY73F.js.map} +1 -1
- package/dist/{Notepad-UUUJKLXB.js → Notepad-SN5WZIJY.js} +3 -3
- package/dist/{Notepad-UUUJKLXB.js.map → Notepad-SN5WZIJY.js.map} +1 -1
- package/dist/{PomodoroTimer-H4EMUMPT.js → PomodoroTimer-PJFPPOOQ.js} +4 -4
- package/dist/{PomodoroTimer-H4EMUMPT.js.map → PomodoroTimer-PJFPPOOQ.js.map} +1 -1
- package/dist/Preview-7PVR2MB7.js +7 -0
- package/dist/{Preview-RDGDPER7.js.map → Preview-7PVR2MB7.js.map} +1 -1
- package/dist/{Spreadsheet-TEK43EVB.js → Spreadsheet-T5TEHTKO.js} +3 -3
- package/dist/{Spreadsheet-TEK43EVB.js.map → Spreadsheet-T5TEHTKO.js.map} +1 -1
- package/dist/{Weather-BGLKHRCK.js → Weather-XMFVT6EO.js} +4 -4
- package/dist/{Weather-BGLKHRCK.js.map → Weather-XMFVT6EO.js.map} +1 -1
- package/dist/{WorldClock-X3VM3WFT.js → WorldClock-2F7CPJZW.js} +4 -4
- package/dist/{WorldClock-X3VM3WFT.js.map → WorldClock-2F7CPJZW.js.map} +1 -1
- package/dist/apps/index.js +17 -17
- package/dist/{chunk-4ZCO2DWL.js → chunk-372FJEYH.js} +3 -3
- package/dist/{chunk-4ZCO2DWL.js.map → chunk-372FJEYH.js.map} +1 -1
- package/dist/{chunk-OVQOM35O.js → chunk-K4J4DLJL.js} +4 -4
- package/dist/{chunk-OVQOM35O.js.map → chunk-K4J4DLJL.js.map} +1 -1
- package/dist/{chunk-YMSQ23E4.js → chunk-LWXHFZE4.js} +25 -11
- package/dist/chunk-LWXHFZE4.js.map +1 -0
- package/dist/{chunk-QHLNMX3Z.js → chunk-XD34ZT3F.js} +16 -8
- package/dist/chunk-XD34ZT3F.js.map +1 -0
- package/dist/index.js +4 -4
- package/package.json +1 -1
- package/dist/Files-6NSYXV5B.js +0 -8
- package/dist/Preview-RDGDPER7.js +0 -7
- package/dist/chunk-QHLNMX3Z.js.map +0 -1
- package/dist/chunk-YMSQ23E4.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ImageAnnotator_default } from './chunk-KUIPWCTJ.js';
|
|
2
2
|
import { toast_default } from './chunk-WIJ45SYD.js';
|
|
3
|
-
import { WindowTitle, getActiveModalId } from './chunk-
|
|
3
|
+
import { WindowTitle, getActiveModalId } from './chunk-LWXHFZE4.js';
|
|
4
4
|
import { createContext, useState, useEffect, useRef, useContext } from 'react';
|
|
5
5
|
import { createPortal } from 'react-dom';
|
|
6
6
|
import * as pdfjsLib from 'pdfjs-dist';
|
|
@@ -2320,18 +2320,26 @@ function ImagePanel({ url, filename, onDownload, onEmail }) {
|
|
|
2320
2320
|
a.click();
|
|
2321
2321
|
return;
|
|
2322
2322
|
}
|
|
2323
|
-
|
|
2324
|
-
const res = await fetch(url,
|
|
2323
|
+
const tryFetch = async (init) => {
|
|
2324
|
+
const res = await fetch(url, init);
|
|
2325
2325
|
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
2326
|
-
|
|
2326
|
+
return res.blob();
|
|
2327
|
+
};
|
|
2328
|
+
try {
|
|
2329
|
+
let blob;
|
|
2330
|
+
try {
|
|
2331
|
+
blob = await tryFetch({ credentials: "include" });
|
|
2332
|
+
} catch {
|
|
2333
|
+
blob = await tryFetch({ credentials: "omit" });
|
|
2334
|
+
}
|
|
2327
2335
|
const blobUrl = URL.createObjectURL(blob);
|
|
2328
2336
|
const a = document.createElement("a");
|
|
2329
2337
|
a.href = blobUrl;
|
|
2330
2338
|
a.download = filename;
|
|
2331
2339
|
a.click();
|
|
2332
2340
|
setTimeout(() => URL.revokeObjectURL(blobUrl), 1e3);
|
|
2333
|
-
} catch
|
|
2334
|
-
|
|
2341
|
+
} catch {
|
|
2342
|
+
toast_default.error("Download failed \u2014 couldn't reach the file.");
|
|
2335
2343
|
}
|
|
2336
2344
|
};
|
|
2337
2345
|
const btn = "px-2 py-1 rounded hover:bg-gray-200 transition-colors text-gray-600 flex items-center gap-1";
|
|
@@ -2388,5 +2396,5 @@ function ImagePanel({ url, filename, onDownload, onEmail }) {
|
|
|
2388
2396
|
}
|
|
2389
2397
|
|
|
2390
2398
|
export { Preview, setPdfPreview };
|
|
2391
|
-
//# sourceMappingURL=chunk-
|
|
2392
|
-
//# sourceMappingURL=chunk-
|
|
2399
|
+
//# sourceMappingURL=chunk-XD34ZT3F.js.map
|
|
2400
|
+
//# sourceMappingURL=chunk-XD34ZT3F.js.map
|