refactor: use consistent checkbox style for rebroadcast settings

- Match existing checkbox pattern from other settings
- Use setting-group, checkbox-label, and setting-checkbox classes
- Add proper id and htmlFor attributes for accessibility
- Consistent with LayoutNavigationSettings and other checkbox settings
- Keep code DRY with unified styling approach
This commit is contained in:
Gigi
2025-10-09 13:05:33 +01:00
parent 3483532944
commit a0cba9fb6f

View File

@@ -40,23 +40,27 @@ const RelaySettings: React.FC<RelaySettingsProps> = ({ relayStatuses, settings,
<div className="settings-section">
<h3>Relays</h3>
<div className="settings-group">
<label className="settings-checkbox-label">
<div className="setting-group">
<label htmlFor="useLocalRelayAsCache" className="checkbox-label">
<input
id="useLocalRelayAsCache"
type="checkbox"
checked={settings.useLocalRelayAsCache ?? true}
onChange={(e) => onUpdate({ useLocalRelayAsCache: e.target.checked })}
className="setting-checkbox"
/>
<span>Use local relay(s) as cache</span>
</label>
</div>
<div className="settings-group">
<label className="settings-checkbox-label">
<div className="setting-group">
<label htmlFor="rebroadcastToAllRelays" className="checkbox-label">
<input
id="rebroadcastToAllRelays"
type="checkbox"
checked={settings.rebroadcastToAllRelays ?? false}
onChange={(e) => onUpdate({ rebroadcastToAllRelays: e.target.checked })}
className="setting-checkbox"
/>
<span>Rebroadcast events to all relays</span>
</label>