LordOS — a free, fast and secure GNU/Linux distribution based on Debian, with its own desktop environment: display server and Wayland compositor in C, a React UI engine on QuickJS, and private native apps.
C cdebiandesktop-environmentebpffirewalllandlocklinuxlinux-distributionopen-sourceprivacyquickjsraspberry-pi-5reactsecuritywaylandwayland-compositor
Imager: the dialogs cover the window, a tip after a cancel, the picker starts in Downloads
Federico Pereira67af3137ac57
diff --git a/apps/imager/index.jsx b/apps/imager/index.jsxindex cd25348..7315812 100644--- a/apps/imager/index.jsx+++ b/apps/imager/index.jsx@@ -25,7 +25,7 @@ export const Icon = ImagerIcon;// Lumo's pose and tip for each stepconst HELP = {device: 'wave', image: 'shield', custom: 'confused', storage: 'wave', erase: 'shield', customise: 'wave', write: 'shield',- writing: 'run', failed: 'confused', 'tab.general': 'wave', 'tab.user': 'shield', 'tab.wifi': 'wave', 'tab.remote': 'shield',+ writing: 'run', failed: 'confused', cancelled: 'shield', 'tab.general': 'wave', 'tab.user': 'shield', 'tab.wifi': 'wave', 'tab.remote': 'shield','tab.look': 'celebrate', 'tab.cooling': 'run', 'tab.more': 'shield',};@@ -70,7 +70,7 @@ function Sidebar({ s }) {const steps = STEPS.filter((id) => id !== 'customise' || dev.customise);const cur = s.step === 'done' ? steps.length : steps.indexOf(s.step);const writing = isBusy(s.job) || s.job?.phase === 'failed';- let tip = s.step === 'write' && writing ? (s.job.phase === 'failed' ? 'failed' : 'writing') : s.step;+ let tip = s.step === 'write' && writing ? (s.job.phase === 'failed' ? (s.job.cancelledByUser ? 'cancelled' : 'failed') : 'writing') : s.step;if (s.step === 'storage' && s.drive) tip = 'erase';if (s.step === 'image' && s.image && !s.image.official) tip = 'custom';if (s.step === 'customise' && s.customise) tip = `tab.${s.tab}`;diff --git a/apps/imager/platform.js b/apps/imager/platform.jsindex c74fd1e..e0d26b6 100644--- a/apps/imager/platform.js+++ b/apps/imager/platform.js@@ -70,7 +70,13 @@ export const platform = {// ---- a file of the user's own ----async pickImage() {- const path = await pick(/\.(img|img\.xz|iso)$/i, t('imager.image.pickTitle'));+ // start in Downloads (where an image usually is), relative to the home folder+ let start = '';+ try {+ const m = /^XDG_DOWNLOAD_DIR="\$HOME\/([^"]+)"/m.exec(fs.read('.config/user-dirs.dirs'));+ if (m && fs.stat(m[1])?.dir) start = m[1];+ } catch { /* the home folder */ }+ const path = await pick(/\.(img|img\.xz|iso)$/i, t('imager.image.pickTitle'), start);return path ? this.imageInfo(path) : null;},imageInfo: (path) => (has() ? lord.imager.imageInfo(path) : null),diff --git a/assets/locales/en/imager.json b/assets/locales/en/imager.jsonindex c7ffdf8..9763c27 100644--- a/assets/locales/en/imager.json+++ b/assets/locales/en/imager.json@@ -291,6 +291,8 @@"tab.remote": "Remote access","tab.user": "User","tab.wifi": "Wi-Fi",+ "tip.cancelled.text": "The drive was cleared. Try again whenever you like; the download is kept.",+ "tip.cancelled.title": "Stopped, all safe","tip.custom.text": "Nobody vouches for this one: I can check that it's written correctly, not where it came from.","tip.custom.title": "A file of your own","tip.customise.text": "Set it up now and the board starts with your account, network and look. Nothing secret is stored in clear.",diff --git a/assets/locales/es/imager.json b/assets/locales/es/imager.jsonindex a46c525..b6f822a 100644--- a/assets/locales/es/imager.json+++ b/assets/locales/es/imager.json@@ -291,6 +291,8 @@"tab.remote": "Acceso remoto","tab.user": "Usuario","tab.wifi": "Wi-Fi",+ "tip.cancelled.text": "La unidad quedó limpia. Probá de nuevo cuando quieras; la descarga se conserva.",+ "tip.cancelled.title": "Detenido, todo en orden","tip.custom.text": "Nadie lo respalda: puedo comprobar que se grabe bien, pero no de dónde vino.","tip.custom.title": "Un archivo tuyo","tip.customise.text": "Configurala ahora y la placa arranca con tu cuenta, tu red y tu estilo. Nada secreto se guarda en claro.",diff --git a/assets/locales/pt/imager.json b/assets/locales/pt/imager.jsonindex 1c999cf..2df7232 100644--- a/assets/locales/pt/imager.json+++ b/assets/locales/pt/imager.json@@ -291,6 +291,8 @@"tab.remote": "Acesso remoto","tab.user": "Usuário","tab.wifi": "Wi-Fi",+ "tip.cancelled.text": "A unidade foi limpa. Tente de novo quando quiser; o download fica guardado.",+ "tip.cancelled.title": "Parado, tudo certo","tip.custom.text": "Ninguém garante este: posso conferir que ele foi gravado direito, não de onde veio.","tip.custom.title": "Um arquivo seu","tip.customise.text": "Configure agora e a placa já inicia com a sua conta, a sua rede e o seu visual. Nada secreto fica salvo em texto claro.",