Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ const App = () => {
isOpen={showWwbotaFilters}
onClose={() => setShowWwbotaFilters(false)}
/>
<WhatsNew />
<WhatsNew showWhatsNew={config.showWhatsNew} />
</div>
);
};
Expand Down
30 changes: 30 additions & 0 deletions src/components/SettingsPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const SettingsPanel = ({
const [distUnits, setDistUnits] = useState(config?.allUnits?.dist || config?.units || 'imperial');
const [tempUnits, setTempUnits] = useState(config?.allUnits?.temp || config?.units || 'imperial');
const [pressUnits, setPressUnits] = useState(config?.allUnits?.press || config?.units || 'imperial');
const [showWhatsNew, setShowWhatsNew] = useState(config.showWhatsNew); // set in config.js
const [propMode, setPropMode] = useState(config?.propagation?.mode || 'SSB');
const [propPower, setPropPower] = useState(config?.propagation?.power || 100);
const [rigEnabled, setRigEnabled] = useState(config?.rigControl?.enabled || false);
Expand Down Expand Up @@ -2884,6 +2885,35 @@ export const SettingsPanel = ({
</div>
</div>

{/* Display Whats New on Startup */}
<div style={{ marginBottom: '24px' }}>
<label
style={{
display: 'flex',
alignItems: 'center',
gap: '10px',
cursor: 'pointer',
fontSize: '13px',
color: 'var(--text-primary)',
}}
>
<input
type="checkbox"
checked={showWhatsNew}
onChange={(e) => {
config.showWhatsNew = e.target.checked;
setShowWhatsNew(e.target.checked);
}}
style={{ accentColor: 'var(--accent-amber)' }}
/>
Show What's New on Startup
</label>
<div style={{ fontSize: '11px', color: 'var(--text-muted)', marginTop: '6px' }}>
By default, What's New is displayed. Setting this true means it will only be displayed when the version
is clicked.
</div>
</div>

{/* Mutual Reception Indicator */}
<div style={{ marginBottom: '24px' }}>
<label
Expand Down
1 change: 1 addition & 0 deletions src/components/SidebarMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export default function SidebarMenu({
{ id: 'profiles', icon: '👤', label: t('station.settings.tab.title.profiles') },
{ id: 'community', icon: '🌐', label: t('station.settings.tab.title.community') },
{ id: 'alerts', icon: '🔔', label: t('station.settings.tab.title.alerts') },
{ id: 'rig-bridge', icon: '📻', label: 'Rig Bridge' },
],
[t],
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/WhatsNew.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ const CHANGELOG = [

const LS_KEY = 'openhamclock_lastSeenVersion';

export default function WhatsNew() {
export default function WhatsNew({ showWhatsNew }) {
const [visible, setVisible] = useState(false);
const [currentVersion, setCurrentVersion] = useState(null);

Expand All @@ -1058,7 +1058,7 @@ export default function WhatsNew() {
if (!lastSeen || lastSeen !== version) {
// Only show if we actually have changelog entries for this version
const hasEntry = CHANGELOG.some((c) => c.version === version);
if (hasEntry) {
if (hasEntry && showWhatsNew) {
setVisible(true);
} else {
// No changelog entry — just silently update the stored version
Expand Down
1 change: 1 addition & 0 deletions src/utils/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const DEFAULT_CONFIG = {
defaultDX: { lat: 35.6762, lon: 139.6503 }, // Tokyo
units: 'imperial', // 'imperial' or 'metric'
allUnits: { dist: 'imperial', temp: 'imperial', press: 'imperial' },
showWhatsNew: true,
propagation: {
mode: 'SSB', // SSB, CW, FT8, FT4, WSPR, JS8, RTTY, PSK31
power: 100, // TX power in watts
Expand Down
Loading