From da1b362441d390cf0be6a6a6b21941da0e68a278 Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 18:52:44 +0200 Subject: [PATCH 01/25] Manage tab: every game setting in one place, grouped in cards Updates (version, change build, update automatically, pause updates, project association), Starting the Game (Easy Setup, executable, launch options, your copy, builds, set up by hand, Wine tools), Files and Saves (folder, backups, cloud saves), Screenshots, and Uninstall last. The Shortcuts row goes: the buttons beside every tab already add them. Cloud saves is switched here now, for signed-in players. --- tests/beta51.test.cjs | 2 +- tests/choose-program.test.cjs | 2 +- tests/manage-tab.test.cjs | 51 ++++++++++++++++++++++ ui/app.js | 79 ++++++++++++++++++++++++++++------- 4 files changed, 116 insertions(+), 18 deletions(-) create mode 100644 tests/manage-tab.test.cjs diff --git a/tests/beta51.test.cjs b/tests/beta51.test.cjs index 160cec72..16705db1 100644 --- a/tests/beta51.test.cjs +++ b/tests/beta51.test.cjs @@ -69,7 +69,7 @@ test('the files from before and the build on this PC are offered under the game\ // The build already in the game's folder comes first: Set Up uses it, unless Build It Again. const built = c.stepsView('h', su({ previous: ['Base.nsp'], prebuilt: '/home/p/Games/Hopper' }), {}, { name: 'H' }); assert.match(built, /still here, so setup skips the build\. ${inst.local ? '' : ``} -
${esc(t('Shortcuts'))}${esc(S.steam ? t('Start it from your desktop or from Steam, with its art. Play time still counts here.') : t('Start it from your desktop. Play time still counts here.'))}
${S.steam ? `` : ''}
-
${esc(t('Project association'))}${esc(inst.local ? t('Untracked · no updates') : inst.repo)}
- ${inst.local ? '' : `
${esc(t('Update automatically'))}${esc(t('Installs new releases as soon as the launcher finds them. Your saves are backed up first.'))}
`} -
${esc(t('Launch options'))}${inst.args ? esc(inst.args) : esc(t('Extra options passed to the game when it starts.'))}
- ${easyRow(id)} - ${programRow(id, inst)} - ${inst.local ? '' : `
${esc(t('Backups of your saves'))}${esc(t('Taken before every update: the saves in its folder.'))}
`} - ${inst.local ? '' : `
${esc(t('Installed version'))}${inst.asset ? `${esc(inst.tag)} · ${esc(inst.asset)}${inst.size ? ' · ' + fmtB(inst.size) : ''} · ${esc(inst.verified ? (isLab(inst.repo) || isSF(inst.repo) ? t('matched its release\'s checksum') : t('matched GitHub\'s checksum')) : (isLab(inst.repo) || isSF(inst.repo) ? t('Its release had no checksum for it') : t('GitHub had no checksum for it')))}` : esc(inst.tag || t('Not known. Updating puts the newest one in its folder.'))}
`} - ${inst.local ? `
${esc(t('Remove from Library'))}${esc(t('Your folder stays exactly as it is.'))}
` : `
${esc(t('Uninstall'))}${esc(t('Takes it out of your Library. You choose whether its folder goes too.'))}
`} - -

${esc(t('Screenshots'))}

- ${shots && shots.length ? `
${shots.slice(0, 8).map((f, i) => ``).join('')}
` : `

${esc(S.os === 'macos' ? t('In-game screenshot capture is not available on Mac yet.') : t('None yet. While you play, press F12, or View + RB on a controller.'))}

`}
`; + body = manageTab(a); } return body + gameRail(a); } +// The Manage tab: every setting of an installed game, in one place. The game's "…" menu leaves out +// whatever is here, so each setting has a single home. Shortcuts aren't repeated here: the buttons +// beside every tab already add them. +function manageTab(a) { + const id = a.id, inst = S.library[id]; + const shots = S.shots[id]; + if (!shots) loadShots(id); + const card = (title, rows) => `

${esc(title)}

${rows.join('')}
`; + const shotsCard = `

${esc(t('Screenshots'))}

+ ${shots && shots.length ? `
${shots.slice(0, 8).map((f, i) => ``).join('')}
` : `

${esc(S.os === 'macos' ? t('In-game screenshot capture is not available on Mac yet.') : t('None yet. While you play, press F12, or View + RB on a controller.'))}

`}
`; + const leave = inst.local ? `
${esc(t('Remove from Library'))}${esc(t('Your folder stays exactly as it is.'))}
` + : `
${esc(t('Uninstall'))}${esc(t('Takes it out of your Library. You choose whether its folder goes too.'))}
`; + return `
${card(t('Updates'), manageUpdateRows(id, inst))}${card(t('Starting the Game'), manageStartRows(id, inst))}${card(t('Files and Saves'), manageFileRows(id, inst))}${shotsCard}
${leave}
`; +} +// Which version it has, and how it gets the next one. +function manageUpdateRows(id, inst) { + const project = `
${esc(t('Project association'))}${esc(inst.local ? t('Untracked · no updates') : inst.repo)}
`; + if (inst.local) return [project]; + const other = isLab(inst.repo) || isSF(inst.repo); + const checked = inst.verified ? (other ? t('matched its release\'s checksum') : t('matched GitHub\'s checksum')) : (other ? t('Its release had no checksum for it') : t('GitHub had no checksum for it')); + const what = inst.asset ? `${esc(inst.tag)} · ${esc(inst.asset)}${inst.size ? ' · ' + fmtB(inst.size) : ''} · ${esc(checked)}` : esc(inst.tag || t('Not known. Updating puts the newest one in its folder.')); + const held = heldIds().has(id); + return [ + `
${esc(t('Installed version'))}${what}
`, + `
${esc(t('Update automatically'))}${esc(t('Installs new releases as soon as the launcher finds them. Your saves are backed up first.'))}
`, + `
${esc(t('Pause Updates'))}${esc(t('It stays on the version it has until you turn this off.'))}
`, + project, + ]; +} +// What Play starts, and how the game gets set up for it. +function manageStartRows(id, inst) { + const su = S.setup[id] && S.setup[id] !== 'loading' ? S.setup[id] : null; + const rows = [easyRow(id), programRow(id, inst)]; + rows.push(`
${esc(t('Launch options'))}${inst.args ? esc(inst.args) : esc(t('Extra options passed to the game when it starts.'))}
`); + if (S.easy.has(id)) { + const copy = typeof inst.game_copy === 'string' ? inst.game_copy : t('Easy Setup builds the game from it.'); + rows.push(`
${esc(t('Your Copy'))}${esc(copy)}
`); + } + if (su && (su.own_build || su.build_dir)) { + const sub = su.build_dir ? String(su.build_dir) : t('Point it at a build of the game you already made.'); + rows.push(`
${esc(t('Use a Build You Already Have'))}${esc(sub)}
`); + } + if (su && su.build_at) rows.push(`
${esc(t('Move Build'))}${esc(String(su.build_at))}
`); + const hand = byHand(inst); + const handSub = hand ? t('On. It starts the way you set, instead of the launcher\'s own setup.') : t('Point the launcher at the program and your game files yourself.'); + rows.push(`
${esc(t('Set Up By Hand'))}${esc(handSub)}
`); + if (S.os === 'linux' && inst.proton) rows.push(`
${esc(t('Wine Tools'))}${esc(t('Winetricks and installers for the Wine prefix every Windows game here shares, for when a game says something is missing.'))}
`); + return rows; +} +// Where it is on disk, and what keeps its saves safe. +function manageFileRows(id, inst) { + const rows = [`
${esc(t('Folder'))}${esc(inst.path)}
${inst.local ? '' : ``}
`]; + if (!inst.local) rows.push(`
${esc(t('Backups of your saves'))}${esc(t('Taken before every update: the saves in its folder.'))}
`); + // Cloud saves is switched here only; the Saves tab just offers to turn it on. + if (S.account && S.account.signedIn) { + const on = inst.cloud === true; + rows.push(`
${esc(t('Cloud saves'))}${esc(on ? t('On. After you play, its saves go to your account.') : t('Off. Its saves only stay on this PC.'))}
`); + } + return rows; +} // Asks once what the Updates tab shows for a game. update_info works it out from the release list // on disk, so an answer that comes back after a newer list came in (S.updInfo is a new object by // then) is from the old list and is dropped; the tab asks again. @@ -8231,6 +8276,8 @@ function launchOptions(id) { // ---------- clicks ---------- async function act(el, e) { const a = el.dataset.act, id = el.dataset.id; + // The Cloud saves switch lives in the Manage tab, and the saves handler only redraws the Saves tab. + if (a === 'saves-cloud' && S.tab === 'installed' && window.accountAct) { await window.accountAct(a, el); return refreshGame(); } if (/^(acc|saves|myrep)-/.test(a) && window.accountAct) return window.accountAct(a, el); if (/^beta-/.test(a) && window.moreAct) return window.moreAct(a, el); if (a === 'project-association') return changeProject(id); From 0ba423aae7542a0498fc0273483be6e05fae24a8 Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 18:58:51 +0200 Subject: [PATCH 02/25] The game's menu leaves out what its tabs already have No Manage, Files or GitHub submenus: settings, folder, backups and Uninstall are in the Manage tab, saves in Saves, versions in Updates, the README in Overview. What's left: Play, pin, favorites, hide, Customize, Add To, its project page as one row, Troubleshoot and Report. --- tests/beta53.test.cjs | 10 ++--- tests/beta54.test.cjs | 4 +- tests/choose-program.test.cjs | 11 ++---- tests/manage-tab.test.cjs | 22 +++++++++++ ui/app.js | 69 ++++++++--------------------------- 5 files changed, 48 insertions(+), 68 deletions(-) diff --git a/tests/beta53.test.cjs b/tests/beta53.test.cjs index 9165c388..3ae4d31a 100644 --- a/tests/beta53.test.cjs +++ b/tests/beta53.test.cjs @@ -13,9 +13,9 @@ test('Skip Easy Setup: per game or for every game, and the page treats those gam applyEasySkip(); assert.deepEqual([...S.easy], ['hopper', 'skyracer']); assert.equal(easySkipItem('hopper')[0].check, false); - // Installed, the menu opens the Easy Setup switch on its Manage tab instead. + // Installed, the switch is on its Manage tab and the menu leaves it out. S.library.skyracer = {}; - assert.deepEqual(easySkipItem('skyracer'), [{ act: 'easy-row', id: 'skyracer', label: 'Easy Setup…', icon: 'disc' }]); + assert.deepEqual(easySkipItem('skyracer'), []); delete S.library.skyracer; assert.deepEqual(easySkipItem('plain'), [], 'only games Easy Setup can do get the item'); S.settings.ui.easy_skip = ['hopper']; @@ -34,7 +34,7 @@ test('Skip Easy Setup: per game or for every game, and the page treats those gam test('the menu item and the Settings switch', () => { const menu = fn(app, 'gameMenu'); assert.match(menu, /\.\.\.\(!g \? easySkipItem\(id\) : \[\]\)/); - assert.match(menu, /act: 'manual'[^\n]*\n\s+\.\.\.easySkipItem\(id\),/); + assert.match(fn(app, 'manageStartRows'), /const rows = \[easyRow\(id\), programRow\(id, inst\)\];/); assert.match(app, /case 'easy-skip': \{[^]*?await setEasySkip\(id, on\);/); assert.match(fn(app, 'setEasySkip'), /saveUi\(\{ easy_skip: \[\.\.\.skip\] \}, true\)/); assert.match(app, /sw\('easy_skip_all', ui\.easy_skip_all, t\('Skip Easy Setup'\), 'ui-toggle'\)/); @@ -54,14 +54,14 @@ test('a skipped game starts as its own setup leaves it, after that setup when it const named = fs.readFileSync(path.join(__dirname, '../ui/setup-inputs.js'), 'utf8'); const tv = fs.readFileSync(path.join(__dirname, '../ui/tv.js'), 'utf8'); -test('Use a Build You Already Have: a line under the copy in Easy Setup, a menu item, and the skipped-game prompt', () => { +test('Use a Build You Already Have: a line under the copy in Easy Setup, a Manage row, and the skipped-game prompt', () => { const steps = fs.readFileSync(path.join(__dirname, '../ui/setup-steps.js'), 'utf8'); // Easy Setup: one quiet line, and the folder shows in the copy's box until Set Up uses it. assert.match(fn(steps, 'ssAlt'), /if \(su\.own_build\) return `

\$\{esc\(tf\('Already built \{name\} from your copy, outside the launcher\? Skip the build:'/); assert.match(fn(steps, 'stepsRun'), /await invoke\('setup_use_build', ns\.own \? \{ id, folder: ns\.own \} : \{ id \}\);/); assert.match(fn(named, 'useOwnBuild'), /invoke\('setup_use_build', \{ id, folder: typeof p === 'string' \? p : p\.path \}\)/); assert.match(app, /\/\^NEED_OWN_BUILD\\\|\/\.test/); - assert.match(fn(app, 'gameMenu'), /act: 'ownbuild'/); + assert.match(fn(app, 'manageStartRows'), /data-act="ownbuild"/); // Big Picture draws the same steps, so it has the same line. assert.match(tv, /body = stepsShell\(id, su, TS\.named, a, true\);/); // It says where the game's own setup builds it, when that's outside the launcher's folder for diff --git a/tests/beta54.test.cjs b/tests/beta54.test.cjs index ca951531..6f79f3a5 100644 --- a/tests/beta54.test.cjs +++ b/tests/beta54.test.cjs @@ -41,7 +41,7 @@ test('Pause Updates keeps a game on its version: out of Update, Update All and a // It's applied as updates come in, so automatic updates and Update All never see it. const check = fn(app, 'checkUpdates'); assert.ok(check.indexOf('holdUpdates();') < check.indexOf('const auto = ')); - assert.match(fn(app, 'gameMenu'), /act: 'auto-up'[^\n]*\n\s+\.\.\.holdItem\(id\),/); + assert.match(fn(app, 'manageUpdateRows'), /aria-checked="\$\{held\}"[^\n]*data-act="hold-up"/); assert.match(app, /case 'hold-up': return toggleHold\(id\);/); assert.match(fn(app, 'badNote'), /gp-note held[^]*data-act="hold-up"/); assert.match(tv, /window\.toggleHold\(id\)/); @@ -72,7 +72,7 @@ test('Free Up Space: on the Your Copy card when the game plays without the copy, }); test('Move Build moves a build of its own folder and the game starts from there', () => { - assert.match(fn(app, 'gameMenu'), /S\.setup\[id\]\.build_at \? \[\{ act: 'move-build', id, label: t\('Move Build…'\)/); + assert.match(fn(app, 'manageStartRows'), /if \(su && su\.build_at\) rows\.push\([^\n]*data-act="move-build"/); assert.match(fn(app, 'moveBuild'), /invoke\('move_build', \{ id, to \}\)/); assert.match(rust, /x\.build_dir = \(dest != home\)\.then\(\|\| dest\.clone\(\)\);/); }); diff --git a/tests/choose-program.test.cjs b/tests/choose-program.test.cjs index f355b94a..2e30bf1c 100644 --- a/tests/choose-program.test.cjs +++ b/tests/choose-program.test.cjs @@ -67,14 +67,10 @@ test('turning Easy Setup off says it in the switch\'s words once installed, and assert.match(sw, /toast\(tf\('\{name\} skips Easy Setup: it installs as it comes/); }); -test('the game\'s menu: Skip Easy Setup ticked before install, Easy Setup… (to the switch) once installed', () => { +test('the game\'s menu: Skip Easy Setup ticked before install, nothing once installed (the switch is in Manage)', () => { const item = fn(app, 'easySkipItem'); - assert.match(item, /if \(S\.library\[id\]\) return \[\{ act: 'easy-row', id, label: t\('Easy Setup…'\), icon: 'disc' \}\];/); + assert.match(item, /if \(S\.library\[id\]\) return \[\];/); assert.match(item, /return \[\{ act: 'easy-skip', id, label: t\('Skip Easy Setup'\), icon: 'disc', check: /); - assert.match(app, /case 'easy-row': return showEasyRow\(id\);/); - const show = fn(app, 'showEasyRow'); - assert.match(show, /S\.nextTab = 'installed';\n\s+go\('game', id\);/); - assert.match(show, /row\.scrollIntoView\(\{ block: 'center'[^\n]*\n\s+row\.classList\.add\('lit'\);/); }); test('a game Easy Setup can\'t do goes back with Use Default', () => { @@ -85,9 +81,8 @@ test('with Easy Setup skipped for every game, the way back is Use Default', () = assert.match(row(MINE, true, undefined, { easy_skip_all: true }), /data-act="forget-program"[^>]*>Use Default { +test('the Overview shows Self-Managed under the install date', () => { assert.match(app, /\$\{inst && k === t\('Installed'\) \? selfManagedPill\(id\) : ''\}/); - assert.match(fn(app, 'gameMenu'), /act: 'setexe', id, label: selfManaged\(id\) \? t\('Set Game Executable \(On\)…'\) : t\('Set Game Executable…'\)/); }); test('Where\'s Your Build? offers the build folder or the game\'s executable, each saying what it does', () => { diff --git a/tests/manage-tab.test.cjs b/tests/manage-tab.test.cjs index 5eb43cba..d004c773 100644 --- a/tests/manage-tab.test.cjs +++ b/tests/manage-tab.test.cjs @@ -19,6 +19,28 @@ const updateRows = (inst, held) => { }; const GAME = { path: 'F:\\Library\\hydro', repo: 'dev/hydro', tag: 'v1.3.0' }; +test('the menu leaves out what a tab of the game\'s page has', () => { + const menu = fn(app, 'gameMenu'); + for (const act of ['saves-game', 'versions', 'looks', 'mods', 'launch-opts', 'setexe', 'manual', 'auto-up', 'build', 'folder', 'backups', 'move', 'shots', 'uninstall']) { + assert.doesNotMatch(menu, new RegExp(`act: '${act}'`), act); + } +}); + +test('the menu keeps what no tab has', () => { + const menu = fn(app, 'gameMenu'); + for (const act of ['pin', 'fav', 'hide', 'customize', 'desktop', 'steam', 'troubleshoot', 'report']) { + assert.match(menu, new RegExp(`act: '${act}'`), act); + } +}); + +test('the project page is one menu row', () => { + const run = new Function('t', 'tf', 'isSF', 'isFJ', 'isLab', 'fjServer', 'repoHome', `${fn(app, 'repoItem')}; return repoItem;`); + const no = () => false; + const repoItem = run(same, same, no, no, no, same, (r) => `https://github.com/${r}`); + assert.deepEqual(repoItem({ repo: 'dev/hydro' }), [{ act: 'url', url: 'https://github.com/dev/hydro', label: 'On GitHub', icon: 'web' }]); + assert.deepEqual(repoItem({}), []); +}); + test('Manage groups its rows in cards, with Uninstall last', () => { const tab = fn(app, 'manageTab'); assert.match(tab, /card\(t\('Updates'\), [^\n]*card\(t\('Starting the Game'\), [^\n]*card\(t\('Files and Saves'\), [^\n]*\$\{shotsCard\}

\$\{leave\}<\/div>/); diff --git a/ui/app.js b/ui/app.js index 24d8ebda..6807ea51 100644 --- a/ui/app.js +++ b/ui/app.js @@ -391,10 +391,6 @@ const viewOn = (repo) => (isSF(repo) ? t('View on SourceForge') : isFJ(repo) ? t // Where Report a problem goes: the catalog's own link when it gives one (https), else the project's. const reportUrl = (a) => (a && /^https:\/\//i.test(String(a.report_url || '')) ? String(a.report_url) : repoIssues(a.repo)); window.isSF = isSF; -// A SourceForge project's two links: its page and its files (its releases). -const sfMenu = (repo) => [{ act: 'url', url: repoHome(repo), label: t('View on SourceForge'), icon: 'web' }, { act: 'url', url: repoFiles(repo), label: t('Releases'), icon: 'page' }]; -// A Forgejo project's three links: its page, its releases and its issues. -const fjMenu = (repo) => [{ act: 'url', url: repoHome(repo), label: viewOn(repo), icon: 'web' }, { act: 'url', url: repoFiles(repo), label: t('Releases'), icon: 'page' }, { act: 'url', url: repoIssues(repo), label: t('Issues'), icon: 'page' }]; window.isFJ = isFJ; window.repoFiles = repoFiles; // A Coming soon game announced before it has a project: the post to follow it on (https only), and @@ -2044,7 +2040,7 @@ function pageLibrary() { // Consoles the player's games are from: a filter once there's more than one. const origins = [...new Set(Object.values(S.library).map((g) => (byId(g.id) || {}).origin).filter(Boolean))].sort((x, y) => originName(x).localeCompare(originName(y))); const consoleSel = origins.length > 1 ? `` : ''; - return `

${esc(t('Library'))}

${esc(tn(total, '1 game. Right-click one for versions, launch options and more.', '{n} games. Right-click one for versions, launch options and more.'))}

+ return `

${esc(t('Library'))}

${esc(tn(total, '1 game. Right-click one to pin it, add a shortcut and more.', '{n} games. Right-click one to pin it, add a shortcut and more.'))}

@@ -5876,30 +5872,17 @@ function askWhereBuild() { new MutationObserver((m, o) => { if (!box.isConnected) { o.disconnect(); res(picked); } }).observe(document.body, { childList: true }); }); } -// Skip Easy Setup for one game, in its menu: only on games Easy Setup can do, and not while it's -// skipped for every game in Settings. Before it's installed it's ticked here (it changes how the -// game installs, and there's no Manage tab yet); once installed, Easy Setup… opens its switch. +// Skip Easy Setup for one game, in its menu, before it's installed: only on games Easy Setup can +// do, and not while it's skipped for every game in Settings. It changes how the game installs, and +// there's no Manage tab yet. Once installed, the switch is in its Manage tab. function easySkipItem(id) { const ui = S.settings.ui || {}; if (!S.easyAll || !S.easyAll.has(id) || ui.easy_skip_all) return []; - if (S.library[id]) return [{ act: 'easy-row', id, label: t('Easy Setup…'), icon: 'disc' }]; + if (S.library[id]) return []; return [{ act: 'easy-skip', id, label: t('Skip Easy Setup'), icon: 'disc', check: (ui.easy_skip || []).includes(id) }]; } -// Easy Setup… in an installed game's menu: its Manage tab, scrolled to the switch, which lights up. -async function showEasyRow(id) { - S.nextTab = 'installed'; - go('game', id); - let row = null; - for (let i = 0; i < 20 && !row; i++) { - await new Promise((r) => setTimeout(r, 50)); - row = document.getElementById('easy-row'); - } - if (!row) return; - row.scrollIntoView({ block: 'center', behavior: calm() ? 'auto' : 'smooth' }); - row.classList.add('lit'); - setTimeout(() => row.classList.remove('lit'), 1800); -} -// The same menu wherever a game is: its "…" button, or a right-click on its tile. +// The same menu wherever a game is: its "…" button, or a right-click on its tile. It holds what no +// tab of the game's page has: settings live in its Manage tab, saves in Saves, releases in Updates. function gameMenu(id) { const g = S.library[id], x = byId(id), st = x ? status(x) : g ? 'installed' : 'get'; const first = st === 'running' ? { act: 'stop', id, label: t('Close game'), icon: 'stop' } @@ -5920,24 +5903,6 @@ function gameMenu(id) { ...(!g && x ? [{ act: 'customize', id, label: t('Customize…'), icon: 'shot' }] : []), ...(!g ? easySkipItem(id) : []), ...(g ? ['-', - { label: t('Manage'), icon: 'gear', sub: [ - { act: 'project-association', id, label: t('Project association…'), icon: 'layers' }, - ...(!g.local ? [{ act: 'auto-up', id, label: t('Update automatically'), icon: 'refresh', check: !!g.auto_update }] : []), - ...holdItem(id), - { act: 'versions', id, label: t('Changelog and other versions'), icon: 'history' }, - ...(!g.local ? [{ act: 'build', id, label: t('Change Build…'), icon: 'layers' }] : []), - { act: 'launch-opts', id, label: t('Launch options…'), icon: 'exe' }, - { act: 'setexe', id, label: selfManaged(id) ? t('Set Game Executable (On)…') : t('Set Game Executable…'), icon: 'exe' }, - { act: 'manual', id, label: byHand(g) ? t('Set Up By Hand (On)…') : t('Set Up By Hand…'), icon: 'gear' }, - ...easySkipItem(id), - ...(S.setup[id] && S.setup[id] !== 'loading' && S.setup[id].build_at ? [{ act: 'move-build', id, label: t('Move Build…'), icon: 'move' }] : []), - ...(S.setup[id] && S.setup[id] !== 'loading' && (S.setup[id].own_build || S.setup[id].build_dir) ? [{ act: 'ownbuild', id, label: S.setup[id].build_dir ? t('Use a Build You Already Have (On)…') : t('Use a Build You Already Have…'), icon: 'folder' }] : []), - ...(S.easy.has(id) ? [{ act: 'setup', id, label: g.game_copy ? t('Change your copy…') : t('Insert your copy…'), icon: 'disc' }, { act: 'relink', id, label: t('Relink Setup'), icon: 'refresh' }] : []), - ...(looksHere() ? [{ act: 'looks', id, label: t('Shaders'), icon: 'look' }] : []), - ...(S.mods[id] ? [{ act: 'mods', id, label: t('Mods'), icon: 'puzzle' }] : []), - ...(S.os === 'linux' && g.proton ? [{ act: 'wine-tools', id, label: t('Wine Tools…'), icon: 'exe' }] : []), - ] }, - { act: 'saves-game', id, label: t('Manage saves'), icon: 'save' }, { act: 'customize', id, label: t('Customize…'), icon: 'shot' }, ...(x && x.custom ? [{ act: 'edit-info', id, label: t('Edit Game Info…'), icon: 'page' }] : []), { label: t('Add To'), icon: 'plus', sub: [ @@ -5945,21 +5910,20 @@ function gameMenu(id) { ...(S.os === 'windows' || S.os === 'linux' ? [{ act: 'app-menu', id, label: S.os === 'windows' ? t('Add to Start Menu') : t('Add to App Menu'), icon: 'desk' }] : []), ...(S.steam ? [{ act: 'steam', id, label: t('Add to Steam'), icon: 'steam' }] : []), ] }, - { label: t('Files'), icon: 'folder', sub: [ - { act: 'folder', id, label: t('Open its folder'), icon: 'folder' }, - { act: 'shots', id, label: t('Screenshots'), icon: 'shot' }, - { act: 'backups', id, label: t('Backups of your saves…'), icon: 'save' }, - { act: 'move', id, label: t('Move to another drive…'), icon: 'move' }, - ] }, - ...(x && x.repo ? [isSF(x.repo) ? { label: t('On SourceForge'), icon: 'web', sub: sfMenu(x.repo) } : isFJ(x.repo) ? { label: tf('On {host}', { host: fjServer(x.repo) }), icon: 'web', sub: fjMenu(x.repo) } : { label: isLab(x.repo) ? t('On GitLab') : t('On GitHub'), icon: 'web', sub: [{ act: 'url', url: repoReadme(x.repo), label: t('Read me'), icon: 'page' }, { act: 'url', url: repoHome(x.repo), label: isLab(x.repo) ? t('Its GitLab') : t('Its GitHub'), icon: 'web' }] }] : []), + ...repoItem(x), ...(window.pluginMenu ? window.pluginMenu(id) : []), '-', { act: 'troubleshoot', id, label: t('Troubleshoot…'), icon: 'info' }, { act: 'report', id, label: t('Report a Problem…'), icon: 'page' }, - ] : x && x.repo ? (isSF(x.repo) ? ['-', ...sfMenu(x.repo)] : isFJ(x.repo) ? ['-', ...fjMenu(x.repo)] : ['-', { act: 'url', url: repoReadme(x.repo), label: t('Read me'), icon: 'page' }, { act: 'url', url: repoHome(x.repo), label: isLab(x.repo) ? t('Its GitLab') : t('Its GitHub'), icon: 'web' }]) : []), - ...(g ? ['-', { act: 'uninstall', id, label: t('Uninstall…'), cls: 'danger', icon: 'bin' }] : []), + ] : x && x.repo ? ['-', ...repoItem(x)] : []), ]; } +// Its project page, one row: its README is on Overview, its releases on Updates. +function repoItem(x) { + if (!x || !x.repo) return []; + const label = isSF(x.repo) ? t('On SourceForge') : isFJ(x.repo) ? tf('On {host}', { host: fjServer(x.repo) }) : isLab(x.repo) ? t('On GitLab') : t('On GitHub'); + return [{ act: 'url', url: repoHome(x.repo), label, icon: 'web' }]; +} // The game's folder is its own, right inside one of the libraries (so the launcher may delete it). // A game brought over from elsewhere, or a local build, keeps its folder. @@ -6260,7 +6224,7 @@ function pickBuild(id, builds, current) { const lit = builds.some((b) => b.name === current) ? (b) => b.name === current : (b) => kinds && b.best; const btns = builds.map((b) => ``); if (btns.length % 2) btns[0] = btns[0].replace('class="btn', 'class="span2 btn'); - const say = kinds ? t('This release comes in more than one kind of build. The usual one works for most players. You can switch later from its right-click menu.') : t('This release comes in more than one build, often one for each region. Pick the one that matches your copy of the game. You can switch later from its right-click menu.'); + const say = kinds ? t('This release comes in more than one kind of build. The usual one works for most players. You can switch later in its Manage tab.') : t('This release comes in more than one build, often one for each region. Pick the one that matches your copy of the game. You can switch later in its Manage tab.'); modal(`

${esc(tf('Which Version of {name}?', { name: a.name }))}

${esc(say)}

${btns.join('')}
`, (x, close) => { if (x.dataset.x === 'b') { close(); go(x.dataset.f); } }, t('Pick a build')); } @@ -8599,7 +8563,6 @@ async function act(el, e) { case 'setexe': try { if (await chooseProgram(id)) { toast(t('Play starts that program now.')); render(true); } } catch (err) { fail(err); } return; - case 'easy-row': return showEasyRow(id); case 'forget-program': try { S.library[id] = await invoke('forget_program', { id }); From 307f5a76d4db1458560df14d74b71e272e40cae8 Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 19:03:16 +0200 Subject: [PATCH 03/25] Uninstall stays in the game's menu The one exception to leaving out what a tab has: players expect it on a right-click in their Library. --- tests/manage-tab.test.cjs | 6 +++++- ui/app.js | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/manage-tab.test.cjs b/tests/manage-tab.test.cjs index d004c773..0276326a 100644 --- a/tests/manage-tab.test.cjs +++ b/tests/manage-tab.test.cjs @@ -21,7 +21,7 @@ const GAME = { path: 'F:\\Library\\hydro', repo: 'dev/hydro', tag: 'v1.3.0' }; test('the menu leaves out what a tab of the game\'s page has', () => { const menu = fn(app, 'gameMenu'); - for (const act of ['saves-game', 'versions', 'looks', 'mods', 'launch-opts', 'setexe', 'manual', 'auto-up', 'build', 'folder', 'backups', 'move', 'shots', 'uninstall']) { + for (const act of ['saves-game', 'versions', 'looks', 'mods', 'launch-opts', 'setexe', 'manual', 'auto-up', 'build', 'folder', 'backups', 'move', 'shots']) { assert.doesNotMatch(menu, new RegExp(`act: '${act}'`), act); } }); @@ -33,6 +33,10 @@ test('the menu keeps what no tab has', () => { } }); +test('Uninstall stays in the menu of an installed game, last and in red', () => { + assert.match(fn(app, 'gameMenu'), /\.\.\.\(g \? \['-', \{ act: 'uninstall', id, label: t\('Uninstall…'\), cls: 'danger', icon: 'bin' \}\] : \[\]\),\n \];/); +}); + test('the project page is one menu row', () => { const run = new Function('t', 'tf', 'isSF', 'isFJ', 'isLab', 'fjServer', 'repoHome', `${fn(app, 'repoItem')}; return repoItem;`); const no = () => false; diff --git a/ui/app.js b/ui/app.js index 6807ea51..b9abbcd1 100644 --- a/ui/app.js +++ b/ui/app.js @@ -5883,6 +5883,7 @@ function easySkipItem(id) { } // The same menu wherever a game is: its "…" button, or a right-click on its tile. It holds what no // tab of the game's page has: settings live in its Manage tab, saves in Saves, releases in Updates. +// Uninstall is the one exception: players expect it on a right-click in their Library. function gameMenu(id) { const g = S.library[id], x = byId(id), st = x ? status(x) : g ? 'installed' : 'get'; const first = st === 'running' ? { act: 'stop', id, label: t('Close game'), icon: 'stop' } @@ -5916,6 +5917,7 @@ function gameMenu(id) { { act: 'troubleshoot', id, label: t('Troubleshoot…'), icon: 'info' }, { act: 'report', id, label: t('Report a Problem…'), icon: 'page' }, ] : x && x.repo ? ['-', ...repoItem(x)] : []), + ...(g ? ['-', { act: 'uninstall', id, label: t('Uninstall…'), cls: 'danger', icon: 'bin' }] : []), ]; } // Its project page, one row: its README is on Overview, its releases on Updates. From 9518402f5b57d6638e5d54397e8be36d041ea61b Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 19:35:18 +0200 Subject: [PATCH 04/25] An open menu closes when the page scrolls Menus are fixed to the window, so the game's menu stayed put while its button scrolled away. They close on scroll now, as system menus do. The version picker under a game's title too. --- tests/manage-tab.test.cjs | 4 ++++ ui/app.js | 3 +++ 2 files changed, 7 insertions(+) diff --git a/tests/manage-tab.test.cjs b/tests/manage-tab.test.cjs index 0276326a..f7c32bf5 100644 --- a/tests/manage-tab.test.cjs +++ b/tests/manage-tab.test.cjs @@ -37,6 +37,10 @@ test('Uninstall stays in the menu of an installed game, last and in red', () => assert.match(fn(app, 'gameMenu'), /\.\.\.\(g \? \['-', \{ act: 'uninstall', id, label: t\('Uninstall…'\), cls: 'danger', icon: 'bin' \}\] : \[\]\),\n \];/); }); +test('an open menu closes when the page scrolls', () => { + assert.match(app, /\$\('#main'\)\.addEventListener\('scroll', \(\) => \{\n(?:\s*\/\/[^\n]*\n)*\s+if \(\$\('\.menu'\)\) closeMenu\(\);/); +}); + test('the project page is one menu row', () => { const run = new Function('t', 'tf', 'isSF', 'isFJ', 'isLab', 'fjServer', 'repoHome', `${fn(app, 'repoItem')}; return repoItem;`); const no = () => false; diff --git a/ui/app.js b/ui/app.js index b9abbcd1..4bf3ddcc 100644 --- a/ui/app.js +++ b/ui/app.js @@ -8707,6 +8707,9 @@ document.addEventListener('input', (e) => { $('#isl').addEventListener('click', () => go('downloads')); // Past the top of a page, the window's buttons get a bar behind them. $('#main').addEventListener('scroll', () => { + // An open menu is fixed to the window, so it would stay put while its button scrolls away: + // it closes instead, as a system menu does. + if ($('.menu')) closeMenu(); const s = $('#main').scrollTop > 10; const bar = $('.topbar'); if (bar.classList.contains('solid') !== s) bar.classList.toggle('solid', s); if (S.view === 'discover') stickCheck(); // While it scrolls, tiles passing under the pointer don't light up (that redraw is what made From be1684510fa814be32c4decb54326337e84013e4 Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 19:39:53 +0200 Subject: [PATCH 05/25] An open menu moves with the page as it scrolls It stays open and keeps to its button instead of closing. The part that goes under the window's top bar or past the page's edge is hidden, like the page's own content. --- tests/manage-tab.test.cjs | 38 ++++++++++++++++++++++++++++++++++++-- ui/app.js | 23 ++++++++++++++++++++--- 2 files changed, 56 insertions(+), 5 deletions(-) diff --git a/tests/manage-tab.test.cjs b/tests/manage-tab.test.cjs index f7c32bf5..85e85a35 100644 --- a/tests/manage-tab.test.cjs +++ b/tests/manage-tab.test.cjs @@ -37,8 +37,42 @@ test('Uninstall stays in the menu of an installed game, last and in red', () => assert.match(fn(app, 'gameMenu'), /\.\.\.\(g \? \['-', \{ act: 'uninstall', id, label: t\('Uninstall…'\), cls: 'danger', icon: 'bin' \}\] : \[\]\),\n \];/); }); -test('an open menu closes when the page scrolls', () => { - assert.match(app, /\$\('#main'\)\.addEventListener\('scroll', \(\) => \{\n(?:\s*\/\/[^\n]*\n)*\s+if \(\$\('\.menu'\)\) closeMenu\(\);/); +// A page that scrolls under a 42px top bar, 800px tall, with one open menu 300px tall. +const scrolled = (style, by) => { + const main = { scrollTop: 0, getBoundingClientRect: () => ({ bottom: 800 }) }; + const bar = { getBoundingClientRect: () => ({ bottom: 42 }) }; + const menu = { style: Object.assign({ clipPath: '' }, style) }; + menu.getBoundingClientRect = () => { + const top = menu.style.top ? parseFloat(menu.style.top) : 800 - parseFloat(menu.style.bottom) - 300; + return { top, bottom: top + 300 }; + }; + const run = new Function('$', '$$', `let menuScroll = 0; ${fn(app, 'scrollMenus')}; return scrollMenus;`); + const scrollMenus = run((s) => (s === '#main' ? main : bar), () => [menu]); + main.scrollTop = by; + scrollMenus(); + return menu.style; +}; + +test('an open menu moves with the page as it scrolls', () => { + assert.equal(scrolled({ top: '200px' }, 50).top, '150px'); +}); + +test('a menu that opens upward moves with the page too', () => { + assert.equal(scrolled({ top: '', bottom: '100px' }, 50).bottom, '150px'); +}); + +test('the part of a menu under the top bar is hidden', () => { + assert.equal(scrolled({ top: '100px' }, 80).clipPath, 'inset(22px 0 0px 0)'); +}); + +test('a menu fully on the page is not clipped', () => { + assert.equal(scrolled({ top: '400px' }, 50).clipPath, ''); +}); + +test('scrolling the page moves menus instead of closing them', () => { + const handler = app.match(/\$\('#main'\)\.addEventListener\('scroll', \(\) => \{[^]*?\n\}, \{ passive: true \}\);/)[0]; + assert.match(handler, /^\$\('#main'\)\.addEventListener\('scroll', \(\) => \{\n\s+scrollMenus\(\);/); + assert.doesNotMatch(handler, /closeMenu/); }); test('the project page is one menu row', () => { diff --git a/ui/app.js b/ui/app.js index 4bf3ddcc..c8ebd799 100644 --- a/ui/app.js +++ b/ui/app.js @@ -8705,11 +8705,28 @@ document.addEventListener('input', (e) => { qTimer = setTimeout(() => { if (id === 'dq') S.q = e.target.value; else S.lq = e.target.value; refreshList(id); }, 120); }); $('#isl').addEventListener('click', () => go('downloads')); +// An open menu is part of the page: it stays open and moves with it as it scrolls. Menus are fixed +// to the window, so they're moved by hand, by as much as the page moved. The part that goes under +// the window's top bar or past the page's bottom edge is hidden, as the page's own content is. +let menuScroll = 0; +function scrollMenus() { + const main = $('#main'), dy = menuScroll - main.scrollTop; + menuScroll = main.scrollTop; + const menus = $$('.menu'); + if (!dy || !menus.length) return; + const top = $('.topbar').getBoundingClientRect().bottom, bottom = main.getBoundingClientRect().bottom; + for (const m of menus) { + // A menu that opens upward (the version list near the bottom) is placed by its bottom edge. + if (m.style.top) m.style.top = parseFloat(m.style.top) + dy + 'px'; + else if (m.style.bottom) m.style.bottom = parseFloat(m.style.bottom) - dy + 'px'; + const r = m.getBoundingClientRect(); + const cutTop = Math.max(0, top - r.top), cutBottom = Math.max(0, r.bottom - bottom); + m.style.clipPath = cutTop || cutBottom ? `inset(${cutTop}px 0 ${cutBottom}px 0)` : ''; + } +} // Past the top of a page, the window's buttons get a bar behind them. $('#main').addEventListener('scroll', () => { - // An open menu is fixed to the window, so it would stay put while its button scrolls away: - // it closes instead, as a system menu does. - if ($('.menu')) closeMenu(); + scrollMenus(); const s = $('#main').scrollTop > 10; const bar = $('.topbar'); if (bar.classList.contains('solid') !== s) bar.classList.toggle('solid', s); if (S.view === 'discover') stickCheck(); // While it scrolls, tiles passing under the pointer don't light up (that redraw is what made From b1f7af3c1d39b85db1ed03185ac45ce8f041934b Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 19:56:44 +0200 Subject: [PATCH 06/25] Game page side column: no buttons, Launcher Support is a box MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add to Steam and Desktop, the project page and both ways to report are in the game's "…" menu. Launcher Support is a box on Overview under Before You Play instead of a window. The facts card no longer repeats who made it; that's under the title. --- tests/integration-ownership.test.cjs | 12 ++--- tests/manage-tab.test.cjs | 10 ++++ ui/app.css | 16 ++---- ui/app.js | 77 ++++++++++------------------ 4 files changed, 45 insertions(+), 70 deletions(-) diff --git a/tests/integration-ownership.test.cjs b/tests/integration-ownership.test.cjs index 3a751daa..3ed85af0 100644 --- a/tests/integration-ownership.test.cjs +++ b/tests/integration-ownership.test.cjs @@ -5,21 +5,19 @@ const vm = require('node:vm'); const path = require('node:path'); const source = fs.readFileSync(path.join(__dirname, '../ui/app.js'), 'utf8'); +// The Launcher Support box on Overview, for a catalog entry and (installed) its own manifest. async function support(entry, local = null) { - let html = ''; const ctx = vm.createContext({ - S: { library: local ? { game: {} } : {}, easy: new Set() }, - byId: () => ({ id: 'game', name: 'Example Game', ...entry }), + S: { library: local ? { game: {} } : {}, easy: new Set(), supLocal: local ? { game: local } : {} }, invoke: async () => local, builtinBoot: () => ({}), TURNKEY_HOW: [], t: (s) => s, N_: (s) => s, tf: (s, args) => s.replace('{name}', args.name), esc: (s) => String(s).replaceAll('&', '&').replaceAll('<', '<'), okMark: (yes) => yes ? 'available' : 'unavailable', - modal: (content) => { html = content; }, + a: { id: 'game', name: 'Example Game', ...entry }, }); vm.runInContext(source.match(/^const OWNER_LONG = .*;$/m)[0], ctx); - vm.runInContext(source.match(/^async function supportModal\([^]*?^}/m)[0], ctx); - await vm.runInContext("supportModal('game')", ctx); - return html; + vm.runInContext(source.match(/^function supportCard\([^]*?^}/m)[0], ctx); + return vm.runInContext('supportCard(a)', ctx); } test('an installed manifest provides capabilities without confirming developer maintenance', async () => { diff --git a/tests/manage-tab.test.cjs b/tests/manage-tab.test.cjs index 85e85a35..2fc17824 100644 --- a/tests/manage-tab.test.cjs +++ b/tests/manage-tab.test.cjs @@ -113,3 +113,13 @@ test('a local build has only its project association under Updates', () => { assert.match(html, /data-act="project-association"/); assert.doesNotMatch(html, /hold-up|auto-up|data-act="build"/); }); + +test('the side column has no buttons, and Launcher Support is a box on Overview', () => { + const rail = fn(app, 'gameRail'); + assert.doesNotMatch(rail, /quickActs|btn/); + assert.match(rail, /S\.tab === 'overview' \? readyCard\(a\) \+ supportCard\(a\) : ''/); +}); + +test('the facts card leaves out who made it (it is under the title)', () => { + assert.doesNotMatch(fn(app, 'gameRail'), /t\('By'\)/); +}); diff --git a/ui/app.css b/ui/app.css index dcb97948..ff97c2c8 100644 --- a/ui/app.css +++ b/ui/app.css @@ -2118,10 +2118,6 @@ body.light .ds-panel{box-shadow:0 14px 40px rgba(14,22,38,.16)} body.light .su-note{color:#8a5300;background:rgba(255,184,77,.14)} /* A game's quick actions above Before You Play: icon and name, two to a row. */ -.gp-quick{margin:0} -.gp-quick .btn{gap:9px;justify-content:center} -.gp-quick .btn svg{width:18px;height:18px;flex:none} -.gp-quick .btn .qi-brand{width:18px;height:18px;flex:none} /* Mac: the web view there pays a lot for big blurs, so covers don't glow on hover. */ body.mac .tile .glow{display:none} @@ -2164,14 +2160,10 @@ body.mac .tile .glow{display:none} .copy-tags{display:flex;gap:6px;flex-shrink:0} .tag.ok{color:#3ee08f;background:rgba(62,224,143,.08);border-color:rgba(62,224,143,.36)} .modal .warn-line{color:var(--warn);font-weight:700} -/* Launcher support: one row per feature, checked or not, and who made it work */ -.modal:has(.sup-list){width:min(560px,94vw)} -.sup-list{gap:8px} -.sup-row{min-height:74px} -.sup-d{font-size:12.5px;color:var(--dim);line-height:1.35} -.sup-row .tag{height:22px;padding:0 8px;font-size:11.5px;flex-shrink:0} -.sup-mark{display:flex;flex-shrink:0} -.modal .sup-own{color:#3ee08f;font-weight:700} +/* Launcher Support, on Overview under Before You Play: one row per feature, and who made it work */ +.sup-card>p{margin:10px 0 0;font-size:13.5px} +.sup-card .acts .tag{height:22px;padding:0 8px;font-size:11.5px;flex-shrink:0} +.sup-card .sup-own{color:#3ee08f;font-weight:700} /* The crash window: the game's own last error line */ .modal .fatal-line{display:flex;flex-direction:column;gap:4px;margin:0} .modal .fatal-line code{font-size:12.5px;padding:8px 10px;border-radius:10px;background:var(--card2);color:var(--text);overflow-wrap:anywhere;white-space:pre-wrap} diff --git a/ui/app.js b/ui/app.js index c8ebd799..a17ed323 100644 --- a/ui/app.js +++ b/ui/app.js @@ -359,7 +359,6 @@ async function playSync(ids) { } setInterval(() => { if (!document.hidden) { libSync(); playSync().then((changed) => changed && render(true)); } }, 10 * 60 * 1000); const setupDone = (id) => !!(((S.settings && S.settings.ui) || {}).setup_ok || {})[id]; -const GITHUB_S = ''; // Where a recomp lives: GitHub, GitLab for a project kept as gitlab:group/project, SourceForge // for sourceforge:, or a Forgejo server for forgejo://. const isLab = (repo) => /^gitlab:/i.test(String(repo || '')); @@ -401,7 +400,6 @@ const followLabel = (url) => (onX(url) ? t('Follow It on X') : t('Follow It')); window.onX = onX; window.followLink = followLink; window.followLabel = followLabel; -const X_S = ''; // A link to a project: GitHub's mark for GitHub, a plain branch for anywhere else. const BRANCH_S = ''; window.repoHome = repoHome; @@ -752,8 +750,6 @@ async function toggleFollow(slug) { if (S.view === 'home') render(true); if (window.tvRefresh) window.tvRefresh(); } -// A name with the tick after it, for lists. -const whoHTML = (a) => { const d = devOf(a); return esc((d && d.name) || a.author || '') + (d && d.verified ? TICK(13) : ''); }; // A game with more than one version for this computer: { id, name, pick, list }, or null. A page of // a version that doesn't run here still points at the ones that do. const verGroup = (a) => { @@ -1216,16 +1212,6 @@ function actions(a, size = 'big') { } } -// A game's quick actions, at the top of its side column: Add to Steam and to the desktop -// (installed games), its project page and Report a problem (games with a repo). Each has its icon -// and its name. Steam's own icon is used when ui/icons/steam.svg is there. -const QI = (d, w = 1.9) => ``; -const QI_PAD = QI(''); -const QI_DESK = QI(''); -const QI_REPORT = QI('', 2); -let STEAM_ICON = ''; -fetch('icons/steam.svg').then((r) => (r.ok ? r.text() : '')).then((t) => { if (/^\s*]/i.test(t) && !/ {}); -const SUPPORT_I = ''; // A new issue on the recomp's own page, asking for RecompLauncher support. Opened for the player to // send themselves; nothing is sent from here. function askSupportUrl(a) { @@ -1235,14 +1221,23 @@ function askSupportUrl(a) { if (isLab(a.repo)) return `${repoHome(a.repo)}/-/issues/new?issue[title]=${encodeURIComponent(title)}&issue[description]=${encodeURIComponent(body)}`; return `${repoIssues(a.repo)}/new?title=${encodeURIComponent(title)}&body=${encodeURIComponent(body)}`; } -// What RecompLauncher can do for this recomp, and who made each part work: the catalog's -// "support", the recomp's own recomplauncher.json in its folder, or (offline) its boot profile. -async function supportModal(id) { - const a = byId(id) || (S.library[id] && libApp(S.library[id])); - if (!a) return; +// Launcher Support, a box on Overview under Before You Play: what RecompLauncher can do for this +// recomp, and who made each part work. From the catalog's "support", the recomp's own +// recomplauncher.json in its folder (asked for once, for an installed game), or (offline) its +// boot profile. +S.supLocal = {}; +function supportCard(a) { + if (!a || a.soon) return ''; + const id = a.id; + if (S.library[id] && S.supLocal[id] === undefined) { + S.supLocal[id] = null; + invoke('support_local', { id }).then((v) => { + S.supLocal[id] = v || null; + if (v && S.view === 'game' && S.arg === id && S.tab === 'overview') refreshGame(); + }).catch(() => {}); + } + const local = S.library[id] ? S.supLocal[id] : null; const sup = a.support && typeof a.support === 'object' ? a.support : null; - let local = null; - if (S.library[id]) local = await invoke('support_local', { id }).catch(() => null); const boot = a.boot || builtinBoot()[id] || {}; const files = boot.files && typeof boot.files === 'object' ? boot.files : null; const guess = { @@ -1274,35 +1269,13 @@ async function supportModal(id) { // manifest may have been supplied by the player, launcher, or another contributor. const owner = a.maintained_by === 'official' ? 'project' : ['project', 'launcher', 'community'].includes(a.maintained_by) ? a.maintained_by : 'unconfirmed'; const ask = a.repo && (sdk === 'none' || missing); - const html = `

${esc(t('Launcher Support'))}

${esc(tf('What RecompLauncher can do for {name}, and who made it work.', { name: a.name }))}

-
${rows.map(([k, d, w]) => `
${okMark(w ? true : null)}
${esc(k)}${esc(d)}
${tag(w)}
`).join('')}
+ const row = ([k, d, w]) => `
${esc(k)}${esc(d)}
${tag(w)}${okMark(w ? true : null)}
`; + return `

${esc(t('Launcher Support'))}

+

${esc(tf('What RecompLauncher can do for {name}, and who made it work.', { name: a.name }))}

+ ${rows.map(row).join('')} ${source ? `

${esc(source)}

` : ''}

${esc(t(OWNER_LONG[owner]))}

- ${ask ? `

${esc(t('Is a feature missing? Ask the developer to add RecompLauncher support.'))}

` : ''} -
${ask ? `` : ''}
`; - modal(html, (x) => { if (x.dataset.x === 'ask') invoke('open_url', { url: askSupportUrl(a) }).catch(fail); }, t('Launcher Support')); -} - -function quickActs(a) { - const id = esc(a.id), b = (act, label, icon, extra = '') => ``; - const out = []; - if (S.library[a.id] && S.os !== 'macos') { - if (S.steam) out.push(b('steam', t('Add to Steam'), STEAM_ICON || QI_PAD)); - out.push(b('desktop', t('Add to desktop'), QI_DESK)); - } - if (followLink(a)) { - const f = followLink(a); - out.push(b('url', followLabel(f), onX(f) ? X_S : BRANCH_S.replace('width="15" height="15"', 'width="18" height="18"'), `data-url="${esc(f)}"`)); - } - if (a.repo) { - out.push(b('url', viewOn(a.repo), isLab(a.repo) || isSF(a.repo) || isFJ(a.repo) ? BRANCH_S.replace('width="15" height="15"', 'width="18" height="18"') : GITHUB_S.replace('width="15" height="15"', 'width="18" height="18"'), `data-url="${esc(repoHome(a.repo))}"`)); - out.push(b('url', t('Report a problem'), QI_REPORT, `data-url="${esc(reportUrl(a))}"`)); - } - if (!a.soon) out.push(b('support', t('Launcher Support'), SUPPORT_I)); - if (!out.length) return ''; - // Even rows: an odd one out takes the whole row. - if (out.length % 2) out[out.length - 1] = out[out.length - 1].replace('class="btn"', 'class="btn span2"'); - return `
${out.join('')}
`; + ${ask ? `

${esc(t('Is a feature missing? Ask the developer to add RecompLauncher support.'))}

` : ''}
`; } // The other versions of this game that are installed too. @@ -2464,10 +2437,13 @@ function playersText(a) { function gameRail(a) { const facts = [ [t('Latest version'), verText(a.version)], [t('Size'), a.size], [t('Latest release'), date(a.released)], [t('First release'), date(a.first)], - [t('Releases'), a.releases ? fmtNum(a.releases) : ''], [t('Downloads'), a.downloads ? fmtN(a.downloads) : ''], [t('Played on RecompLauncher'), playersText(a)], [starsLabel(a.repo), starsText(a)], [t('License'), a.license], [t('By'), a.author], [t('Setup By'), OWNER_NAME[a.maintained_by] ? t(OWNER_NAME[a.maintained_by]) : ''], + [t('Releases'), a.releases ? fmtNum(a.releases) : ''], [t('Downloads'), a.downloads ? fmtN(a.downloads) : ''], [t('Played on RecompLauncher'), playersText(a)], [starsLabel(a.repo), starsText(a)], [t('License'), a.license], [t('Setup By'), OWNER_NAME[a.maintained_by] ? t(OWNER_NAME[a.maintained_by]) : ''], ].filter(([, v]) => v); const sys = (a.systems || []).filter((k) => OS_NAME[k]); - return `
${quickActs(a)}${S.tab === 'overview' ? readyCard(a) : ''}
${facts.map(([k, v]) => `
${esc(k)}
${k === t('By') ? `${whoHTML(a)}` : esc(v)}
`).join('')} + // Who made it is under the title; adding it somewhere, its project page and reporting are in the + // "…" menu. Overview has what it needs to play, and what the launcher can do for it. + const overview = S.tab === 'overview' ? readyCard(a) + supportCard(a) : ''; + return `
${overview}
${facts.map(([k, v]) => `
${esc(k)}
${esc(v)}
`).join('')} ${sys.length ? `
${esc(t('Runs on'))}
${sys.map((k) => `${osIcon(k)}${OS_NAME[k]}`).join('')}
` : ''}
`; } @@ -8549,7 +8525,6 @@ async function act(el, e) { case 'rom-emus': return emuFolders(); case 'found-fix': return fixFound(id); case 'copies': return copiesModal(id); - case 'support': return supportModal(id); case 'tv': return window.enterTV && window.enterTV(); case 'vcredist': return installVcredist(); case 'report': S.reportGame = id; return setSection('report'); From ea0daaec20260c37ddea4bbf615b44841f39b47f Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 20:02:45 +0200 Subject: [PATCH 07/25] The game's menu: Troubleshoot and Add To submenus, site logos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Play is gone (it's the big button). Favorites moves under Add To, and Add to Start Menu gets its own icon. The project row shows GitHub, GitLab, SourceForge or Forgejo with its logo, or Follow It on X for a Coming Soon game with no project yet. Troubleshoot holds Check What's Wrong, Report to RecompLauncher and Report to the Game's Developer. Customize is Edit Name and Artwork. Set Up Again leaves the side of Play and becomes Setup Options in the menu; new options put a dot on the "…" button and their count on the row. --- tests/manage-tab.test.cjs | 92 ++++++++++++++++++++++++++++++++------- ui/app.css | 4 +- ui/app.js | 79 ++++++++++++++++++++++----------- 3 files changed, 132 insertions(+), 43 deletions(-) diff --git a/tests/manage-tab.test.cjs b/tests/manage-tab.test.cjs index 2fc17824..e585f467 100644 --- a/tests/manage-tab.test.cjs +++ b/tests/manage-tab.test.cjs @@ -37,6 +37,52 @@ test('Uninstall stays in the menu of an installed game, last and in red', () => assert.match(fn(app, 'gameMenu'), /\.\.\.\(g \? \['-', \{ act: 'uninstall', id, label: t\('Uninstall…'\), cls: 'danger', icon: 'bin' \}\] : \[\]\),\n \];/); }); +// One submenu of the game's menu, from its label to its closing bracket. +const submenu = (label) => fn(app, 'gameMenu').match(new RegExp(`label: t\\('${label}'\\)[^]*?\\n \\] \\},`))[0]; + +test('Play is not in the menu: it is the big button', () => { + assert.doesNotMatch(fn(app, 'gameMenu'), /act: 'play'/); +}); + +test('Favorites is under Add To', () => { + assert.match(submenu('Add To'), /act: 'fav'/); +}); + +test('Add to Start Menu has its own icon, not the desktop one', () => { + assert.match(submenu('Add To'), /act: 'app-menu'[^\n]*icon: 'apps'/); +}); + +test('Troubleshoot holds the checker and both ways to report', () => { + const sub = submenu('Troubleshoot'); + assert.match(sub, /act: 'troubleshoot', id, label: t\('Check What\\'s Wrong…'\)/); + assert.match(sub, /act: 'report', id, label: t\('Report to RecompLauncher…'\)/); + assert.match(sub, /\.\.\.devReportItem\(x\)/); +}); + +test('Set Up Again is Setup Options in the menu, not a button beside Play', () => { + assert.match(fn(app, 'gameMenu'), /canSetUpAgain\(id\) \? \[\{ act: 'setup', id, label: setupLabel, icon: 'disc' \}\]/); + assert.doesNotMatch(fn(app, 'actions'), /again/); +}); + +test('new setup options put a dot on the "…" button', () => { + assert.match(fn(app, 'actions'), /class="\$\{sq\}\$\{fresh \? ' has-new' : ''\}" data-act="menu"/); +}); + +test('Customize is called Edit Name and Artwork', () => { + assert.match(fn(app, 'gameMenu'), /act: 'customize', id, label: t\('Edit Name and Artwork…'\)/); + assert.doesNotMatch(fn(app, 'gameMenu'), /Customize…/); +}); + +test('the side column has no buttons, and Launcher Support is a box on Overview', () => { + const rail = fn(app, 'gameRail'); + assert.doesNotMatch(rail, /quickActs|btn/); + assert.match(rail, /S\.tab === 'overview' \? readyCard\(a\) \+ supportCard\(a\) : ''/); +}); + +test('the facts card leaves out who made it (it is under the title)', () => { + assert.doesNotMatch(fn(app, 'gameRail'), /t\('By'\)/); +}); + // A page that scrolls under a 42px top bar, 800px tall, with one open menu 300px tall. const scrolled = (style, by) => { const main = { scrollTop: 0, getBoundingClientRect: () => ({ bottom: 800 }) }; @@ -75,12 +121,36 @@ test('scrolling the page moves menus instead of closing them', () => { assert.doesNotMatch(handler, /closeMenu/); }); -test('the project page is one menu row', () => { - const run = new Function('t', 'tf', 'isSF', 'isFJ', 'isLab', 'fjServer', 'repoHome', `${fn(app, 'repoItem')}; return repoItem;`); - const no = () => false; - const repoItem = run(same, same, no, no, no, same, (r) => `https://github.com/${r}`); - assert.deepEqual(repoItem({ repo: 'dev/hydro' }), [{ act: 'url', url: 'https://github.com/dev/hydro', label: 'On GitHub', icon: 'web' }]); - assert.deepEqual(repoItem({}), []); +// The menu's project row for an entry, with the hosts told apart by their repo's prefix. +const projectRow = (x) => { + const run = new Function('t', 'tf', 'isSF', 'isFJ', 'isLab', 'fjServer', 'repoHome', 'followLink', 'followLabel', 'onX', `${fn(app, 'projectItem')}; return projectItem;`); + const pre = (p) => (r) => String(r || '').startsWith(p); + const follow = (a) => a.follow || ''; + const projectItem = run(same, (s, v) => s.replace('{host}', v.host), pre('sourceforge:'), pre('forgejo:'), pre('gitlab:'), () => 'codeberg.org', (r) => `home:${r}`, follow, () => 'Follow It on X', (u) => u.includes('x.com')); + return projectItem(x); +}; + +test('the project row is GitHub with its logo', () => { + assert.deepEqual(projectRow({ repo: 'dev/hydro' }), [{ act: 'url', url: 'home:dev/hydro', label: 'On GitHub', icon: 'github' }]); +}); + +test('the project row shows GitLab, SourceForge and Forgejo with their own logos', () => { + assert.equal(projectRow({ repo: 'gitlab:dev/hydro' })[0].icon, 'gitlab'); + assert.equal(projectRow({ repo: 'sourceforge:hydro' })[0].icon, 'sourceforge'); + assert.deepEqual(projectRow({ repo: 'forgejo:codeberg.org/dev/hydro' })[0], { act: 'url', url: 'home:forgejo:codeberg.org/dev/hydro', label: 'On codeberg.org', icon: 'forgejo' }); +}); + +test('a Coming Soon entry with no repo gets Follow It on X instead', () => { + assert.deepEqual(projectRow({ follow: 'https://x.com/hydro' }), [{ act: 'url', url: 'https://x.com/hydro', label: 'Follow It on X', icon: 'x' }]); +}); + +test('no repo and no follow link: no project row', () => { + assert.deepEqual(projectRow({}), []); +}); + +test('every logo the project row names is in the menu icons', () => { + const icons = app.match(/^const MI = \{[^]*?^\};/m)[0]; + for (const k of ['github', 'gitlab', 'sourceforge', 'forgejo', 'x', 'apps', 'wrench']) assert.match(icons, new RegExp(`\\n ${k}: '`), k); }); test('Manage groups its rows in cards, with Uninstall last', () => { @@ -113,13 +183,3 @@ test('a local build has only its project association under Updates', () => { assert.match(html, /data-act="project-association"/); assert.doesNotMatch(html, /hold-up|auto-up|data-act="build"/); }); - -test('the side column has no buttons, and Launcher Support is a box on Overview', () => { - const rail = fn(app, 'gameRail'); - assert.doesNotMatch(rail, /quickActs|btn/); - assert.match(rail, /S\.tab === 'overview' \? readyCard\(a\) \+ supportCard\(a\) : ''/); -}); - -test('the facts card leaves out who made it (it is under the title)', () => { - assert.doesNotMatch(fn(app, 'gameRail'), /t\('By'\)/); -}); diff --git a/ui/app.css b/ui/app.css index ff97c2c8..845d3313 100644 --- a/ui/app.css +++ b/ui/app.css @@ -2507,8 +2507,8 @@ body.light .su-req-tag{color:#8a5300} body.light .su-req{color:#8a5300} .su-new{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:99px;background:var(--cyan);color:#04161b;font-size:10.5px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;vertical-align:1px} /* Set Up Again beside Play: a dot while its project has options the player hasn't answered yet. */ -.btn.again{position:relative} -.btn.again.has-new::after{content:"";position:absolute;top:9px;right:9px;width:9px;height:9px;border-radius:50%;background:var(--cyan);box-shadow:0 0 0 2px rgba(8,14,26,.9),0 0 10px rgba(52,242,232,.7)} +.btn.has-new{position:relative} +.btn.has-new::after{content:"";position:absolute;top:9px;right:9px;width:9px;height:9px;border-radius:50%;background:var(--cyan);box-shadow:0 0 0 2px rgba(8,14,26,.9),0 0 10px rgba(52,242,232,.7)} .mig-welcome{margin:4px 0 16px;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px} .mig-welcome li{padding:10px 14px 10px 16px;border-radius:12px;background:var(--fill);border:1px solid var(--line);border-left:3px solid var(--cyan);font-size:13.5px} diff --git a/ui/app.js b/ui/app.js index a17ed323..b63f21b6 100644 --- a/ui/app.js +++ b/ui/app.js @@ -1179,16 +1179,14 @@ const canPause = (id) => { const j = S.jobs[id]; return !!j && !j.plug && (j.pha // The main button for a game, whatever state it's in. function actions(a, size = 'big') { - const st = status(a), id = esc(a.id), sq = size === 'big' ? 'btn sq glass' : 'btn sq sm', more = ``; + const st = status(a), id = esc(a.id), sq = size === 'big' ? 'btn sq glass' : 'btn sq sm'; + // Setup Options is in the "…" menu. While the game's project has options the player hasn't + // answered yet, the "…" button has a dot, and says how many. + const asks = size === 'big' && !!S.library[a.id] && canSetUpAgain(a.id); + const fresh = asks ? newPrepOpts(S.setup[a.id]).length : 0; + const tip = fresh ? `${t('More')} · ${tn(fresh, '1 new option', '{n} new options')}` : t('More'); + const more = ``; const b = (cls, act, label, icon = '') => ``; - // Set Up Again beside Play on its page, with a dot while its project has options the player - // hasn't answered yet. Only the states with Play ask for it. - const again = () => { - if (size !== 'big' || !canSetUpAgain(a.id)) return ''; - const fresh = newPrepOpts(S.setup[a.id]).length; - const tip = fresh ? `${t('Set Up Again')} · ${tn(fresh, '1 new option', '{n} new options')}` : t('Set Up Again'); - return ``; - }; switch (st) { case 'running': return b('main', 'resume', esc(t('Back to the game')), PLAY) + b('', 'stop', esc(t('Close game'))) + more; case 'settingup': { @@ -1203,8 +1201,8 @@ function actions(a, size = 'big') { } case 'busy': return progress(a.id) + (canPause(a.id) ? `` : '') + ``; case 'paused': return progress(a.id) + `` + (size === 'big' ? more : ''); - case 'update': return b('main', 'install', esc(t('Update')), DOWN) + b('', 'play', esc(t('Play')), PLAY) + again() + more; - case 'installed': return setupDue(a) ? b('main warn', 'setupreq', esc(t('Set Up')), WRENCH) + more : easyNotReady(a.id) ? b('main', 'setup', esc(t('Set up')), DISC_S.replace(/14/g, '18')) + more : isServer(a) ? b('main', 'play', esc(t('Start Server')), PLAY) + again() + more : size === 'big' && otherInstalled(a).length ? `${b('main', 'play', esc(t('Play')), PLAY)}` + again() + more : b('main', 'play', esc(t('Play')), PLAY) + again() + more; + case 'update': return b('main', 'install', esc(t('Update')), DOWN) + b('', 'play', esc(t('Play')), PLAY) + more; + case 'installed': return setupDue(a) ? b('main warn', 'setupreq', esc(t('Set Up')), WRENCH) + more : easyNotReady(a.id) ? b('main', 'setup', esc(t('Set up')), DISC_S.replace(/14/g, '18')) + more : isServer(a) ? b('main', 'play', esc(t('Start Server')), PLAY) + more : size === 'big' && otherInstalled(a).length ? `${b('main', 'play', esc(t('Play')), PLAY)}` + more : b('main', 'play', esc(t('Play')), PLAY) + more; case 'soon': return (a.custom ? `` : notifyOn(a.id) ? b('notify-on', 'notify', esc(t('We\'ll Email You')), BELL(18)) : b('main', 'notify', esc(t('Notify Me')), BELL(18))) + more; case 'nobuild': return S.os === 'linux' && hasWindowsBuild(a) ? b('main', 'use-proton', esc(t('Play With Proton')), PLAY) + more : `` + more; // Easy Setup games say so: one press installs it and asks for the player's copy. @@ -5656,6 +5654,14 @@ const MI = { star: '', disc: '', layers: '', + apps: '', + wrench: '', + // The sites' own logos (Simple Icons, CC0), filled rather than drawn in lines. + github: '', + gitlab: '', + sourceforge: '', + forgejo: '', + x: '', }; // A menu at a button or the pointer. An item with `sub` opens its group in the same spot, with a // Back row at the top, so the menu stays short. @@ -5859,48 +5865,71 @@ function easySkipItem(id) { } // The same menu wherever a game is: its "…" button, or a right-click on its tile. It holds what no // tab of the game's page has: settings live in its Manage tab, saves in Saves, releases in Updates. -// Uninstall is the one exception: players expect it on a right-click in their Library. +// Uninstall is the one exception: players expect it on a right-click in their Library. Play isn't +// here: it's the big button on the page and on the tile. function gameMenu(id) { const g = S.library[id], x = byId(id), st = x ? status(x) : g ? 'installed' : 'get'; const first = st === 'running' ? { act: 'stop', id, label: t('Close game'), icon: 'stop' } : st === 'settingup' ? { act: 'setup-cancel', id, label: t('Cancel Setup'), icon: 'stop' } - : g ? { act: 'play', id, label: t('Play'), icon: 'play' } + : g ? null : st === 'get' ? (isSaved(id) ? { act: 'install', id, label: x && turnkey(x) ? t('Easy Install') : t('Install'), icon: x && turnkey(x) ? 'disc' : 'down' } : { act: 'addlib', id, label: t('Add to Library'), icon: 'plus' }) : null; const pinned = pins().includes(id); + // Before it's installed: its project page and where to report, under the rest. + const links = [...projectItem(x), ...devReportItem(x)]; + // Setup Options says how many new options its project added (the "…" button has a dot then). + const fresh = newPrepOpts(S.setup[id]).length; + const setupLabel = fresh ? `${t('Setup Options…')} · ${tn(fresh, '1 new option', '{n} new options')}` : t('Setup Options…'); return [ ...(first ? [first] : []), ...(!g && st === 'get' && !isSaved(id) ? [{ act: 'install', id, label: t('Add and Install'), icon: 'down' }] : []), ...(g && S.updates[id] ? [{ act: 'install', id, label: t('Update'), icon: 'down' }] : []), ...(S.view !== 'game' || S.arg !== id ? [{ act: 'open', id, label: t('Game page'), icon: 'page' }] : []), { act: 'pin', id, label: pinned ? t('Unpin from the sidebar') : t('Pin to the sidebar'), icon: 'pin' }, - ...(g ? [{ act: 'fav', id, label: favs().includes(id) ? t('Remove from Favorites') : t('Add to Favorites'), icon: 'star' }] : []), ...(!g && isSaved(id) ? [{ act: 'unsave', id, label: t('Remove from Library'), icon: 'bin' }] : []), ...(x && !x.custom ? [isHidden(id) ? { act: 'unhide', id, label: t('Show in Discover'), icon: 'hide' } : { act: 'hide', id, label: t('Hide from Discover'), icon: 'hide' }] : []), // Its own pictures and words before it's installed too (they stay when it is). - ...(!g && x ? [{ act: 'customize', id, label: t('Customize…'), icon: 'shot' }] : []), + ...(!g && x ? [{ act: 'customize', id, label: t('Edit Name and Artwork…'), icon: 'shot' }] : []), ...(!g ? easySkipItem(id) : []), ...(g ? ['-', - { act: 'customize', id, label: t('Customize…'), icon: 'shot' }, + { act: 'customize', id, label: t('Edit Name and Artwork…'), icon: 'shot' }, ...(x && x.custom ? [{ act: 'edit-info', id, label: t('Edit Game Info…'), icon: 'page' }] : []), + ...(canSetUpAgain(id) ? [{ act: 'setup', id, label: setupLabel, icon: 'disc' }] : []), { label: t('Add To'), icon: 'plus', sub: [ { act: 'desktop', id, label: t('Add to desktop'), icon: 'desk' }, - ...(S.os === 'windows' || S.os === 'linux' ? [{ act: 'app-menu', id, label: S.os === 'windows' ? t('Add to Start Menu') : t('Add to App Menu'), icon: 'desk' }] : []), + ...(S.os === 'windows' || S.os === 'linux' ? [{ act: 'app-menu', id, label: S.os === 'windows' ? t('Add to Start Menu') : t('Add to App Menu'), icon: 'apps' }] : []), ...(S.steam ? [{ act: 'steam', id, label: t('Add to Steam'), icon: 'steam' }] : []), + { act: 'fav', id, label: favs().includes(id) ? t('Remove from Favorites') : t('Add to Favorites'), icon: 'star' }, ] }, - ...repoItem(x), + ...projectItem(x), ...(window.pluginMenu ? window.pluginMenu(id) : []), '-', - { act: 'troubleshoot', id, label: t('Troubleshoot…'), icon: 'info' }, - { act: 'report', id, label: t('Report a Problem…'), icon: 'page' }, - ] : x && x.repo ? ['-', ...repoItem(x)] : []), + { label: t('Troubleshoot'), icon: 'wrench', sub: [ + { act: 'troubleshoot', id, label: t('Check What\'s Wrong…'), icon: 'info' }, + { act: 'report', id, label: t('Report to RecompLauncher…'), icon: 'page' }, + ...devReportItem(x), + ] }, + ] : links.length ? ['-', ...links] : []), ...(g ? ['-', { act: 'uninstall', id, label: t('Uninstall…'), cls: 'danger', icon: 'bin' }] : []), ]; } -// Its project page, one row: its README is on Overview, its releases on Updates. -function repoItem(x) { +// Its project page, one row with the site's logo: its README is on Overview, its releases on +// Updates. A Coming Soon entry with no project yet links where to follow it instead. +function projectItem(x) { + if (!x) return []; + if (!x.repo) { + const f = followLink(x); + return f ? [{ act: 'url', url: f, label: followLabel(f), icon: onX(f) ? 'x' : 'web' }] : []; + } + if (isSF(x.repo)) return [{ act: 'url', url: repoHome(x.repo), label: t('On SourceForge'), icon: 'sourceforge' }]; + if (isFJ(x.repo)) return [{ act: 'url', url: repoHome(x.repo), label: tf('On {host}', { host: fjServer(x.repo) }), icon: 'forgejo' }]; + if (isLab(x.repo)) return [{ act: 'url', url: repoHome(x.repo), label: t('On GitLab'), icon: 'gitlab' }]; + return [{ act: 'url', url: repoHome(x.repo), label: t('On GitHub'), icon: 'github' }]; +} +// A new issue on its project's own page, for the recomp's developer (the catalog can name another +// page). Report to RecompLauncher is the launcher's own form. +function devReportItem(x) { if (!x || !x.repo) return []; - const label = isSF(x.repo) ? t('On SourceForge') : isFJ(x.repo) ? tf('On {host}', { host: fjServer(x.repo) }) : isLab(x.repo) ? t('On GitLab') : t('On GitHub'); - return [{ act: 'url', url: repoHome(x.repo), label, icon: 'web' }]; + return [{ act: 'url', url: reportUrl(x), label: t('Report to the Game\'s Developer'), icon: 'page' }]; } // The game's folder is its own, right inside one of the libraries (so the launcher may delete it). From f780c882be8dba49e8982a267ca04e646c7f0c2c Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 20:20:15 +0200 Subject: [PATCH 08/25] New setup options: a dot on Setup Options and on the Extras step The menu row has a dot on its right instead of saying how many, and the setup window's Extras step has one too, where the option says New. The last places that said Set Up Again say Setup Options. --- tests/manage-tab.test.cjs | 20 +++++++++++++++++++- ui/app.css | 2 ++ ui/app.js | 15 +++++++++------ ui/setup-steps.js | 11 ++++++----- ui/tv.css | 2 +- 5 files changed, 37 insertions(+), 13 deletions(-) diff --git a/tests/manage-tab.test.cjs b/tests/manage-tab.test.cjs index e585f467..7466f46f 100644 --- a/tests/manage-tab.test.cjs +++ b/tests/manage-tab.test.cjs @@ -60,7 +60,7 @@ test('Troubleshoot holds the checker and both ways to report', () => { }); test('Set Up Again is Setup Options in the menu, not a button beside Play', () => { - assert.match(fn(app, 'gameMenu'), /canSetUpAgain\(id\) \? \[\{ act: 'setup', id, label: setupLabel, icon: 'disc' \}\]/); + assert.match(fn(app, 'gameMenu'), /canSetUpAgain\(id\) \? \[\{ act: 'setup', id, label: t\('Setup Options…'\), icon: 'disc', dot: newOpts \}\]/); assert.doesNotMatch(fn(app, 'actions'), /again/); }); @@ -68,6 +68,24 @@ test('new setup options put a dot on the "…" button', () => { assert.match(fn(app, 'actions'), /class="\$\{sq\}\$\{fresh \? ' has-new' : ''\}" data-act="menu"/); }); +// The menu's rows as HTML, with the helpers they use. +const rows = (items) => new Function('t', 'esc', 'MI', 'CHECK', 'M_CHEV', `${fn(app, 'menuRows')}; return menuRows;`)(same, same, {}, '✓', '›')(items); + +test('a menu row with something new has a dot on its right, and says it to screen readers', () => { + const html = rows([{ act: 'setup', id: 'g', label: 'Setup Options…', dot: '1 new option' }]); + assert.match(html, /aria-label="Setup Options… · 1 new option">Setup Options…
`); if (S.easy.has(id)) { const copy = typeof inst.game_copy === 'string' ? inst.game_copy : t('Easy Setup builds the game from it.'); - rows.push(`
${esc(t('Your Copy'))}${esc(copy)}
`); + // Relink uses the files it was set up with again: only once there are some. + const setUpBefore = !!inst.game_copy || !!(su && (su.previous || []).length); + const relink = setUpBefore ? `` : ''; + rows.push(`
${esc(t('Your Copy'))}${esc(copy)}
${relink}
`); } if (su && (su.own_build || su.build_dir)) { const sub = su.build_dir ? String(su.build_dir) : t('Point it at a build of the game you already made.'); From 69617fd6686f93fc05d3cc5f5edfe865dbd22ec9 Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 22:24:05 +0200 Subject: [PATCH 22/25] The favorite star on a Library tile has a dark edge, so it reads on light covers --- ui/app.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/app.css b/ui/app.css index 91050173..d9e9430d 100644 --- a/ui/app.css +++ b/ui/app.css @@ -1357,7 +1357,9 @@ body.away .slide>.bg,body.unfocused .slide>.bg{transition:none} .badge.vers svg{color:var(--cyan)} /* A favourite in the Library: a plain gold star, bottom right (the versions count is never on those tiles) */ .badge.fav{top:auto;bottom:9px;right:9px;height:auto;padding:0;border:0;background:none;backdrop-filter:none;color:#ffc94d;filter:drop-shadow(0 1px 3px rgba(0,0,0,.85))} -.badge.fav svg{width:17px;height:17px} +.badge.fav svg{width:18px;height:18px;overflow:visible} +/* A dark edge so the star reads on light covers too (still no box around it) */ +.badge.fav svg path{stroke:rgba(6,11,21,.9);stroke-width:2.6px;stroke-linejoin:round;paint-order:stroke} .ver-pill{align-self:flex-start;display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 12px 0 11px;border-radius:17px;background:rgba(6,11,21,.55);backdrop-filter:blur(10px);border:1px solid var(--line2);font-size:13px;font-weight:700;color:var(--ink);transition:border-color .15s,background-color .15s} .ver-pill:hover,.ver-pill[aria-expanded="true"]{border-color:rgba(52,242,232,.5);background:rgba(6,11,21,.75)} .ver-pill>svg:first-child{color:var(--cyan)} From 7a73c42166ccea621c50ee10065cda0e4a1c44ce Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 22:52:10 +0200 Subject: [PATCH 23/25] No Relink Setup or Use Them Again: the setup window already fills in last time's files --- tests/beta51.test.cjs | 14 +++++++++----- tests/manage-tab.test.cjs | 18 +++++++++++++++--- ui/app.js | 12 +----------- ui/i18n/ar.json | 3 --- ui/i18n/de.json | 3 --- ui/i18n/es-419.json | 3 --- ui/i18n/es.json | 3 --- ui/i18n/fr-CA.json | 3 --- ui/i18n/fr.json | 3 --- ui/i18n/id.json | 3 --- ui/i18n/it.json | 3 --- ui/i18n/ja.json | 3 --- ui/i18n/ko.json | 3 --- ui/i18n/nl.json | 3 --- ui/i18n/pl.json | 3 --- ui/i18n/pt-BR.json | 3 --- ui/i18n/pt.json | 3 --- ui/i18n/ru.json | 3 --- ui/i18n/th.json | 3 --- ui/i18n/tr.json | 3 --- ui/i18n/uk.json | 3 --- ui/i18n/vi.json | 3 --- ui/i18n/zh-Hans.json | 3 --- ui/i18n/zh-Hant.json | 3 --- ui/setup-inputs.js | 19 ------------------- ui/setup-steps.js | 14 +------------- 26 files changed, 26 insertions(+), 114 deletions(-) diff --git a/tests/beta51.test.cjs b/tests/beta51.test.cjs index 16705db1..75bf8eff 100644 --- a/tests/beta51.test.cjs +++ b/tests/beta51.test.cjs @@ -60,16 +60,20 @@ test('reports need an account: signed out, the sign-in prompt instead of a quest assert.equal(c.needSignIn(new Error('Something else')), null); }); -test('the files from before and the build on this PC are offered under the game\'s box', () => { +test('the build on this PC is offered under the game\'s box', () => { const { stepsContext } = require('./steps-context.cjs'); const c = stepsContext(); const su = (x) => Object.assign({ needs: 'x', kind: '', inputs: [{ id: 'base', label: 'Base', role: 'game', file: true, active: true, path: null }], prepare_options: [] }, x); - assert.match(c.stepsView('h', su({ previous: ['Base.nsp', 'Update.nsp'], inputs_ready: false }), {}, { name: 'H' }), /Set up before with Base\.nsp · Update\.nsp\.
`); if (S.easy.has(id)) { const copy = typeof inst.game_copy === 'string' ? inst.game_copy : t('Easy Setup builds the game from it.'); - // Relink uses the files it was set up with again: only once there are some. - const setUpBefore = !!inst.game_copy || !!(su && (su.previous || []).length); - const relink = setUpBefore ? `` : ''; - rows.push(`
${esc(t('Your Copy'))}${esc(copy)}
${relink}
`); + rows.push(`
${esc(t('Your Copy'))}${esc(copy)}
`); } if (su && (su.own_build || su.build_dir)) { const sub = su.build_dir ? String(su.build_dir) : t('Point it at a build of the game you already made.'); @@ -8366,13 +8363,6 @@ async function act(el, e) { case 'recomp-req': return requestModal(); case 'setup': return setupModal(id); case 'rep-only': S.repOnly = Object.assign(S.repOnly || {}, { [id]: !!el.dataset.on }); return refreshGame(); - case 'relink': { - // The files it was set up with, checked and used again; one that moved opens the setup. - let r; - try { await loadSetup(id); r = await relinkSetup(id); } catch (e) { return fail(e); } - if (r === 'ready') { toast(tf('{name} is set up again with your files.', { name: (byId(id) || S.library[id] || {}).name || id })); if (S.view === 'game') refreshGame(); return; } - return setupModal(id); - } case 'reopen-setup': return setupModal(id); case 'setup-cancel': { invoke('setup_cancel', { id }).catch(() => {}); diff --git a/ui/i18n/ar.json b/ui/i18n/ar.json index a7f9ac05..097d7fb4 100644 --- a/ui/i18n/ar.json +++ b/ui/i18n/ar.json @@ -3247,7 +3247,6 @@ "No reports for this version yet.": "لا تقارير عن هذا الإصدار بعد.", "Not verified": "غير موثّق", "Pick the folder for each new game when you install it, Easy Install too. Off: new games go to the default library.": "اختر مجلد كل لعبة جديدة عند تثبيتها، والتثبيت السهل أيضًا. عند الإيقاف: تذهب الألعاب الجديدة إلى المكتبة الافتراضية.", - "Relink Setup": "إعادة ربط الإعداد", "Reports": "التقارير", "Scan It Online": "افحصه عبر الإنترنت", "Scanned before release and checked by the RecompStore team.": "فُحص قبل النشر وراجعه فريق RecompStore.", @@ -3263,9 +3262,7 @@ "Verified update": "تحديث موثّق", "Your name isn't shown with your report.": "لا يظهر اسمك مع تقريرك.", "Your previous setup": "إعدادك السابق", - "{file} isn't where it was. Pick it again, then press Set Up.": "لم يعد {file} في مكانه. اختره من جديد، ثم اضغط إعداد.", "{file} isn't where it was. Pick it again.": "لم يعد {file} في مكانه. اختره من جديد.", - "{name} is set up again with your files.": "أُعدّت {name} من جديد بملفاتك.", "{n} reports so far": "تقريران حتى الآن|{n} تقارير حتى الآن|{n} تقريرًا حتى الآن|{n} تقرير حتى الآن", "{v}: no reports yet": "{v}: لا تقارير بعد", "A strip across the top of each cover with its console, like the band on a real game box.": "شريط أعلى كل غلاف يحمل اسم منصته، مثل الشريط على علبة لعبة حقيقية.", diff --git a/ui/i18n/de.json b/ui/i18n/de.json index 9c8ee083..6dc75a3f 100644 --- a/ui/i18n/de.json +++ b/ui/i18n/de.json @@ -3247,7 +3247,6 @@ "No reports for this version yet.": "Noch keine Berichte zu dieser Version.", "Not verified": "Nicht verifiziert", "Pick the folder for each new game when you install it, Easy Install too. Off: new games go to the default library.": "Wähle bei jeder Installation den Ordner für das neue Spiel, auch bei Einfach installieren. Aus: Neue Spiele kommen in die Standardbibliothek.", - "Relink Setup": "Einrichtung neu verknüpfen", "Reports": "Berichte", "Scan It Online": "Online prüfen", "Scanned before release and checked by the RecompStore team.": "Vor der Veröffentlichung gescannt und vom RecompStore-Team geprüft.", @@ -3263,9 +3262,7 @@ "Verified update": "Verifiziertes Update", "Your name isn't shown with your report.": "Dein Name wird mit deinem Bericht nicht angezeigt.", "Your previous setup": "Deine vorherige Einrichtung", - "{file} isn't where it was. Pick it again, then press Set Up.": "{file} ist nicht mehr da, wo es war. Wähle es neu und drücke dann Einrichten.", "{file} isn't where it was. Pick it again.": "{file} ist nicht mehr da, wo es war. Wähle es neu.", - "{name} is set up again with your files.": "{name} ist wieder mit deinen Dateien eingerichtet.", "{n} reports so far": "{n} Berichte bisher", "{v}: no reports yet": "{v}: noch keine Berichte", "A strip across the top of each cover with its console, like the band on a real game box.": "Ein Streifen oben auf jedem Cover mit seiner Konsole, wie das Band auf einer echten Spielhülle.", diff --git a/ui/i18n/es-419.json b/ui/i18n/es-419.json index d6ddd62f..fb06e803 100644 --- a/ui/i18n/es-419.json +++ b/ui/i18n/es-419.json @@ -3247,7 +3247,6 @@ "No reports for this version yet.": "Aún no hay informes de esta versión.", "Not verified": "No verificado", "Pick the folder for each new game when you install it, Easy Install too. Off: new games go to the default library.": "Elige la carpeta de cada juego nuevo al instalarlo, también con Instalación fácil. Desactivado: los juegos nuevos van a la biblioteca predeterminada.", - "Relink Setup": "Volver a Vincular la Configuración", "Reports": "Informes", "Scan It Online": "Analizarlo en Línea", "Scanned before release and checked by the RecompStore team.": "Analizado antes de publicarse y revisado por el equipo de RecompStore.", @@ -3263,9 +3262,7 @@ "Verified update": "Actualización verificada", "Your name isn't shown with your report.": "Tu nombre no se muestra con tu informe.", "Your previous setup": "Tu configuración anterior", - "{file} isn't where it was. Pick it again, then press Set Up.": "{file} no está donde estaba. Elígelo de nuevo y pulsa Configurar.", "{file} isn't where it was. Pick it again.": "{file} no está donde estaba. Elígelo de nuevo.", - "{name} is set up again with your files.": "{name} vuelve a estar configurado con tus archivos.", "{n} reports so far": "{n} informes hasta ahora", "{v}: no reports yet": "{v}: aún no hay informes", "A strip across the top of each cover with its console, like the band on a real game box.": "Una franja en la parte de arriba de cada portada con su consola, como la banda de una caja de juego real.", diff --git a/ui/i18n/es.json b/ui/i18n/es.json index 9d6c20d7..2798ae3b 100644 --- a/ui/i18n/es.json +++ b/ui/i18n/es.json @@ -3247,7 +3247,6 @@ "No reports for this version yet.": "Aún no hay informes de esta versión.", "Not verified": "No verificado", "Pick the folder for each new game when you install it, Easy Install too. Off: new games go to the default library.": "Elige la carpeta de cada juego nuevo al instalarlo, también con Instalación fácil. Desactivado: los juegos nuevos van a la biblioteca predeterminada.", - "Relink Setup": "Volver a Vincular la Configuración", "Reports": "Informes", "Scan It Online": "Analizarlo en Línea", "Scanned before release and checked by the RecompStore team.": "Analizado antes de publicarse y revisado por el equipo de RecompStore.", @@ -3263,9 +3262,7 @@ "Verified update": "Actualización verificada", "Your name isn't shown with your report.": "Tu nombre no se muestra con tu informe.", "Your previous setup": "Tu configuración anterior", - "{file} isn't where it was. Pick it again, then press Set Up.": "{file} no está donde estaba. Elígelo de nuevo y pulsa Configurar.", "{file} isn't where it was. Pick it again.": "{file} no está donde estaba. Elígelo de nuevo.", - "{name} is set up again with your files.": "{name} vuelve a estar configurado con tus archivos.", "{n} reports so far": "{n} informes hasta ahora", "{v}: no reports yet": "{v}: aún no hay informes", "A strip across the top of each cover with its console, like the band on a real game box.": "Una franja en la parte superior de cada portada con su consola, como la banda de una caja de juego real.", diff --git a/ui/i18n/fr-CA.json b/ui/i18n/fr-CA.json index 4bbc0f92..9f0e79db 100644 --- a/ui/i18n/fr-CA.json +++ b/ui/i18n/fr-CA.json @@ -1379,7 +1379,6 @@ "No reports for this version yet.": "Aucun rapport pour cette version pour l’instant.", "Not verified": "Non vérifiée", "Pick the folder for each new game when you install it, Easy Install too. Off: new games go to the default library.": "Choisissez le dossier de chaque nouveau jeu à son installation, Installation facile comprise. Désactivé: les nouveaux jeux vont dans la bibliothèque par défaut.", - "Relink Setup": "Relier la Configuration", "Reports": "Rapports", "Scan It Online": "L’analyser en Ligne", "Scanned before release and checked by the RecompStore team.": "Analysée avant sa sortie et vérifiée par l’équipe RecompStore.", @@ -1395,9 +1394,7 @@ "Verified update": "Mise à jour vérifiée", "Your name isn't shown with your report.": "Votre nom n’est pas affiché avec votre rapport.", "Your previous setup": "Votre configuration précédente", - "{file} isn't where it was. Pick it again, then press Set Up.": "{file} n’est plus là où il était. Choisissez-le à nouveau, puis appuyez sur Configurer.", "{file} isn't where it was. Pick it again.": "{file} n’est plus là où il était. Choisissez-le à nouveau.", - "{name} is set up again with your files.": "{name} est de nouveau configuré avec vos fichiers.", "{n} reports so far": "{n} rapports pour l’instant", "{v}: no reports yet": "{v}: aucun rapport pour l’instant", "A strip across the top of each cover with its console, like the band on a real game box.": "Un bandeau en haut de chaque jaquette avec sa console, comme sur une vraie boîte de jeu.", diff --git a/ui/i18n/fr.json b/ui/i18n/fr.json index 6061d187..5f26fb93 100644 --- a/ui/i18n/fr.json +++ b/ui/i18n/fr.json @@ -3247,7 +3247,6 @@ "No reports for this version yet.": "Aucun rapport pour cette version pour l’instant.", "Not verified": "Non vérifiée", "Pick the folder for each new game when you install it, Easy Install too. Off: new games go to the default library.": "Choisissez le dossier de chaque nouveau jeu à son installation, Installation facile comprise. Désactivé : les nouveaux jeux vont dans la bibliothèque par défaut.", - "Relink Setup": "Relier la Configuration", "Reports": "Rapports", "Scan It Online": "L’analyser en Ligne", "Scanned before release and checked by the RecompStore team.": "Analysée avant sa sortie et vérifiée par l’équipe RecompStore.", @@ -3263,9 +3262,7 @@ "Verified update": "Mise à jour vérifiée", "Your name isn't shown with your report.": "Votre nom n’est pas affiché avec votre rapport.", "Your previous setup": "Votre configuration précédente", - "{file} isn't where it was. Pick it again, then press Set Up.": "{file} n’est plus là où il était. Choisissez-le à nouveau, puis appuyez sur Configurer.", "{file} isn't where it was. Pick it again.": "{file} n’est plus là où il était. Choisissez-le à nouveau.", - "{name} is set up again with your files.": "{name} est de nouveau configuré avec vos fichiers.", "{n} reports so far": "{n} rapports pour l’instant", "{v}: no reports yet": "{v} : aucun rapport pour l’instant", "A strip across the top of each cover with its console, like the band on a real game box.": "Un bandeau en haut de chaque jaquette avec sa console, comme sur une vraie boîte de jeu.", diff --git a/ui/i18n/id.json b/ui/i18n/id.json index 23a62bb8..66396927 100644 --- a/ui/i18n/id.json +++ b/ui/i18n/id.json @@ -3247,7 +3247,6 @@ "No reports for this version yet.": "Belum ada laporan untuk versi ini.", "Not verified": "Belum terverifikasi", "Pick the folder for each new game when you install it, Easy Install too. Off: new games go to the default library.": "Pilih folder untuk setiap game baru saat memasangnya, termasuk Pasang Mudah. Mati: game baru masuk ke pustaka bawaan.", - "Relink Setup": "Tautkan Ulang Penyiapan", "Reports": "Laporan", "Scan It Online": "Pindai Online", "Scanned before release and checked by the RecompStore team.": "Dipindai sebelum dirilis dan diperiksa tim RecompStore.", @@ -3263,9 +3262,7 @@ "Verified update": "Pembaruan terverifikasi", "Your name isn't shown with your report.": "Namamu tidak ditampilkan bersama laporanmu.", "Your previous setup": "Penyiapan sebelumnya", - "{file} isn't where it was. Pick it again, then press Set Up.": "{file} tidak ada di tempatnya. Pilih lagi, lalu tekan Siapkan.", "{file} isn't where it was. Pick it again.": "{file} tidak ada di tempatnya. Pilih lagi.", - "{name} is set up again with your files.": "{name} sudah disiapkan lagi dengan file-filemu.", "{n} reports so far": "Sejauh ini {n} laporan", "{v}: no reports yet": "{v}: belum ada laporan", "A strip across the top of each cover with its console, like the band on a real game box.": "Strip di atas setiap sampul dengan konsolnya, seperti pita di kotak game asli.", diff --git a/ui/i18n/it.json b/ui/i18n/it.json index 68b625d1..f54d2845 100644 --- a/ui/i18n/it.json +++ b/ui/i18n/it.json @@ -3247,7 +3247,6 @@ "No reports for this version yet.": "Ancora nessuna segnalazione per questa versione.", "Not verified": "Non verificato", "Pick the folder for each new game when you install it, Easy Install too. Off: new games go to the default library.": "Scegli la cartella di ogni nuovo gioco quando lo installi, anche con Installazione facile. Disattivato: i nuovi giochi vanno nella libreria predefinita.", - "Relink Setup": "Ricollega la Configurazione", "Reports": "Segnalazioni", "Scan It Online": "Scansiona Online", "Scanned before release and checked by the RecompStore team.": "Scansionato prima dell’uscita e controllato dal team di RecompStore.", @@ -3263,9 +3262,7 @@ "Verified update": "Aggiornamento verificato", "Your name isn't shown with your report.": "Il tuo nome non viene mostrato con la tua segnalazione.", "Your previous setup": "La tua configurazione precedente", - "{file} isn't where it was. Pick it again, then press Set Up.": "{file} non è più dov’era. Sceglilo di nuovo, poi premi Configura.", "{file} isn't where it was. Pick it again.": "{file} non è più dov’era. Sceglilo di nuovo.", - "{name} is set up again with your files.": "{name} è di nuovo configurato con i tuoi file.", "{n} reports so far": "{n} segnalazioni finora", "{v}: no reports yet": "{v}: ancora nessuna segnalazione", "A strip across the top of each cover with its console, like the band on a real game box.": "Una striscia in cima a ogni copertina con la sua console, come la fascia di una vera custodia.", diff --git a/ui/i18n/ja.json b/ui/i18n/ja.json index a29602ff..14a30762 100644 --- a/ui/i18n/ja.json +++ b/ui/i18n/ja.json @@ -3247,7 +3247,6 @@ "No reports for this version yet.": "このバージョンのレポートはまだありません。", "Not verified": "未確認", "Pick the folder for each new game when you install it, Easy Install too. Off: new games go to the default library.": "新しいゲームをインストールするたびにフォルダーを選びます。かんたんインストールでも同じです。オフ: 新しいゲームは既定のライブラリに入ります。", - "Relink Setup": "セットアップを再リンク", "Reports": "レポート", "Scan It Online": "オンラインでスキャン", "Scanned before release and checked by the RecompStore team.": "公開前にスキャンされ、RecompStore チームが確認しました。", @@ -3263,9 +3262,7 @@ "Verified update": "確認済みのアップデート", "Your name isn't shown with your report.": "レポートに名前は表示されません。", "Your previous setup": "前回のセットアップ", - "{file} isn't where it was. Pick it again, then press Set Up.": "{file} が元の場所にありません。選び直してからセットアップを押してください。", "{file} isn't where it was. Pick it again.": "{file} が元の場所にありません。選び直してください。", - "{name} is set up again with your files.": "{name} をあなたのファイルで再セットアップしました。", "{n} reports so far": "これまでに {n} 件のレポート", "{v}: no reports yet": "{v}: まだレポートはありません", "A strip across the top of each cover with its console, like the band on a real game box.": "実際のゲームのパッケージの帯のように、各カバーの上部にゲーム機名の帯を表示します。", diff --git a/ui/i18n/ko.json b/ui/i18n/ko.json index be14ea6c..799d7ce9 100644 --- a/ui/i18n/ko.json +++ b/ui/i18n/ko.json @@ -3247,7 +3247,6 @@ "No reports for this version yet.": "이 버전의 보고가 아직 없습니다.", "Not verified": "확인 안 됨", "Pick the folder for each new game when you install it, Easy Install too. Off: new games go to the default library.": "새 게임을 설치할 때마다 폴더를 고릅니다. 간편 설치도 마찬가지입니다. 끄면 새 게임은 기본 라이브러리에 들어갑니다.", - "Relink Setup": "설정 다시 연결", "Reports": "보고", "Scan It Online": "온라인 검사", "Scanned before release and checked by the RecompStore team.": "출시 전에 검사하고 RecompStore 팀이 확인했습니다.", @@ -3263,9 +3262,7 @@ "Verified update": "확인된 업데이트", "Your name isn't shown with your report.": "보고에 이름은 표시되지 않습니다.", "Your previous setup": "이전 설정", - "{file} isn't where it was. Pick it again, then press Set Up.": "{file}이(가) 원래 자리에 없습니다. 다시 고른 뒤 설정을 누르세요.", "{file} isn't where it was. Pick it again.": "{file}이(가) 원래 자리에 없습니다. 다시 고르세요.", - "{name} is set up again with your files.": "{name}을(를) 파일로 다시 설정했습니다.", "{n} reports so far": "지금까지 보고 {n}개", "{v}: no reports yet": "{v}: 아직 보고 없음", "A strip across the top of each cover with its console, like the band on a real game box.": "실제 게임 케이스의 띠처럼 각 커버 위쪽에 콘솔 이름이 적힌 띠를 표시합니다.", diff --git a/ui/i18n/nl.json b/ui/i18n/nl.json index 451b0676..da9c59d7 100644 --- a/ui/i18n/nl.json +++ b/ui/i18n/nl.json @@ -3247,7 +3247,6 @@ "No reports for this version yet.": "Nog geen meldingen voor deze versie.", "Not verified": "Niet geverifieerd", "Pick the folder for each new game when you install it, Easy Install too. Off: new games go to the default library.": "Kies de map voor elk nieuw spel bij het installeren, ook bij Eenvoudig installeren. Uit: nieuwe spellen gaan naar de standaardbibliotheek.", - "Relink Setup": "Instelling Opnieuw Koppelen", "Reports": "Meldingen", "Scan It Online": "Online Scannen", "Scanned before release and checked by the RecompStore team.": "Gescand voor de release en gecontroleerd door het RecompStore-team.", @@ -3263,9 +3262,7 @@ "Verified update": "Geverifieerde update", "Your name isn't shown with your report.": "Je naam wordt niet getoond bij je melding.", "Your previous setup": "Je vorige instelling", - "{file} isn't where it was. Pick it again, then press Set Up.": "{file} staat niet meer waar het stond. Kies het opnieuw en druk dan op Instellen.", "{file} isn't where it was. Pick it again.": "{file} staat niet meer waar het stond. Kies het opnieuw.", - "{name} is set up again with your files.": "{name} is weer ingesteld met je bestanden.", "{n} reports so far": "{n} meldingen tot nu toe", "{v}: no reports yet": "{v}: nog geen meldingen", "A strip across the top of each cover with its console, like the band on a real game box.": "Een strook bovenaan elke cover met de console, zoals de band op een echt spelhoesje.", diff --git a/ui/i18n/pl.json b/ui/i18n/pl.json index ff81e37b..bf684c52 100644 --- a/ui/i18n/pl.json +++ b/ui/i18n/pl.json @@ -3247,7 +3247,6 @@ "No reports for this version yet.": "Brak zgłoszeń dla tej wersji.", "Not verified": "Niezweryfikowane", "Pick the folder for each new game when you install it, Easy Install too. Off: new games go to the default library.": "Wybieraj folder dla każdej nowej gry przy instalacji, także przy łatwej instalacji. Wyłączone: nowe gry trafiają do domyślnej biblioteki.", - "Relink Setup": "Połącz Konfigurację Ponownie", "Reports": "Zgłoszenia", "Scan It Online": "Przeskanuj Online", "Scanned before release and checked by the RecompStore team.": "Przeskanowane przed wydaniem i sprawdzone przez zespół RecompStore.", @@ -3263,9 +3262,7 @@ "Verified update": "Zweryfikowana aktualizacja", "Your name isn't shown with your report.": "Twoja nazwa nie jest pokazywana przy zgłoszeniu.", "Your previous setup": "Twoja poprzednia konfiguracja", - "{file} isn't where it was. Pick it again, then press Set Up.": "{file} nie ma tam, gdzie był. Wybierz go ponownie, a potem naciśnij Skonfiguruj.", "{file} isn't where it was. Pick it again.": "{file} nie ma tam, gdzie był. Wybierz go ponownie.", - "{name} is set up again with your files.": "{name} jest znowu skonfigurowana z twoimi plikami.", "{n} reports so far": "Na razie {n} zgłoszenie|Na razie {n} zgłoszenia|Na razie {n} zgłoszeń", "{v}: no reports yet": "{v}: brak zgłoszeń", "A strip across the top of each cover with its console, like the band on a real game box.": "Pasek u góry każdej okładki z jej konsolą, jak na prawdziwym pudełku z grą.", diff --git a/ui/i18n/pt-BR.json b/ui/i18n/pt-BR.json index 0a9268cd..373da8d2 100644 --- a/ui/i18n/pt-BR.json +++ b/ui/i18n/pt-BR.json @@ -3247,7 +3247,6 @@ "No reports for this version yet.": "Ainda não há relatos desta versão.", "Not verified": "Não verificado", "Pick the folder for each new game when you install it, Easy Install too. Off: new games go to the default library.": "Escolha a pasta de cada jogo novo ao instalar, inclusive na Instalação fácil. Desligado: jogos novos vão para a biblioteca padrão.", - "Relink Setup": "Reconectar a Configuração", "Reports": "Relatos", "Scan It Online": "Verificar Online", "Scanned before release and checked by the RecompStore team.": "Verificado antes do lançamento e conferido pela equipe da RecompStore.", @@ -3263,9 +3262,7 @@ "Verified update": "Atualização verificada", "Your name isn't shown with your report.": "Seu nome não aparece com seu relato.", "Your previous setup": "Sua configuração anterior", - "{file} isn't where it was. Pick it again, then press Set Up.": "{file} não está mais onde estava. Escolha de novo e aperte Configurar.", "{file} isn't where it was. Pick it again.": "{file} não está mais onde estava. Escolha de novo.", - "{name} is set up again with your files.": "{name} está configurado de novo com seus arquivos.", "{n} reports so far": "{n} relatos até agora", "{v}: no reports yet": "{v}: ainda não há relatos", "A strip across the top of each cover with its console, like the band on a real game box.": "Uma faixa no topo de cada capa com o console dela, como a faixa de uma caixa de jogo de verdade.", diff --git a/ui/i18n/pt.json b/ui/i18n/pt.json index 0cff9afd..8aa42854 100644 --- a/ui/i18n/pt.json +++ b/ui/i18n/pt.json @@ -3247,7 +3247,6 @@ "No reports for this version yet.": "Ainda não há relatórios desta versão.", "Not verified": "Não verificado", "Pick the folder for each new game when you install it, Easy Install too. Off: new games go to the default library.": "Escolhe a pasta de cada jogo novo ao instalá-lo, também na Instalação fácil. Desligado: os jogos novos vão para a biblioteca predefinida.", - "Relink Setup": "Voltar a Ligar a Configuração", "Reports": "Relatórios", "Scan It Online": "Analisar Online", "Scanned before release and checked by the RecompStore team.": "Analisado antes do lançamento e verificado pela equipa da RecompStore.", @@ -3263,9 +3262,7 @@ "Verified update": "Atualização verificada", "Your name isn't shown with your report.": "O teu nome não aparece com o teu relatório.", "Your previous setup": "A tua configuração anterior", - "{file} isn't where it was. Pick it again, then press Set Up.": "{file} já não está onde estava. Escolhe-o de novo e carrega em Configurar.", "{file} isn't where it was. Pick it again.": "{file} já não está onde estava. Escolhe-o de novo.", - "{name} is set up again with your files.": "{name} está de novo configurado com os teus ficheiros.", "{n} reports so far": "{n} relatórios até agora", "{v}: no reports yet": "{v}: ainda não há relatórios", "A strip across the top of each cover with its console, like the band on a real game box.": "Uma faixa no topo de cada capa com a sua consola, como a banda de uma caixa de jogo real.", diff --git a/ui/i18n/ru.json b/ui/i18n/ru.json index 8177ee65..4251a401 100644 --- a/ui/i18n/ru.json +++ b/ui/i18n/ru.json @@ -3247,7 +3247,6 @@ "No reports for this version yet.": "Отзывов об этой версии пока нет.", "Not verified": "Не проверено", "Pick the folder for each new game when you install it, Easy Install too. Off: new games go to the default library.": "Выбирайте папку для каждой новой игры при установке, в том числе при простой установке. Выкл.: новые игры попадают в библиотеку по умолчанию.", - "Relink Setup": "Привязать Настройку Заново", "Reports": "Отзывы", "Scan It Online": "Проверить Онлайн", "Scanned before release and checked by the RecompStore team.": "Проверено перед выпуском и одобрено командой RecompStore.", @@ -3263,9 +3262,7 @@ "Verified update": "Проверенное обновление", "Your name isn't shown with your report.": "Ваше имя не показывается рядом с отзывом.", "Your previous setup": "Ваша прежняя настройка", - "{file} isn't where it was. Pick it again, then press Set Up.": "{file} больше нет на прежнем месте. Выберите его снова и нажмите «Настроить».", "{file} isn't where it was. Pick it again.": "{file} больше нет на прежнем месте. Выберите его снова.", - "{name} is set up again with your files.": "{name} снова настроена с вашими файлами.", "{n} reports so far": "Пока {n} отзыв|Пока {n} отзыва|Пока {n} отзывов", "{v}: no reports yet": "{v}: отзывов пока нет", "A strip across the top of each cover with its console, like the band on a real game box.": "Полоса вверху каждой обложки с её консолью, как на настоящей коробке с игрой.", diff --git a/ui/i18n/th.json b/ui/i18n/th.json index 035799d7..29c684af 100644 --- a/ui/i18n/th.json +++ b/ui/i18n/th.json @@ -3247,7 +3247,6 @@ "No reports for this version yet.": "ยังไม่มีรายงานสำหรับเวอร์ชันนี้", "Not verified": "ยังไม่ยืนยัน", "Pick the folder for each new game when you install it, Easy Install too. Off: new games go to the default library.": "เลือกโฟลเดอร์ของเกมใหม่ทุกครั้งที่ติดตั้ง รวมถึงติดตั้งแบบง่าย ปิด: เกมใหม่จะไปที่คลังเริ่มต้น", - "Relink Setup": "เชื่อมการตั้งค่าใหม่", "Reports": "รายงาน", "Scan It Online": "สแกนออนไลน์", "Scanned before release and checked by the RecompStore team.": "สแกนก่อนเผยแพร่และตรวจโดยทีม RecompStore", @@ -3263,9 +3262,7 @@ "Verified update": "อัปเดตที่ยืนยันแล้ว", "Your name isn't shown with your report.": "ชื่อของคุณจะไม่แสดงพร้อมรายงาน", "Your previous setup": "การตั้งค่าก่อนหน้าของคุณ", - "{file} isn't where it was. Pick it again, then press Set Up.": "{file} ไม่อยู่ที่เดิมแล้ว เลือกใหม่ แล้วกดตั้งค่า", "{file} isn't where it was. Pick it again.": "{file} ไม่อยู่ที่เดิมแล้ว เลือกใหม่", - "{name} is set up again with your files.": "{name} ตั้งค่าใหม่ด้วยไฟล์ของคุณแล้ว", "{n} reports so far": "มี {n} รายงานแล้ว", "{v}: no reports yet": "{v}: ยังไม่มีรายงาน", "A strip across the top of each cover with its console, like the band on a real game box.": "แถบด้านบนของปกแต่ละเกมที่บอกเครื่องเล่น เหมือนแถบบนกล่องเกมจริง", diff --git a/ui/i18n/tr.json b/ui/i18n/tr.json index 9cb4c1a2..0f79f40d 100644 --- a/ui/i18n/tr.json +++ b/ui/i18n/tr.json @@ -3247,7 +3247,6 @@ "No reports for this version yet.": "Bu sürüm için henüz rapor yok.", "Not verified": "Doğrulanmadı", "Pick the folder for each new game when you install it, Easy Install too. Off: new games go to the default library.": "Her yeni oyunun klasörünü kurarken seç, Kolay Kurulum dahil. Kapalı: yeni oyunlar varsayılan kitaplığa gider.", - "Relink Setup": "Kurulumu Yeniden Bağla", "Reports": "Raporlar", "Scan It Online": "Çevrimiçi Tara", "Scanned before release and checked by the RecompStore team.": "Yayından önce tarandı ve RecompStore ekibi tarafından kontrol edildi.", @@ -3263,9 +3262,7 @@ "Verified update": "Doğrulanmış güncelleme", "Your name isn't shown with your report.": "Adın raporunla birlikte gösterilmez.", "Your previous setup": "Önceki kurulumun", - "{file} isn't where it was. Pick it again, then press Set Up.": "{file} eski yerinde değil. Yeniden seç ve Kur'a bas.", "{file} isn't where it was. Pick it again.": "{file} eski yerinde değil. Yeniden seç.", - "{name} is set up again with your files.": "{name} dosyalarınla yeniden kuruldu.", "{n} reports so far": "Şimdiye kadar {n} rapor", "{v}: no reports yet": "{v}: henüz rapor yok", "A strip across the top of each cover with its console, like the band on a real game box.": "Her kapağın üstünde, gerçek bir oyun kutusundaki gibi konsolunu gösteren bir şerit.", diff --git a/ui/i18n/uk.json b/ui/i18n/uk.json index 1fcbed36..48e3e893 100644 --- a/ui/i18n/uk.json +++ b/ui/i18n/uk.json @@ -3247,7 +3247,6 @@ "No reports for this version yet.": "Відгуків про цю версію поки немає.", "Not verified": "Не перевірено", "Pick the folder for each new game when you install it, Easy Install too. Off: new games go to the default library.": "Обирайте папку для кожної нової гри під час встановлення, зокрема при простому встановленні. Вимк.: нові ігри потрапляють до бібліотеки за замовчуванням.", - "Relink Setup": "Прив’язати Налаштування Знову", "Reports": "Відгуки", "Scan It Online": "Перевірити Онлайн", "Scanned before release and checked by the RecompStore team.": "Перевірено перед випуском і схвалено командою RecompStore.", @@ -3263,9 +3262,7 @@ "Verified update": "Перевірене оновлення", "Your name isn't shown with your report.": "Ваше ім’я не показується біля відгуку.", "Your previous setup": "Ваше попереднє налаштування", - "{file} isn't where it was. Pick it again, then press Set Up.": "{file} більше немає на попередньому місці. Виберіть його знову й натисніть «Налаштувати».", "{file} isn't where it was. Pick it again.": "{file} більше немає на попередньому місці. Виберіть його знову.", - "{name} is set up again with your files.": "{name} знову налаштована з вашими файлами.", "{n} reports so far": "Поки {n} відгук|Поки {n} відгуки|Поки {n} відгуків", "{v}: no reports yet": "{v}: відгуків поки немає", "A strip across the top of each cover with its console, like the band on a real game box.": "Смуга вгорі кожної обкладинки з її консоллю, як на справжній коробці з грою.", diff --git a/ui/i18n/vi.json b/ui/i18n/vi.json index 09761012..7e9262b6 100644 --- a/ui/i18n/vi.json +++ b/ui/i18n/vi.json @@ -3247,7 +3247,6 @@ "No reports for this version yet.": "Chưa có báo cáo nào cho phiên bản này.", "Not verified": "Chưa xác minh", "Pick the folder for each new game when you install it, Easy Install too. Off: new games go to the default library.": "Chọn thư mục cho mỗi trò chơi mới khi cài, kể cả Cài đặt dễ dàng. Tắt: trò chơi mới vào thư viện mặc định.", - "Relink Setup": "Liên Kết Lại Thiết Lập", "Reports": "Báo cáo", "Scan It Online": "Quét Trực Tuyến", "Scanned before release and checked by the RecompStore team.": "Được quét trước khi phát hành và được đội RecompStore kiểm tra.", @@ -3263,9 +3262,7 @@ "Verified update": "Bản cập nhật đã xác minh", "Your name isn't shown with your report.": "Tên bạn không hiển thị cùng báo cáo.", "Your previous setup": "Thiết lập trước của bạn", - "{file} isn't where it was. Pick it again, then press Set Up.": "{file} không còn ở chỗ cũ. Hãy chọn lại rồi nhấn Thiết lập.", "{file} isn't where it was. Pick it again.": "{file} không còn ở chỗ cũ. Hãy chọn lại.", - "{name} is set up again with your files.": "{name} đã được thiết lập lại với các tệp của bạn.", "{n} reports so far": "Đến nay có {n} báo cáo", "{v}: no reports yet": "{v}: chưa có báo cáo", "A strip across the top of each cover with its console, like the band on a real game box.": "Một dải trên đầu mỗi bìa ghi hệ máy của nó, như dải trên hộp game thật.", diff --git a/ui/i18n/zh-Hans.json b/ui/i18n/zh-Hans.json index ef9dbf05..1c538c7b 100644 --- a/ui/i18n/zh-Hans.json +++ b/ui/i18n/zh-Hans.json @@ -3247,7 +3247,6 @@ "No reports for this version yet.": "这个版本还没有报告。", "Not verified": "未验证", "Pick the folder for each new game when you install it, Easy Install too. Off: new games go to the default library.": "每次安装新游戏时选择文件夹,简易安装也一样。关闭:新游戏装到默认库。", - "Relink Setup": "重新关联配置", "Reports": "报告", "Scan It Online": "在线扫描", "Scanned before release and checked by the RecompStore team.": "发布前已扫描,并由 RecompStore 团队检查。", @@ -3263,9 +3262,7 @@ "Verified update": "已验证的更新", "Your name isn't shown with your report.": "报告不会显示你的名字。", "Your previous setup": "你之前的配置", - "{file} isn't where it was. Pick it again, then press Set Up.": "{file} 不在原来的位置了。请重新选择,然后按配置。", "{file} isn't where it was. Pick it again.": "{file} 不在原来的位置了。请重新选择。", - "{name} is set up again with your files.": "{name} 已用你的文件重新配置。", "{n} reports so far": "目前 {n} 份报告", "{v}: no reports yet": "{v}:还没有报告", "A strip across the top of each cover with its console, like the band on a real game box.": "在每个封面顶部显示其主机的横条,就像真实游戏盒上的那条色带。", diff --git a/ui/i18n/zh-Hant.json b/ui/i18n/zh-Hant.json index 6f6647c4..039d8396 100644 --- a/ui/i18n/zh-Hant.json +++ b/ui/i18n/zh-Hant.json @@ -3247,7 +3247,6 @@ "No reports for this version yet.": "這個版本還沒有回報。", "Not verified": "未驗證", "Pick the folder for each new game when you install it, Easy Install too. Off: new games go to the default library.": "每次安裝新遊戲時選擇資料夾,簡易安裝也一樣。關閉:新遊戲裝到預設遊戲庫。", - "Relink Setup": "重新連結設定", "Reports": "回報", "Scan It Online": "線上掃描", "Scanned before release and checked by the RecompStore team.": "發布前已掃描,並由 RecompStore 團隊檢查。", @@ -3263,9 +3262,7 @@ "Verified update": "已驗證的更新", "Your name isn't shown with your report.": "回報不會顯示你的名字。", "Your previous setup": "你之前的設定", - "{file} isn't where it was. Pick it again, then press Set Up.": "{file} 不在原來的位置了。請重新選擇,然後按設定。", "{file} isn't where it was. Pick it again.": "{file} 不在原來的位置了。請重新選擇。", - "{name} is set up again with your files.": "{name} 已用你的檔案重新設定。", "{n} reports so far": "目前 {n} 份回報", "{v}: no reports yet": "{v}:還沒有回報", "A strip across the top of each cover with its console, like the band on a real game box.": "在每個封面頂端顯示其主機的橫條,就像真實遊戲盒上的那條色帶。", diff --git a/ui/setup-inputs.js b/ui/setup-inputs.js index d42cc957..1626b669 100644 --- a/ui/setup-inputs.js +++ b/ui/setup-inputs.js @@ -36,18 +36,6 @@ async function runtimeFetch(id, ns, redraw) { catch (e) { ns.dlss = { failed: true }; } finally { off(); redraw(); } } -// Use My Previous Setup (Relink): 'ready' when it's set up again, 'build' when the setup step has -// to run, or { input, label } when one file moved and only it is asked for. -async function relinkSetup(id) { - try { await invoke('setup_relink', { id }); S.setup[id] = await invoke('game_setup', { id }); await refreshState(); return 'ready'; } - catch (e) { - const m = String(e && e.message ? e.message : e); - if (m.startsWith('RELINK_BUILD|')) return 'build'; - const x = m.match(/^RELINK_MISSING\|([^|]*)\|(.*)$/); - if (x) return { input: x[1], label: x[2] }; - throw e; - } -} // A build the player already has, anywhere (Use a Build You Already Have): its folder picked, and // used in place of building it again. True when it's set. async function useOwnBuild(id) { @@ -67,13 +55,6 @@ async function namedInputsAction(id, act, input, ns) { try { const su = S.setup[id], row = namedInputRows(su).find((r) => r.id === input); if (act === 'run') return 'run'; - if (act === 'relink') { - const r = await relinkSetup(id); - if (r === 'build') return 'run'; - if (r === 'ready') return 'ready'; - ns.error = tf('{file} isn\'t where it was. Pick it again, then press Set Up.', { file: r.label }); - return; - } if (act === 'prebuilt') { await invoke('setup_use_build', { id }); S.setup[id] = await invoke('game_setup', { id }); await refreshState(); return 'ready'; } if (act === 'ownbuild') return (await useOwnBuild(id)) ? 'ready' : undefined; if (act === 'dlss-off' || act === 'dlss-on') { diff --git a/ui/setup-steps.js b/ui/setup-steps.js index e57e44a2..67502b8e 100644 --- a/ui/setup-steps.js +++ b/ui/setup-steps.js @@ -192,13 +192,11 @@ function stepsView(id, su, ns, game) {
${back}

${ok ? CHECK : ''}${esc(status)}

${next}
`; } -// The quiet line under the game's box: a build that's already there, or the files from before. +// The quiet line under the game's box: a build that's already there, or one the player made. function ssAlt(su, ns, name) { if (ns.own) return ''; if (su.prebuilt && !ns.rebuild) return `

