mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 21:11:58 +00:00
Add errored plugins to plugin array for uninstalls
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
|||||||
sleep,
|
sleep,
|
||||||
staticClasses,
|
staticClasses,
|
||||||
} from 'decky-frontend-lib';
|
} from 'decky-frontend-lib';
|
||||||
import { lazy } from 'react';
|
import { FC, lazy } from 'react';
|
||||||
import { FaExclamationCircle, FaPlug } from 'react-icons/fa';
|
import { FaExclamationCircle, FaPlug } from 'react-icons/fa';
|
||||||
|
|
||||||
import { DeckyState, DeckyStateContextProvider, useDeckyState } from './components/DeckyState';
|
import { DeckyState, DeckyStateContextProvider, useDeckyState } from './components/DeckyState';
|
||||||
@@ -245,6 +245,20 @@ class PluginLoader extends Logger {
|
|||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.error('Error loading plugin ' + name, e);
|
this.error('Error loading plugin ' + name, e);
|
||||||
|
const TheError: FC<{}> = () => (
|
||||||
|
<>
|
||||||
|
Error:{' '}
|
||||||
|
<pre>
|
||||||
|
<code>{e}</code>
|
||||||
|
</pre>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
this.plugins.push({
|
||||||
|
name: name,
|
||||||
|
version: version,
|
||||||
|
content: <TheError />,
|
||||||
|
icon: <FaExclamationCircle />,
|
||||||
|
});
|
||||||
this.toaster.toast({ title: 'Error loading ' + name, body: '' + e, icon: <FaExclamationCircle /> });
|
this.toaster.toast({ title: 'Error loading ' + name, body: '' + e, icon: <FaExclamationCircle /> });
|
||||||
}
|
}
|
||||||
} else throw new Error(`${name} frontend_bundle not OK`);
|
} else throw new Error(`${name} frontend_bundle not OK`);
|
||||||
|
|||||||
Reference in New Issue
Block a user