refine: Update network button labels and tooltips with honest security messaging

- Change button labels: 'Extra secure' / 'Normal' (better reflects defense-in-depth)
- Update tooltips to acknowledge CSP already blocks connections:
  - 'Extra secure: Added manual blocking layer (CSP already blocks connections)'
  - 'Normal: Relying on CSP to block connections'
- Update comment: Clarify button adds extra manual layer, not primary control
- More transparent about how security actually works (CSP does the real work)
This commit is contained in:
LC mac
2026-02-12 23:22:02 +08:00
parent 005fb292b4
commit 747e298cb2

View File

@@ -93,7 +93,7 @@ const Header: React.FC<HeaderProps> = ({
{/* Right: Action Buttons */}
<div className="flex items-center gap-2">
{/* Network availability toggle - Click to disable/enable internet access for maximum security */}
{/* Defense-in-depth toggle: Add extra manual blocking layer on top of CSP */}
<button
onClick={onToggleNetwork}
className={`flex items-center gap-1 px-2.5 py-1.5 text-xs rounded-lg font-medium transition-all whitespace-nowrap ${isNetworkBlocked
@@ -101,12 +101,12 @@ const Header: React.FC<HeaderProps> = ({
: 'bg-[#16213e] border border-[#39ff14] text-[#39ff14] hover:bg-[#39ff1420]'
}`}
title={isNetworkBlocked
? 'Internet disabled - Maximum security (no data can leave your device)'
: 'Internet enabled - Normal operation (browser CSP blocks most connections)'}
? 'Extra secure: Added manual blocking layer (CSP already blocks connections)'
: 'Normal: Relying on CSP to block connections'}
>
<span className="text-sm">{isNetworkBlocked ? '🚫' : '🌐'}</span>
<span className="hidden sm:inline text-[10px]">
{isNetworkBlocked ? 'Internet OFF' : 'Internet ON'}
{isNetworkBlocked ? 'Extra secure' : 'Normal'}
</span>
</button>
</div>