summaryrefslogtreecommitdiff
path: root/frontend/src/components/PluginView.tsx
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2023-06-08 14:40:08 +0000
committerWeblate <noreply@weblate.org>2023-06-08 14:40:08 +0000
commit89bbbf6fe4348236f9828a39ddc8f1790cb2f2f4 (patch)
treec175788ffc6917a66db810eb14073c57b750efb3 /frontend/src/components/PluginView.tsx
parentfdc556edeed416843f3e4b9d5c1a9e163dc72d89 (diff)
parent9a05c228a004392df6921a7706f4ae6a62fff2d3 (diff)
downloaddecky-loader-89bbbf6fe4348236f9828a39ddc8f1790cb2f2f4.tar.gz
decky-loader-89bbbf6fe4348236f9828a39ddc8f1790cb2f2f4.zip
Merge remote-tracking branch 'origin/main'
Diffstat (limited to 'frontend/src/components/PluginView.tsx')
-rw-r--r--frontend/src/components/PluginView.tsx11
1 files changed, 11 insertions, 0 deletions
diff --git a/frontend/src/components/PluginView.tsx b/frontend/src/components/PluginView.tsx
index 3ecc2c86..b53035f7 100644
--- a/frontend/src/components/PluginView.tsx
+++ b/frontend/src/components/PluginView.tsx
@@ -8,6 +8,8 @@ import {
staticClasses,
} from 'decky-frontend-lib';
import { VFC, useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+import { FaEyeSlash } from 'react-icons/fa';
import { Plugin } from '../plugin';
import { useDeckyState } from './DeckyState';
@@ -16,8 +18,10 @@ import { useQuickAccessVisible } from './QuickAccessVisibleState';
import TitleView from './TitleView';
const PluginView: VFC = () => {
+ const { hiddenPlugins } = useDeckyState();
const { plugins, updates, activePlugin, pluginOrder, setActivePlugin, closeActivePlugin } = useDeckyState();
const visible = useQuickAccessVisible();
+ const { t } = useTranslation();
const [pluginList, setPluginList] = useState<Plugin[]>(
plugins.sort((a, b) => pluginOrder.indexOf(a.name) - pluginOrder.indexOf(b.name)),
@@ -48,6 +52,7 @@ const PluginView: VFC = () => {
<PanelSection>
{pluginList
.filter((p) => p.content)
+ .filter(({ name }) => !hiddenPlugins.includes(name))
.map(({ name, icon }) => (
<PanelSectionRow key={name}>
<ButtonItem layout="below" onClick={() => setActivePlugin(name)}>
@@ -59,6 +64,12 @@ const PluginView: VFC = () => {
</ButtonItem>
</PanelSectionRow>
))}
+ {hiddenPlugins.length > 0 && (
+ <div style={{ display: 'flex', alignItems: 'center', gap: '10px', fontSize: '0.8rem', marginTop: '10px' }}>
+ <FaEyeSlash />
+ <div>{t('PluginView.hidden', { count: hiddenPlugins.length })}</div>
+ </div>
+ )}
</PanelSection>
</div>
</>