added that it is not possible to enable proxy if no profile is available

This commit is contained in:
coolcoala
2025-07-21 01:57:37 +03:00
parent 9271b107b6
commit 05f1ec7b34

View File

@@ -240,14 +240,14 @@ const MinimalHomePage: React.FC = () => {
href={currentProfile.announce_url} href={currentProfile.announce_url}
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
className="inline-flex items-center gap-2 text-base font-semibold text-foreground hover:underline hover:opacity-80 transition-all" className="inline-flex items-center gap-2 text-base font-semibold text-foreground hover:underline hover:opacity-80 transition-all whitespace-pre-wrap"
title={currentProfile.announce_url} title={currentProfile.announce_url.replace(/\\n/g, '\n')}
> >
<span>{currentProfile.announce}</span> <span>{currentProfile.announce.replace(/\\n/g, '\n')}</span>
<ExternalLink className="h-4 w-4 flex-shrink-0" /> <ExternalLink className="h-4 w-4 flex-shrink-0" />
</a> </a>
) : ( ) : (
<p className="text-base font-semibold text-foreground"> <p className="text-base font-semibold text-foreground whitespace-pre-wrap">
{currentProfile.announce} {currentProfile.announce}
</p> </p>
)} )}
@@ -268,7 +268,7 @@ const MinimalHomePage: React.FC = () => {
<div className="scale-[7] my-16"> <div className="scale-[7] my-16">
<Switch <Switch
disabled={showTunAlert || isToggling} disabled={showTunAlert || isToggling || profileItems.length === 0}
checked={!!isProxyEnabled} checked={!!isProxyEnabled}
onCheckedChange={handleToggleProxy} onCheckedChange={handleToggleProxy}
aria-label={t("Toggle Proxy")} aria-label={t("Toggle Proxy")}