mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-12 03:11:59 +00:00
fix external links softlocking the ui in testing store cta
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
import { Navigation } from '@decky/ui';
|
||||||
|
import { AnchorHTMLAttributes, FC } from 'react';
|
||||||
|
|
||||||
|
const ExternalLink: FC<AnchorHTMLAttributes<HTMLAnchorElement>> = (props) => {
|
||||||
|
return (
|
||||||
|
<a
|
||||||
|
{...props}
|
||||||
|
onClick={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
props.onClick ? props.onClick(e) : props.href && Navigation.NavigateToExternalWeb(props.href);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ExternalLink;
|
||||||
@@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next';
|
|||||||
|
|
||||||
import { InstallType } from '../../plugin';
|
import { InstallType } from '../../plugin';
|
||||||
import { StorePlugin, StorePluginVersion, requestPluginInstall } from '../../store';
|
import { StorePlugin, StorePluginVersion, requestPluginInstall } from '../../store';
|
||||||
|
import ExternalLink from '../ExternalLink';
|
||||||
|
|
||||||
interface PluginCardProps {
|
interface PluginCardProps {
|
||||||
plugin: StorePlugin;
|
plugin: StorePlugin;
|
||||||
@@ -108,7 +109,7 @@ const PluginCard: FC<PluginCardProps> = ({ plugin }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<i>{t('PluginCard.plugin_full_access')}</i>{' '}
|
<i>{t('PluginCard.plugin_full_access')}</i>{' '}
|
||||||
<a
|
<ExternalLink
|
||||||
className="deckyStoreCardDescriptionRootLink"
|
className="deckyStoreCardDescriptionRootLink"
|
||||||
href="https://deckbrew.xyz/root"
|
href="https://deckbrew.xyz/root"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
@@ -118,7 +119,7 @@ const PluginCard: FC<PluginCardProps> = ({ plugin }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
deckbrew.xyz/root
|
deckbrew.xyz/root
|
||||||
</a>
|
</ExternalLink>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import { useTranslation } from 'react-i18next';
|
|||||||
import logo from '../../../assets/plugin_store.png';
|
import logo from '../../../assets/plugin_store.png';
|
||||||
import Logger from '../../logger';
|
import Logger from '../../logger';
|
||||||
import { SortDirections, SortOptions, Store, StorePlugin, getPluginList, getStore } from '../../store';
|
import { SortDirections, SortOptions, Store, StorePlugin, getPluginList, getStore } from '../../store';
|
||||||
|
import ExternalLink from '../ExternalLink';
|
||||||
import PluginCard from './PluginCard';
|
import PluginCard from './PluginCard';
|
||||||
|
|
||||||
const logger = new Logger('Store');
|
const logger = new Logger('Store');
|
||||||
@@ -207,7 +208,7 @@ const BrowseTab: FC<{ setPluginCount: Dispatch<SetStateAction<number | null>> }>
|
|||||||
<h2 style={{ margin: 0 }}>{t('Store.store_testing_warning.label')}</h2>
|
<h2 style={{ margin: 0 }}>{t('Store.store_testing_warning.label')}</h2>
|
||||||
<span>
|
<span>
|
||||||
{`${t('Store.store_testing_warning.desc')} `}
|
{`${t('Store.store_testing_warning.desc')} `}
|
||||||
<a
|
<ExternalLink
|
||||||
href="https://decky.xyz/testing"
|
href="https://decky.xyz/testing"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
style={{
|
style={{
|
||||||
@@ -215,7 +216,7 @@ const BrowseTab: FC<{ setPluginCount: Dispatch<SetStateAction<number | null>> }>
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
decky.xyz/testing
|
decky.xyz/testing
|
||||||
</a>
|
</ExternalLink>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -269,7 +270,7 @@ const AboutTab: FC<{}> = () => {
|
|||||||
<span className="deckyStoreAboutHeader">Testing</span>
|
<span className="deckyStoreAboutHeader">Testing</span>
|
||||||
<span>
|
<span>
|
||||||
{t('Store.store_testing_cta')}{' '}
|
{t('Store.store_testing_cta')}{' '}
|
||||||
<a
|
<ExternalLink
|
||||||
href="https://decky.xyz/testing"
|
href="https://decky.xyz/testing"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
style={{
|
style={{
|
||||||
@@ -277,7 +278,7 @@ const AboutTab: FC<{}> = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
decky.xyz/testing
|
decky.xyz/testing
|
||||||
</a>
|
</ExternalLink>
|
||||||
</span>
|
</span>
|
||||||
<span className="deckyStoreAboutHeader">{t('Store.store_contrib.label')}</span>
|
<span className="deckyStoreAboutHeader">{t('Store.store_contrib.label')}</span>
|
||||||
<span>{t('Store.store_contrib.desc')}</span>
|
<span>{t('Store.store_contrib.desc')}</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user