summaryrefslogtreecommitdiff
path: root/frontend/src/components/settings/pages/developer/index.tsx
diff options
context:
space:
mode:
authorAAGaming <aagaming@riseup.net>2026-10-17 20:31:24 -0400
committerAAGaming <aagaming@riseup.net>2026-10-17 20:31:24 -0400
commita349af9d76d0457067fb546872304df8cdb6ab27 (patch)
treea2376f6b6288a4c79dea62d90510b09051ce73fb /frontend/src/components/settings/pages/developer/index.tsx
parentdae497ef949d4b36b2bdc3537f4f52b1cfdafa2e (diff)
parent82df584b461fe9a283b687ad9d883ea1cb8767a8 (diff)
downloaddecky-loader-a349af9d76d0457067fb546872304df8cdb6ab27.tar.gz
decky-loader-a349af9d76d0457067fb546872304df8cdb6ab27.zip
Merge branch 'main' of github.com:SteamDeckHomebrew/decky-loader
Diffstat (limited to 'frontend/src/components/settings/pages/developer/index.tsx')
-rw-r--r--frontend/src/components/settings/pages/developer/index.tsx29
1 files changed, 22 insertions, 7 deletions
diff --git a/frontend/src/components/settings/pages/developer/index.tsx b/frontend/src/components/settings/pages/developer/index.tsx
index 05989806..8691ff7b 100644
--- a/frontend/src/components/settings/pages/developer/index.tsx
+++ b/frontend/src/components/settings/pages/developer/index.tsx
@@ -7,6 +7,7 @@ import {
Navigation,
TextField,
Toggle,
+ showModal,
} from '@decky/ui';
import { useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
@@ -15,9 +16,11 @@ import { FaFileArchive, FaLink, FaReact, FaSteamSymbol, FaTerminal } from 'react
import { setShouldConnectToReactDevTools, setShowValveInternal } from '../../../../developer';
import Logger from '../../../../logger';
import { installFromURL } from '../../../../store';
+import { WarnThirdPartyType } from '../../../../utils/globalTypes';
import { useSetting } from '../../../../utils/hooks/useSetting';
import { getSetting } from '../../../../utils/settings';
import { FileSelectionType } from '../../../modals/filepicker';
+import WarnThirdParty from '../../../modals/WarnThirdParty';
import RemoteDebuggingSettings from '../general/RemoteDebugging';
const logger = new Logger('DeveloperIndex');
@@ -43,6 +46,8 @@ export default function DeveloperSettings() {
const [enableValveInternal, setEnableValveInternal] = useSetting<boolean>('developer.valve_internal', false);
const [reactDevtoolsEnabled, setReactDevtoolsEnabled] = useSetting<boolean>('developer.rdt.enabled', false);
const [reactDevtoolsIP, setReactDevtoolsIP] = useSetting<string>('developer.rdt.ip', '');
+ const [acceptedWarning, setAcceptedWarning] = useSetting<boolean>('developer.warn.third_party', false);
+ const waitTime = acceptedWarning ? 0 : 5;
const [pluginURL, setPluginURL] = useState('');
const textRef = useRef<HTMLDivElement>(null);
const { t } = useTranslation();
@@ -74,13 +79,23 @@ export default function DeveloperSettings() {
>
<DialogButton
disabled={pluginURL.length == 0}
- onClick={() => {
- if (/^https?:\/\//.test(pluginURL)) {
- installFromURL(pluginURL);
- } else {
- installFromURL('https://' + pluginURL);
- }
- }}
+ onClick={() =>
+ showModal(
+ <WarnThirdParty
+ type={WarnThirdPartyType.ZIP}
+ onOK={() => {
+ setAcceptedWarning(true);
+ if (/^https?:\/\//.test(pluginURL)) {
+ installFromURL(pluginURL);
+ } else {
+ installFromURL('https://' + pluginURL);
+ }
+ }}
+ onCancel={() => {}}
+ seconds={waitTime}
+ />,
+ )
+ }
>
{t('SettingsDeveloperIndex.third_party_plugins.button_install')}
</DialogButton>