summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorTrainDoctor <traindoctor@protonmail.com>2023-01-15 17:40:47 -0800
committerGitHub <noreply@github.com>2023-01-15 17:40:47 -0800
commit5fdcc56409a0bc75171df25ca50b6e09ffe7bf3a (patch)
tree2e35f9fe6246dca82ac415298af5c2bfe9c879b5 /frontend
parent915997d1495cc47f60e148252df3e4878a1179a5 (diff)
downloaddecky-loader-5fdcc56409a0bc75171df25ca50b6e09ffe7bf3a.tar.gz
decky-loader-5fdcc56409a0bc75171df25ca50b6e09ffe7bf3a.zip
Aa/bump dfl navigation fix jan2023 (#341)v2.4.10-pre1
* fix React DevTools * bump DFL to fix Navigation * Bump DFL and add shims * fix shims not applying due to timing issue Co-authored-by: AAGaming <aa@mail.catvibers.me>
Diffstat (limited to 'frontend')
-rw-r--r--frontend/package.json2
-rw-r--r--frontend/pnpm-lock.yaml8
-rw-r--r--frontend/src/index.tsx18
3 files changed, 23 insertions, 5 deletions
diff --git a/frontend/package.json b/frontend/package.json
index 3e45e49a..d76289aa 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -41,7 +41,7 @@
}
},
"dependencies": {
- "decky-frontend-lib": "^3.18.4",
+ "decky-frontend-lib": "^3.18.8",
"react-file-icon": "^1.2.0",
"react-icons": "^4.4.0",
"react-markdown": "^8.0.3",
diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml
index 58fa64ce..721c3a8d 100644
--- a/frontend/pnpm-lock.yaml
+++ b/frontend/pnpm-lock.yaml
@@ -10,7 +10,7 @@ specifiers:
'@types/react-file-icon': ^1.0.1
'@types/react-router': 5.1.18
'@types/webpack': ^5.28.0
- decky-frontend-lib: ^3.18.4
+ decky-frontend-lib: ^3.18.8
husky: ^8.0.1
import-sort-style-module: ^6.0.0
inquirer: ^8.2.4
@@ -30,7 +30,7 @@ specifiers:
typescript: ^4.7.4
dependencies:
- decky-frontend-lib: 3.18.4
+ decky-frontend-lib: 3.18.8
react-file-icon: 1.2.0_wcqkhtmu7mswc6yz4uyexck3ty
react-icons: 4.4.0_react@16.14.0
react-markdown: 8.0.3_vshvapmxg47tngu7tvrsqpq55u
@@ -944,8 +944,8 @@ packages:
dependencies:
ms: 2.1.2
- /decky-frontend-lib/3.18.4:
- resolution: {integrity: sha512-i3TAe3RJtT1TK0rJgW9Ek5jxMWZRCYLDvqHDylGVieUvuyI7c8X+cogz30pP4cqeGOaA1d/MxBEbhlpD3JhVvg==}
+ /decky-frontend-lib/3.18.8:
+ resolution: {integrity: sha512-tgN35XgfsAePpmlxdCXnJ/TswmDoP2Dh9Ddl49bHbZMX2GV/H+7jT532Rrs/q8D4xX1LN1qA4alZ8Rr4q61PVg==}
dev: false
/decode-named-character-reference/1.0.2:
diff --git a/frontend/src/index.tsx b/frontend/src/index.tsx
index 03010e13..86dd90e1 100644
--- a/frontend/src/index.tsx
+++ b/frontend/src/index.tsx
@@ -1,3 +1,5 @@
+import { Navigation, Router, sleep } from 'decky-frontend-lib';
+
import PluginLoader from './plugin-loader';
import { DeckyUpdater } from './updater';
@@ -15,6 +17,22 @@ declare global {
}
(async () => {
+ try {
+ if (!Router.NavigateToAppProperties || !Router.NavigateToLibraryTab || !Router.NavigateToInvites) {
+ while (!Navigation.NavigateToAppProperties) await sleep(100);
+ const shims = {
+ NavigateToAppProperties: Navigation.NavigateToAppProperties,
+ NavigateToInvites: Navigation.NavigateToInvites,
+ NavigateToLibraryTab: Navigation.NavigateToLibraryTab,
+ };
+ Object.assign(Router, shims);
+ }
+ } catch (e) {
+ console.error('[DECKY]: Error initializing Navigation interface shims', e);
+ }
+})();
+
+(async () => {
window.deckyAuthToken = await fetch('http://127.0.0.1:1337/auth/token').then((r) => r.text());
window.DeckyPluginLoader?.dismountAll();