desktop dev update channel: every push to main builds dev bundles (<next patch>-dev.<UTC>), the VDS signs and publishes dev/latest.json (newest 5); app channel setting stable|dev, background updater at start / 15 min / resume / channel switch, deferred while in use, no downgrade, autostart rewritten on every start, card shows version and channel
This commit is contained in:
parent
4dff7d9b2e
commit
39b2f73ad7
25 changed files with 732 additions and 47 deletions
|
|
@ -257,7 +257,8 @@ export function Settings({ onTheme: _onTheme, section }: { onTheme: () => void;
|
|||
<Section id="set-updates" title={t('set.updates')} icon="download" className="set-card">
|
||||
<div className="form">
|
||||
<div className="field"><span className="legend">{t('set.channel')}</span>
|
||||
<Seg value={s.channel} label={t('set.channel')} onChange={channel => set(x => ({ ...x, channel }))} options={[['stable', t('set.stable')], ['beta', t('set.beta')]]} /></div>
|
||||
<Seg value={s.channel} label={t('set.channel')} onChange={channel => set(x => ({ ...x, channel }))} options={[['stable', t('set.stable')], ['dev', t('set.dev')]]} /></div>
|
||||
{s.channel === 'stable' && /-dev\./.test(d.info?.version ?? '') && <p className="small muted">{t('set.devToStable', { version: d.info!.version })}</p>}
|
||||
<Updates />
|
||||
<p className="small muted">{t('set.updatesText')}</p>
|
||||
</div>
|
||||
|
|
@ -279,7 +280,7 @@ export function Settings({ onTheme: _onTheme, section }: { onTheme: () => void;
|
|||
);
|
||||
}
|
||||
|
||||
/** Settings > Updates: checks on click only; installs after the host's native dialog (the signature is checked there). */
|
||||
/** Settings > Updates: Check asks the channel now; Install runs after the host's native dialog (the signature is checked there). The host also checks and installs in the background (lib.rs auto_update). */
|
||||
function Updates() {
|
||||
const [info, setInfo] = useState<UpdateInfo | null>(null);
|
||||
const [busy, setBusy] = useState<'check' | 'install' | null>(null);
|
||||
|
|
@ -294,7 +295,7 @@ function Updates() {
|
|||
setBusy('install'); setError(null);
|
||||
try { await api.updateInstall(version); } catch (e) { setError(errorText(e)); } finally { setBusy(null); setGot(null); }
|
||||
};
|
||||
const channel = info ? t(info.channel === 'beta' ? 'set.beta' : 'set.stable') : '';
|
||||
const channel = info ? t(info.channel === 'beta' ? 'set.beta' : info.channel === 'dev' ? 'set.dev' : 'set.stable') : '';
|
||||
return (
|
||||
<div className="stack" style={{ gap: 8 }}>
|
||||
{error && <Notice tone="bad">{error}</Notice>}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue