blob: bf01f85a49e18fa672f0909a326d3f560673ed7c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
import { DialogButton, staticClasses } from 'decky-frontend-lib';
import { FaTrash } from 'react-icons/fa';
import { useDeckyState } from '../../DeckyState';
export default function PluginList() {
const { plugins } = useDeckyState();
if (plugins.length === 0) {
return (
<div>
<p>No plugins installed</p>
</div>
);
}
return (
<ul style={{ listStyleType: 'none' }}>
{plugins.map(({ name }) => (
<li style={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
<span>{name}</span>
<div className={staticClasses.Title} style={{ marginLeft: 'auto', boxShadow: 'none' }}>
<DialogButton
style={{ height: '40px', width: '40px', padding: '10px 12px' }}
onClick={() => window.DeckyPluginLoader.uninstall_plugin(name)}
>
<FaTrash />
</DialogButton>
</div>
</li>
))}
</ul>
);
}
|