diff --git a/CHANGELOG.md b/CHANGELOG.md index 78a749b..10e6e4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 1.4.3 + +- Pinned games only react to the Games tab. Opening, installing or removing an app on the Media tab no longer + runs Lineup's reorder. Pins saved by an older version switch over by themselves the first time Lineup opens. +- Options → Save a report for a bug writes `/data/lineup/report.json`: the apps on the Games and Media tabs and + how the home screen stores them, with no account details. Copy it over FTP and attach it to your issue. + ## 1.4.2 - One place on the home screen always stays unpinned. With every place pinned, the last game opened (the diff --git a/app/api.js b/app/api.js index c1566e6..3b00fda 100644 --- a/app/api.js +++ b/app/api.js @@ -3,7 +3,7 @@ import {Archives, Downloads, FileSystem, Http, Payloads} from '@ps5-react/core'; import {T} from './i18n.js'; -export const VERSION = '1.4.2'; +export const VERSION = '1.4.3'; const BASE = 'http://127.0.0.1:9077'; /** An error the app shows as is: a short title and what to do about it. */ @@ -132,6 +132,16 @@ export async function unpinAll() { } } +/** Writes a report of the Games and Media tabs for a bug report. Resolves to {path} or {error}. */ +export async function report() { + try { + const reply = await call('/report', {method: 'POST', timeoutMs: 15000}); + return reply.ok ? {path: reply.data.path} : {error: T.report.failed(reply.data.error ?? T.service.status(reply.status))}; + } catch { + return {error: T.report.failed(T.pins.noAnswer)}; + } +} + // ---- Updates ---- const UPDATE_DIR = '/data/lineup/update'; diff --git a/app/app.json b/app/app.json index 01c36cd..0347f4a 100644 --- a/app/app.json +++ b/app/app.json @@ -3,7 +3,7 @@ "titleId": "PPSA99077", "contentId": "UP9000-PPSA99077_00-LINEUP0000000000", "name": "Lineup", - "version": "01.004.002", + "version": "01.004.003", "render": { "width": 1920, "height": 1080 diff --git a/app/i18n.js b/app/i18n.js index 0645b1c..74990b6 100644 --- a/app/i18n.js +++ b/app/i18n.js @@ -59,6 +59,14 @@ const en = { + 'Free the first place for it?', freeFirst: 'Free the first place', }, + report: { + save: 'Save a report for a bug', + title: 'Report saved', + body: path => `Copy ${path} over FTP and attach it to your issue on GitHub. It lists the apps on the Games and ` + + 'Media tabs and how the home screen stores them. It has no names or passwords, only the number of each profile.', + ok: 'OK', + failed: detail => `Could not save the report (${detail}).`, + }, saved: ['Order saved', 'Closing the app. The home screen comes back with the new order.'], closeNow: 'Close now', retry: 'Try again', @@ -169,6 +177,14 @@ const pt = { + 'Liberar o primeiro lugar para ele?', freeFirst: 'Liberar o primeiro lugar', }, + report: { + save: 'Salvar um relatório para um bug', + title: 'Relatório salvo', + body: path => `Copie ${path} por FTP e anexe na sua issue do GitHub. Ele lista os apps das abas Jogos e ` + + 'Mídia e como a tela inicial guarda cada um. Não tem nomes nem senhas, só o número de cada perfil.', + ok: 'OK', + failed: detail => `Não consegui salvar o relatório (${detail}).`, + }, saved: ['Ordem salva', 'Fechando o app. A tela inicial já volta com a nova ordem.'], closeNow: 'Fechar agora', retry: 'Tentar de novo', diff --git a/app/index.jsx b/app/index.jsx index 4f6fb30..0b7c656 100644 --- a/app/index.jsx +++ b/app/index.jsx @@ -527,6 +527,15 @@ function App() { close(); toast(error || T.pins.removed); }; + const saveReport = async () => { + patch({layer: 'busy'}); + const {path, error} = await api.report(); + if (path) patch({layer: 'report', report: path}); + else { + close(); + toast(error); + } + }; const sortAZ = () => patch(p => { const id = p.order[p.focus]; const order = p.order.slice().sort((a, b) => { @@ -632,6 +641,7 @@ function App() { ) : null, patch({layer: 'updates'})} />, patch({layer: 'removePins'})} />, + , ] : s.profiles.map(item => ( } @@ -673,6 +683,11 @@ function App() {