${esc(t('The game built from your copy last time is still here, so setup skips the build.'))}

`; if (su.prebuilt) return `

${esc(t('Building it again from your copy.'))}

`; - const prev = su.previous || []; - if (prev.length && !su.inputs_ready) return `

${esc(tf('Set up before with {files}.', { files: prev.join(' · ') }))}

`; if (su.own_build) return `

${esc(tf('Already built {name} from your copy, outside the launcher? Skip the build:', { name }))}

`; return ''; } @@ -244,16 +242,6 @@ async function stepsAction(id, act, input, ns) { if (p) { ns.own = typeof p === 'string' ? p : p.path; ns.ownErr = ''; } return; } - if (act === 'relink') { - ns.busy = true; - try { - const r = await relinkSetup(id); - if (r === 'ready') return 'ready'; - if (r && r.label) ns.error = tf('{file} isn\'t where it was. Choose it again, then press Set Up.', { file: r.label }); - } catch (e) { ns.error = String(e && e.message ? e.message : e); } - finally { ns.busy = false; } - return; - } // The game's copy (game.kind) stays on this screen until Set Up: setup_copy checks it and keeps // it then, so a window closed halfway leaves the game as it was. if (row && row.legacy && row.id === 'game' && (act === 'file' || act === 'folder')) { From 6b6f149d9fd7b8be7605402edda0d61849caebec Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 23:08:24 +0200 Subject: [PATCH 24/25] The core has no setup_relink either: nothing calls it now --- src-tauri/src/lib.rs | 89 +--------------------------------- tests/beta51.test.cjs | 4 +- tests/beta53.test.cjs | 5 +- tests/setup-steps-preview.html | 2 +- 4 files changed, 5 insertions(+), 95 deletions(-) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 75df6520..16971c2e 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -5009,9 +5009,6 @@ struct Setup { inputs: Vec, inputs_error: Option, inputs_ready: bool, - /// The files it was set up with before, by name (Use My Previous Setup), when they're - /// remembered and it isn't set up now. - previous: Vec, /// A build already in the game's folder, to use instead of building it again. prebuilt: Option, /// Set up from the build already on this PC. @@ -5131,7 +5128,6 @@ fn game_setup(app: AppHandle, st: State<'_, App>, id: String) -> Option { inputs: inputs::rows(&p, &g, &st.dir).unwrap_or_default(), inputs_error: inputs::validate(&p).err(), inputs_ready, - previous: if set_up { vec![] } else { previous_files(&p, &g, &st.dir) }, prebuilt: if set_up { None } else { p.build_folder_here(&g.path) }, prebuilt_on: g.prebuilt && built, kept: setup_state::builds_from_kept(&p, &g), @@ -5272,89 +5268,6 @@ async fn free_up_space(st: State<'_, App>, id: String) -> Res { Ok(size) } -/// The files a game was set up with, by name: its copy and its picked files, remembered after an -/// update or a lost setup. Empty when nothing is remembered. -fn previous_files(p: &profile::Profile, g: &Installed, dir: &Path) -> Vec { - let name = |x: &Path| x.file_name().map(|n| n.to_string_lossy().to_string()).unwrap_or_else(|| x.display().to_string()); - let mut out = vec![]; - if p.game.is_some() { - if let Some(c) = &g.game_copy { - out.push(name(c)); - } - } - let active: Vec = inputs::rows(p, g, dir).unwrap_or_default().into_iter().filter(|r| r.active && r.shared.is_empty() && !r.runtime).collect(); - for r in active { - if let Some(x) = g.setup_inputs.get(&r.id) { - out.push(name(x)); - } - } - out -} - -/// Use My Previous Setup: the files it was set up with are checked as Easy Setup checks them, -/// the setup step is skipped when what it leaves is still there, and the game is set up again. -/// `RELINK_MISSING||