fix(polish): address 3 review blockers + 1 security issue

1. ThemeSettings: change 'auto' radio value to 'system' to match
   the v5 settingsSchema enum. Storing 'auto' silently wipes all
   settings on next launch.
2. UpdateBanner: render an 'available' branch so users see a CTA
   when a new version is detected (the store already had this state,
   but the banner was silent). Added a test.
3. feed-config: remove the unused resolveFeedUrl / FEEDS exports.
   feedConfigFor is the actual implementation used by the IPC
   handler. Updated tests to match.
4. main/index.js: tighten app:open-external regex to https:// only.
This commit is contained in:
2026-06-08 07:35:54 +05:30
parent 1715e26e5f
commit c5d4b113bd
6 changed files with 25 additions and 68 deletions
+1 -31
View File
@@ -1,33 +1,3 @@
const REPO = 'amitwh/markdown-converter';
const FEEDS = {
github: {
base: `https://github.com/${REPO}/releases/download`,
},
concreteinfo: {
base: 'https://updates.concreteinfo.co.in/v5',
},
};
function platformSuffix(platform) {
if (platform === 'darwin' || platform === 'mac') return 'mac';
if (platform === 'win32' || platform === 'windows') return 'windows';
return 'linux';
}
function feedForChannel(channel, version, platform) {
const suffix = platformSuffix(platform);
const f = FEEDS[channel] || FEEDS.github;
if (channel === 'github') {
return `${f.base}/v${version}/latest-${suffix}.yml`;
}
return `${f.base}/latest-${suffix}.yml`;
}
function resolveFeedUrl(channel, version, platform) {
return feedForChannel(channel, version, platform);
}
function feedConfigFor(channel) {
if (channel === 'github') {
return { provider: 'github', owner: 'amitwh', repo: 'markdown-converter' };
@@ -35,4 +5,4 @@ function feedConfigFor(channel) {
return { provider: 'generic', url: 'https://updates.concreteinfo.co.in/v5' };
}
module.exports = { resolveFeedUrl, feedConfigFor, FEEDS };
module.exports = { feedConfigFor };