summaryrefslogtreecommitdiff
path: root/frontend/src/plugin-loader.tsx
diff options
context:
space:
mode:
authorÁlvaro Cuesta <1827495+alvaro-cuesta@users.noreply.github.com>2025-01-02 20:38:40 +0100
committerGitHub <noreply@github.com>2025-01-02 11:38:40 -0800
commitf6144f9634482d6bd0ed88a31495c6c6c88add96 (patch)
tree21797e504d62c33c1514870a457e36d3b4f3cbac /frontend/src/plugin-loader.tsx
parent79bb62a3c4f69dbd57dc037da1269285cae1b26d (diff)
downloaddecky-loader-f6144f9634482d6bd0ed88a31495c6c6c88add96.tar.gz
decky-loader-f6144f9634482d6bd0ed88a31495c6c6c88add96.zip
feat: sync with local plugin status in store (#733)v3.1.0-pre1
* fix: useDeckyState proper type and safety * refactor: plugin list Avoids unneeded re-renders. See https://react.dev/learn/you-might-not-need-an-effect#caching-expensive-calculations * feat: sync with local plugin status in store Adds some QoL changes to the plugin store browser: - Add ✓ icon to currently installed plugin version in version selector - Change install button label depending on the install type that the button would trigger - Adds icon to install button for clarity The goal is to make it clear to the user what the current state of the installed plugin is, and what would be the impact of installing the selected version. Resolves #360 * lint: prettier * fix: add missing translations * refactor: safer translation strings on install Prefer using `t(...)` instead of `TranslationHelper` since it ensures that the translation keys are not missing in the locale files when running the `extractext` task. By adding comments with `t(...)` calls, `i18next-parser` will generate the strings as if they were present as literals in the code (see https://github.com/i18next/i18next-parser#caveats). This does _not_ suppress the warnings (since `i18next-parser` does not have access to TS types, so it cannot infer template literals) but it at least makes it less likely that a translation will be missed by mistake, have typos, etc.
Diffstat (limited to 'frontend/src/plugin-loader.tsx')
-rw-r--r--frontend/src/plugin-loader.tsx8
1 files changed, 5 insertions, 3 deletions
diff --git a/frontend/src/plugin-loader.tsx b/frontend/src/plugin-loader.tsx
index cb1bb270..88e85a48 100644
--- a/frontend/src/plugin-loader.tsx
+++ b/frontend/src/plugin-loader.tsx
@@ -146,9 +146,11 @@ class PluginLoader extends Logger {
});
this.routerHook.addRoute('/decky/store', () => (
- <WithSuspense route={true}>
- <StorePage />
- </WithSuspense>
+ <DeckyStateContextProvider deckyState={this.deckyState}>
+ <WithSuspense route={true}>
+ <StorePage />
+ </WithSuspense>
+ </DeckyStateContextProvider>
));
this.routerHook.addRoute('/decky/settings', () => {
return (