mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-15 18:13:40 +03:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -45,9 +45,9 @@ class PluginBrowser:
|
||||
for folder in listdir(self.plugin_path):
|
||||
with open(path.join(self.plugin_path, folder, 'plugin.json'), 'r') as f:
|
||||
plugin = json.load(f)
|
||||
|
||||
|
||||
if plugin['name'] == name:
|
||||
return path.join(self.plugin_path, folder)
|
||||
return path.join(self.plugin_path, folder)
|
||||
|
||||
async def uninstall_plugin(self, name):
|
||||
tab = await get_tab("SP")
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { DialogButton, staticClasses } from 'decky-frontend-lib';
|
||||
import { FaTrash } from 'react-icons/fa';
|
||||
|
||||
import { useDeckyState } from '../../DeckyState';
|
||||
|
||||
export default function PluginList() {
|
||||
const plugins = window.DeckyPluginLoader?.getPlugins();
|
||||
const { plugins } = useDeckyState();
|
||||
|
||||
if (plugins.length === 0) {
|
||||
return (
|
||||
@@ -14,7 +16,7 @@ export default function PluginList() {
|
||||
|
||||
return (
|
||||
<ul style={{ listStyleType: 'none' }}>
|
||||
{window.DeckyPluginLoader?.getPlugins().map(({ name }) => (
|
||||
{plugins.map(({ name }) => (
|
||||
<li style={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
|
||||
<span>{name}</span>
|
||||
<div className={staticClasses.Title} style={{ marginLeft: 'auto', boxShadow: 'none' }}>
|
||||
|
||||
@@ -44,11 +44,13 @@ class PluginLoader extends Logger {
|
||||
});
|
||||
|
||||
this.routerHook.addRoute('/decky/store', () => <StorePage />);
|
||||
this.routerHook.addRoute('/decky/settings', () => <SettingsPage />);
|
||||
}
|
||||
|
||||
public getPlugins() {
|
||||
return this.plugins;
|
||||
this.routerHook.addRoute('/decky/settings', () => {
|
||||
return (
|
||||
<DeckyStateContextProvider deckyState={this.deckyState}>
|
||||
<SettingsPage />
|
||||
</DeckyStateContextProvider>
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
public addPluginInstallPrompt(artifact: string, version: string, request_id: string, hash: string) {
|
||||
|
||||
Reference in New Issue
Block a user