Skip to content

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.

LordOS Imager: the native app

Federico Pereira3f7f909c7ac6
diff --git a/apps/imager/core/releases.js b/apps/imager/core/releases.js
index 0d0e563..1e4c9ed 100644
--- a/apps/imager/core/releases.js
+++ b/apps/imager/core/releases.js
@@ -34,7 +34,7 @@ export function parseReleases(json, deviceId) {
const sig = find((n) => n === 'SHA256SUMS.sig');
if (!image || !sums || !sig || sums.size > 65536 || sig.size > 512) continue;
const t = Date.parse(r.published_at || '');
- out.push({ tag: r.tag_name, version: r.tag_name.slice(1), date: Number.isFinite(t) ? t : 0, prerelease: !!r.prerelease, image, sums, sig });
+ out.push({ tag: r.tag_name, version: r.tag_name.slice(1).replace(/-.*$/, ''), date: Number.isFinite(t) ? t : 0, prerelease: !!r.prerelease, image, sums, sig });
}
return out.sort((a, b) => b.date - a.date);
}
diff --git a/apps/imager/data/countries.js b/apps/imager/data/countries.js
new file mode 100644
index 0000000..1d55734
--- /dev/null
+++ b/apps/imager/data/countries.js
@@ -0,0 +1,5 @@
+// The Wi-Fi countries: the ISO 3166 codes LordOS already knows (assets/locales/<lang>/countries.json;
+// the names come from the user's language through t('countries.XX'), English here as the fallback).
+import countries from '../../../assets/locales/en/countries.json';
+
+export default countries;
diff --git a/apps/imager/data/layouts.json b/apps/imager/data/layouts.json
new file mode 100644
index 0000000..3a248ba
--- /dev/null
+++ b/apps/imager/data/layouts.json
@@ -0,0 +1 @@
+{"source":"Debian 13 xkb-data evdev.xml","layouts":[{"id":"al","name":"Albanian","variants":[["plisi","Albanian (Plisi)"],["veqilharxhi","Albanian (Veqilharxhi)"]]},{"id":"et","name":"Amharic","variants":[]},{"id":"ara","name":"Arabic","variants":[["digits","Arabic (Eastern Arabic numerals)"],["azerty","Arabic (AZERTY)"],["azerty_digits","Arabic (AZERTY, Eastern Arabic numerals)"],["buckwalter","Arabic (Buckwalter)"],["olpc","Arabic (OLPC)"]]},{"id":"eg","name":"Arabic (Egypt)","variants":[]},{"id":"iq","name":"Arabic (Iraq)","variants":[["ku","Kurdish (Iraq, Latin Q)"],["ku_alt","Kurdish (Iraq, Latin Alt-Q)"],["ku_f","Kurdish (Iraq, F)"],["ku_ara","Kurdish (Iraq, Arabic-Latin)"]]},{"id":"ma","name":"Arabic (Morocco)","variants":[["tifinagh","Berber (Morocco, Tifinagh)"],["tifinagh-alt","Berber (Morocco, Tifinagh alt.)"],["tifinagh-alt-phonetic","Berber (Morocco, Tifinagh phonetic, alt.)"],["tifinagh-extended","Berber (Morocco, Tifinagh extended)"],["tifinagh-phonetic","Berber (Morocco, Tifinagh phonetic)"],["tifinagh-extended-phonetic","Berber (Morocco, Tifinagh extended phonetic)"],["french","French (Morocco)"],["rif","Tarifit"]]},{"id":"sy","name":"Arabic (Syria)","variants":[["syc","Syriac"],["syc_phonetic","Syriac (phonetic)"],["ku","Kurdish (Syria, Latin Q)"],["ku_alt","Kurdish (Syria, Latin Alt-Q)"],["ku_f","Kurdish (Syria, F)"]]},{"id":"am","name":"Armenian","variants":[["phonetic","Armenian (phonetic)"],["phonetic-alt","Armenian (alt. phonetic)"],["eastern","Armenian (eastern)"],["eastern-alt","Armenian (alt. eastern)"],["western","Armenian (western)"]]},{"id":"az","name":"Azerbaijani","variants":[["cyrillic","Azerbaijani (Cyrillic)"]]},{"id":"ml","name":"Bambara","variants":[["fr-oss","French (Mali, alt.)"],["us-intl","English (Mali, US, intl.)"]]},{"id":"bd","name":"Bangla","variants":[["probhat","Bangla (Probhat)"]]},{"id":"by","name":"Belarusian","variants":[["legacy","Belarusian (legacy)"],["latin","Belarusian (Latin)"],["intl","Belarusian (intl.)"],["phonetic","Belarusian (phonetic)"],["ru","Russian (Belarus)"]]},{"id":"be","name":"Belgian","variants":[["oss","Belgian (alt.)"],["oss_latin9","Belgian (Latin-9 only, alt.)"],["iso-alternate","Belgian (ISO, alt.)"],["nodeadkeys","Belgian (no dead keys)"],["wang","Belgian (Wang 724 AZERTY)"]]},{"id":"dz","name":"Berber (Algeria, Latin)","variants":[["ber","Berber (Algeria, Tifinagh)"],["azerty-deadkeys","Kabyle (AZERTY, with dead keys)"],["qwerty-gb-deadkeys","Kabyle (QWERTY, UK, with dead keys)"],["qwerty-us-deadkeys","Kabyle (QWERTY, US, with dead keys)"],["ar","Arabic (Algeria)"]]},{"id":"ba","name":"Bosnian","variants":[["alternatequotes","Bosnian (with guillemets)"],["unicode","Bosnian (with Bosnian digraphs)"],["unicodeus","Bosnian (US, with Bosnian digraphs)"],["us","Bosnian (US)"]]},{"id":"brai","name":"Braille","variants":[["left_hand","Braille (left-handed)"],["left_hand_invert","Braille (left-handed inverted thumb)"],["right_hand","Braille (right-handed)"],["right_hand_invert","Braille (right-handed inverted thumb)"]]},{"id":"bg","name":"Bulgarian","variants":[["phonetic","Bulgarian (traditional phonetic)"],["bas_phonetic","Bulgarian (new phonetic)"],["bekl","Bulgarian (enhanced)"]]},{"id":"mm","name":"Burmese","variants":[["zawgyi","Burmese (Zawgyi)"],["mnw","Mon"],["mnw-a1","Mon (A1)"],["shn","Shan"],["zgt","Shan (Zawgyi)"]]},{"id":"cn","name":"Chinese","variants":[["altgr-pinyin","Hanyu Pinyin Letters (with AltGr dead keys)"],["mon_trad","Mongolian (Bichig)"],["mon_trad_todo","Mongolian (Todo)"],["mon_trad_xibe","Mongolian (Xibe)"],["mon_trad_manchu","Mongolian (Manchu)"],["mon_trad_galik","Mongolian (Galik)"],["mon_todo_galik","Mongolian (Todo Galik)"],["mon_manchu_galik","Mongolian (Manchu Galik)"],["tib","Tibetan"],["tib_asciinum","Tibetan (with ASCII numerals)"],["ug","Uyghur"]]},{"id":"hr","name":"Croatian","variants":[["alternatequotes","Croatian (with guillemets)"],["unicode","Croatian (with Croatian digraphs)"],["unicodeus","Croatian (US, with Croatian digraphs)"],["us","Croatian (US)"]]},{"id":"cz","name":"Czech","variants":[["bksl","Czech (extra backslash)"],["qwerty","Czech (QWERTY)"],["qwerty_bksl","Czech (QWERTY, extra backslash)"],["ucw","Czech (UCW, only accented letters)"],["dvorak-ucw","Czech (US, Dvorak, UCW support)"],["rus","Russian (Czechia, phonetic)"]]},{"id":"dk","name":"Danish","variants":[["nodeadkeys","Danish (no dead keys)"],["dvorak","Danish (Dvorak)"]]},{"id":"af","name":"Dari","variants":[["ps","Pashto"],["uz","Uzbek (Afghanistan)"],["fa-olpc","Dari (Afghanistan, OLPC)"],["ps-olpc","Pashto (Afghanistan, OLPC)"],["uz-olpc","Uzbek (Afghanistan, OLPC)"]]},{"id":"mv","name":"Dhivehi","variants":[]},{"id":"nl","name":"Dutch","variants":[["us","Dutch (US)"],["std","Dutch (standard)"]]},{"id":"bt","name":"Dzongkha","variants":[]},{"id":"au","name":"English (Australia)","variants":[]},{"id":"cm","name":"English (Cameroon)","variants":[["french","French (Cameroon)"],["qwerty","Cameroon Multilingual (QWERTY, intl.)"],["azerty","Cameroon (AZERTY, intl.)"],["dvorak","Cameroon (Dvorak, intl.)"],["mmuock","Mmuock"]]},{"id":"gh","name":"English (Ghana)","variants":[["generic","English (Ghana, multilingual)"],["gillbt","English (Ghana, GILLBT)"],["akan","Akan"],["avn","Avatime"],["ewe","Ewe"],["fula","Fula"],["ga","Ga"],["hausa","Hausa (Ghana)"]]},{"id":"nz","name":"English (New Zealand)","variants":[["mao","Maori"]]},{"id":"ng","name":"English (Nigeria)","variants":[["hausa","Hausa (Nigeria)"],["igbo","Igbo"],["yoruba","Yoruba"]]},{"id":"za","name":"English (South Africa)","variants":[]},{"id":"gb","name":"English (UK)","variants":[["intl","English (UK, intl., with dead keys)"],["dvorak","English (UK, Dvorak)"],["dvorakukp","English (UK, Dvorak, with UK punctuation)"],["colemak","English (UK, Colemak)"],["colemak_dh","English (UK, Colemak-DH)"],["gla","Scottish Gaelic"],["pl","Polish (British keyboard)"]]},{"id":"us","name":"English (US)","variants":[["euro","English (US, euro on 5)"],["intl","English (US, intl., with dead keys)"],["alt-intl","English (US, alt. intl.)"],["altgr-intl","English (intl., with AltGr dead keys)"],["colemak","English (Colemak)"],["colemak_dh","English (Colemak-DH)"],["colemak_dh_wide","English (Colemak-DH Wide)"],["colemak_dh_ortho","English (Colemak-DH Ortholinear)"],["colemak_dh_iso","English (Colemak-DH ISO)"],["colemak_dh_wide_iso","English (Colemak-DH Wide ISO)"],["dvorak","English (Dvorak)"],["dvorak-intl","English (Dvorak, intl., with dead keys)"],["dvorak-alt-intl","English (Dvorak, alt. intl.)"],["dvorak-l","English (Dvorak, left-handed)"],["dvorak-r","English (Dvorak, right-handed)"],["dvorak-classic","English (classic Dvorak)"],["dvp","English (programmer Dvorak)"],["norman","English (Norman)"],["symbolic","English (US, Symbolic)"],["workman","English (Workman)"],["workman-intl","English (Workman, intl., with dead keys)"],["olpc2","English (the divide/multiply toggle the layout)"],["chr","Cherokee"],["haw","Hawaiian"],["rus","Russian (US, phonetic)"],["hbs","Serbo-Croatian (US)"]]},{"id":"epo","name":"Esperanto","variants":[["legacy","Esperanto (legacy)"]]},{"id":"ee","name":"Estonian","variants":[["nodeadkeys","Estonian (no dead keys)"],["dvorak","Estonian (Dvorak)"],["us","Estonian (US)"]]},{"id":"fo","name":"Faroese","variants":[["nodeadkeys","Faroese (no dead keys)"]]},{"id":"ph","name":"Filipino","variants":[["qwerty-bay","Filipino (QWERTY, Baybayin)"],["capewell-dvorak","Filipino (Capewell-Dvorak, Latin)"],["capewell-dvorak-bay","Filipino (Capewell-Dvorak, Baybayin)"],["capewell-qwerf2k6","Filipino (Capewell-QWERF 2006, Latin)"],["capewell-qwerf2k6-bay","Filipino (Capewell-QWERF 2006, Baybayin)"],["colemak","Filipino (Colemak, Latin)"],["colemak-bay","Filipino (Colemak, Baybayin)"],["dvorak","Filipino (Dvorak, Latin)"],["dvorak-bay","Filipino (Dvorak, Baybayin)"]]},{"id":"fi","name":"Finnish","variants":[["classic","Finnish (classic)"],["nodeadkeys","Finnish (classic, no dead keys)"],["smi","Northern Saami (Finland)"]]},{"id":"fr","name":"French","variants":[["nodeadkeys","French (no dead keys)"],["oss","French (alt.)"],["oss_nodeadkeys","French (alt., no dead keys)"],["oss_latin9","French (alt., Latin-9 only)"],["latin9","French (legacy, alt.)"],["latin9_nodeadkeys","French (legacy, alt., no dead keys)"],["azerty","French (AZERTY)"],["afnor","French (AZERTY, AFNOR)"],["bepo","French (BEPO)"],["bepo_latin9","French (BEPO, Latin-9 only)"],["bepo_afnor","French (BEPO, AFNOR)"],["dvorak","French (Dvorak)"],["ergol","French (Ergo‑L)"],["ergol_iso","French (Ergo‑L, ISO variant)"],["us","French (US)"],["bre","Breton (France)"],["oci","Occitan"],["geo","Georgian (France, AZERTY Tskapo)"]]},{"id":"ca","name":"French (Canada)","variants":[["fr-dvorak","French (Canada, Dvorak)"],["fr-legacy","French (Canada, legacy)"],["multix","Canadian (CSA)"],["eng","English (Canada)"],["ike","Inuktitut"]]},{"id":"cd","name":"French (Democratic Republic of the Congo)","variants":[]},{"id":"tg","name":"French (Togo)","variants":[]},{"id":"ge","name":"Georgian","variants":[["ergonomic","Georgian (ergonomic)"],["mess","Georgian (MESS)"],["os","Ossetian (Georgia)"],["ru","Russian (Georgia)"]]},{"id":"de","name":"German","variants":[["deadacute","German (dead acute)"],["deadgraveacute","German (dead grave acute)"],["deadtilde","German (dead tilde)"],["nodeadkeys","German (no dead keys)"],["e1","German (E1)"],["e2","German (E2)"],["T3","German (T3)"],["us","German (US)"],["dvorak","German (Dvorak)"],["neo","German (Neo 2)"],["qwerty","German (QWERTY)"],["dsb","Lower Sorbian"],["dsb_qwertz","Lower Sorbian (QWERTZ)"],["ro","Romanian (Germany)"],["ro_nodeadkeys","Romanian (Germany, no dead keys)"],["ru","Russian (Germany, phonetic)"],["tr","Turkish (Germany)"]]},{"id":"at","name":"German (Austria)","variants":[["nodeadkeys","German (Austria, no dead keys)"]]},{"id":"ch","name":"German (Switzerland)","variants":[["de_nodeadkeys","German (Switzerland, no dead keys)"],["legacy","German (Switzerland, legacy)"],["fr","French (Switzerland)"],["fr_nodeadkeys","French (Switzerland, no dead keys)"]]},{"id":"gr","name":"Greek","variants":[["simple","Greek (simple)"],["nodeadkeys","Greek (no dead keys)"],["polytonic","Greek (polytonic)"]]},{"id":"il","name":"Hebrew","variants":[["si2","Hebrew (SI-1452-2)"],["lyx","Hebrew (lyx)"],["phonetic","Hebrew (phonetic)"],["biblical","Hebrew (Biblical, Tiro)"]]},{"id":"hu","name":"Hungarian","variants":[["standard","Hungarian (standard)"],["nodeadkeys","Hungarian (no dead keys)"],["qwerty","Hungarian (QWERTY)"],["101_qwertz_comma_dead","Hungarian (QWERTZ, 101-key, comma, dead keys)"],["101_qwertz_comma_nodead","Hungarian (QWERTZ, 101-key, comma, no dead keys)"],["101_qwertz_dot_dead","Hungarian (QWERTZ, 101-key, dot, dead keys)"],["101_qwertz_dot_nodead","Hungarian (QWERTZ, 101-key, dot, no dead keys)"],["101_qwerty_comma_dead","Hungarian (QWERTY, 101-key, comma, dead keys)"],["101_qwerty_comma_nodead","Hungarian (QWERTY, 101-key, comma, no dead keys)"],["101_qwerty_dot_dead","Hungarian (QWERTY, 101-key, dot, dead keys)"],["101_qwerty_dot_nodead","Hungarian (QWERTY, 101-key, dot, no dead keys)"],["102_qwertz_comma_dead","Hungarian (QWERTZ, 102-key, comma, dead keys)"],["102_qwertz_comma_nodead","Hungarian (QWERTZ, 102-key, comma, no dead keys)"],["102_qwertz_dot_dead","Hungarian (QWERTZ, 102-key, dot, dead keys)"],["102_qwertz_dot_nodead","Hungarian (QWERTZ, 102-key, dot, no dead keys)"],["102_qwerty_comma_dead","Hungarian (QWERTY, 102-key, comma, dead keys)"],["102_qwerty_comma_nodead","Hungarian (QWERTY, 102-key, comma, no dead keys)"],["102_qwerty_dot_dead","Hungarian (QWERTY, 102-key, dot, dead keys)"],["102_qwerty_dot_nodead","Hungarian (QWERTY, 102-key, dot, no dead keys)"]]},{"id":"is","name":"Icelandic","variants":[["dvorak","Icelandic (Dvorak)"]]},{"id":"in","name":"Indian","variants":[["asm-kagapa","Assamese (KaGaPa, phonetic)"],["ben","Bangla (India)"],["ben_probhat","Bangla (India, Probhat)"],["ben_baishakhi","Bangla (India, Baishakhi)"],["ben_bornona","Bangla (India, Bornona)"],["ben-kagapa","Bangla (India, KaGaPa, phonetic)"],["ben_gitanjali","Bangla (India, Gitanjali)"],["ben_inscript","Bangla (India, Baishakhi InScript)"],["eng","English (India, with rupee)"],["guj","Gujarati"],["guj-kagapa","Gujarati (KaGaPa, phonetic)"],["bolnagri","Hindi (Bolnagri)"],["hin-wx","Hindi (Wx)"],["hin-kagapa","Hindi (KaGaPa, phonetic)"],["kan","Kannada"],["kan-kagapa","Kannada (KaGaPa, phonetic)"],["mal","Malayalam"],["mal_lalitha","Malayalam (Lalitha)"],["mal_enhanced","Malayalam (enhanced InScript, with rupee)"],["mal_poorna","Malayalam (Poorna, extended InScript)"],["mni","Manipuri (Meitei)"],["mar-kagapa","Marathi (KaGaPa, phonetic)"],["marathi","Marathi (enhanced InScript)"],["ori","Oriya"],["ori-bolnagri","Oriya (Bolnagri)"],["ori-wx","Oriya (Wx)"],["guru","Punjabi (Gurmukhi)"],["jhelum","Punjabi (Gurmukhi Jhelum)"],["san-kagapa","Sanskrit (KaGaPa, phonetic)"],["sat","Santali (Ol Chiki)"],["tamilnet","Tamil (TamilNet '99)"],["tamilnet_tamilnumbers","Tamil (TamilNet '99 with Tamil numerals)"],["tamilnet_TAB","Tamil (TamilNet '99, TAB encoding)"],["tamilnet_TSCII","Tamil (TamilNet '99, TSCII encoding)"],["tam","Tamil (InScript, with Arabic numerals)"],["tam_tamilnumbers","Tamil (InScript, with Tamil numerals)"],["tel","Telugu"],["tel-kagapa","Telugu (KaGaPa, phonetic)"],["tel-sarala","Telugu (Sarala)"],["urd-phonetic","Urdu (phonetic)"],["urd-phonetic3","Urdu (alt. phonetic)"],["iipa","Indic IPA"]]},{"id":"id","name":"Indonesian (Latin)","variants":[["melayu-phonetic","Indonesian (Arab Melayu, phonetic)"],["melayu-phoneticx","Indonesian (Arab Melayu, extended phonetic)"],["pegon-phonetic","Indonesian (Arab Pegon, phonetic)"],["javanese","Javanese"]]},{"id":"ie","name":"Irish","variants":[["UnicodeExpert","Irish (UnicodeExpert)"],["CloGaelach","CloGaelach"],["ogam","Ogham"],["ogam_is434","Ogham (IS434)"]]},{"id":"it","name":"Italian","variants":[["nodeadkeys","Italian (no dead keys)"],["us","Italian (US)"],["fur","Friulian (Italy)"],["scn","Sicilian"],["geo","Georgian (Italy)"]]},{"id":"jp","name":"Japanese","variants":[["kana","Japanese (Kana)"],["kana86","Japanese (Kana 86)"],["OADG109A","Japanese (OADG 109A)"],["dvorak","Japanese (Dvorak)"]]},{"id":"kz","name":"Kazakh","variants":[["kazrus","Kazakh (with Russian)"],["ext","Kazakh (extended)"],["latin","Kazakh (Latin)"],["ruskaz","Russian (Kazakhstan, with Kazakh)"]]},{"id":"kh","name":"Khmer (Cambodia)","variants":[]},{"id":"kr","name":"Korean","variants":[["kr104","Korean (101/104-key compatible)"]]},{"id":"kg","name":"Kyrgyz","variants":[["phonetic","Kyrgyz (phonetic)"]]},{"id":"la","name":"Lao","variants":[["stea","Lao (STEA)"]]},{"id":"lv","name":"Latvian","variants":[["apostrophe","Latvian (apostrophe)"],["tilde","Latvian (tilde)"],["fkey","Latvian (F)"],["modern","Latvian (Modern Latin)"],["modern-cyr","Latvian (Modern Cyrillic)"],["ergonomic","Latvian (ergonomic, ŪGJRMV)"],["adapted","Latvian (adapted)"]]},{"id":"lt","name":"Lithuanian","variants":[["std","Lithuanian (standard)"],["us","Lithuanian (US)"],["lekp","Lithuanian (LEKP)"],["lekpa","Lithuanian (LEKPa)"],["ratise","Lithuanian (Ratise)"],["sgs","Samogitian"]]},{"id":"mk","name":"Macedonian","variants":[["nodeadkeys","Macedonian (no dead keys)"]]},{"id":"my","name":"Malay (Jawi, Arabic Keyboard)","variants":[["phonetic","Malay (Jawi, phonetic)"]]},{"id":"mt","name":"Maltese","variants":[["us","Maltese (US)"],["alt-us","Maltese (US, with AltGr overrides)"],["alt-gb","Maltese (UK, with AltGr overrides)"]]},{"id":"md","name":"Moldavian","variants":[["gag","Gagauz (Moldova)"]]},{"id":"mn","name":"Mongolian","variants":[]},{"id":"me","name":"Montenegrin","variants":[["cyrillic","Montenegrin (Cyrillic)"],["cyrillicyz","Montenegrin (Cyrillic, ZE and ZHE swapped)"],["cyrillicalternatequotes","Montenegrin (Cyrillic, with guillemets)"],["latinunicode","Montenegrin (Latin, Unicode)"],["latinyz","Montenegrin (Latin, QWERTY)"],["latinunicodeyz","Montenegrin (Latin, Unicode, QWERTY)"],["latinalternatequotes","Montenegrin (Latin, with guillemets)"]]},{"id":"gn","name":"N'Ko (AZERTY)","variants":[]},{"id":"np","name":"Nepali","variants":[]},{"id":"no","name":"Norwegian","variants":[["nodeadkeys","Norwegian (no dead keys)"],["colemak","Norwegian (Colemak)"],["colemak_dh","Norwegian (Colemak-DH)"],["colemak_dh_wide","Norwegian (Colemak-DH Wide)"],["dvorak","Norwegian (Dvorak)"],["smi","Northern Saami (Norway)"],["smi_nodeadkeys","Northern Saami (Norway, no dead keys)"]]},{"id":"ir","name":"Persian","variants":[["pes_keypad","Persian (with Persian keypad)"],["azb","Azerbaijani (Iran)"],["ku","Kurdish (Iran, Latin Q)"],["ku_alt","Kurdish (Iran, Latin Alt-Q)"],["ku_f","Kurdish (Iran, F)"],["ku_ara","Kurdish (Iran, Arabic-Latin)"]]},{"id":"pl","name":"Polish","variants":[["legacy","Polish (legacy)"],["qwertz","Polish (QWERTZ)"],["dvorak","Polish (Dvorak)"],["dvorak_quotes","Polish (Dvorak, with Polish quotes on quotemark key)"],["dvorak_altquotes","Polish (Dvorak, with Polish quotes on key 1)"],["dvp","Polish (programmer Dvorak)"],["csb","Kashubian"],["szl","Silesian"],["ru_phonetic_dvorak","Russian (Poland, phonetic Dvorak)"]]},{"id":"pt","name":"Portuguese","variants":[["nodeadkeys","Portuguese (no dead keys)"],["nativo","Portuguese (Nativo)"],["nativo-us","Portuguese (Nativo for US keyboards)"],["nativo-epo","Esperanto (Portugal, Nativo)"]]},{"id":"br","name":"Portuguese (Brazil)","variants":[["nodeadkeys","Portuguese (Brazil, no dead keys)"],["dvorak","Portuguese (Brazil, Dvorak)"],["nativo","Portuguese (Brazil, Nativo)"],["nativo-us","Portuguese (Brazil, Nativo for US keyboards)"],["nativo-epo","Esperanto (Brazil, Nativo)"],["rus","Russian (Brazil, phonetic)"]]},{"id":"ro","name":"Romanian","variants":[["std","Romanian (standard)"]]},{"id":"ru","name":"Russian","variants":[["phonetic","Russian (phonetic)"],["phonetic_YAZHERTY","Russian (phonetic, YAZHERTY)"],["phonetic_azerty","Russian (phonetic, AZERTY)"],["phonetic_dvorak","Russian (phonetic, Dvorak)"],["typewriter","Russian (typewriter)"],["ruchey_ru","Russian (engineering, RU)"],["ruchey_en","Russian (engineering, EN)"],["legacy","Russian (legacy)"],["typewriter-legacy","Russian (typewriter, legacy)"],["dos","Russian (DOS)"],["ab","Abkhazian (Russia)"],["bak","Bashkirian"],["cv","Chuvash"],["cv_latin","Chuvash (Latin)"],["xal","Kalmyk"],["kom","Komi"],["chm","Mari"],["os_legacy","Ossetian (legacy)"],["srp","Serbian (Russia)"],["tt","Tatar"],["udm","Udmurt"],["sah","Yakut"]]},{"id":"rs","name":"Serbian","variants":[["alternatequotes","Serbian (Cyrillic, with guillemets)"],["yz","Serbian (Cyrillic, ZE and ZHE swapped)"],["latin","Serbian (Latin)"],["latinalternatequotes","Serbian (Latin, with guillemets)"],["latinunicode","Serbian (Latin, Unicode)"],["latinyz","Serbian (Latin, QWERTY)"],["latinunicodeyz","Serbian (Latin, Unicode, QWERTY)"],["rue","Pannonian Rusyn"]]},{"id":"lk","name":"Sinhala (phonetic)","variants":[["us","Sinhala (US)"],["tam_unicode","Tamil (Sri Lanka, TamilNet '99)"],["tam_TAB","Tamil (Sri Lanka, TamilNet '99, TAB encoding)"]]},{"id":"sk","name":"Slovak","variants":[["bksl","Slovak (extra backslash)"],["qwerty","Slovak (QWERTY)"],["qwerty_bksl","Slovak (QWERTY, extra backslash)"]]},{"id":"si","name":"Slovenian","variants":[["alternatequotes","Slovenian (with guillemets)"],["us","Slovenian (US)"]]},{"id":"es","name":"Spanish","variants":[["nodeadkeys","Spanish (no dead keys)"],["deadtilde","Spanish (dead tilde)"],["dvorak","Spanish (Dvorak)"],["ast","Asturian (Spain, with bottom-dot H and L)"],["cat","Catalan (Spain, with middle-dot L)"]]},{"id":"latam","name":"Spanish (Latin American)","variants":[["nodeadkeys","Spanish (Latin American, no dead keys)"],["deadtilde","Spanish (Latin American, dead tilde)"],["dvorak","Spanish (Latin American, Dvorak)"],["colemak","Spanish (Latin American, Colemak)"]]},{"id":"ke","name":"Swahili (Kenya)","variants":[["kik","Kikuyu"]]},{"id":"tz","name":"Swahili (Tanzania)","variants":[]},{"id":"se","name":"Swedish","variants":[["nodeadkeys","Swedish (no dead keys)"],["dvorak","Swedish (Dvorak)"],["us_dvorak","Swedish (Dvorak, intl.)"],["svdvorak","Swedish (Svdvorak)"],["us","Swedish (US)"],["swl","Swedish Sign Language"],["smi","Northern Saami (Sweden)"],["rus","Russian (Sweden, phonetic)"]]},{"id":"tw","name":"Taiwanese","variants":[["indigenous","Taiwanese (indigenous)"],["saisiyat","Saisiyat (Taiwan)"]]},{"id":"tj","name":"Tajik","variants":[["legacy","Tajik (legacy)"]]},{"id":"th","name":"Thai","variants":[["tis","Thai (TIS-820.2538)"],["pat","Thai (Pattachote)"]]},{"id":"bw","name":"Tswana","variants":[]},{"id":"tr","name":"Turkish","variants":[["f","Turkish (F)"],["e","Turkish (E)"],["alt","Turkish (Alt-Q)"],["intl","Turkish (intl., with dead keys)"],["ku","Kurdish (Turkey, Latin Q)"],["ku_f","Kurdish (Turkey, F)"],["ku_alt","Kurdish (Turkey, Latin Alt-Q)"]]},{"id":"tm","name":"Turkmen","variants":[["alt","Turkmen (Alt-Q)"]]},{"id":"ua","name":"Ukrainian","variants":[["phonetic","Ukrainian (phonetic)"],["typewriter","Ukrainian (typewriter)"],["legacy","Ukrainian (legacy)"],["homophonic","Ukrainian (homophonic)"],["crh","Crimean Tatar (Turkish Q)"],["crh_f","Crimean Tatar (Turkish F)"],["crh_alt","Crimean Tatar (Turkish Alt-Q)"]]},{"id":"pk","name":"Urdu (Pakistan)","variants":[["urd-crulp","Urdu (Pakistan, CRULP)"],["urd-nla","Urdu (Pakistan, NLA)"],["ara","Arabic (Pakistan)"],["snd","Sindhi"]]},{"id":"uz","name":"Uzbek","variants":[["latin","Uzbek (Latin)"]]},{"id":"vn","name":"Vietnamese","variants":[["us","Vietnamese (US)"],["fr","Vietnamese (France)"]]},{"id":"sn","name":"Wolof","variants":[]}],"note":"variants named after products are left out (docs/IMAGER.md)"}
\ No newline at end of file
diff --git a/apps/imager/data/zones.json b/apps/imager/data/zones.json
new file mode 100644
index 0000000..d873db3
--- /dev/null
+++ b/apps/imager/data/zones.json
@@ -0,0 +1 @@
+{"source":"Debian 13 tzdata zone1970.tab","zones":["Africa/Abidjan","Africa/Algiers","Africa/Bissau","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/El_Aaiun","Africa/Johannesburg","Africa/Juba","Africa/Khartoum","Africa/Lagos","Africa/Maputo","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Asuncion","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Boa_Vista","America/Bogota","America/Boise","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Cayenne","America/Chicago","America/Chihuahua","America/Ciudad_Juarez","America/Costa_Rica","America/Coyhaique","America/Cuiaba","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fort_Nelson","America/Fortaleza","America/Glace_Bay","America/Goose_Bay","America/Grand_Turk","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Inuvik","America/Iqaluit","America/Jamaica","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/La_Paz","America/Lima","America/Los_Angeles","America/Maceio","America/Managua","America/Manaus","America/Martinique","America/Matamoros","America/Mazatlan","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/New_York","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Nuuk","America/Ojinaga","America/Panama","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Johns","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Tijuana","America/Toronto","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","Antarctica/Casey","Antarctica/Davis","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Troll","Antarctica/Vostok","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Chita","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kathmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuching","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Riyadh","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faroe","Atlantic/Madeira","Atlantic/South_Georgia","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Chisinau","Europe/Dublin","Europe/Gibraltar","Europe/Helsinki","Europe/Istanbul","Europe/Kaliningrad","Europe/Kirov","Europe/Kyiv","Europe/Lisbon","Europe/London","Europe/Madrid","Europe/Malta","Europe/Minsk","Europe/Moscow","Europe/Paris","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/Saratov","Europe/Simferopol","Europe/Sofia","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zurich","Indian/Chagos","Indian/Maldives","Indian/Mauritius","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Easter","Pacific/Efate","Pacific/Fakaofo","Pacific/Fiji","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Kanton","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Marquesas","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","UTC"]}
\ No newline at end of file
diff --git a/apps/imager/index.jsx b/apps/imager/index.jsx
new file mode 100644
index 0000000..cd25348
--- /dev/null
+++ b/apps/imager/index.jsx
@@ -0,0 +1,170 @@
+// LordOS Imager: writes LordOS to an SD card or a USB stick and prepares the Raspberry Pi's first
+// boot (computer name, user, Wi-Fi, remote access, look, cooling). Steps: Device → System image →
+// Storage → Customise → Write → Done, with Lumo giving a tip at each one. docs/IMAGER.md.
+//
+// The same files build the desktop app (desktop/imager, Tauri): only platform.js is swapped and the
+// few SDK primitives used are DOM versions there. Nothing here talks to the system directly.
+import { View, Text, ScrollView, Button, Lumo, useTheme, useLocale, useStore, typeScale, spacing } from '@lordos/sdk';
+import { useEffect } from 'react';
+import { platform } from './platform.js';
+import { app, set, STEPS, loadReleases, isBusy } from './state.js';
+import { deviceById } from './core/catalog.js';
+import { Press, Helper, useFocusKeys } from './ui/kit.jsx';
+import { ImagerIcon } from './ui/art.jsx';
+import { DeviceStep } from './ui/StepDevice.jsx';
+import { ImageStep } from './ui/StepImage.jsx';
+import { StorageStep } from './ui/StepStorage.jsx';
+import { CustomiseStep, customiseProblems } from './ui/StepCustomise.jsx';
+import { WriteStep, WriteDialogs } from './ui/StepWrite.jsx';
+import { DoneStep } from './ui/StepDone.jsx';
+import { OptionsDialog } from './ui/Options.jsx';
+import { formatSize } from './ui/format.js';
+
+export const Icon = ImagerIcon;
+
+// Lumo's pose and tip for each step
+const 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',
+ 'tab.look': 'celebrate', 'tab.cooling': 'run', 'tab.more': 'shield',
+};
+
+function canNext(s) {
+ if (s.step === 'device') return !!deviceById(s.device)?.supported;
+ if (s.step === 'image') return !!s.image;
+ if (s.step === 'storage') return !!s.drive;
+ if (s.step === 'customise') return !s.customise || customiseProblems(s).length === 0;
+ return false;
+}
+
+function next() {
+ const s = app.get();
+ if (s.step === 'customise' && s.customise && customiseProblems(s).length) { set({ showErrors: true }); return; }
+ if (!canNext(s)) return;
+ const dev = deviceById(s.device);
+ let i = STEPS.indexOf(s.step) + 1;
+ if (STEPS[i] === 'customise' && !dev.customise) i++;
+ set({ step: STEPS[i], showErrors: false });
+}
+function back() {
+ const s = app.get();
+ if (isBusy(s.job)) return;
+ const dev = deviceById(s.device);
+ let i = STEPS.indexOf(s.step) - 1;
+ if (STEPS[i] === 'customise' && !dev.customise) i--;
+ if (i >= 0) set({ step: STEPS[i], job: s.step === 'write' && s.job?.phase === 'failed' ? null : s.job });
+}
+
+function stepDetail(s, id, tr) {
+ if (id === 'device') return deviceById(s.device)?.name || tr('imager.device.pc');
+ if (id === 'image') return s.image ? (s.image.official ? `LordOS ${s.image.release.version}` : s.image.name) : '';
+ if (id === 'storage') return s.drive ? `${s.drive.model} · ${formatSize(s.drive.size)}` : '';
+ if (id === 'customise') return s.customise ? (s.cfg.hostname || tr('imager.custom.on')) : tr('imager.custom.skipped');
+ return '';
+}
+
+function Sidebar({ s }) {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ const dev = deviceById(s.device);
+ 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;
+ 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}`;
+ const pose = HELP[tip] || HELP[s.step] || 'wave';
+ return (
+ <View style={{ width: 236, backgroundColor: t.sidebarBg, borderEndWidth: 1, borderEndColor: t.separator, paddingHorizontal: 12, paddingTop: 18, paddingBottom: 14 }}>
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: 10, paddingHorizontal: 6, marginBottom: 20 }}>
+ <ImagerIcon size={34} />
+ <View style={{ flex: 1 }}>
+ <Text style={{ fontSize: 14, fontWeight: 700, color: t.text }}>{tr('imager.title')}</Text>
+ <Text style={{ fontSize: typeScale.caption, color: t.textDim }}>{tr('imager.subtitle')}</Text>
+ </View>
+ </View>
+ <View style={{ gap: 2 }} {...platform.a11y({ role: 'list', label: tr('imager.steps') })}>
+ {steps.map((id, i) => {
+ const done = i < cur, here = i === cur;
+ const reachable = !writing && s.step !== 'done' && i <= cur;
+ return (
+ <Press key={id} id={`step-${id}`} label={tr(`imager.step.${id}`)} role="tab" selected={here} disabled={!reachable && !here}
+ onClick={reachable ? () => set({ step: id }) : undefined}
+ style={{ flexDirection: 'row', alignItems: 'center', gap: 10, paddingHorizontal: 8, paddingVertical: 7, borderRadius: 8,
+ backgroundColor: here ? (t.mode === 'dark' ? 'rgba(255,255,255,0.08)' : 'rgba(0,0,0,0.05)') : 'transparent', opacity: 1 }}>
+ <View style={{ width: 22, height: 22, borderRadius: 11, alignItems: 'center', justifyContent: 'center',
+ backgroundColor: done ? t.accent : here ? 'transparent' : t.control, border: here ? `2px solid ${t.accent}` : 'none' }}>
+ <Text style={{ fontSize: 11, fontWeight: 700, color: done ? '#fff' : here ? t.accent : t.textDim }}>{done ? '✓' : String(i + 1)}</Text>
+ </View>
+ <View style={{ flex: 1, minWidth: 0 }}>
+ <Text style={{ fontSize: typeScale.body, fontWeight: here ? 600 : 500, color: here || done ? t.text : t.textDim }}>{tr(`imager.step.${id}`)}</Text>
+ {stepDetail(s, id, tr) && (done || here) ? (
+ <Text style={{ fontSize: typeScale.caption, color: t.textDim, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{stepDetail(s, id, tr)}</Text>
+ ) : null}
+ </View>
+ </Press>
+ );
+ })}
+ </View>
+ <View style={{ flex: 1 }} />
+ {s.step !== 'done' ? <Helper pose={pose} title={tr(`imager.tip.${tip}.title`)} text={tr(`imager.tip.${tip}.text`)} /> : null}
+ <Press id="options" label={tr('imager.options.title')} onClick={() => set({ dialog: 'options' })}
+ style={{ flexDirection: 'row', alignItems: 'center', gap: 8, marginTop: 12, paddingHorizontal: 8, paddingVertical: 6, borderRadius: 7 }}>
+ <Text style={{ fontSize: 14, color: t.textDim }}>⚙</Text>
+ <Text style={{ fontSize: typeScale.callout, color: t.textDim }}>{tr('imager.options.title')}</Text>
+ </Press>
+ </View>
+ );
+}
+
+function Footer({ s }) {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ if (s.step === 'done' || (s.step === 'write' && s.job)) return null;
+ const first = s.step === 'device';
+ const isWrite = s.step === 'write';
+ return (
+ <View style={{ height: 56, flexDirection: 'row', alignItems: 'center', gap: spacing.s, paddingHorizontal: 24, borderTopWidth: 1, borderTopColor: t.separator }}>
+ <View style={{ flex: 1 }} />
+ {!first ? <Button label={tr('imager.back')} onClick={back} /> : null}
+ {isWrite ? <Button primary label={tr('imager.write.start')} style={{ backgroundColor: '#e5484d' }} onClick={() => set({ dialog: 'confirm' })} />
+ : <Button primary label={tr('imager.next')} onClick={next} disabled={!canNext(s) && !(s.step === 'customise')} />}
+ </View>
+ );
+}
+
+export default function Imager() {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ const s = useStore(app);
+ useFocusKeys({ onEscape: back });
+ useEffect(() => { loadReleases(); }, []);
+ if (!platform.available()) {
+ return (
+ <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center', gap: 10, padding: 30, backgroundColor: t.windowBg }}>
+ <Lumo pose="confused" size={112} />
+ <Text style={{ fontSize: typeScale.headline, fontWeight: 600, color: t.text }}>{tr('imager.unavailable.title')}</Text>
+ <Text style={{ fontSize: typeScale.callout, color: t.textDim, textAlign: 'center', maxWidth: 380 }}>{tr('imager.unavailable.text')}</Text>
+ </View>
+ );
+ }
+ const Step = { device: DeviceStep, image: ImageStep, storage: StorageStep, customise: CustomiseStep, write: WriteStep, done: DoneStep }[s.step];
+ const Layer = platform.Layer;
+ return (
+ <View style={{ flex: 1, flexDirection: 'row', backgroundColor: t.windowBg }}>
+ <Sidebar s={s} />
+ <View style={{ flex: 1, minWidth: 0 }}>
+ {s.step === 'customise' || s.step === 'done' ? <Step s={s} /> : (
+ <ScrollView style={{ flex: 1 }} contentStyle={{ paddingHorizontal: 28, paddingTop: 24, paddingBottom: 24 }}>
+ <Step s={s} />
+ </ScrollView>
+ )}
+ <Footer s={s} />
+ </View>
+ {s.dialog === 'options' ? <OptionsDialog s={s} /> : null}
+ <WriteDialogs s={s} />
+ {Layer ? <Layer /> : null}
+ </View>
+ );
+}
diff --git a/apps/imager/manifest.json b/apps/imager/manifest.json
new file mode 100644
index 0000000..5d1e9b6
--- /dev/null
+++ b/apps/imager/manifest.json
@@ -0,0 +1,10 @@
+{
+ "id": "imager",
+ "name": "LordOS Imager",
+ "description": "Writes LordOS to an SD card or a USB stick and prepares the Raspberry Pi's first boot",
+ "size": [960, 660],
+ "minSize": [820, 560],
+ "dock": false,
+ "category": "System",
+ "permissions": ["disks:manage"]
+}
diff --git a/apps/imager/platform.js b/apps/imager/platform.js
new file mode 100644
index 0000000..c74fd1e
--- /dev/null
+++ b/apps/imager/platform.js
@@ -0,0 +1,154 @@
+// platform.js — the LordOS Imager on LordOS itself: everything the shared UI needs from the system.
+// The desktop app (desktop/imager) replaces this module with its own (desktop/imager/web/platform.js,
+// Tauri commands) and keeps the same functions. docs/IMAGER.md, "One UI, two platforms".
+//
+// What needs root is only the closed admin actions imager-fetch, imager-fetch-cancel,
+// imager-cache-clear and imager-write (server/src/imager/imager_admin.c), plus disk-mount,
+// disk-unmount, disk-eject and disk-cancel (the Disks app's). The first-run file goes onto the
+// card's boot partition through lord.fs, mounted for the user like any USB stick.
+import { createElement as h } from 'react';
+import { admin, disks, fs, settings, keyboard, sound, notify, t, FilePicker, createStore, useStore } from '@lordos/sdk';
+import zonesData from './data/zones.json';
+import layoutsData from './data/layouts.json';
+
+const CACHE = '.cache/lordos/imager';
+const has = () => typeof lord !== 'undefined' && !!lord.imager;
+
+// progress phase=<p> done=<n> total=<n>
+function progressOf(line) {
+ const m = /^progress phase=(\w+) done=(\d+) total=(\d+)/.exec(line || '');
+ return m ? { phase: m[1], done: Number(m[2]), total: Number(m[3]) } : null;
+}
+
+// the file picker sheet is drawn by <platform.Layer /> at the app's root
+const picker = createStore(null);
+function pick(filter, title, start = '') {
+ return new Promise((resolve) => picker.set({ filter, title, resolve, start }));
+}
+
+function driveOf(d) {
+ const mounted = [];
+ for (const p of d.partitions || []) if (p.mountpoint) mounted.push(p.label || p.name);
+ if (d.mountpoint) mounted.push(d.label || d.name);
+ return {
+ id: d.name, name: d.name, model: [d.vendor, d.model].filter(Boolean).join(' ').trim() || d.name, rawModel: d.model || '', serial: d.serial || '',
+ size: d.size, transport: d.transport === 'mmc' ? 'sd' : d.transport || '', removable: !!d.removable, system: !!d.system, readOnly: !!d.ro,
+ labels: (d.partitions || []).map((p) => p.label).filter(Boolean), mounted,
+ };
+}
+
+export const platform = {
+ kind: 'native',
+ domFocus: false,
+ a11y: () => ({}), // LordOS has no screen reader yet; the desktop app fills these in
+ available: () => has() && admin.available(),
+
+ // ---- drives: removable, not the system disk, not read-only (the root side checks it again) ----
+ drives() {
+ return disks.list().filter((d) => d.removable && !d.system && !/^(loop|zram|sr|dm-|md)/.test(d.name)).map(driveOf);
+ },
+ watchDrives(fn) { return disks.watch(fn); },
+ hiddenDriveCount() { return disks.list().filter((d) => !d.removable || d.system).length; },
+
+ // ---- releases and downloads (curl as the user, in ~/.cache/lordos/imager) ----
+ cacheDir: () => `${fs.home()}/${CACHE}`,
+ cachePath: (tag, name) => `${fs.home()}/${CACHE}/${tag}/${name}`,
+ async releases() {
+ await admin.run('imager-fetch', 'meta', null, { quiet: true });
+ return fs.read(`${CACHE}/releases.json`);
+ },
+ cachedReleases() { try { return fs.read(`${CACHE}/releases.json`); } catch { return null; } },
+ isCached(tag, asset) { try { const s = fs.stat(`${CACHE}/${tag}/${asset.name}`); return !!s && s.size === asset.size; } catch { return false; } },
+ partialSize(tag, asset) { try { return fs.stat(`${CACHE}/${tag}/${asset.name}.part`)?.size || 0; } catch { return 0; } },
+ async download(tag, asset, onProgress) {
+ await admin.run('imager-fetch', `file\n${tag}\n${asset.name}\n${asset.size}`, (l) => { const p = progressOf(l); if (p) onProgress?.(p); }, { quiet: true });
+ return this.cachePath(tag, asset.name);
+ },
+ cancelDownload() { return admin.run('imager-fetch-cancel', '', null, { quiet: true }).catch(() => {}); },
+ readText(path) { return fs.read(path); },
+ checkSums: (sums, sig) => (has() ? lord.imager.checkSums(sums, sig) : { ok: false }),
+
+ // ---- a file of the user's own ----
+ async pickImage() {
+ const path = await pick(/\.(img|img\.xz|iso)$/i, t('imager.image.pickTitle'));
+ return path ? this.imageInfo(path) : null;
+ },
+ imageInfo: (path) => (has() ? lord.imager.imageInfo(path) : null),
+ async pickKeyFile() {
+ let start = '';
+ try { if (fs.stat('.ssh')?.dir) start = '.ssh'; } catch { /* the home folder */ }
+ const path = await pick(/\.pub$/i, t('imager.remote.pickKey'), start);
+ return path ? fs.read(path) : null;
+ },
+ Layer() {
+ const p = useStore(picker);
+ if (!p) return null;
+ const done = (v) => { picker.set(null); p.resolve(v); };
+ return h(FilePicker, { filter: p.filter, title: p.title, onPick: (path) => done(path), onClose: () => done(null), start: p.start || '' });
+ },
+
+ // ---- secrets: derived here, only the results go into the file ----
+ async hashPassword(p) { return has() ? lord.imager.hashPassword(p) : null; },
+ async wifiPsk(ssid, p) { return has() ? lord.imager.wifiPsk(ssid, p) : null; },
+
+ // ---- writing ----
+ async write({ drive, image }, onProgress) {
+ const lines = [drive.name, String(drive.size), drive.rawModel, drive.serial, image.official ? 'official' : 'custom', image.path];
+ if (image.official) lines.push(image.sums, image.sig);
+ const ok = await admin.run('imager-write', lines.join('\n'), (l) => { const p = progressOf(l); if (p) onProgress?.(p); }, { quiet: true });
+ const kv = Object.fromEntries(String(ok).split(' ').slice(1).map((x) => x.split('=')));
+ return { sha256: kv.sha256 || '', mbps: Number(kv.mbps || 0), ms: Number(kv.ms || 0) };
+ },
+ cancelWrite(drive) { return admin.run('disk-cancel', drive.name, null, { quiet: true }).catch(() => {}); },
+ // the image's first partition (bootfs, FAT), mounted for the user, the file written, unmounted
+ async writeFirstRun(drive, text, name) {
+ const part = /[0-9]$/.test(drive.name) ? `${drive.name}p1` : `${drive.name}1`;
+ let dir = '';
+ for (let i = 0; i < 20 && !dir; i++) {
+ try { dir = String(await admin.run('disk-mount', part, null, { quiet: true })); } catch (e) {
+ if (!/disk\.alreadyMounted/.test(e.code || '') && i < 19) await new Promise((r) => setTimeout(r, 300)); else throw e;
+ }
+ }
+ try { fs.write(`${dir}/${name}`, text); } finally { await admin.run('disk-unmount', part, null, { quiet: true }).catch(() => {}); }
+ },
+ eject(drive) { return admin.run('disk-eject', drive.name, null, { quiet: true }); },
+
+ // ---- this computer's settings, as suggestions ----
+ defaults() {
+ const s = settings.get();
+ const kb = keyboard.active?.() || {};
+ const lang = ['en', 'es', 'pt'].includes(s.language) ? s.language : 'en';
+ let zone = '';
+ try { zone = lord.time.zone() || ''; } catch { /* keep empty */ }
+ const region = (s.region || '').split('_')[1] || '';
+ return { lang, timezone: zone, keyboard: kb.layout || '', variant: kb.variant || '', country: /^[A-Z]{2}$/.test(region) ? region : '' };
+ },
+ zones: () => zonesData.zones,
+ // the same lists the image ships (Debian 13 tzdata and xkb-data; apps/imager/data)
+ layouts: () => layoutsData.layouts,
+ async scanWifi() {
+ if (typeof lord === 'undefined' || !lord.net) return null;
+ const radio = (lord.net.interfaces() || []).find((i) => i.type === 'wifi');
+ if (!radio) return null;
+ const found = [];
+ await admin.run('net-wifi-scan', radio.name, (line) => { try { found.push(JSON.parse(line)); } catch { /* text */ } }, { quiet: true });
+ const seen = new Set();
+ return found.sort((a, b) => b.signal - a.signal).filter((n) => n.ssid && !seen.has(n.ssid) && seen.add(n.ssid));
+ },
+
+ // ---- the app's own options and profiles (settings.json "imager"; profiles never hold secrets) ----
+ loadOptions() { return settings.get().imager || {}; },
+ saveOptions(o) { settings.set((s) => ({ ...s, imager: { ...(s.imager || {}), ...o } })); },
+ loadProfiles() { try { const p = JSON.parse(fs.read('.config/lordos/imager-profiles.json')); return Array.isArray(p) ? p : []; } catch { return []; } },
+ saveProfiles(list) { fs.mkdir('.config/lordos'); fs.write('.config/lordos/imager-profiles.json', JSON.stringify(list, null, 2)); },
+ cacheSize() { try { return fs.du(CACHE, 200)?.size || 0; } catch { return 0; } },
+ async clearCache() { await admin.run('imager-cache-clear', '', null, { quiet: true }); },
+ // the language and theme follow LordOS; updates come with LordOS itself
+ followsSystem: true,
+ appUpdates: null,
+
+ done({ title, body, sound: withSound }) {
+ if (withSound) sound.play('notify');
+ notify({ app: 'imager', title, body, sound: false });
+ },
+};
diff --git a/apps/imager/state.js b/apps/imager/state.js
new file mode 100644
index 0000000..85e15a8
--- /dev/null
+++ b/apps/imager/state.js
@@ -0,0 +1,167 @@
+// state.js — the LordOS Imager's wizard state and the write pipeline. Shared by the native and the
+// desktop app; only platform.js differs. The secrets (password, Wi-Fi password) live in memory only,
+// in `secrets`, and are dropped once they are derived (docs/IMAGER.md, "Secrets").
+import { createStore } from '@lordos/sdk';
+import { platform } from './platform.js';
+import { defaultConfig, deviceById } from './core/catalog.js';
+import { parseReleases } from './core/releases.js';
+import * as firstrun from './core/firstrun.js';
+
+export const STEPS = ['device', 'image', 'storage', 'customise', 'write'];
+
+const OPTION_DEFAULTS = { sound: true, eject: true, appUpdates: true, theme: 'auto', lang: '', showOld: false };
+
+function initial() {
+ const d = platform.defaults();
+ const cfg = { ...defaultConfig(), lang: d.lang, timezone: d.timezone, keyboard: d.keyboard, variant: d.variant, wifiCountry: d.country };
+ return {
+ step: 'device', device: 'rpi5',
+ releases: { state: 'idle', list: [], error: null },
+ image: null, // { official, release?, name, size, raw, path?, sums?, sig? }
+ drive: null,
+ customise: true, cfg, tab: 'general',
+ secrets: { password: '', confirm: '', wifiPassword: '' },
+ showErrors: false,
+ job: null, // the write pipeline (see run())
+ options: { ...OPTION_DEFAULTS, ...platform.loadOptions() },
+ dialog: null, // 'options' | 'confirm' | 'profiles' | 'cancel'
+ };
+}
+
+export const app = createStore(initial());
+export const set = (p) => app.set((s) => ({ ...s, ...(typeof p === 'function' ? p(s) : p) }));
+export const setCfg = (p) => app.set((s) => ({ ...s, cfg: { ...s.cfg, ...p } }));
+export const setSecrets = (p) => app.set((s) => ({ ...s, secrets: { ...s.secrets, ...p } }));
+export const setOptions = (p) => { platform.saveOptions(p); app.set((s) => ({ ...s, options: { ...s.options, ...p } })); };
+export function restart({ keepCfg = true } = {}) {
+ const s = app.get();
+ const fresh = initial();
+ app.set({ ...fresh, device: s.device, releases: s.releases, image: s.image, cfg: keepCfg ? s.cfg : fresh.cfg, step: 'storage' });
+}
+
+// ---- releases ----
+
+export async function loadReleases() {
+ const s = app.get();
+ if (s.releases.state === 'loading') return;
+ set({ releases: { ...s.releases, state: 'loading', error: null } });
+ try {
+ const text = await platform.releases();
+ const list = parseReleases(text, app.get().device);
+ // the latest is chosen unless the user already chose something
+ set((st) => ({ releases: { state: 'ok', list, error: null, all: text }, image: st.image || (list[0] ? officialImage(list[0]) : null) }));
+ } catch (e) {
+ // offline: what was fetched before still works (the signature is checked again before writing)
+ const cached = platform.cachedReleases();
+ const list = cached ? parseReleases(cached, app.get().device) : [];
+ set({ releases: { state: list.length ? 'stale' : 'error', list, error: e.message || String(e), all: cached } });
+ }
+}
+
+export function chooseDevice(id) {
+ const s = app.get();
+ if (s.device === id) return;
+ const text = s.releases.all;
+ set({ device: id, image: null, releases: { ...s.releases, list: text ? parseReleases(text, id) : [] } });
+}
+
+export function officialImage(r) {
+ return { official: true, release: r, name: r.image.name, size: r.image.size, raw: null, tag: r.tag };
+}
+
+// ---- the pipeline: download → check the signature → derive secrets → write → verify → first run → eject ----
+
+const now = () => Date.now();
+
+function setJob(p) { app.set((s) => ({ ...s, job: s.job ? { ...s.job, ...p } : p })); }
+
+// speed and time left from the last samples of one phase (bytes per second, smoothed)
+function progress(phase, done, total) {
+ const j = app.get().job || {};
+ const t = now();
+ let { speed = 0, last } = j.phase === phase ? j : {};
+ if (last && t > last.t) {
+ const inst = ((done - last.done) * 1000) / (t - last.t);
+ if (inst >= 0) speed = speed ? speed * 0.8 + inst * 0.2 : inst;
+ }
+ const eta = speed > 0 && total > done ? (total - done) / speed : null;
+ setJob({ phase, done, total, speed, eta, last: { t, done } });
+}
+
+export async function run() {
+ const s = app.get();
+ const dev = deviceById(s.device);
+ const img = s.image;
+ const drive = s.drive;
+ const custom = s.customise && dev.customise;
+ app.set((st) => ({ ...st, dialog: null, job: { phase: 'prepare', started: now(), done: 0, total: 0, phases: [], cancel: false, error: null, result: null } }));
+ const mark = (p) => app.set((st) => ({ ...st, job: { ...st.job, phases: [...(st.job.phases || []), p] } }));
+ const cancelled = () => app.get().job?.cancel;
+ try {
+ let image = { ...img };
+ if (img.official) {
+ const r = img.release;
+ // the two small files first, then the signature, then (only if it verifies) the image
+ setJob({ phase: 'signature' });
+ const sumsPath = await platform.download(r.tag, r.sums);
+ const sigPath = await platform.download(r.tag, r.sig);
+ const check = platform.checkSums(await platform.readText(sumsPath), await platform.readText(sigPath));
+ if (!check || !check.ok) throw Object.assign(new Error('imager.err.badSignature'), { code: 'imager.badSignature' });
+ if (!check.files[r.image.name]) throw Object.assign(new Error('imager.err.notListed'), { code: 'imager.notListed' });
+ mark('signature');
+ if (cancelled()) throw Object.assign(new Error('cancel'), { code: 'cancelled' });
+ if (!platform.isCached(r.tag, r.image)) {
+ setJob({ phase: 'download', done: platform.partialSize(r.tag, r.image), total: r.image.size });
+ await platform.download(r.tag, r.image, (p) => progress('download', p.done, r.image.size));
+ }
+ mark('download');
+ image = { ...image, path: platform.cachePath(r.tag, r.image.name), sums: sumsPath, sig: sigPath, sha256: check.files[r.image.name] };
+ }
+ if (cancelled()) throw Object.assign(new Error('cancel'), { code: 'cancelled' });
+ // the secrets become a hash and a key now; the plain ones are forgotten
+ let text = null;
+ if (custom) {
+ setJob({ phase: 'secrets' });
+ const sec = app.get().secrets;
+ const passwordHash = s.cfg.user.name ? await platform.hashPassword(sec.password) : null;
+ if (s.cfg.user.name && !passwordHash) throw Object.assign(new Error('imager.err.hashFailed'), { code: 'imager.hashFailed' });
+ const psk = s.cfg.wifi.enabled && !s.cfg.wifi.open ? await platform.wifiPsk(s.cfg.wifi.ssid, sec.wifiPassword) : null;
+ if (s.cfg.wifi.enabled && !s.cfg.wifi.open && !psk) throw Object.assign(new Error('imager.err.wifiPassLength'), { code: 'imager.pskFailed' });
+ text = firstrun.build(s.cfg, { passwordHash, psk });
+ app.set((st) => ({ ...st, secrets: { password: '', confirm: '', wifiPassword: '' } }));
+ }
+ setJob({ phase: 'write', done: 0, total: 0, speed: 0, eta: null, last: null });
+ const result = await platform.write({ drive, image }, (p) => progress(p.phase, p.done, p.total));
+ mark('write');
+ mark('verify');
+ if (custom) {
+ setJob({ phase: 'firstrun' });
+ await platform.writeFirstRun(drive, text, firstrun.FIRSTRUN_NAME);
+ mark('firstrun');
+ }
+ let ejected = false;
+ if (app.get().options.eject) {
+ setJob({ phase: 'eject' });
+ try { await platform.eject(drive); ejected = true; } catch { /* the card can still be removed after unmounting */ }
+ mark('eject');
+ }
+ const j = app.get().job;
+ setJob({ phase: 'done', result: { ...result, ejected, custom, seconds: Math.round((now() - j.started) / 1000) } });
+ set({ step: 'done' });
+ return true;
+ } catch (e) {
+ const code = e.code || '';
+ setJob({ phase: 'failed', error: { code, message: code === 'cancelled' || /cancel/i.test(code) ? null : (e.message || String(e)) }, cancelledByUser: !!app.get().job?.cancel });
+ return false;
+ }
+}
+
+export async function cancel() {
+ const s = app.get();
+ if (!s.job) return;
+ setJob({ cancel: true });
+ if (s.job.phase === 'download' || s.job.phase === 'signature') await platform.cancelDownload();
+ else if (['write', 'check', 'verify', 'prepare'].includes(s.job.phase)) await platform.cancelWrite(s.drive);
+}
+
+export const isBusy = (job) => !!job && !['done', 'failed'].includes(job.phase);
diff --git a/apps/imager/ui/Options.jsx b/apps/imager/ui/Options.jsx
new file mode 100644
index 0000000..f280253
--- /dev/null
+++ b/apps/imager/ui/Options.jsx
@@ -0,0 +1,62 @@
+// App options: sound and eject when finished, updates of the app, language and theme (the desktop
+// app; on LordOS they follow the system), the download cache. No telemetry, ever.
+import { View, Text, Button, useTheme, useLocale, typeScale, spacing } from '@lordos/sdk';
+import { useState } from 'react';
+import { platform } from '../platform.js';
+import { set, setOptions } from '../state.js';
+import { LANGUAGES } from '../core/catalog.js';
+import { Group, SwitchRow, Choice, KeyValue } from './kit.jsx';
+import { formatSize } from './format.js';
+
+export function OptionsDialog({ s }) {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ const o = s.options;
+ const [cache, setCache] = useState(() => platform.cacheSize());
+ const [clearing, setClearing] = useState(false);
+ const close = () => set({ dialog: null });
+ return (
+ <View onClick={close} style={{ position: 'absolute', left: 0, top: 0, right: 0, bottom: 0, backgroundColor: 'rgba(0,0,0,0.3)', alignItems: 'center', justifyContent: 'center' }}>
+ <View onClick={(e) => e.stopPropagation?.()} {...platform.a11y({ role: 'dialog', label: tr('imager.options.title') })}
+ style={{ width: 480, padding: 20, gap: spacing.l, borderRadius: t.groupRadius + 2, backgroundColor: t.windowBg, border: `1px solid ${t.separator}`, boxShadow: '0 14px 36px rgba(0,0,0,0.45)' }}>
+ <Text style={{ fontSize: typeScale.headline, fontWeight: 600, color: t.text }}>{tr('imager.options.title')}</Text>
+ <Group>
+ <SwitchRow id="o-sound" label={tr('imager.options.sound')} on={o.sound} onChange={(sound) => setOptions({ sound })} />
+ <SwitchRow id="o-eject" label={tr('imager.options.eject')} detail={tr('imager.options.ejectHint')} on={o.eject} onChange={(eject) => setOptions({ eject })} />
+ {platform.appUpdates ? (
+ <SwitchRow id="o-upd" label={tr('imager.options.updates')} detail={tr('imager.options.updatesHint')} on={o.appUpdates} onChange={(appUpdates) => setOptions({ appUpdates })} />
+ ) : (
+ <View style={{ paddingVertical: 9 }}><Text style={{ fontSize: typeScale.caption, color: t.textDim, lineHeight: 1.4 }}>{tr('imager.options.updatesSystem')}</Text></View>
+ )}
+ </Group>
+ {platform.followsSystem ? (
+ <Text style={{ fontSize: typeScale.caption, color: t.textDim, lineHeight: 1.4 }}>{tr('imager.options.followsSystem')}</Text>
+ ) : (
+ <Group>
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: spacing.m, paddingVertical: 8 }}>
+ <Text style={{ flex: 1, fontSize: typeScale.body, color: t.text }}>{tr('imager.options.language')}</Text>
+ <Choice id="o-lang" small label={tr('imager.options.language')} value={o.lang || ''} onChange={(lang) => { setOptions({ lang }); platform.setLanguage?.(lang); }}
+ options={[['', tr('imager.options.auto')], ...LANGUAGES.map((l) => [l.id, l.name])]} />
+ </View>
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: spacing.m, paddingVertical: 8 }}>
+ <Text style={{ flex: 1, fontSize: typeScale.body, color: t.text }}>{tr('imager.options.theme')}</Text>
+ <Choice id="o-theme" small label={tr('imager.options.theme')} value={o.theme} onChange={(theme) => { setOptions({ theme }); platform.setTheme?.(theme); }}
+ options={[['auto', tr('imager.options.auto')], ['light', tr('imager.look.light')], ['dark', tr('imager.look.dark')]]} />
+ </View>
+ </Group>
+ )}
+ <Group title={tr('imager.options.cache')}>
+ <KeyValue label={tr('imager.options.cacheWhere')} value={platform.cacheDir()} mono />
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: spacing.m, paddingVertical: 8 }}>
+ <Text style={{ flex: 1, fontSize: typeScale.body, color: t.text }}>{tr('imager.options.cacheSize', { size: formatSize(cache) })}</Text>
+ {platform.chooseCacheDir ? <Button small label={tr('imager.options.cacheMove')} onClick={async () => { await platform.chooseCacheDir(); setCache(platform.cacheSize()); }} /> : null}
+ <Button small label={tr(clearing ? 'imager.options.clearing' : 'imager.options.clear')} disabled={clearing || !cache}
+ onClick={async () => { setClearing(true); try { await platform.clearCache(); } finally { setClearing(false); setCache(platform.cacheSize()); } }} />
+ </View>
+ </Group>
+ <Text style={{ fontSize: typeScale.caption, color: t.textDim, lineHeight: 1.45 }}>{tr('imager.options.privacy')}</Text>
+ <View style={{ flexDirection: 'row', justifyContent: 'flex-end' }}><Button primary label={tr('imager.options.done')} onClick={close} /></View>
+ </View>
+ </View>
+ );
+}
diff --git a/apps/imager/ui/StepCustomise.jsx b/apps/imager/ui/StepCustomise.jsx
new file mode 100644
index 0000000..2a003dd
--- /dev/null
+++ b/apps/imager/ui/StepCustomise.jsx
@@ -0,0 +1,428 @@
+// Step 4 — customise the first boot (Raspberry Pi only): what goes into lordos-firstrun.txt. Every
+// field is checked with the board's own rules (core/validate.js = server/src/firstrun/firstrun.c).
+// Secrets stay in memory until the write starts; then only a hash and a derived key are kept.
+import { View, Text, Button, ScrollView, useTheme, useLocale, typeScale, spacing, tOptional } from '@lordos/sdk';
+import { useState } from 'react';
+import { platform } from '../platform.js';
+import { app, set, setCfg, setSecrets } from '../state.js';
+import * as v from '../core/validate.js';
+import * as firstrun from '../core/firstrun.js';
+import { COOLERS, LANGUAGES, ACCENTS, THEMES, WALLPAPERS, profilesFor, defaultProfile, overclockAllowed, coolerHasFan, defaultConfig } from '../core/catalog.js';
+import { Field, SwitchRow, Choice, Card, Group, Notice, PickList, Press, Badge } from './kit.jsx';
+import { CoolerArt, ThemeArt } from './art.jsx';
+import countries from '../data/countries.js';
+
+export const TABS = ['general', 'user', 'wifi', 'remote', 'look', 'cooling', 'more'];
+
+export function customiseProblems(s) { return firstrun.check(s.cfg, s.secrets); }
+const errFor = (s, field) => {
+ const p = customiseProblems(s).find((x) => x.field === field);
+ return p ? p.key : null;
+};
+function useErr(s) {
+ const { t: tr } = useLocale();
+ // a field shows its problem once it has a value, or after Next was pressed
+ return (field, value) => {
+ const k = errFor(s, field);
+ return k && (s.showErrors || (value !== undefined && value !== '' && value !== null)) ? tr(k) : null;
+ };
+}
+
+function General({ s }) {
+ const { t: tr } = useLocale();
+ const err = useErr(s);
+ const c = s.cfg;
+ const zones = platform.zones().map((z) => [z, z.replace(/_/g, ' ')]);
+ const layouts = platform.layouts().flatMap((l) => [[l.id, l.name], ...l.variants.map(([id, name]) => [`${l.id}(${id})`, name])]);
+ const kbId = c.keyboard ? (c.variant ? `${c.keyboard}(${c.variant})` : c.keyboard) : '';
+ const pickKb = (id) => { const m = /^([a-z]+)(?:\(([\w-]+)\))?$/.exec(id); if (m) setCfg({ keyboard: m[1], variant: m[2] || '' }); };
+ const cs = Object.keys(countries).map((k) => [k, `${tOptional(`countries.${k}`) || countries[k]} (${k})`]).sort((a, b) => a[1].localeCompare(b[1]));
+ return (
+ <View style={{ gap: spacing.xl }}>
+ <Field id="host" label={tr('imager.general.hostname')} value={c.hostname} placeholder={v.suggestHostname(c.user.fullname || c.user.name)}
+ onChange={(x) => setCfg({ hostname: x.toLowerCase().replace(/[^a-z0-9-]/g, '').slice(0, 63) })}
+ error={err('hostname', c.hostname)} hint={tr('imager.general.hostnameHint', { name: c.hostname || v.suggestHostname(c.user.fullname || c.user.name) })} suffix=".local" />
+ <View style={{ gap: 6 }}>
+ <Text style={{ fontSize: typeScale.callout, fontWeight: 600, color: useTheme().text }}>{tr('imager.general.language')}</Text>
+ <Choice id="lang" label={tr('imager.general.language')} value={c.lang} onChange={(lang) => setCfg({ lang })} options={LANGUAGES.map((l) => [l.id, l.name])} />
+ </View>
+ <View style={{ flexDirection: 'row', gap: spacing.l }}>
+ <View style={{ flex: 1, gap: 6 }}>
+ <Text style={{ fontSize: typeScale.callout, fontWeight: 600, color: useTheme().text }}>{tr('imager.general.zone')}</Text>
+ <PickList id="zone" items={zones} value={c.timezone} onPick={(timezone) => setCfg({ timezone })} placeholder={tr('imager.search')} />
+ </View>
+ <View style={{ flex: 1, gap: 6 }}>
+ <Text style={{ fontSize: typeScale.callout, fontWeight: 600, color: useTheme().text }}>{tr('imager.general.keyboard')}</Text>
+ <PickList id="kb" items={layouts} value={kbId} onPick={pickKb} placeholder={tr('imager.search')} />
+ </View>
+ </View>
+ <View style={{ gap: 6 }}>
+ <Text style={{ fontSize: typeScale.callout, fontWeight: 600, color: useTheme().text }}>{tr('imager.general.country')}</Text>
+ <PickList id="country" items={cs} value={c.wifiCountry} onPick={(wifiCountry) => setCfg({ wifiCountry })} placeholder={tr('imager.search')} height={110} />
+ <Text style={{ fontSize: typeScale.caption, color: useTheme().textDim }}>{tr('imager.general.countryHint')}</Text>
+ </View>
+ </View>
+ );
+}
+
+function Strength({ p }) {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ if (!p) return null;
+ const st = v.strength(p);
+ const colors = ['#ff453a', '#ff6b3d', '#ff9f0a', '#a8d84b', '#30d158'];
+ return (
+ <View style={{ gap: 4 }}>
+ <View style={{ flexDirection: 'row', gap: 4 }}>
+ {[0, 1, 2, 3].map((i) => <View key={i} style={{ flex: 1, height: 4, borderRadius: 2, backgroundColor: i < Math.max(1, st.score) ? colors[st.score] : t.control }} />)}
+ </View>
+ <Text style={{ fontSize: typeScale.caption, color: t.textDim }}>
+ {tr(`imager.user.strength.${st.score}`)}{st.hints.length ? ` · ${st.hints.map((h) => tr(h)).join(' · ')}` : ''}
+ </Text>
+ </View>
+ );
+}
+
+function User({ s }) {
+ const { t: tr } = useLocale();
+ const err = useErr(s);
+ const c = s.cfg, sec = s.secrets;
+ const [show, setShow] = useState(false);
+ const setUser = (p) => setCfg({ user: { ...c.user, ...p } });
+ return (
+ <View style={{ gap: spacing.xl }}>
+ <Notice tone="info" title={tr('imager.user.introTitle')}>{tr('imager.user.intro')}</Notice>
+ <Field id="full" label={tr('imager.user.fullname')} value={c.user.fullname} placeholder={tr('imager.user.fullnamePh')}
+ onChange={(fullname) => setUser({ fullname, ...(c.user.edited ? {} : { name: v.suggestUser(fullname) }) })} error={err('fullname', c.user.fullname)} />
+ <Field id="user" label={tr('imager.user.name')} value={c.user.name} placeholder="ana" mono
+ onChange={(name) => setUser({ name: name.toLowerCase().replace(/[^a-z0-9_-]/g, '').slice(0, 32), edited: true })}
+ error={err('user', c.user.name)} hint={tr('imager.user.nameHint')} />
+ <View style={{ flexDirection: 'row', gap: spacing.l }}>
+ <View style={{ flex: 1 }}>
+ <Field id="pass" label={tr('imager.user.password')} value={sec.password} secure={!show} onChange={(password) => setSecrets({ password })}
+ error={c.user.name ? err('password', sec.password || (s.showErrors ? '' : undefined)) : null} />
+ </View>
+ <View style={{ flex: 1 }}>
+ <Field id="pass2" label={tr('imager.user.confirm')} value={sec.confirm} secure={!show} onChange={(confirm) => setSecrets({ confirm })}
+ error={sec.confirm && sec.confirm !== sec.password ? tr('imager.err.passMismatch') : null} />
+ </View>
+ </View>
+ <Strength p={sec.password} />
+ <Press id="showpass" label={tr(show ? 'imager.user.hide' : 'imager.user.show')} onClick={() => setShow(!show)} style={{ alignSelf: 'flex-start', paddingVertical: 2, paddingHorizontal: 4, borderRadius: 5 }}>
+ <Text style={{ fontSize: typeScale.callout, color: useTheme().accent }}>{tr(show ? 'imager.user.hide' : 'imager.user.show')}</Text>
+ </Press>
+ <Group footer={tr('imager.user.hashNote')}>
+ <SwitchRow id="autologin" label={tr('imager.user.autologin')} detail={tr('imager.user.autologinHint')} on={c.user.autologin} onChange={(autologin) => setUser({ autologin })} />
+ </Group>
+ </View>
+ );
+}
+
+function Wifi({ s }) {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ const err = useErr(s);
+ const w = s.cfg.wifi, sec = s.secrets;
+ const [scan, setScan] = useState(null);
+ const [show, setShow] = useState(false);
+ const setW = (p) => setCfg({ wifi: { ...w, ...p } });
+ const doScan = async () => {
+ setScan('busy');
+ try { const r = await platform.scanWifi(); setScan(r === null ? 'noRadio' : r.length ? r : 'none'); } catch { setScan('none'); }
+ };
+ return (
+ <View style={{ gap: spacing.xl }}>
+ <Group>
+ <SwitchRow id="wifi" label={tr('imager.wifi.enable')} detail={tr('imager.wifi.enableHint')} on={w.enabled} onChange={(enabled) => setW({ enabled })} />
+ </Group>
+ {w.enabled ? (
+ <>
+ <View style={{ flexDirection: 'row', gap: spacing.s, alignItems: 'flex-end' }}>
+ <View style={{ flex: 1 }}>
+ <Field id="ssid" label={tr('imager.wifi.ssid')} value={w.ssid} onChange={(ssid) => setW({ ssid })} error={err('ssid', w.ssid)} placeholder={tr('imager.wifi.ssidPh')} />
+ </View>
+ {platform.scanWifi ? <Button label={tr(scan === 'busy' ? 'imager.wifi.scanning' : 'imager.wifi.scan')} onClick={doScan} disabled={scan === 'busy'} /> : null}
+ </View>
+ {Array.isArray(scan) && scan.length ? (
+ <View style={{ flexDirection: 'row', flexWrap: 'wrap', gap: 6 }}>
+ {scan.slice(0, 12).map((n) => (
+ <Press key={n.ssid} label={n.ssid} onClick={() => setW({ ssid: n.ssid, open: n.security === 'open' })}
+ style={{ paddingHorizontal: 10, height: 24, borderRadius: 12, justifyContent: 'center', backgroundColor: n.ssid === w.ssid ? t.accent : t.control }}>
+ <Text style={{ fontSize: typeScale.caption, color: n.ssid === w.ssid ? '#fff' : t.text }}>{n.security === 'open' ? `${n.ssid} · ${tr('imager.wifi.openShort')}` : n.ssid}</Text>
+ </Press>
+ ))}
+ </View>
+ ) : scan === 'none' || scan === 'noRadio' ? <Text style={{ fontSize: typeScale.caption, color: t.textDim }}>{tr(scan === 'noRadio' ? 'imager.wifi.noRadio' : 'imager.wifi.scanNone')}</Text> : null}
+ <Choice id="wsec" label={tr('imager.wifi.security')} value={w.open ? 'open' : 'wpa'} onChange={(x) => setW({ open: x === 'open' })}
+ options={[['wpa', tr('imager.wifi.wpa')], ['open', tr('imager.wifi.open')]]} />
+ {!w.open ? (
+ <View style={{ gap: 6 }}>
+ <Field id="wpass" label={tr('imager.wifi.password')} value={sec.wifiPassword} secure={!show} onChange={(wifiPassword) => setSecrets({ wifiPassword })}
+ error={err('wifiPassword', sec.wifiPassword || (s.showErrors ? '' : undefined))} hint={tr('imager.wifi.passwordHint')} />
+ <Press id="wshow" label={tr(show ? 'imager.user.hide' : 'imager.user.show')} onClick={() => setShow(!show)} style={{ alignSelf: 'flex-start', paddingVertical: 2, paddingHorizontal: 4, borderRadius: 5 }}>
+ <Text style={{ fontSize: typeScale.callout, color: t.accent }}>{tr(show ? 'imager.user.hide' : 'imager.user.show')}</Text>
+ </Press>
+ </View>
+ ) : <Notice tone="warn" title={tr('imager.wifi.openWarnTitle')}>{tr('imager.wifi.openWarn')}</Notice>}
+ <Group>
+ <SwitchRow id="hidden" label={tr('imager.wifi.hidden')} detail={tr('imager.wifi.hiddenHint')} on={w.hidden} onChange={(hidden) => setW({ hidden })} />
+ </Group>
+ <Text style={{ fontSize: typeScale.caption, color: t.textDim, lineHeight: 1.45 }}>{tr('imager.wifi.pskNote')}</Text>
+ </>
+ ) : <Text style={{ fontSize: typeScale.callout, color: t.textDim, lineHeight: 1.45 }}>{tr('imager.wifi.ethernet')}</Text>}
+ </View>
+ );
+}
+
+function Remote({ s }) {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ const c = s.cfg;
+ const [paste, setPaste] = useState('');
+ const [msg, setMsg] = useState(null);
+ const addKeys = (text) => {
+ const r = v.sshKeys(text);
+ const merged = [...c.sshKeys];
+ for (const k of r.keys) if (!merged.some((x) => x.line === k.line) && merged.length < 16) merged.push(k);
+ setCfg({ sshKeys: merged });
+ setMsg(r.errors.length ? tr(r.errors[0]) : r.keys.length ? null : tr('imager.err.keyEmpty'));
+ if (r.keys.length) setPaste('');
+ };
+ const noUser = !c.user.name;
+ return (
+ <View style={{ gap: spacing.xl }}>
+ {noUser ? <Notice tone="warn" title={tr('imager.remote.needUserTitle')}>{tr('imager.remote.needUser')}</Notice> : null}
+ <View style={{ gap: 8, opacity: noUser ? 0.5 : 1 }}>
+ <Text style={{ fontSize: typeScale.headline, fontWeight: 600, color: t.text }}>{tr('imager.remote.ssh')}</Text>
+ <Text style={{ fontSize: typeScale.callout, color: t.textDim, lineHeight: 1.45 }}>{tr('imager.remote.sshText')}</Text>
+ <Choice id="ssh" label={tr('imager.remote.ssh')} value={c.ssh} onChange={(ssh) => !noUser && setCfg({ ssh })}
+ options={[['off', tr('imager.remote.sshOff')], ['keys', tr('imager.remote.sshKeys')], ['password', tr('imager.remote.sshPassword')]]} />
+ {c.ssh === 'password' ? <Notice tone="warn" title={tr('imager.remote.passwordWarnTitle')}>{tr('imager.remote.passwordWarn')}</Notice> : null}
+ {c.ssh !== 'off' ? (
+ <View style={{ gap: 8, marginTop: 4 }}>
+ {c.sshKeys.map((k) => (
+ <View key={k.line} style={{ flexDirection: 'row', alignItems: 'center', gap: 8, padding: 8, borderRadius: 8, backgroundColor: t.hover }}>
+ <Badge tone="ok">{k.type.replace('sk-', '').replace('@openssh.com', '').replace('ecdsa-sha2-', 'ecdsa ')}</Badge>
+ <Text style={{ flex: 1, fontSize: typeScale.caption, color: t.text, fontFamily: 'monospace', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>
+ {k.comment || `${k.line.split(' ')[1].slice(0, 24)}…`}
+ </Text>
+ <Button small plain label={tr('imager.remote.remove')} onClick={() => setCfg({ sshKeys: c.sshKeys.filter((x) => x.line !== k.line) })} />
+ </View>
+ ))}
+ <Field id="keypaste" label={tr('imager.remote.addKey')} value={paste} onChange={setPaste} placeholder="ssh-ed25519 AAAA… you@computer" mono onSubmit={() => addKeys(paste)}
+ error={msg} hint={tr('imager.remote.addKeyHint')} />
+ <View style={{ flexDirection: 'row', gap: spacing.s }}>
+ <Button small label={tr('imager.remote.add')} onClick={() => addKeys(paste)} disabled={!paste.trim()} />
+ <Button small label={tr('imager.remote.pickKey')} onClick={async () => { const txt = await platform.pickKeyFile(); if (txt) addKeys(txt); }} />
+ </View>
+ </View>
+ ) : null}
+ </View>
+ <View style={{ height: 1, backgroundColor: t.separator }} />
+ <View style={{ gap: 8, opacity: noUser ? 0.5 : 1 }}>
+ <Text style={{ fontSize: typeScale.headline, fontWeight: 600, color: t.text }}>{tr('imager.remote.desktop')}</Text>
+ <Group footer={tr('imager.remote.desktopFooter')}>
+ <SwitchRow id="rdp" label={tr('imager.remote.desktopOn')} detail={tr('imager.remote.desktopHint', { host: c.hostname || 'lordos-pi' })} on={c.remote}
+ onChange={(remote) => !noUser && setCfg({ remote })} disabled={noUser} />
+ </Group>
+ </View>
+ </View>
+ );
+}
+
+function Look({ s }) {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ const c = s.cfg;
+ const accent = ACCENTS.find((a) => a.id === c.accent)?.color || '#0a84ff';
+ return (
+ <View style={{ gap: spacing.xl }}>
+ <View style={{ gap: 8 }}>
+ <Text style={{ fontSize: typeScale.callout, fontWeight: 600, color: t.text }}>{tr('imager.look.style')}</Text>
+ <View style={{ flexDirection: 'row', gap: spacing.l }}>
+ {THEMES.map((th) => (
+ <Card key={th} id={`theme-${th}`} label={tr(`imager.look.theme.${th}`)} selected={c.theme === th} onClick={() => setCfg({ theme: th })} style={{ alignItems: 'center', padding: 12 }}>
+ <ThemeArt theme={th} mode={c.mode} accent={accent} width={170} />
+ <Text style={{ fontSize: typeScale.body, fontWeight: 600, color: t.text }}>{tr(`imager.look.theme.${th}`)}</Text>
+ <Text style={{ fontSize: typeScale.caption, color: t.textDim, textAlign: 'center', maxWidth: 170 }}>{tr(`imager.look.theme.${th}Hint`)}</Text>
+ </Card>
+ ))}
+ </View>
+ </View>
+ <View style={{ gap: 8 }}>
+ <Text style={{ fontSize: typeScale.callout, fontWeight: 600, color: t.text }}>{tr('imager.look.mode')}</Text>
+ <Choice id="mode" label={tr('imager.look.mode')} value={c.mode} onChange={(mode) => setCfg({ mode })} options={[['light', tr('imager.look.light')], ['dark', tr('imager.look.dark')]]} />
+ </View>
+ <View style={{ gap: 8 }}>
+ <Text style={{ fontSize: typeScale.callout, fontWeight: 600, color: t.text }}>{tr('imager.look.accent')}</Text>
+ <View style={{ flexDirection: 'row', gap: 10 }} {...platform.a11y({ role: 'radiogroup', label: tr('imager.look.accent') })}>
+ {ACCENTS.map((a) => (
+ <Press key={a.id} id={`acc-${a.id}`} label={tr(`imager.look.accents.${a.id}`)} role="radio" selected={c.accent === a.id} onClick={() => setCfg({ accent: a.id })} ringRadius={14}
+ style={{ width: 28, height: 28, borderRadius: 14, backgroundColor: a.color, alignItems: 'center', justifyContent: 'center', border: c.accent === a.id ? `3px solid ${t.windowBg}` : 'none',
+ boxShadow: c.accent === a.id ? `0 0 0 2px ${a.color}` : 'none' }}>
+ {c.accent === a.id ? <Text style={{ fontSize: 12, fontWeight: 700, color: '#fff' }}>✓</Text> : null}
+ </Press>
+ ))}
+ </View>
+ </View>
+ <View style={{ gap: 8 }}>
+ <Text style={{ fontSize: typeScale.callout, fontWeight: 600, color: t.text }}>{tr('imager.look.wallpaper')}</Text>
+ <Choice id="wall" label={tr('imager.look.wallpaper')} value={c.wallpaper} onChange={(wallpaper) => setCfg({ wallpaper })}
+ options={WALLPAPERS.map((w) => [w, tOptional(`shell.wallpaper.${w}`) || w])} />
+ </View>
+ </View>
+ );
+}
+
+function Cooling({ s }) {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ const c = s.cfg;
+ const profiles = c.cooler ? profilesFor(c.cooler) : [];
+ const pick = (cooler) => setCfg({ cooler, performance: profilesFor(cooler).includes(c.performance) ? c.performance : defaultProfile(cooler), overclock: overclockAllowed(cooler) && c.overclock });
+ return (
+ <View style={{ gap: spacing.xl }}>
+ <Text style={{ fontSize: typeScale.callout, color: t.textDim, lineHeight: 1.45 }}>{tr('imager.cooling.text')}</Text>
+ <View style={{ flexDirection: 'row', gap: spacing.m, flexWrap: 'wrap' }}>
+ {COOLERS.map((k) => (
+ <Card key={k.id} id={`cool-${k.id}`} label={tr(`imager.cooling.${k.id}`)} selected={c.cooler === k.id} onClick={() => pick(k.id)} style={{ width: 150, alignItems: 'center', padding: 12 }}>
+ <CoolerArt kind={k.id} size={96} />
+ <Text style={{ fontSize: typeScale.body, fontWeight: 600, color: t.text, textAlign: 'center' }}>{tr(`imager.cooling.${k.id}`)}</Text>
+ <Text style={{ fontSize: typeScale.caption, color: t.textDim, textAlign: 'center', lineHeight: 1.35 }}>{tr(`imager.cooling.${k.id}Hint`)}</Text>
+ </Card>
+ ))}
+ </View>
+ {c.cooler ? (
+ <View style={{ gap: 8 }}>
+ <Text style={{ fontSize: typeScale.callout, fontWeight: 600, color: t.text }}>{tr('imager.cooling.profile')}</Text>
+ <Choice id="perf" label={tr('imager.cooling.profile')} value={c.performance} onChange={(performance) => setCfg({ performance })}
+ options={profiles.map((p) => [p, tr(`imager.cooling.p.${p}`)])} />
+ <Text style={{ fontSize: typeScale.caption, color: t.textDim, lineHeight: 1.45 }}>{tr(`imager.cooling.p.${c.performance}Hint`)}</Text>
+ </View>
+ ) : <Text style={{ fontSize: typeScale.caption, color: t.textDim }}>{tr('imager.cooling.unset')}</Text>}
+ {coolerHasFan(c.cooler) ? (
+ <View style={{ gap: spacing.s }}>
+ <Group>
+ <SwitchRow id="oc" label={tr('imager.cooling.overclock')} detail={tr('imager.cooling.overclockHint')} on={c.overclock} onChange={(overclock) => setCfg({ overclock })} />
+ </Group>
+ {c.overclock ? <Notice tone="warn" title={tr('imager.cooling.overclockWarnTitle')}>{tr('imager.cooling.overclockWarn')}</Notice> : null}
+ </View>
+ ) : c.cooler === 'none' ? <Notice tone="warn" title={tr('imager.cooling.noneWarnTitle')}>{tr('imager.cooling.noneWarn')}</Notice> : null}
+ </View>
+ );
+}
+
+function More({ s }) {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ const c = s.cfg;
+ return (
+ <View style={{ gap: spacing.xl }}>
+ <Group>
+ <SwitchRow id="bt" label={tr('imager.more.bluetooth')} detail={tr('imager.more.bluetoothHint')} on={c.bluetooth} onChange={(bluetooth) => setCfg({ bluetooth })} />
+ <SwitchRow id="upd" label={tr('imager.more.updates')} detail={tr('imager.more.updatesHint')} on={c.autoUpdates} onChange={(autoUpdates) => setCfg({ autoUpdates })} />
+ </Group>
+ <Group title={tr('imager.more.privacy')}>
+ <View style={{ paddingVertical: 10, gap: 4 }}>
+ <Text style={{ fontSize: typeScale.body, fontWeight: 600, color: t.text }}>{tr('imager.more.telemetryTitle')}</Text>
+ <Text style={{ fontSize: typeScale.callout, color: t.textDim, lineHeight: 1.45 }}>{tr('imager.more.telemetry')}</Text>
+ </View>
+ </Group>
+ </View>
+ );
+}
+
+function ProfilesSheet({ s, onClose }) {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ const [list, setList] = useState(() => platform.loadProfiles());
+ const [name, setName] = useState(s.cfg.hostname || '');
+ const save = () => {
+ if (!name.trim()) return;
+ const p = firstrun.toProfile(name.trim(), s.cfg);
+ const next = [...list.filter((x) => x.name !== p.name), p].slice(-20);
+ platform.saveProfiles(next);
+ setList(next);
+ };
+ const load = (p) => {
+ const cfg = firstrun.fromProfile(p, defaultConfig());
+ if (cfg) { set({ cfg }); onClose(); }
+ };
+ const del = (p) => { const next = list.filter((x) => x.name !== p.name); platform.saveProfiles(next); setList(next); };
+ return (
+ <View onClick={onClose} style={{ position: 'absolute', left: 0, top: 0, right: 0, bottom: 0, backgroundColor: 'rgba(0,0,0,0.3)', alignItems: 'center', justifyContent: 'center' }}>
+ <View onClick={(e) => e.stopPropagation?.()} {...platform.a11y({ role: 'dialog', label: tr('imager.profiles.title') })}
+ style={{ width: 440, padding: 20, gap: 12, borderRadius: t.groupRadius + 2, backgroundColor: t.windowBg, border: `1px solid ${t.separator}`, boxShadow: '0 14px 36px rgba(0,0,0,0.45)' }}>
+ <Text style={{ fontSize: typeScale.headline, fontWeight: 600, color: t.text }}>{tr('imager.profiles.title')}</Text>
+ <Text style={{ fontSize: typeScale.callout, color: t.textDim, lineHeight: 1.45 }}>{tr('imager.profiles.text')}</Text>
+ <View style={{ flexDirection: 'row', gap: 8, alignItems: 'flex-end' }}>
+ <View style={{ flex: 1 }}><Field id="pname" label={tr('imager.profiles.name')} value={name} onChange={(x) => setName(x.slice(0, 64))} onSubmit={save} /></View>
+ <Button primary label={tr('imager.profiles.save')} onClick={save} disabled={!name.trim()} />
+ </View>
+ <View style={{ maxHeight: 220 }}>
+ <ScrollView style={{ maxHeight: 220 }}>
+ {list.length ? list.map((p) => (
+ <View key={p.name} style={{ flexDirection: 'row', alignItems: 'center', gap: 8, paddingVertical: 6, borderTopWidth: 1, borderTopColor: t.separator }}>
+ <Text style={{ flex: 1, fontSize: typeScale.body, color: t.text }}>{p.name}</Text>
+ <Button small label={tr('imager.profiles.load')} onClick={() => load(p)} />
+ <Button small plain label={tr('imager.profiles.delete')} onClick={() => del(p)} />
+ </View>
+ )) : <Text style={{ fontSize: typeScale.caption, color: t.textDim }}>{tr('imager.profiles.none')}</Text>}
+ </ScrollView>
+ </View>
+ <View style={{ flexDirection: 'row', justifyContent: 'flex-end' }}><Button label={tr('imager.profiles.close')} onClick={onClose} /></View>
+ </View>
+ </View>
+ );
+}
+
+export function CustomiseStep({ s }) {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ const [profiles, setProfiles] = useState(false);
+ const Body = { general: General, user: User, wifi: Wifi, remote: Remote, look: Look, cooling: Cooling, more: More }[s.tab];
+ const problems = s.customise ? customiseProblems(s) : [];
+ const tabOf = { hostname: 'general', timezone: 'general', user: 'user', fullname: 'user', password: 'user', ssid: 'wifi', wifiPassword: 'wifi',
+ ssh: 'remote', remote: 'remote', overclock: 'cooling', performance: 'cooling' };
+ const bad = new Set(problems.map((p) => tabOf[p.field]));
+ return (
+ <View style={{ flex: 1 }}>
+ <View style={{ paddingHorizontal: 28, paddingTop: 24, gap: 12 }}>
+ <View style={{ flexDirection: 'row', alignItems: 'flex-start', gap: spacing.l }}>
+ <View style={{ flex: 1, gap: 6 }}>
+ <Text style={{ fontSize: typeScale.largeTitle, fontWeight: 600, color: t.text }}>{tr('imager.custom.title')}</Text>
+ <Text style={{ fontSize: typeScale.body, color: t.textDim, lineHeight: 1.45 }}>{tr('imager.custom.text')}</Text>
+ </View>
+ <Button small label={tr('imager.profiles.button')} onClick={() => setProfiles(true)} />
+ </View>
+ <Group>
+ <SwitchRow id="custom-on" label={tr('imager.custom.toggle')} detail={tr(s.customise ? 'imager.custom.toggleOn' : 'imager.custom.toggleOff')} on={s.customise} onChange={(customise) => set({ customise })} />
+ </Group>
+ {s.customise ? (
+ <View style={{ flexDirection: 'row', gap: 4, flexWrap: 'wrap', borderBottomWidth: 1, borderBottomColor: t.separator, paddingBottom: 8 }}
+ {...platform.a11y({ role: 'tablist', label: tr('imager.custom.title') })}>
+ {TABS.map((id) => (
+ <Press key={id} id={`tab-${id}`} label={tr(`imager.tab.${id}`)} role="tab" selected={s.tab === id} onClick={() => set({ tab: id })}
+ style={{ paddingHorizontal: 12, height: 28, borderRadius: 7, justifyContent: 'center', flexDirection: 'row', alignItems: 'center', gap: 5,
+ backgroundColor: s.tab === id ? (t.mode === 'dark' ? 'rgba(255,255,255,0.10)' : 'rgba(0,0,0,0.06)') : 'transparent' }}>
+ <Text style={{ fontSize: typeScale.callout, fontWeight: s.tab === id ? 600 : 500, color: s.tab === id ? t.text : t.textDim }}>{tr(`imager.tab.${id}`)}</Text>
+ {s.showErrors && bad.has(id) ? <View style={{ width: 6, height: 6, borderRadius: 3, backgroundColor: '#ff453a' }} /> : null}
+ </Press>
+ ))}
+ </View>
+ ) : null}
+ </View>
+ {s.customise ? (
+ <ScrollView key={s.tab} style={{ flex: 1 }} contentStyle={{ paddingHorizontal: 28, paddingTop: 18, paddingBottom: 24 }}>
+ {s.showErrors && problems.length ? <Notice tone="bad" title={tr('imager.custom.fix', { n: problems.length })} style={{ marginBottom: spacing.l }} /> : null}
+ <Body s={s} />
+ </ScrollView>
+ ) : (
+ <View style={{ flex: 1, paddingHorizontal: 28, paddingTop: 18 }}>
+ <Notice tone="info" title={tr('imager.custom.skipTitle')}>{tr('imager.custom.skipText')}</Notice>
+ </View>
+ )}
+ {profiles ? <ProfilesSheet s={s} onClose={() => setProfiles(false)} /> : null}
+ </View>
+ );
+}
diff --git a/apps/imager/ui/StepDevice.jsx b/apps/imager/ui/StepDevice.jsx
new file mode 100644
index 0000000..1f2b741
--- /dev/null
+++ b/apps/imager/ui/StepDevice.jsx
@@ -0,0 +1,78 @@
+// Step 1 — the device: the Raspberry Pi 5 (the only supported board), or a PC from a USB stick.
+import { View, Text, useTheme, useLocale, typeScale, spacing } from '@lordos/sdk';
+import { DEVICES, RAM_ADVICE } from '../core/catalog.js';
+import { chooseDevice } from '../state.js';
+import { Card, Badge, Group, SectionTitle } from './kit.jsx';
+import { BoardArt, PcArt } from './art.jsx';
+
+export function StepHeader({ title, text }) {
+ const t = useTheme();
+ return (
+ <View style={{ gap: 6, marginBottom: spacing.xl }}>
+ <Text style={{ fontSize: typeScale.largeTitle, fontWeight: 600, color: t.text }}>{title}</Text>
+ {text ? <Text style={{ fontSize: typeScale.body, color: t.textDim, lineHeight: 1.45, maxWidth: 620 }}>{text}</Text> : null}
+ </View>
+ );
+}
+
+function RamMeter() {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ const colors = { min: '#ff9f0a', comfortable: '#30d158', max: '#B46CFF' };
+ return (
+ <View style={{ gap: 8, paddingVertical: 10 }}>
+ <Text style={{ fontSize: typeScale.body, fontWeight: 600, color: t.text }}>{tr('imager.device.ramTitle')}</Text>
+ <View style={{ flexDirection: 'row', gap: 6 }}>
+ {RAM_ADVICE.map((r) => (
+ <View key={r.gb} style={{ flex: 1, gap: 4 }}>
+ <View style={{ height: 6, borderRadius: 3, backgroundColor: colors[r.level] }} />
+ <Text style={{ fontSize: typeScale.callout, fontWeight: 600, color: t.text }}>{tr('imager.device.ramGb', { n: r.gb })}</Text>
+ <Text style={{ fontSize: typeScale.caption, color: t.textDim, lineHeight: 1.35 }}>{tr(`imager.device.ram.${r.level}`)}</Text>
+ </View>
+ ))}
+ </View>
+ </View>
+ );
+}
+
+export function DeviceStep({ s }) {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ const supported = DEVICES.filter((d) => d.supported);
+ const other = DEVICES.filter((d) => !d.supported);
+ return (
+ <View>
+ <StepHeader title={tr('imager.device.title')} text={tr('imager.device.text')} />
+ <View style={{ flexDirection: 'row', gap: spacing.l, flexWrap: 'wrap' }}>
+ {supported.map((d) => (
+ <Card key={d.id} id={`dev-${d.id}`} label={d.name || tr('imager.device.pc')} selected={s.device === d.id} onClick={() => chooseDevice(d.id)}
+ style={{ width: 250, alignItems: 'center' }}>
+ {d.kind === 'pi' ? <BoardArt size={130} /> : <PcArt size={130} />}
+ <Text style={{ fontSize: typeScale.headline, fontWeight: 600, color: t.text, marginTop: 4 }}>{d.name || tr('imager.device.pc')}</Text>
+ <Text style={{ fontSize: typeScale.caption, color: t.textDim, textAlign: 'center', lineHeight: 1.4, alignSelf: 'stretch' }}>{tr(`imager.device.${d.id}.text`)}</Text>
+ <Badge tone="ok">{tr(d.kind === 'pi' ? 'imager.device.supported' : 'imager.device.liveUsb')}</Badge>
+ </Card>
+ ))}
+ </View>
+ {s.device === 'rpi5' ? (
+ <Group style={{ marginTop: spacing.xl }} footer={tr('imager.device.ramFooter')}>
+ <RamMeter />
+ </Group>
+ ) : (
+ <Group style={{ marginTop: spacing.xl }} footer={tr('imager.device.pcFooter')}>
+ <View style={{ paddingVertical: 10 }}><Text style={{ fontSize: typeScale.body, color: t.text, lineHeight: 1.45 }}>{tr('imager.device.pcText')}</Text></View>
+ </Group>
+ )}
+ <SectionTitle style={{ marginTop: spacing.xxl, marginBottom: spacing.s, fontSize: typeScale.body }}>{tr('imager.device.otherTitle')}</SectionTitle>
+ <Group>
+ {other.map((d) => (
+ <View key={d.id} style={{ flexDirection: 'row', alignItems: 'center', gap: spacing.m, minHeight: 36, paddingVertical: 4 }}>
+ <View style={{ opacity: 0.5 }}><BoardArt size={34} /></View>
+ <Text style={{ flex: 1, fontSize: typeScale.body, color: t.textDim }}>{d.name}</Text>
+ <Badge tone="dim">{tr(d.never ? 'imager.device.never' : 'imager.device.notYet')}</Badge>
+ </View>
+ ))}
+ </Group>
+ </View>
+ );
+}
diff --git a/apps/imager/ui/StepDone.jsx b/apps/imager/ui/StepDone.jsx
new file mode 100644
index 0000000..dffa23c
--- /dev/null
+++ b/apps/imager/ui/StepDone.jsx
@@ -0,0 +1,78 @@
+// Done — Lumo celebrates; what to do next with the card, and how to find the board on the network.
+import { View, Text, Button, ScrollView, Lumo, useTheme, useLocale, typeScale, spacing } from '@lordos/sdk';
+import { useEffect, useRef } from 'react';
+import { platform } from '../platform.js';
+import { app, restart } from '../state.js';
+import { deviceById } from '../core/catalog.js';
+import { Group, Badge } from './kit.jsx';
+import { formatSize } from './format.js';
+
+function StepRow({ n, title, text, mono }) {
+ const t = useTheme();
+ return (
+ <View style={{ flexDirection: 'row', gap: spacing.m, paddingVertical: 10 }}>
+ <View style={{ width: 22, height: 22, borderRadius: 11, backgroundColor: t.accent, alignItems: 'center', justifyContent: 'center' }}>
+ <Text style={{ fontSize: 11, fontWeight: 700, color: '#fff' }}>{String(n)}</Text>
+ </View>
+ <View style={{ flex: 1, gap: 3 }}>
+ <Text style={{ fontSize: typeScale.body, fontWeight: 600, color: t.text }}>{title}</Text>
+ {text ? <Text style={{ fontSize: typeScale.callout, color: t.textDim, lineHeight: 1.45, fontFamily: mono ? 'monospace' : undefined }}>{text}</Text> : null}
+ </View>
+ </View>
+ );
+}
+
+export function DoneStep({ s }) {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ const dev = deviceById(s.device);
+ const r = s.job?.result || {};
+ const host = `${s.cfg.hostname || 'lordos-pi'}.local`;
+ const announced = useRef(false);
+ useEffect(() => {
+ if (announced.current) return;
+ announced.current = true;
+ platform.done({ title: tr('imager.done.notifyTitle'), body: tr('imager.done.notifyBody', { name: s.drive?.model || '' }), sound: s.options.sound });
+ }, []);
+ const pi = dev.kind === 'pi';
+ const custom = s.customise && dev.customise;
+ return (
+ <ScrollView style={{ flex: 1 }} contentStyle={{ paddingHorizontal: 28, paddingTop: 26, paddingBottom: 26 }}>
+ <View style={{ alignItems: 'center', gap: 8, marginBottom: spacing.xl }}>
+ <Lumo pose="celebrate" size={128} />
+ <Text style={{ fontSize: typeScale.largeTitle, fontWeight: 600, color: t.text, textAlign: 'center' }}>{tr('imager.done.title')}</Text>
+ <Text style={{ fontSize: typeScale.body, color: t.textDim, textAlign: 'center', maxWidth: 520, lineHeight: 1.45 }}>
+ {tr(r.ejected ? 'imager.done.ejected' : 'imager.done.notEjected', { name: s.drive?.model || '' })}
+ </Text>
+ <View style={{ flexDirection: 'row', gap: 6, flexWrap: 'wrap', justifyContent: 'center' }}>
+ <Badge tone="ok">{tr('imager.done.verified')}</Badge>
+ {s.image?.official ? <Badge tone="ok">{tr('imager.image.signed')}</Badge> : <Badge tone="warn">{tr('imager.done.custom')}</Badge>}
+ {r.mbps ? <Badge tone="dim">{tr('imager.done.stats', { s: r.seconds || 0, speed: `${formatSize(r.mbps * 1e6)}/s` })}</Badge> : null}
+ </View>
+ </View>
+ <Group title={tr('imager.done.next')}>
+ {pi ? (
+ <>
+ <StepRow n={1} title={tr('imager.done.pi1')} text={tr('imager.done.pi1Text')} />
+ <StepRow n={2} title={tr('imager.done.pi2')} text={tr(custom ? 'imager.done.pi2Custom' : 'imager.done.pi2Setup')} />
+ <StepRow n={3} title={tr('imager.done.pi3')} text={tr('imager.done.pi3Text', { host })} />
+ {custom && s.cfg.ssh !== 'off' && s.cfg.user.name ? <StepRow n={4} title={tr('imager.done.ssh')} text={`ssh ${s.cfg.user.name}@${host}`} mono /> : null}
+ {custom && s.cfg.remote ? <StepRow n={custom && s.cfg.ssh !== 'off' ? 5 : 4} title={tr('imager.done.remote')} text={`https://${host}:5673`} mono /> : null}
+ </>
+ ) : (
+ <>
+ <StepRow n={1} title={tr('imager.done.pc1')} text={tr('imager.done.pc1Text')} />
+ <StepRow n={2} title={tr('imager.done.pc2')} text={tr('imager.done.pc2Text')} />
+ </>
+ )}
+ </Group>
+ {r.sha256 ? (
+ <Text style={{ fontSize: typeScale.caption, color: t.textDim, marginTop: spacing.l, fontFamily: 'monospace' }}>{`SHA-256 ${r.sha256}`}</Text>
+ ) : null}
+ <View style={{ flexDirection: 'row', justifyContent: 'center', gap: spacing.s, marginTop: spacing.xl }}>
+ <Button label={tr('imager.done.another')} onClick={() => restart({ keepCfg: true })} />
+ <Button primary label={tr('imager.done.newSetup')} onClick={() => restart({ keepCfg: false })} />
+ </View>
+ </ScrollView>
+ );
+}
diff --git a/apps/imager/ui/StepImage.jsx b/apps/imager/ui/StepImage.jsx
new file mode 100644
index 0000000..0e3420d
--- /dev/null
+++ b/apps/imager/ui/StepImage.jsx
@@ -0,0 +1,100 @@
+// Step 2 — the system image: the latest LordOS release (signed; downloaded and cached, resumable),
+// an older one, or a file of the user's own (with a clear warning: nobody vouches for it).
+import { View, Text, Button, LordOSLogo, useTheme, useLocale, formatDate, typeScale, spacing } from '@lordos/sdk';
+import { useState } from 'react';
+import { platform } from '../platform.js';
+import { app, set, loadReleases, officialImage, setOptions } from '../state.js';
+import { deviceById } from '../core/catalog.js';
+import { Card, Badge, Notice, Press } from './kit.jsx';
+import { StepHeader } from './StepDevice.jsx';
+import { formatSize } from './format.js';
+
+function ReleaseCard({ r, selected, latest }) {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ const cached = platform.isCached(r.tag, r.image);
+ const partial = !cached && platform.partialSize(r.tag, r.image);
+ return (
+ <Card id={`rel-${r.tag}`} label={`LordOS ${r.version}`} selected={selected} onClick={() => set({ image: officialImage(r) })}
+ style={{ flexDirection: 'row', alignItems: 'center', gap: spacing.l }}>
+ <LordOSLogo size={44} />
+ <View style={{ flex: 1, gap: 3 }}>
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: 8, flexWrap: 'wrap' }}>
+ <Text style={{ fontSize: typeScale.headline, fontWeight: 600, color: t.text }}>{`LordOS ${r.version}`}</Text>
+ {latest ? <Badge tone="info">{tr('imager.image.latest')}</Badge> : null}
+ {r.prerelease ? <Badge tone="warn">{tr('imager.image.beta')}</Badge> : null}
+ </View>
+ <Text style={{ fontSize: typeScale.caption, color: t.textDim }}>
+ {tr('imager.image.meta', { date: r.date ? formatDate(new Date(r.date), 'long') : '—', size: formatSize(r.image.size) })}
+ </Text>
+ <View style={{ flexDirection: 'row', gap: 6, marginTop: 2, flexWrap: 'wrap' }}>
+ <Badge tone="ok">{tr('imager.image.signed')}</Badge>
+ {cached ? <Badge tone="dim">{tr('imager.image.cached')}</Badge> : partial ? <Badge tone="dim">{tr('imager.image.partial', { size: formatSize(partial) })}</Badge> : null}
+ </View>
+ </View>
+ </Card>
+ );
+}
+
+export function ImageStep({ s }) {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ const dev = deviceById(s.device);
+ const [picking, setPicking] = useState(false);
+ const list = s.releases.list;
+ const showOld = s.options.showOld;
+ const shown = showOld ? list : list.slice(0, 1);
+ const pickFile = async () => {
+ setPicking(true);
+ try {
+ const info = await platform.pickImage();
+ if (info) set({ image: { official: false, name: info.name, size: info.size, raw: info.raw, path: info.path, kind: info.kind } });
+ } finally { setPicking(false); }
+ };
+ const custom = s.image && !s.image.official ? s.image : null;
+ return (
+ <View>
+ <StepHeader title={tr('imager.image.title')} text={tr(dev.kind === 'pi' ? 'imager.image.textPi' : 'imager.image.textPc')} />
+ {s.releases.state === 'loading' && !list.length ? (
+ <Notice tone="info" title={tr('imager.image.loading')} />
+ ) : null}
+ {s.releases.state === 'error' ? (
+ <Notice tone="bad" title={tr('imager.image.offlineTitle')}>{tr('imager.image.offlineText')}</Notice>
+ ) : null}
+ {s.releases.state === 'stale' ? (
+ <Notice tone="warn" title={tr('imager.image.staleTitle')} style={{ marginBottom: spacing.m }}>{tr('imager.image.staleText')}</Notice>
+ ) : null}
+ <View style={{ gap: spacing.m }}>
+ {shown.map((r, i) => <ReleaseCard key={r.tag} r={r} latest={i === 0} selected={!!s.image?.official && s.image.release.tag === r.tag} />)}
+ </View>
+ <View style={{ flexDirection: 'row', gap: spacing.s, marginTop: spacing.m, alignItems: 'center' }}>
+ {list.length > 1 ? (
+ <Press id="old" label={tr(showOld ? 'imager.image.hideOld' : 'imager.image.showOld', { n: list.length - 1 })} onClick={() => setOptions({ showOld: !showOld })}
+ style={{ paddingVertical: 4, paddingHorizontal: 6, borderRadius: 6 }}>
+ <Text style={{ fontSize: typeScale.callout, color: t.accent }}>{tr(showOld ? 'imager.image.hideOld' : 'imager.image.showOld', { n: list.length - 1 })}</Text>
+ </Press>
+ ) : null}
+ <View style={{ flex: 1 }} />
+ <Button small label={tr('imager.image.refresh')} onClick={() => loadReleases()} disabled={s.releases.state === 'loading'} />
+ </View>
+ <View style={{ height: 1, backgroundColor: t.separator, marginVertical: spacing.xl }} />
+ <Card id="custom" label={tr('imager.image.custom')} selected={!!custom} onClick={pickFile} style={{ flexDirection: 'row', alignItems: 'center', gap: spacing.l }}>
+ <View style={{ width: 44, height: 44, borderRadius: 11, backgroundColor: t.control, alignItems: 'center', justifyContent: 'center' }}>
+ <Text style={{ fontSize: 20, color: t.textDim }}>⊕</Text>
+ </View>
+ <View style={{ flex: 1, gap: 3 }}>
+ <Text style={{ fontSize: typeScale.body, fontWeight: 600, color: t.text }}>{custom ? custom.name : tr('imager.image.custom')}</Text>
+ <Text style={{ fontSize: typeScale.caption, color: t.textDim }}>
+ {custom ? tr('imager.image.customMeta', { size: formatSize(custom.size), raw: custom.raw ? formatSize(custom.raw) : '?' }) : tr(picking ? 'imager.image.picking' : 'imager.image.customHint')}
+ </Text>
+ </View>
+ </Card>
+ {custom ? (
+ <Notice tone="warn" title={tr('imager.image.customWarnTitle')} style={{ marginTop: spacing.m }}>{tr('imager.image.customWarn')}</Notice>
+ ) : null}
+ {custom && custom.raw == null && custom.kind === 'xz' ? (
+ <Notice tone="bad" title={tr('imager.image.damagedTitle')} style={{ marginTop: spacing.m }}>{tr('imager.image.damaged')}</Notice>
+ ) : null}
+ </View>
+ );
+}
diff --git a/apps/imager/ui/StepStorage.jsx b/apps/imager/ui/StepStorage.jsx
new file mode 100644
index 0000000..fec05ec
--- /dev/null
+++ b/apps/imager/ui/StepStorage.jsx
@@ -0,0 +1,87 @@
+// Step 3 — the card or stick to write: only removable drives are listed, never an internal disk or
+// the disk this computer runs from (the write action refuses those as well). Lumo warns that the
+// drive will be erased.
+import { View, Text, useTheme, useLocale, typeScale, spacing } from '@lordos/sdk';
+import { useEffect, useState } from 'react';
+import { platform } from '../platform.js';
+import { set } from '../state.js';
+import { deviceById } from '../core/catalog.js';
+import { fits } from '../core/releases.js';
+import { Card, Badge, Notice } from './kit.jsx';
+import { DriveArt } from './art.jsx';
+import { StepHeader } from './StepDevice.jsx';
+import { formatSize } from './format.js';
+
+// the smallest drive worth writing: the Pi image needs about 3 GB and then grows into the card
+const MIN = { pi: 8e9, pc: 2e9 };
+const BIG = 300e9; // a removable drive this large is probably someone's backup disk
+
+export function driveProblem(s, d) {
+ const dev = deviceById(s.device);
+ if (d.readOnly) return 'imager.storage.readOnly';
+ const need = s.image?.raw || (s.image?.official ? null : s.image?.size);
+ if (need && fits(need, d.size) === 'no') return 'imager.storage.tooSmall';
+ if (d.size < MIN[dev.kind]) return dev.kind === 'pi' ? 'imager.storage.tooSmallPi' : 'imager.storage.tooSmallPc';
+ return null;
+}
+
+export function StorageStep({ s }) {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ const [list, setList] = useState(() => platform.drives());
+ useEffect(() => platform.watchDrives(() => setList(platform.drives())), []);
+ // the chosen drive left: forget it
+ useEffect(() => {
+ if (s.drive && !list.some((d) => d.id === s.drive.id && d.size === s.drive.size && d.serial === s.drive.serial)) set({ drive: null });
+ }, [list]);
+ const hidden = platform.hiddenDriveCount?.() || 0;
+ return (
+ <View>
+ <StepHeader title={tr('imager.storage.title')} text={tr('imager.storage.text')} />
+ {!list.length ? (
+ <View style={{ alignItems: 'center', gap: spacing.s, paddingVertical: 36 }}>
+ <View style={{ flexDirection: 'row', gap: spacing.l, opacity: 0.6 }}><DriveArt transport="sd" size={48} /><DriveArt transport="usb" size={48} /></View>
+ <Text style={{ fontSize: typeScale.headline, fontWeight: 600, color: t.text }}>{tr('imager.storage.noneTitle')}</Text>
+ <Text style={{ fontSize: typeScale.callout, color: t.textDim, textAlign: 'center', maxWidth: 380, lineHeight: 1.4 }}>{tr('imager.storage.noneText')}</Text>
+ </View>
+ ) : (
+ <View style={{ gap: spacing.m }}>
+ {list.map((d) => {
+ const problem = driveProblem(s, d);
+ const sel = s.drive?.id === d.id;
+ return (
+ <Card key={d.id} id={`drive-${d.id}`} label={`${d.model}, ${formatSize(d.size)}`} selected={sel} disabled={!!problem}
+ onClick={() => set({ drive: d })} style={{ flexDirection: 'row', alignItems: 'center', gap: spacing.l }}>
+ <DriveArt transport={d.transport} size={40} />
+ <View style={{ flex: 1, gap: 3, minWidth: 0 }}>
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
+ <Text style={{ fontSize: typeScale.body, fontWeight: 600, color: t.text, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{d.model}</Text>
+ <Badge tone="dim">{tr(`imager.storage.kind.${d.transport === 'sd' ? 'sd' : 'usb'}`)}</Badge>
+ </View>
+ <Text style={{ fontSize: typeScale.caption, color: t.textDim, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>
+ {tr('imager.storage.meta', { size: formatSize(d.size), dev: d.name })}
+ {d.labels.length ? ` · ${d.labels.join(', ')}` : ''}
+ </Text>
+ {problem ? <Text style={{ fontSize: typeScale.caption, color: '#ff9f0a' }}>{tr(problem)}</Text>
+ : d.mounted.length ? <Text style={{ fontSize: typeScale.caption, color: t.textDim }}>{tr('imager.storage.inUse', { names: d.mounted.join(', ') })}</Text> : null}
+ </View>
+ <Text style={{ fontSize: typeScale.headline, fontWeight: 600, color: t.text }}>{formatSize(d.size)}</Text>
+ </Card>
+ );
+ })}
+ </View>
+ )}
+ {s.drive && s.drive.size > BIG ? (
+ <Notice tone="warn" title={tr('imager.storage.bigTitle')} style={{ marginTop: spacing.m }}>{tr('imager.storage.bigText', { size: formatSize(s.drive.size) })}</Notice>
+ ) : null}
+ {s.drive ? (
+ <Notice tone="bad" title={tr('imager.storage.eraseTitle', { name: s.drive.model })} style={{ marginTop: spacing.xl }}>
+ {tr('imager.storage.eraseText', { size: formatSize(s.drive.size) })}
+ </Notice>
+ ) : null}
+ <Text style={{ fontSize: typeScale.caption, color: t.textDim, marginTop: spacing.xl, lineHeight: 1.45 }}>
+ {tr(hidden ? 'imager.storage.hiddenSome' : 'imager.storage.hidden', { n: hidden })}
+ </Text>
+ </View>
+ );
+}
diff --git a/apps/imager/ui/StepWrite.jsx b/apps/imager/ui/StepWrite.jsx
new file mode 100644
index 0000000..2f704a5
--- /dev/null
+++ b/apps/imager/ui/StepWrite.jsx
@@ -0,0 +1,159 @@
+// Step 5 — review, confirm and write: download (resumable) → signature → write → read back and
+// compare → first-run file → eject. Progress, speed and time left; cancelling is safe (the card is
+// wiped so it never looks half-bootable).
+import { View, Text, Button, useTheme, useLocale, typeScale, spacing } from '@lordos/sdk';
+import { platform } from '../platform.js';
+import { app, set, run, cancel, isBusy } from '../state.js';
+import { deviceById, COOLERS } from '../core/catalog.js';
+import { Group, KeyValue, Notice, ProgressBar, Badge, useTick, Press } from './kit.jsx';
+import { DriveArt } from './art.jsx';
+import { StepHeader } from './StepDevice.jsx';
+import { formatSize, formatSpeed, formatEta } from './format.js';
+
+function summary(s, tr) {
+ const c = s.cfg;
+ const rows = [];
+ if (c.hostname) rows.push([tr('imager.review.host'), `${c.hostname}.local`]);
+ if (c.user.name) rows.push([tr('imager.review.user'), `${c.user.name}${c.user.fullname ? ` (${c.user.fullname})` : ''}${c.user.autologin ? ` · ${tr('imager.review.autologin')}` : ''}`]);
+ rows.push([tr('imager.review.locale'), [c.lang, c.timezone, c.keyboard ? `${c.keyboard}${c.variant ? `(${c.variant})` : ''}` : '', c.wifiCountry].filter(Boolean).join(' · ')]);
+ if (c.wifi.enabled) rows.push([tr('imager.review.wifi'), `${c.wifi.ssid}${c.wifi.open ? ` · ${tr('imager.wifi.open')}` : ''}${c.wifi.hidden ? ` · ${tr('imager.review.hidden')}` : ''}`]);
+ if (c.user.name) rows.push([tr('imager.review.ssh'), c.ssh === 'off' ? tr('imager.remote.sshOff') : `${tr(c.ssh === 'keys' ? 'imager.remote.sshKeys' : 'imager.remote.sshPassword')}${c.sshKeys.length ? ` · ${tr('imager.review.keys', { n: c.sshKeys.length })}` : ''}`]);
+ if (c.user.name) rows.push([tr('imager.review.remote'), tr(c.remote ? 'imager.review.remoteOn' : 'imager.review.off')]);
+ rows.push([tr('imager.review.look'), `${tr(`imager.look.theme.${c.theme}`)} · ${tr(`imager.look.${c.mode}`)} · ${tr(`imager.look.accents.${c.accent}`)}`]);
+ if (c.cooler) rows.push([tr('imager.review.cooling'), `${tr(`imager.cooling.${c.cooler}`)} · ${tr(`imager.cooling.p.${c.performance}`)}${c.overclock ? ` · ${tr('imager.review.overclock')}` : ''}`]);
+ rows.push([tr('imager.review.more'), `${tr('imager.more.bluetooth')}: ${tr(c.bluetooth ? 'imager.review.on' : 'imager.review.off')} · ${tr('imager.more.updates')}: ${tr(c.autoUpdates ? 'imager.review.on' : 'imager.review.off')}`]);
+ return rows;
+}
+
+function Review({ s }) {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ const dev = deviceById(s.device);
+ const img = s.image;
+ const custom = s.customise && dev.customise;
+ return (
+ <View>
+ <StepHeader title={tr('imager.review.title')} text={tr('imager.review.text')} />
+ <Group>
+ <KeyValue label={tr('imager.step.device')} value={dev.name || tr('imager.device.pc')} />
+ <KeyValue label={tr('imager.step.image')} value={img.official ? `LordOS ${img.release.version} · ${formatSize(img.size)}` : `${img.name} · ${formatSize(img.size)}`} />
+ <KeyValue label={tr('imager.step.storage')} value={`${s.drive.model} · ${formatSize(s.drive.size)} (${s.drive.name})`} />
+ <KeyValue label={tr('imager.review.check')} value={tr(img.official ? 'imager.review.checkOfficial' : 'imager.review.checkCustom')} />
+ </Group>
+ {custom ? (
+ <Group title={tr('imager.review.firstBoot')} style={{ marginTop: spacing.xl }}>
+ {summary(s, tr).map(([k, val]) => <KeyValue key={k} label={k} value={val} />)}
+ </Group>
+ ) : dev.customise ? <Notice tone="info" title={tr('imager.custom.skipTitle')} style={{ marginTop: spacing.xl }}>{tr('imager.custom.skipText')}</Notice> : null}
+ {!img.official ? <Notice tone="warn" title={tr('imager.image.customWarnTitle')} style={{ marginTop: spacing.l }}>{tr('imager.image.customWarn')}</Notice> : null}
+ <Notice tone="bad" title={tr('imager.storage.eraseTitle', { name: s.drive.model })} style={{ marginTop: spacing.l }}>{tr('imager.storage.eraseText', { size: formatSize(s.drive.size) })}</Notice>
+ </View>
+ );
+}
+
+const PHASES = ['signature', 'download', 'check', 'write', 'verify', 'firstrun', 'eject'];
+
+function Progress({ s }) {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ useTick(1000, isBusy(s.job));
+ const j = s.job;
+ const dev = deviceById(s.device);
+ const custom = s.customise && dev.customise;
+ const shown = PHASES.filter((p) => (p !== 'signature' && p !== 'download') || s.image.official).filter((p) => p !== 'check' || s.image.official)
+ .filter((p) => p !== 'firstrun' || custom).filter((p) => p !== 'eject' || s.options.eject);
+ const cur = j.phase === 'secrets' || j.phase === 'prepare' ? 'write' : j.phase;
+ const curIdx = shown.indexOf(cur);
+ const frac = j.total ? j.done / j.total : 0;
+ const failed = j.phase === 'failed';
+ const msg = j.error?.message;
+ return (
+ <View>
+ <StepHeader title={tr(failed ? (j.cancelledByUser ? 'imager.write.cancelledTitle' : 'imager.write.failedTitle') : 'imager.write.title', { name: s.drive.model })}
+ text={tr(failed ? (j.cancelledByUser ? 'imager.write.cancelledText' : 'imager.write.failedText') : 'imager.write.text')} />
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: spacing.l, marginBottom: spacing.xl }}>
+ <DriveArt transport={s.drive.transport} size={48} />
+ <View style={{ flex: 1, gap: 8 }}>
+ <View style={{ flexDirection: 'row', alignItems: 'baseline', gap: 8 }}>
+ <Text style={{ fontSize: typeScale.headline, fontWeight: 600, color: t.text }}>{tr(`imager.phase.${cur}`)}</Text>
+ <View style={{ flex: 1 }} />
+ {j.total && !failed ? <Text style={{ fontSize: typeScale.callout, color: t.textDim }}>{`${Math.floor(frac * 100)} %`}</Text> : null}
+ </View>
+ <ProgressBar value={failed ? 0 : frac} height={10} />
+ {!failed && j.total ? (
+ <View style={{ flexDirection: 'row', gap: spacing.l }}>
+ <Text style={{ fontSize: typeScale.caption, color: t.textDim }}>{tr('imager.write.amount', { done: formatSize(j.done), total: formatSize(j.total) })}</Text>
+ <Text style={{ fontSize: typeScale.caption, color: t.textDim }}>{tr('imager.write.speed', { speed: formatSpeed(j.speed) })}</Text>
+ <Text style={{ fontSize: typeScale.caption, color: t.textDim }}>{tr('imager.write.eta', { eta: formatEta(j.eta) })}</Text>
+ </View>
+ ) : null}
+ </View>
+ </View>
+ <Group>
+ {shown.map((p, i) => {
+ const done = (j.phases || []).includes(p) || (curIdx >= 0 && i < curIdx && !failed);
+ const here = p === cur && !failed;
+ return (
+ <View key={p} style={{ flexDirection: 'row', alignItems: 'center', gap: spacing.m, minHeight: 34 }} {...platform.a11y({ role: 'listitem', label: tr(`imager.phase.${p}`) })}>
+ <View style={{ width: 18, height: 18, borderRadius: 9, alignItems: 'center', justifyContent: 'center', backgroundColor: done ? '#30d158' : here ? t.accent : t.control }}>
+ <Text style={{ fontSize: 10, fontWeight: 700, color: done || here ? '#fff' : t.textDim }}>{done ? '✓' : here ? '•' : ''}</Text>
+ </View>
+ <Text style={{ flex: 1, fontSize: typeScale.body, color: done || here ? t.text : t.textDim, fontWeight: here ? 600 : 400 }}>{tr(`imager.phase.${p}`)}</Text>
+ {p === 'download' && done && !here ? <Badge tone="dim">{tr('imager.write.cachedFor')}</Badge> : null}
+ </View>
+ );
+ })}
+ </Group>
+ {failed && msg ? <Notice tone="bad" title={tr('imager.write.why')} style={{ marginTop: spacing.l }}>{/^imager\.err\./.test(msg) ? tr(msg) : msg}</Notice> : null}
+ <View style={{ flexDirection: 'row', gap: spacing.s, justifyContent: 'flex-end', marginTop: spacing.xl }}>
+ {failed ? (
+ <>
+ <Button label={tr('imager.back')} onClick={() => set({ job: null })} />
+ <Button primary label={tr('imager.write.retry')} onClick={() => run()} />
+ </>
+ ) : (
+ <Button label={tr(j.cancel ? 'imager.write.cancelling' : 'imager.write.cancel')} disabled={j.cancel || j.phase === 'firstrun' || j.phase === 'eject'} onClick={() => set({ dialog: 'cancel' })} />
+ )}
+ </View>
+ </View>
+ );
+}
+
+function Dialog({ title, text, ok, okRed, onOk, onCancel, cancelLabel }) {
+ const t = useTheme();
+ return (
+ <View onClick={onCancel} style={{ position: 'absolute', left: 0, top: 0, right: 0, bottom: 0, backgroundColor: 'rgba(0,0,0,0.3)', alignItems: 'center', justifyContent: 'center' }}>
+ <View onClick={(e) => e.stopPropagation?.()} {...platform.a11y({ role: 'alertdialog', label: title })}
+ style={{ width: 400, padding: 20, gap: 8, borderRadius: t.groupRadius + 2, backgroundColor: t.windowBg, border: `1px solid ${t.separator}`, boxShadow: '0 14px 36px rgba(0,0,0,0.45)' }}>
+ <Text style={{ fontSize: typeScale.headline, fontWeight: 600, color: t.text }}>{title}</Text>
+ <Text style={{ fontSize: typeScale.body, color: t.textDim, lineHeight: 1.45 }}>{text}</Text>
+ <View style={{ flexDirection: 'row', justifyContent: 'flex-end', gap: 8, marginTop: 12 }}>
+ <Button label={cancelLabel} onClick={onCancel} />
+ <Button primary label={ok} onClick={onOk} style={okRed ? { backgroundColor: '#e5484d' } : null} />
+ </View>
+ </View>
+ </View>
+ );
+}
+
+export function WriteStep({ s }) {
+ return <View>{s.job ? <Progress s={s} /> : <Review s={s} />}</View>;
+}
+
+// drawn by the app's root, over the whole window
+export function WriteDialogs({ s }) {
+ const { t: tr } = useLocale();
+ if (s.dialog === 'confirm' && s.drive) {
+ return (
+ <Dialog title={tr('imager.confirm.title', { name: s.drive.model })} text={tr('imager.confirm.text', { size: formatSize(s.drive.size), dev: s.drive.name })}
+ ok={tr('imager.confirm.ok')} okRed cancelLabel={tr('imager.confirm.cancel')} onCancel={() => set({ dialog: null })} onOk={() => run()} />
+ );
+ }
+ if (s.dialog === 'cancel') {
+ return (
+ <Dialog title={tr('imager.cancelAsk.title')} text={tr('imager.cancelAsk.text')} ok={tr('imager.cancelAsk.ok')} okRed cancelLabel={tr('imager.cancelAsk.keep')}
+ onCancel={() => set({ dialog: null })} onOk={() => { set({ dialog: null }); cancel(); }} />
+ );
+ }
+ return null;
+}
diff --git a/apps/imager/ui/art.jsx b/apps/imager/ui/art.jsx
new file mode 100644
index 0000000..00d74f1
--- /dev/null
+++ b/apps/imager/ui/art.jsx
@@ -0,0 +1,187 @@
+// art.jsx — the LordOS Imager's drawings, made of views (no product photos or renders, no other
+// project's artwork): the board, a PC, a USB stick, an SD card, the coolers and the two desktop
+// styles. Shared by the native and desktop apps.
+import { View, Text, useTheme } from '@lordos/sdk';
+
+const abs = (x, y, w, h, extra) => ({ position: 'absolute', left: x, top: y, width: w, height: h, ...extra });
+
+// A single-board computer seen from above: green board, the SoC, RAM, the USB/Ethernet blocks
+export function BoardArt({ size = 120, dim, fan }) {
+ const s = size / 120;
+ const g = (x, y, w, h, c, r = 2) => <View style={abs(x * s, y * s, w * s, h * s, { backgroundColor: c, borderRadius: r * s })} />;
+ return (
+ <View style={{ width: size, height: size * 0.7, opacity: dim ? 0.45 : 1 }}>
+ <View style={abs(0, 4 * s, 116 * s, 76 * s, { borderRadius: 6 * s, background: 'linear-gradient(160deg, #1f8f55, #136b3f)', boxShadow: '0 4px 10px rgba(0,0,0,0.3)' })} />
+ {[[4, 8], [108, 8], [4, 72], [108, 72]].map(([x, y], i) => <View key={i} style={abs(x * s, y * s, 4 * s, 4 * s, { borderRadius: 2 * s, backgroundColor: '#d9d9d9' })} />)}
+ {g(10, 12, 70, 5, '#e2c35a', 1)}
+ {g(34, 30, 24, 24, '#2b2b30', 3)}
+ {g(37, 33, 18, 18, '#45454d', 2)}
+ {g(62, 30, 12, 22, '#2b2b30', 2)}
+ {g(92, 14, 22, 18, '#c8c8cc', 2)}
+ {g(92, 36, 22, 18, '#c8c8cc', 2)}
+ {g(92, 58, 22, 18, '#b0b0b5', 2)}
+ {g(14, 70, 10, 8, '#b0b0b5', 1)}
+ {g(30, 70, 10, 8, '#b0b0b5', 1)}
+ {g(10, 40, 14, 10, '#f5f5f7', 1)}
+ {fan ? <FanArt size={34 * s} style={abs(29 * s, 25 * s, 34 * s, 34 * s)} /> : null}
+ </View>
+ );
+}
+
+// A round fan (the active cooler, a case fan)
+export function FanArt({ size = 40, style }) {
+ const blades = [0, 60, 120, 180, 240, 300];
+ return (
+ <View style={[{ width: size, height: size, borderRadius: size / 2, backgroundColor: '#2c2c33', border: `${Math.max(1, size / 16)}px solid #5a5a63` }, style]}>
+ {blades.map((a) => (
+ <View key={a} style={{ position: 'absolute', left: 0, top: 0, width: size, height: size, transform: `rotate(${a}deg)` }}>
+ <View style={{ position: 'absolute', left: size / 2 - size * 0.13, top: size * 0.06, width: size * 0.26, height: size * 0.4,
+ borderRadius: size * 0.13, borderTopLeftRadius: size * 0.2, backgroundColor: '#9a9aa4', opacity: 0.92 }} />
+ </View>
+ ))}
+ <View style={{ position: 'absolute', left: size * 0.36, top: size * 0.36, width: size * 0.28, height: size * 0.28, borderRadius: size * 0.14, backgroundColor: '#B46CFF' }} />
+ </View>
+ );
+}
+
+// Heatsink fins
+export function FinsArt({ width = 60, height = 34, color = '#9a9aa3' }) {
+ const n = 7;
+ return (
+ <View style={{ width, height, flexDirection: 'row', gap: width / (n * 2.2), alignItems: 'flex-end' }}>
+ {Array.from({ length: n }, (_, i) => <View key={i} style={{ flex: 1, height, borderRadius: 2, backgroundColor: color }} />)}
+ </View>
+ );
+}
+
+export function CoolerArt({ kind, size = 96 }) {
+ const t = useTheme();
+ const s = size / 96;
+ if (kind === 'case-fan') {
+ return (
+ <View style={{ width: size, height: size * 0.72, borderRadius: 10 * s, background: 'linear-gradient(170deg, #b9bcc4, #7e828c)', alignItems: 'center', justifyContent: 'center', boxShadow: '0 4px 10px rgba(0,0,0,0.25)' }}>
+ <View style={{ position: 'absolute', top: 8 * s, left: 10 * s, right: 10 * s, height: 3 * s, borderRadius: 2, backgroundColor: 'rgba(255,255,255,0.45)' }} />
+ <FanArt size={40 * s} />
+ </View>
+ );
+ }
+ if (kind === 'active-cooler') {
+ return (
+ <View style={{ width: size, height: size * 0.72, alignItems: 'center', justifyContent: 'center' }}>
+ <FinsArt width={72 * s} height={44 * s} color="#a3a6ae" />
+ <FanArt size={38 * s} style={{ position: 'absolute', top: 15 * s, left: (size - 38 * s) / 2 }} />
+ </View>
+ );
+ }
+ if (kind === 'passive') {
+ return (
+ <View style={{ width: size, height: size * 0.72, borderRadius: 10 * s, background: 'linear-gradient(170deg, #4b4e57, #2c2e34)', alignItems: 'center', justifyContent: 'center' }}>
+ <FinsArt width={64 * s} height={36 * s} color="#6b6f79" />
+ </View>
+ );
+ }
+ return (
+ <View style={{ width: size, height: size * 0.72, alignItems: 'center', justifyContent: 'center' }}>
+ <BoardArt size={size * 0.9} />
+ <View style={{ position: 'absolute', right: 2 * s, top: 0, width: 22 * s, height: 22 * s, borderRadius: 11 * s, backgroundColor: t.mode === 'dark' ? '#3a2a20' : '#ffe6d5', alignItems: 'center', justifyContent: 'center' }}>
+ <Text style={{ fontSize: 12 * s, fontWeight: 700, color: '#ff9f0a' }}>!</Text>
+ </View>
+ </View>
+ );
+}
+
+// A desktop PC with a USB stick
+export function PcArt({ size = 120, dim }) {
+ const s = size / 120;
+ return (
+ <View style={{ width: size, height: size * 0.7, opacity: dim ? 0.45 : 1 }}>
+ <View style={abs(6 * s, 6 * s, 74 * s, 50 * s, { borderRadius: 6 * s, backgroundColor: '#2a2a31', border: `${3 * s}px solid #4a4a54` })}>
+ <View style={{ flex: 1, margin: 3 * s, borderRadius: 3 * s, background: 'linear-gradient(135deg, #6E4BFF, #B46CFF)' }} />
+ </View>
+ <View style={abs(36 * s, 56 * s, 14 * s, 10 * s, { backgroundColor: '#4a4a54' })} />
+ <View style={abs(24 * s, 64 * s, 38 * s, 4 * s, { borderRadius: 2 * s, backgroundColor: '#4a4a54' })} />
+ <View style={abs(86 * s, 10 * s, 28 * s, 60 * s, { borderRadius: 5 * s, backgroundColor: '#3a3a42', border: `${2 * s}px solid #55555f` })} />
+ <View style={abs(94 * s, 18 * s, 12 * s, 4 * s, { borderRadius: 2 * s, backgroundColor: '#77777f' })} />
+ <View style={abs(98 * s, 30 * s, 4 * s, 4 * s, { borderRadius: 2 * s, backgroundColor: '#30d158' })} />
+ <StickArt size={26 * s} style={abs(64 * s, 40 * s, 26 * s, 26 * s)} />
+ </View>
+ );
+}
+
+export function StickArt({ size = 40, style }) {
+ const s = size / 40;
+ return (
+ <View style={[{ width: size, height: size }, style]}>
+ <View style={abs(14 * s, 0, 12 * s, 9 * s, { borderRadius: 1.5 * s, backgroundColor: '#c8c8cc', border: `${1 * s}px solid #9a9aa0` })} />
+ <View style={abs(10 * s, 8 * s, 20 * s, 30 * s, { borderRadius: 4 * s, background: 'linear-gradient(180deg, #7C5CFF, #4F46E5)' })} />
+ <View style={abs(16 * s, 26 * s, 8 * s, 3 * s, { borderRadius: 1.5 * s, backgroundColor: 'rgba(255,255,255,0.7)' })} />
+ </View>
+ );
+}
+
+export function CardArt({ size = 40, style }) {
+ const s = size / 40;
+ return (
+ <View style={[{ width: size, height: size }, style]}>
+ <View style={abs(9 * s, 2 * s, 24 * s, 34 * s, { borderRadius: 3 * s, borderTopRightRadius: 9 * s, background: 'linear-gradient(180deg, #3b3b44, #24242a)', border: `${1 * s}px solid #5a5a64` })} />
+ {[0, 1, 2, 3, 4].map((i) => <View key={i} style={abs((12 + i * 4) * s, 5 * s, 2.4 * s, 6 * s, { borderRadius: 1, backgroundColor: '#e2c35a' })} />)}
+ <View style={abs(13 * s, 18 * s, 16 * s, 12 * s, { borderRadius: 2 * s, background: 'linear-gradient(135deg, #6E4BFF, #B46CFF)' })} />
+ </View>
+ );
+}
+
+// A drive in the Storage list: an SD card for cards, a stick for the rest
+export const DriveArt = ({ transport, size = 36 }) => (transport === 'mmc' || transport === 'sd' ? <CardArt size={size} /> : <StickArt size={size} />);
+
+// The two desktop styles, as small thumbnails
+export function ThemeArt({ theme, mode, accent = '#0a84ff', width = 150 }) {
+ const dark = mode === 'dark';
+ const h = width * 0.62, s = width / 150;
+ const bg = theme === 'classic' ? (dark ? 'linear-gradient(135deg, #1b2440, #2b1f4a)' : 'linear-gradient(135deg, #cfd9ff, #e9ddff)')
+ : (dark ? 'linear-gradient(135deg, #2a1f5c, #12122A)' : 'linear-gradient(135deg, #c9b8ff, #f1ecff)');
+ const win = dark ? '#26262c' : '#ffffff';
+ const bar = dark ? 'rgba(20,20,26,0.75)' : 'rgba(255,255,255,0.75)';
+ return (
+ <View style={{ width, height: h, borderRadius: 7 * s, background: bg, overflow: 'hidden' }}>
+ {theme === 'classic' ? (
+ <>
+ <View style={abs(24 * s, 16 * s, 96 * s, 54 * s, { borderRadius: 5 * s, backgroundColor: win, boxShadow: '0 3px 8px rgba(0,0,0,0.3)' })}>
+ <View style={{ height: 9 * s, flexDirection: 'row', justifyContent: 'flex-end', gap: 3 * s, paddingRight: 4 * s, alignItems: 'center' }}>
+ {[0, 1, 2].map((i) => <View key={i} style={{ width: 5 * s, height: 2 * s, backgroundColor: dark ? '#aaa' : '#666' }} />)}
+ </View>
+ </View>
+ <View style={abs(0, h - 12 * s, width, 12 * s, { backgroundColor: bar, flexDirection: 'row', justifyContent: 'center', alignItems: 'center', gap: 4 * s })}>
+ {[accent, '#888', '#888', '#888'].map((c, i) => <View key={i} style={{ width: 7 * s, height: 7 * s, borderRadius: 2 * s, backgroundColor: c }} />)}
+ </View>
+ </>
+ ) : (
+ <>
+ <View style={abs(0, 0, width, 8 * s, { backgroundColor: bar })} />
+ <View style={abs(22 * s, 16 * s, 100 * s, 54 * s, { borderRadius: 6 * s, backgroundColor: win, boxShadow: '0 3px 8px rgba(0,0,0,0.3)' })}>
+ <View style={{ height: 9 * s, flexDirection: 'row', gap: 2.5 * s, paddingLeft: 5 * s, alignItems: 'center' }}>
+ {['#ff5f57', '#febc2e', '#28c840'].map((c) => <View key={c} style={{ width: 4 * s, height: 4 * s, borderRadius: 2 * s, backgroundColor: c }} />)}
+ </View>
+ </View>
+ <View style={abs(40 * s, h - 13 * s, 70 * s, 10 * s, { borderRadius: 4 * s, backgroundColor: bar, flexDirection: 'row', justifyContent: 'center', alignItems: 'center', gap: 4 * s })}>
+ {[accent, '#888', '#888', '#888', '#888'].map((c, i) => <View key={i} style={{ width: 6 * s, height: 6 * s, borderRadius: 1.5 * s, backgroundColor: c }} />)}
+ </View>
+ </>
+ )}
+ </View>
+ );
+}
+
+// The app icon: the crown's violet, an SD card with a down arrow
+export function ImagerIcon({ size: s }) {
+ return (
+ <View style={{ width: s, height: s, borderRadius: s * 0.225, background: 'linear-gradient(160deg, #B46CFF, #4F46E5)',
+ boxShadow: `0 ${s * 0.04}px ${s * 0.12}px rgba(0,0,0,0.35)`, alignItems: 'center', justifyContent: 'center' }}>
+ <View style={{ width: s * 0.46, height: s * 0.58, borderRadius: s * 0.05, borderTopRightRadius: s * 0.16, backgroundColor: '#fff', marginTop: s * 0.04 }}>
+ {[0, 1, 2, 3].map((i) => <View key={i} style={{ position: 'absolute', top: s * 0.05, left: s * (0.06 + i * 0.075), width: s * 0.04, height: s * 0.1, borderRadius: s * 0.02, backgroundColor: '#FFC300' }} />)}
+ <View style={{ position: 'absolute', left: s * 0.2, top: s * 0.19, width: s * 0.06, height: s * 0.22, borderRadius: s * 0.03, backgroundColor: '#5B3FE0' }} />
+ <View style={{ position: 'absolute', left: s * 0.135, top: s * 0.305, width: s * 0.06, height: s * 0.14, borderRadius: s * 0.03, backgroundColor: '#5B3FE0', transform: 'rotate(-45deg)' }} />
+ <View style={{ position: 'absolute', left: s * 0.265, top: s * 0.305, width: s * 0.06, height: s * 0.14, borderRadius: s * 0.03, backgroundColor: '#5B3FE0', transform: 'rotate(45deg)' }} />
+ </View>
+ </View>
+ );
+}
diff --git a/apps/imager/ui/format.js b/apps/imager/ui/format.js
new file mode 100644
index 0000000..f1f864f
--- /dev/null
+++ b/apps/imager/ui/format.js
@@ -0,0 +1,19 @@
+// format.js — sizes, speeds and times for the LordOS Imager. Card and stick sizes are shown in
+// decimal units, as they are printed on them (a "32 GB" card holds about 31.9 × 10⁹ bytes).
+import { formatNumber, t } from '@lordos/sdk';
+
+export function formatSize(n) {
+ if (!Number.isFinite(n) || n <= 0) return '—';
+ const u = ['B', 'KB', 'MB', 'GB', 'TB'];
+ let i = 0;
+ while (n >= 1000 && i < u.length - 1) { n /= 1000; i++; }
+ return `${formatNumber(n, n < 10 && i ? 1 : 0)} ${u[i]}`;
+}
+export const formatSpeed = (bps) => (bps > 0 ? `${formatSize(bps)}/s` : '—');
+export function formatEta(s) {
+ if (s == null || !Number.isFinite(s)) return t('imager.write.etaUnknown');
+ s = Math.max(0, Math.round(s));
+ if (s < 60) return t('imager.write.etaSeconds', { n: s });
+ const m = Math.floor(s / 60), r = s % 60;
+ return m < 60 ? t('imager.write.etaMinutes', { m, s: String(r).padStart(2, '0') }) : t('imager.write.etaHours', { h: Math.floor(m / 60), m: m % 60 });
+}
diff --git a/apps/imager/ui/kit.jsx b/apps/imager/ui/kit.jsx
new file mode 100644
index 0000000..7c21774
--- /dev/null
+++ b/apps/imager/ui/kit.jsx
@@ -0,0 +1,269 @@
+// kit.jsx — the LordOS Imager's small building blocks, shared by the native app and the desktop
+// app (desktop/imager builds the same files against a DOM version of the few SDK primitives used).
+// Only View, Text, Image, ScrollView, TextInput, Button, Toggle, Segmented, SearchField, Lumo,
+// useTheme, useKeyboard, t, typeScale and spacing come from the SDK.
+//
+// Keyboard: Tab / Shift+Tab move a focus ring through every Press and Field of the visible step,
+// Enter or Space activates, Escape goes back (docs/IMAGER.md, "Accessibility"). The desktop app
+// uses the browser's own focus instead (platform.domFocus) and gets real screen-reader labels.
+import { View, Text, ScrollView, TextInput, Lumo, useTheme, useKeyboard, typeScale, spacing, createStore, useStore } from '@lordos/sdk';
+import { useEffect, useRef, useState } from 'react';
+import { platform } from '../platform.js';
+
+// ---- focus ----
+
+const focus = createStore({ id: null, tick: 0 });
+let order = []; // ids in registration order for this frame
+let actions = new Map(); // id → { activate, field }
+let seen = new Set();
+
+export function resetFocusOrder() { order = []; seen = new Set(); }
+function register(id, a) {
+ if (!seen.has(id)) { seen.add(id); order.push(id); }
+ actions.set(id, a);
+}
+export const focusTo = (id) => focus.set({ id, tick: focus.get().tick + 1 });
+export function useFocused(id) {
+ const f = useStore(focus);
+ return f.id === id ? f.tick : 0;
+}
+
+// The step root calls this once per render (before its children register)
+export function useFocusKeys({ onEscape } = {}) {
+ resetFocusOrder();
+ useKeyboard((e) => {
+ if (platform.domFocus) return;
+ if (e.key === 'Tab') {
+ const ids = order.filter((x) => actions.has(x));
+ if (!ids.length) return;
+ const cur = ids.indexOf(focus.get().id);
+ const next = cur < 0 ? (e.shift ? ids.length - 1 : 0) : (cur + (e.shift ? ids.length - 1 : 1)) % ids.length;
+ focusTo(ids[next]);
+ return;
+ }
+ const a = actions.get(focus.get().id);
+ if ((e.key === 'Enter' || e.key === ' ') && a && !a.field) { a.activate?.(); return; }
+ if (e.key === 'Escape') { if (focus.get().id) focusTo(null); else onEscape?.(); }
+ });
+}
+
+let autoId = 0;
+const useId = (id) => { const r = useRef(id || `f${++autoId}`); return id || r.current; };
+
+// A clickable area with a focus ring and a label for screen readers (desktop).
+export function Press({ id, label, role = 'button', onClick, disabled, selected, style, children, ringRadius }) {
+ const t = useTheme();
+ const fid = useId(id);
+ const f = useFocused(fid);
+ if (!disabled && onClick) register(fid, { activate: onClick });
+ const ring = f && !platform.domFocus ? { boxShadow: `0 0 0 2px ${t.windowBg}, 0 0 0 4px ${t.accent}` } : null;
+ return (
+ <View onClick={disabled ? undefined : (e) => { focusTo(null); onClick?.(e); }}
+ {...platform.a11y({ label, role, selected, disabled, onActivate: disabled ? null : onClick })}
+ style={[{ opacity: disabled ? 0.45 : 1 }, style, ring, ringRadius ? { borderRadius: ringRadius } : null]}>
+ {children}
+ </View>
+ );
+}
+
+// A labelled text field (with its error or hint underneath)
+export function Field({ id, label, value, onChange, placeholder, secure, error, hint, width, suffix, onSubmit, mono }) {
+ const t = useTheme();
+ const fid = useId(id);
+ const f = useFocused(fid);
+ register(fid, { field: true });
+ return (
+ <View style={{ gap: 5 }}>
+ {label ? <Text style={{ fontSize: typeScale.callout, fontWeight: 600, color: t.text }}>{label}</Text> : null}
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: spacing.s }}>
+ <View style={{ width: width || undefined, flex: width ? 0 : 1, borderRadius: t.controlRadius + 2,
+ boxShadow: f && !platform.domFocus ? `0 0 0 2px ${t.accent}` : 'none' }}>
+ <TextInput key={f ? `f${f}` : 'n'} autoFocus={!!f} value={value} onChange={onChange} placeholder={placeholder} secure={secure}
+ onSubmit={onSubmit} style={mono ? { fontFamily: 'monospace' } : undefined} {...platform.a11y({ label: label || placeholder, role: 'textbox', invalid: !!error })} />
+ </View>
+ {suffix ? <Text style={{ fontSize: typeScale.body, color: t.textDim }}>{suffix}</Text> : null}
+ </View>
+ {error ? <Text style={{ fontSize: typeScale.caption, color: '#ff453a', lineHeight: 1.35 }}>{error}</Text>
+ : hint ? <Text style={{ fontSize: typeScale.caption, color: t.textDim, lineHeight: 1.35 }}>{hint}</Text> : null}
+ </View>
+ );
+}
+
+// A switch row: label, optional detail, the Toggle at the trailing edge
+export function SwitchRow({ id, label, detail, on, onChange, disabled }) {
+ const t = useTheme();
+ return (
+ <Press id={id} label={label} role="switch" selected={on} disabled={disabled} onClick={() => onChange(!on)}
+ style={{ flexDirection: 'row', alignItems: 'center', gap: spacing.m, paddingVertical: 8 }} ringRadius={8}>
+ <View style={{ flex: 1, gap: 2 }}>
+ <Text style={{ fontSize: typeScale.body, color: t.text }}>{label}</Text>
+ {detail ? <Text style={{ fontSize: typeScale.caption, color: t.textDim, lineHeight: 1.35 }}>{detail}</Text> : null}
+ </View>
+ <View style={{ pointerEvents: 'none' }}><ToggleLook on={on} /></View>
+ </Press>
+ );
+}
+function ToggleLook({ on }) {
+ const t = useTheme();
+ return (
+ <View style={{ width: 36, height: 20, borderRadius: 10, direction: 'ltr', backgroundColor: on ? t.accent : t.control }}>
+ <View style={{ position: 'absolute', top: 2, left: on ? 18 : 2, width: 16, height: 16, borderRadius: 8, backgroundColor: '#fff', boxShadow: '0 1px 3px rgba(0,0,0,0.35)' }} />
+ </View>
+ );
+}
+
+// A row of choices (a segmented control that takes part in the focus order)
+export function Choice({ id, options, value, onChange, label, small, fill }) {
+ const t = useTheme();
+ return (
+ <View {...platform.a11y({ label, role: 'radiogroup' })}
+ style={{ flexDirection: 'row', backgroundColor: t.control, borderRadius: t.controlRadius + 1, padding: 2, alignSelf: fill ? 'stretch' : 'flex-start' }}>
+ {options.map(([v, text]) => {
+ const on = value === v;
+ return (
+ <Press key={v} id={id ? `${id}-${v}` : undefined} label={text} role="radio" selected={on} onClick={() => onChange(v)}
+ style={{ paddingHorizontal: small ? 10 : 14, height: small ? 20 : 24, borderRadius: Math.max(2, t.controlRadius - 1), justifyContent: 'center',
+ alignItems: 'center', flexGrow: fill ? 1 : 0, backgroundColor: on ? t.accent : 'transparent' }}>
+ <Text style={{ fontSize: small ? 11 : 12, fontWeight: 600, whiteSpace: 'nowrap', color: on ? '#fff' : t.text }}>{text}</Text>
+ </Press>
+ );
+ })}
+ </View>
+ );
+}
+
+// A selectable card (devices, coolers, themes)
+export function Card({ id, selected, onClick, disabled, label, children, style }) {
+ const t = useTheme();
+ const box = t.mode === 'dark' ? 'rgba(255,255,255,0.04)' : 'rgba(0,0,0,0.025)';
+ return (
+ <Press id={id} label={label} role="radio" selected={selected} onClick={onClick} disabled={disabled} ringRadius={t.groupRadius + 2}
+ style={[{ borderRadius: t.groupRadius + 2, padding: spacing.l, gap: spacing.s, backgroundColor: selected ? (t.mode === 'dark' ? 'rgba(10,132,255,0.10)' : 'rgba(10,132,255,0.06)') : box,
+ border: `${selected ? 2 : 1}px solid ${selected ? t.accent : t.separator}`, margin: selected ? 0 : 1 }, style]}>
+ {children}
+ </Press>
+ );
+}
+
+// An inset group, as in Settings
+export function Group({ title, footer, children, style }) {
+ const t = useTheme();
+ const box = t.mode === 'dark' ? 'rgba(255,255,255,0.04)' : 'rgba(0,0,0,0.025)';
+ const rows = (Array.isArray(children) ? children.flat() : [children]).filter(Boolean);
+ return (
+ <View style={[{ gap: 6 }, style]}>
+ {title ? <Text style={{ fontSize: typeScale.caption, fontWeight: 600, color: t.textDim, marginInlineStart: spacing.s }}>{title}</Text> : null}
+ <View style={{ borderRadius: t.groupRadius, backgroundColor: box, border: `1px solid ${t.separator}`, paddingHorizontal: spacing.m }}>
+ {rows.map((r, i) => (
+ <View key={i} style={i ? { borderTopWidth: 1, borderTopColor: t.separator } : null}>{r}</View>
+ ))}
+ </View>
+ {footer ? <Text style={{ fontSize: typeScale.caption, color: t.textDim, marginInlineStart: spacing.s, lineHeight: 1.4 }}>{footer}</Text> : null}
+ </View>
+ );
+}
+
+export function KeyValue({ label, value, mono }) {
+ const t = useTheme();
+ return (
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: spacing.m, minHeight: 32, paddingVertical: 5 }}>
+ <Text style={{ width: 150, fontSize: typeScale.body, color: t.textDim }}>{label}</Text>
+ <Text style={{ flex: 1, fontSize: typeScale.body, color: t.text, fontFamily: mono ? 'monospace' : undefined, textAlign: 'start' }}>{value}</Text>
+ </View>
+ );
+}
+
+// A small rounded label: tone 'ok' | 'warn' | 'bad' | 'info' | 'dim'
+export function Badge({ tone = 'info', children }) {
+ const t = useTheme();
+ const c = { ok: '#30d158', warn: '#ff9f0a', bad: '#ff453a', info: t.accent, dim: t.textDim }[tone];
+ return (
+ <View style={{ paddingHorizontal: 7, height: 18, borderRadius: 9, justifyContent: 'center', backgroundColor: `${c}22`, border: `1px solid ${c}55` }}>
+ <Text style={{ fontSize: 10.5, fontWeight: 600, color: c, whiteSpace: 'nowrap' }}>{children}</Text>
+ </View>
+ );
+}
+
+export function Notice({ tone = 'warn', title, children, style }) {
+ const t = useTheme();
+ const c = { ok: '#30d158', warn: '#ff9f0a', bad: '#ff453a', info: t.accent }[tone];
+ return (
+ <View {...platform.a11y({ role: tone === 'bad' ? 'alert' : 'note', label: title })}
+ style={[{ flexDirection: 'row', gap: spacing.m, padding: spacing.m, borderRadius: t.groupRadius, backgroundColor: `${c}14`, border: `1px solid ${c}44` }, style]}>
+ <View style={{ width: 4, borderRadius: 2, backgroundColor: c }} />
+ <View style={{ flex: 1, gap: 3 }}>
+ {title ? <Text style={{ fontSize: typeScale.body, fontWeight: 600, color: t.text }}>{title}</Text> : null}
+ {children ? <Text style={{ fontSize: typeScale.callout, color: t.textDim, lineHeight: 1.45 }}>{children}</Text> : null}
+ </View>
+ </View>
+ );
+}
+
+export function ProgressBar({ value, height = 8, tone }) {
+ const t = useTheme();
+ const v = Math.max(0, Math.min(1, value || 0));
+ return (
+ <View {...platform.a11y({ role: 'progressbar', value: Math.round(v * 100) })}
+ style={{ height, borderRadius: height / 2, backgroundColor: t.control, overflow: 'hidden', direction: 'ltr' }}>
+ <View style={{ width: `${(v * 100).toFixed(2)}%`, height, borderRadius: height / 2,
+ background: tone === 'ok' ? '#30d158' : `linear-gradient(90deg, #B46CFF, ${t.accent})` }} />
+ </View>
+ );
+}
+
+// Lumo's tip next to the step: a pose and a short sentence in a bubble (one Lumo per view)
+export function Helper({ pose = 'wave', title, text, compact }) {
+ const t = useTheme();
+ const bubble = t.mode === 'dark' ? 'rgba(180,108,255,0.12)' : 'rgba(110,75,255,0.07)';
+ return (
+ <View {...platform.a11y({ role: 'note', label: title || text })} style={{ flexDirection: 'row', alignItems: 'flex-end', gap: spacing.s }}>
+ <Lumo pose={pose} size={compact ? 52 : 64} />
+ <View style={{ flex: 1, padding: spacing.m, borderRadius: 12, borderBottomStartRadius: 3, backgroundColor: bubble, border: `1px solid ${t.mode === 'dark' ? 'rgba(180,108,255,0.28)' : 'rgba(110,75,255,0.18)'}`, gap: 3 }}>
+ {title ? <Text style={{ fontSize: typeScale.callout, fontWeight: 600, color: t.text }}>{title}</Text> : null}
+ <Text style={{ fontSize: typeScale.caption, color: t.textDim, lineHeight: 1.45 }}>{text}</Text>
+ </View>
+ </View>
+ );
+}
+
+// A searchable list (time zones, keyboard layouts, countries)
+export function PickList({ id, items, value, onPick, placeholder, height = 150 }) {
+ const t = useTheme();
+ const [q, setQ] = useState('');
+ const n = q.trim().toLowerCase();
+ // the chosen one first, then the rest (searching keeps the list order)
+ const ordered = value ? [...items.filter(([k]) => k === value), ...items.filter(([k]) => k !== value)] : items;
+ const shown = (n ? items.filter(([key, label]) => `${key} ${label}`.toLowerCase().includes(n)) : ordered).slice(0, 400);
+ const sel = items.find(([k]) => k === value);
+ return (
+ <View style={{ gap: 6 }}>
+ <Field id={id ? `${id}-q` : undefined} value={q} onChange={setQ} placeholder={placeholder} />
+ <View style={{ height, borderRadius: 8, border: `1px solid ${t.separator}`, backgroundColor: t.mode === 'dark' ? 'rgba(255,255,255,0.03)' : 'rgba(0,0,0,0.02)' }}>
+ <ScrollView style={{ flex: 1 }} contentStyle={{ padding: 4 }}>
+ {shown.map(([key, label]) => (
+ <View key={key} onClick={() => onPick(key)} {...platform.a11y({ role: 'option', label, selected: key === value, onActivate: () => onPick(key) })}
+ style={{ minHeight: 24, justifyContent: 'center', paddingHorizontal: 8, borderRadius: 5, backgroundColor: key === value ? t.accent : 'transparent' }}>
+ <Text style={{ fontSize: typeScale.callout, color: key === value ? '#fff' : t.text, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{label}</Text>
+ </View>
+ ))}
+ </ScrollView>
+ </View>
+ {sel ? <Text style={{ fontSize: typeScale.caption, color: t.textDim }}>{sel[1]}</Text> : null}
+ </View>
+ );
+}
+
+export function SectionTitle({ children, style }) {
+ const t = useTheme();
+ return <Text style={[{ fontSize: typeScale.headline, fontWeight: 600, color: t.text }, style]}>{children}</Text>;
+}
+
+// Re-render every `ms` while mounted (progress timers)
+export function useTick(ms, on = true) {
+ const [, set] = useState(0);
+ useEffect(() => {
+ if (!on) return undefined;
+ const iv = setInterval(() => set((x) => x + 1), ms);
+ return () => clearInterval(iv);
+ }, [ms, on]);
+}
diff --git a/assets/locales/en/apps.json b/assets/locales/en/apps.json
index d9a7070..00653bb 100644
--- a/assets/locales/en/apps.json
+++ b/assets/locales/en/apps.json
@@ -27,5 +27,6 @@
"calendar": "Calendar",
"contacts": "Contacts",
"reminders": "Reminders",
- "mail": "Mail"
+ "mail": "Mail",
+ "imager": "LordOS Imager"
}
diff --git a/assets/locales/en/errors.json b/assets/locales/en/errors.json
index f6df753..a272b1c 100644
--- a/assets/locales/en/errors.json
+++ b/assets/locales/en/errors.json
@@ -566,5 +566,26 @@
"hw.noKernelLog": "The kernel log could not be read",
"app.codeRefused": "This app's code was modified and was not loaded",
"remote.badAddress": "Not a valid address or network",
- "remote.listFull": "The list is full (64 entries)"
+ "remote.listFull": "The list is full (64 entries)",
+ "imager.cacheFailed": "The imager's download folder (~/.cache/lordos/imager) can't be used",
+ "imager.noCurl": "The download tool (curl) isn't installed",
+ "imager.fetchCancelled": "Download cancelled",
+ "imager.fetchTooLarge": "The download is larger than expected",
+ "imager.fetchNotFound": "The release file wasn't found",
+ "imager.fetchNetwork": "No connection to the LordOS releases page",
+ "imager.fetchFailed": "The download failed (code {code})",
+ "imager.nothingRunning": "Nothing is being downloaded",
+ "imager.notRemovable": "{name} is not a removable drive: the imager only writes SD cards and USB drives",
+ "imager.readOnly": "{name} is write-protected",
+ "imager.diskChanged": "{name} is not the drive that was chosen (it changed or was replaced)",
+ "imager.badImageName": "That file isn't an .img, .img.xz or .iso image",
+ "imager.xzDamaged": "The .xz image is damaged or incomplete",
+ "imager.noXz": "The .xz tool (xz-utils) isn't installed",
+ "imager.noSignature": "The release signature files couldn't be read",
+ "imager.badSignature": "The release signature doesn't match the LordOS key",
+ "imager.notListed": "The signed list doesn't include {name}",
+ "imager.hashMismatch": "The image doesn't match its signed SHA-256: it was not written",
+ "imager.cancelledWiped": "Cancelled: the drive was cleared",
+ "imager.xzFailed": "The image couldn't be decompressed",
+ "imager.imageChanged": "The image file changed while it was written: the drive was cleared"
}
diff --git a/assets/locales/en/imager.json b/assets/locales/en/imager.json
new file mode 100644
index 0000000..9228830
--- /dev/null
+++ b/assets/locales/en/imager.json
@@ -0,0 +1,385 @@
+{
+ "back": "Back",
+ "cancelAsk.keep": "Keep writing",
+ "cancelAsk.ok": "Stop",
+ "cancelAsk.text": "The drive will be cleared and won't boot. Downloads already made are kept.",
+ "cancelAsk.title": "Stop writing?",
+ "confirm.cancel": "Cancel",
+ "confirm.ok": "Erase and write",
+ "confirm.text": "Everything on this {size} drive ({dev}) will be deleted and replaced with LordOS.",
+ "confirm.title": "Erase {name}?",
+ "cooling.active-cooler": "Active cooler",
+ "cooling.active-coolerHint": "A heatsink with a fan on top.",
+ "cooling.case-fan": "Case with a fan",
+ "cooling.case-fanHint": "A case whose fan plugs into the board's fan header.",
+ "cooling.none": "Nothing",
+ "cooling.noneHint": "A bare board.",
+ "cooling.noneWarn": "Under load it reaches 85 °C within minutes and throttles. A small heatsink or a fan makes a big difference.",
+ "cooling.noneWarnTitle": "Without cooling the board slows itself down",
+ "cooling.overclock": "Mild overclock",
+ "cooling.overclockHint": "2.6 GHz instead of 2.4 GHz, with no extra voltage. Only with a fan.",
+ "cooling.overclockWarn": "If the board doesn't start, open the card's boot partition on another computer and delete the lordos-firstrun block in config.txt.",
+ "cooling.overclockWarnTitle": "Not every board is stable when overclocked",
+ "cooling.p.balanced": "Balanced",
+ "cooling.p.balancedHint": "The fan starts at 55 °C and speeds up with the temperature. The default.",
+ "cooling.p.conservative": "Conservative",
+ "cooling.p.conservativeHint": "A lower top clock (2.0 GHz) so the board stays cooler and doesn't throttle.",
+ "cooling.p.performance": "Performance",
+ "cooling.p.performanceHint": "The fan starts earlier and the processor stays at its top clock.",
+ "cooling.p.quiet": "Quiet",
+ "cooling.p.quietHint": "The fan starts later (60 °C). Fine for light use.",
+ "cooling.passive": "Passive case",
+ "cooling.passiveHint": "A metal case or heatsink, no fan.",
+ "cooling.profile": "Profile",
+ "cooling.text": "What keeps your board cool? LordOS drives the fan by temperature and picks a profile to match.",
+ "cooling.unset": "Not chosen: the board keeps its defaults.",
+ "custom.fix": "Check {n} field(s) before going on",
+ "custom.on": "Customised",
+ "custom.skipText": "The board starts in setup mode: create your account in Settings → Users, then restart. Keep it off the network until then.",
+ "custom.skipTitle": "Setup on the board",
+ "custom.skipped": "Not customised",
+ "custom.text": "Settings the board applies once when it starts for the first time. You can change everything later in Settings.",
+ "custom.title": "Customise the first boot",
+ "custom.toggle": "Prepare the first boot",
+ "custom.toggleOff": "The board starts in setup mode and you create your account on it.",
+ "custom.toggleOn": "Written to the card as a settings file that is deleted after it's applied.",
+ "device.liveUsb": "Live USB",
+ "device.never": "Not planned",
+ "device.notYet": "Not supported yet",
+ "device.otherTitle": "Other boards",
+ "device.pc": "PC (USB stick)",
+ "device.pc.text": "The live system on a USB stick: try LordOS and install it from there.",
+ "device.pcFooter": "First-boot settings are for the Raspberry Pi; the live system asks for them while installing.",
+ "device.pcText": "The PC image is the live system: it boots from the stick and can install LordOS on the computer's disk.",
+ "device.ram.comfortable": "Comfortable for everyday use.",
+ "device.ram.max": "Best performance, with room for everything.",
+ "device.ram.min": "The minimum: it works, but heavy apps feel tight.",
+ "device.ramFooter": "A fan (the active cooler or a case fan) and the 27 W power supply are recommended.",
+ "device.ramGb": "{n} GB",
+ "device.ramTitle": "Memory",
+ "device.rpi5.text": "BCM2712, 4 cores at 2.4 GHz. SD card or NVMe.",
+ "device.supported": "Supported",
+ "device.text": "LordOS runs on the Raspberry Pi 5 and on 64-bit PCs. Pick where this card or stick will be used.",
+ "device.title": "Choose your device",
+ "done.another": "Write another card",
+ "done.custom": "Unsigned image",
+ "done.ejected": "{name} is ready and safe to remove.",
+ "done.newSetup": "Start over",
+ "done.next": "Next steps",
+ "done.notEjected": "{name} is ready. Eject it before removing it.",
+ "done.notifyBody": "{name} is ready.",
+ "done.notifyTitle": "LordOS is written",
+ "done.pc1": "Plug the stick into the PC",
+ "done.pc1Text": "Turn it on and choose the USB drive in the boot menu (usually F12, F11, F8 or Esc).",
+ "done.pc2": "Try it, then install",
+ "done.pc2Text": "The live system runs from the stick; Install LordOS puts it on the computer's disk.",
+ "done.pi1": "Put the card in the Raspberry Pi 5",
+ "done.pi1Text": "Connect a monitor, keyboard and mouse, then the power supply.",
+ "done.pi2": "Wait for the first boot",
+ "done.pi2Custom": "It takes about a minute: the system grows to fill the card and applies your settings, then shows the login screen.",
+ "done.pi2Setup": "It takes about a minute and starts in setup mode: create your account in Settings → Users.",
+ "done.pi3": "Find it on the network",
+ "done.pi3Text": "From another computer at home it's {host}.",
+ "done.remote": "Remote desktop",
+ "done.ssh": "Remote login",
+ "done.stats": "{s} s · {speed}",
+ "done.title": "All done!",
+ "done.verified": "Written and verified",
+ "err.badSignature": "The release signature doesn't match the LordOS key. Nothing was written.",
+ "err.hashFailed": "The password couldn't be hashed.",
+ "err.hostChars": "Use lowercase letters, numbers and hyphens, not at the start or end (and not only numbers).",
+ "err.hostEmpty": "Enter a computer name.",
+ "err.hostLong": "Up to 63 characters.",
+ "err.keyComment": "The key's comment has invalid characters.",
+ "err.keyData": "That doesn't look like a complete public key.",
+ "err.keyDss": "DSA keys are no longer accepted. Create an ed25519 key.",
+ "err.keyEmpty": "Paste a public key first.",
+ "err.keyRsaShort": "RSA keys must have at least 2048 bits.",
+ "err.keyType": "Not a supported key type (ed25519, ECDSA, security keys or RSA).",
+ "err.nameChars": "Remove : , = \\ and control characters.",
+ "err.nameLong": "That name is too long.",
+ "err.notListed": "The signed list doesn't include this image. Nothing was written.",
+ "err.overclockNeedsFan": "Overclocking needs a fan.",
+ "err.passEmpty": "Enter a password.",
+ "err.passLong": "That password is too long.",
+ "err.passMismatch": "The passwords don't match.",
+ "err.profileNeedsFan": "This profile needs a fan.",
+ "err.remoteNeedsUser": "Remote desktop needs a user account.",
+ "err.sshNeedsKey": "Add at least one key, or allow passwords.",
+ "err.sshNeedsUser": "SSH needs a user account.",
+ "err.ssidChars": "The network name has an invalid character.",
+ "err.ssidEmpty": "Enter the network name.",
+ "err.ssidLong": "A network name has at most 32 bytes.",
+ "err.userChars": "Start with a lowercase letter; then lowercase letters, numbers, _ or -.",
+ "err.userEmpty": "Enter a user name.",
+ "err.userLong": "Up to 32 characters.",
+ "err.userReserved": "That name is reserved by the system.",
+ "err.wifiPassChars": "Use plain letters, numbers and symbols (no accents) for a WPA2 password.",
+ "err.wifiPassLength": "A Wi-Fi password has 8 to 63 characters.",
+ "err.zone": "Choose a time zone from the list.",
+ "general.country": "Wi-Fi country",
+ "general.countryHint": "Unlocks the radio channels allowed where you live.",
+ "general.hostname": "Computer name",
+ "general.hostnameHint": "On your network it will be {name}.local. Lowercase letters, numbers and hyphens.",
+ "general.keyboard": "Keyboard layout",
+ "general.language": "Language",
+ "general.zone": "Time zone",
+ "hint.common": "a very common password",
+ "hint.longer": "use 12 characters or more",
+ "hint.mix": "mix letters, numbers and symbols",
+ "hint.pattern": "avoid repeats and sequences",
+ "image.beta": "Beta",
+ "image.cached": "Downloaded",
+ "image.custom": "Use an image file…",
+ "image.customHint": ".img, .img.xz or .iso",
+ "image.customMeta": "{size} · {raw} when written",
+ "image.customWarn": "LordOS can't tell where it came from or whether someone changed it. It will be written and read back to check the copy, but only official images are verified. Use files you trust.",
+ "image.customWarnTitle": "This image isn't signed",
+ "image.damaged": "Its index can't be read, so its size is unknown. Download it again.",
+ "image.damagedTitle": "This .xz file looks damaged",
+ "image.hideOld": "Only the latest",
+ "image.latest": "Latest",
+ "image.loading": "Looking for the latest release…",
+ "image.meta": "Released {date} · {size} download",
+ "image.offlineText": "Check the internet connection and try again, or use an image file you already have.",
+ "image.offlineTitle": "The release list couldn't be fetched",
+ "image.partial": "{size} downloaded, resumes",
+ "image.pickTitle": "Choose an image file",
+ "image.picking": "Choose the file…",
+ "image.refresh": "Refresh",
+ "image.showOld": "Older releases ({n})",
+ "image.signed": "Signed by LordOS",
+ "image.staleText": "The internet isn't reachable right now. Downloaded images still work: they are checked again before writing.",
+ "image.staleTitle": "Showing the list from earlier",
+ "image.textPc": "The latest LordOS live system for PCs, signed by the LordOS project, or an image file you already have.",
+ "image.textPi": "The latest LordOS for the Raspberry Pi 5, signed by the LordOS project, or an image file you already have.",
+ "image.title": "Choose a system image",
+ "look.accent": "Accent color",
+ "look.accents.azul": "Blue",
+ "look.accents.grafito": "Graphite",
+ "look.accents.naranja": "Orange",
+ "look.accents.rosa": "Pink",
+ "look.accents.verde": "Green",
+ "look.accents.violeta": "Purple",
+ "look.dark": "Dark",
+ "look.light": "Light",
+ "look.mode": "Mode",
+ "look.style": "Desktop style",
+ "look.theme.classic": "Classic",
+ "look.theme.classicHint": "A taskbar and a start menu.",
+ "look.theme.default": "Lord Default",
+ "look.theme.defaultHint": "Menu bar at the top and the Dock.",
+ "look.wallpaper": "Wallpaper",
+ "more.bluetooth": "Bluetooth",
+ "more.bluetoothHint": "Turn it off if you don't use it. Settings → Bluetooth turns it back on.",
+ "more.privacy": "Privacy",
+ "more.telemetry": "LordOS collects nothing: no usage data, no crash reports, no accounts. The imager doesn't either.",
+ "more.telemetryTitle": "No telemetry",
+ "more.updates": "Check for updates automatically",
+ "more.updatesHint": "Once a day LordOS fetches the signed update list and tells you when there's something new. It never installs on its own.",
+ "next": "Next",
+ "options.auto": "Automatic",
+ "options.cache": "Downloads",
+ "options.cacheMove": "Change…",
+ "options.cacheSize": "{size} used",
+ "options.cacheWhere": "Kept in",
+ "options.clear": "Clear",
+ "options.clearing": "Clearing…",
+ "options.done": "Done",
+ "options.eject": "Eject when finished",
+ "options.ejectHint": "The drive can be removed right away.",
+ "options.followsSystem": "Language and appearance follow LordOS (Settings → General and Appearance).",
+ "options.language": "Language",
+ "options.privacy": "No telemetry: the imager only contacts the LordOS release page to list and download images.",
+ "options.sound": "Play a sound when finished",
+ "options.theme": "Appearance",
+ "options.title": "App options",
+ "options.updates": "Check for app updates",
+ "options.updatesHint": "Looks for a newer LordOS Imager on the LordOS releases page when it starts.",
+ "options.updatesSystem": "The imager is part of LordOS: it's updated with the system.",
+ "phase.check": "Checking the image",
+ "phase.done": "Done",
+ "phase.download": "Downloading",
+ "phase.eject": "Ejecting",
+ "phase.failed": "Stopped",
+ "phase.firstrun": "Saving the first-boot settings",
+ "phase.prepare": "Getting ready",
+ "phase.secrets": "Preparing the first boot",
+ "phase.signature": "Checking the release signature",
+ "phase.verify": "Reading back and comparing",
+ "phase.write": "Writing",
+ "profiles.button": "Profiles…",
+ "profiles.close": "Close",
+ "profiles.delete": "Delete",
+ "profiles.load": "Use",
+ "profiles.name": "Profile name",
+ "profiles.none": "No saved profiles yet.",
+ "profiles.save": "Save",
+ "profiles.text": "Save these settings to reuse them for the next card. Passwords and Wi-Fi keys are never saved: you type them again.",
+ "profiles.title": "Customisation profiles",
+ "remote.add": "Add key",
+ "remote.addKey": "Public key",
+ "remote.addKeyHint": "Paste the contents of a .pub file (for example ~/.ssh/id_ed25519.pub). Up to 16 keys.",
+ "remote.desktop": "LordOS remote desktop",
+ "remote.desktopFooter": "Local network only, encrypted, and addresses that fail to log in 3 times are blocked. Change it in Settings → Sharing.",
+ "remote.desktopHint": "From a browser on your local network: https://{host}.local:5673",
+ "remote.desktopOn": "Allow remote desktop",
+ "remote.needUser": "Remote access needs an account with a password (root never logs in). Add one in the User tab.",
+ "remote.needUserTitle": "Create the user first",
+ "remote.passwordWarn": "Keys only is recommended. With passwords, use a strong one and keep the board on your local network.",
+ "remote.passwordWarnTitle": "Passwords can be guessed",
+ "remote.pickKey": "Choose a .pub file…",
+ "remote.remove": "Remove",
+ "remote.ssh": "Remote login (SSH)",
+ "remote.sshKeys": "Keys only",
+ "remote.sshOff": "Off",
+ "remote.sshPassword": "Password and keys",
+ "remote.sshText": "A terminal on the board from another computer.",
+ "review.autologin": "logs in automatically",
+ "review.check": "Verification",
+ "review.checkCustom": "Reading the drive back (the file itself isn't signed)",
+ "review.checkOfficial": "Release signature, SHA-256, and reading the drive back",
+ "review.cooling": "Cooling",
+ "review.firstBoot": "First boot",
+ "review.hidden": "hidden",
+ "review.host": "Computer name",
+ "review.keys": "{n} key(s)",
+ "review.locale": "Language and region",
+ "review.look": "Appearance",
+ "review.more": "Other",
+ "review.off": "off",
+ "review.on": "on",
+ "review.overclock": "mild overclock",
+ "review.remote": "Remote desktop",
+ "review.remoteOn": "On, local network only",
+ "review.ssh": "SSH",
+ "review.text": "Check that everything is right. The drive is erased when you confirm.",
+ "review.title": "Ready to write",
+ "review.user": "User",
+ "review.wifi": "Wi-Fi",
+ "search": "Search",
+ "step.customise": "Customise",
+ "step.device": "Device",
+ "step.image": "System image",
+ "step.storage": "Storage",
+ "step.write": "Write",
+ "steps": "Steps",
+ "storage.bigText": "{size} is unusual for an SD card or a USB stick. Make sure it isn't a backup disk.",
+ "storage.bigTitle": "This is a big drive",
+ "storage.eraseText": "All {size} of it, every partition and every file. This can't be undone.",
+ "storage.eraseTitle": "{name} will be erased",
+ "storage.hidden": "Internal disks and the disk this computer runs from are never shown.",
+ "storage.hiddenSome": "Internal disks and the disk this computer runs from are never shown ({n} hidden).",
+ "storage.inUse": "In use: {names}. It will be unmounted.",
+ "storage.kind.sd": "SD card",
+ "storage.kind.usb": "USB drive",
+ "storage.meta": "{size} · {dev}",
+ "storage.noneText": "Insert an SD card (with a card reader if needed) or plug in a USB drive. It appears here by itself.",
+ "storage.noneTitle": "No card or USB drive found",
+ "storage.readOnly": "Write-protected: slide the card's lock switch.",
+ "storage.text": "The SD card or USB drive LordOS will be written to.",
+ "storage.title": "Choose the storage",
+ "storage.tooSmall": "Too small for this image.",
+ "storage.tooSmallPc": "Too small: use a drive of at least 2 GB.",
+ "storage.tooSmallPi": "Too small: use a card of at least 8 GB (16 GB or more is better).",
+ "subtitle": "SD cards and USB sticks",
+ "tab.cooling": "Cooling",
+ "tab.general": "General",
+ "tab.look": "Appearance",
+ "tab.more": "More",
+ "tab.remote": "Remote access",
+ "tab.user": "User",
+ "tab.wifi": "Wi-Fi",
+ "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.",
+ "tip.customise.title": "Ready on the first boot",
+ "tip.device.text": "I'll walk you through it. Pick the computer the card is for; I'll only offer what LordOS really supports.",
+ "tip.device.title": "Hi, I'm Lumo!",
+ "tip.erase.text": "Copy anything you want to keep first. Writing erases the whole drive.",
+ "tip.erase.title": "Everything on it goes",
+ "tip.failed.text": "The drive was cleared so it doesn't look half-written. You can try again.",
+ "tip.failed.title": "That didn't work",
+ "tip.image.text": "Official images are checked against the LordOS release key before anything is erased. I keep the download, so the next card is quicker.",
+ "tip.image.title": "Only signed images",
+ "tip.storage.text": "Only SD cards and USB drives show up here. The disk this computer runs from is never offered.",
+ "tip.storage.title": "Plug in your card",
+ "tip.tab.cooling.text": "With a fan, the board can stay at full speed. Without one, a gentler clock avoids throttling.",
+ "tip.tab.cooling.title": "Keep it cool",
+ "tip.tab.general.text": "The computer name is how you'll reach it: name.local from any computer at home.",
+ "tip.tab.general.title": "Find it on the network",
+ "tip.tab.look.text": "You can change all of this later in Settings → Appearance.",
+ "tip.tab.look.title": "Make it yours",
+ "tip.tab.more.text": "LordOS collects nothing about you. Not now, not later.",
+ "tip.tab.more.title": "Nothing leaves the board",
+ "tip.tab.remote.text": "SSH with keys only can't be guessed. Remote desktop stays on your local network.",
+ "tip.tab.remote.title": "Keys are safer",
+ "tip.tab.user.text": "Your password is turned into a one-way hash right before writing. A long sentence makes a great password.",
+ "tip.tab.user.title": "Only a hash goes on the card",
+ "tip.tab.wifi.text": "I store the network's derived key, not the password you type.",
+ "tip.tab.wifi.title": "No Wi-Fi password on the card",
+ "tip.write.text": "Look over the summary. After you confirm, the drive is erased and written.",
+ "tip.write.title": "Last check",
+ "tip.writing.text": "Don't remove the drive. I'll read everything back to be sure it's right.",
+ "tip.writing.title": "On it!",
+ "title": "LordOS Imager",
+ "unavailable.text": "It needs LordOS's administration helper, which isn't available in this session.",
+ "unavailable.title": "The imager can't run here",
+ "user.autologin": "Log in automatically",
+ "user.autologinHint": "Starts the desktop without asking for the password. Anyone who turns it on gets your session.",
+ "user.confirm": "Confirm password",
+ "user.fullname": "Full name",
+ "user.fullnamePh": "Ana Pérez",
+ "user.hashNote": "Only a yescrypt or SHA-512 hash of the password is written to the card, never the password.",
+ "user.hide": "Hide passwords",
+ "user.intro": "An administrator account for you. Root stays locked; the setup account is removed.",
+ "user.introTitle": "Your account",
+ "user.name": "User name",
+ "user.nameHint": "Lowercase letters, numbers, _ and -. You'll log in with it.",
+ "user.password": "Password",
+ "user.show": "Show passwords",
+ "user.strength.0": "Very weak",
+ "user.strength.1": "Weak",
+ "user.strength.2": "Fair",
+ "user.strength.3": "Good",
+ "user.strength.4": "Strong",
+ "wifi.enable": "Connect to Wi-Fi",
+ "wifi.enableHint": "The board joins this network on its first boot.",
+ "wifi.ethernet": "Without Wi-Fi, plug in an Ethernet cable: the board gets its address by itself.",
+ "wifi.hidden": "Hidden network",
+ "wifi.hiddenHint": "The network doesn't announce its name.",
+ "wifi.noRadio": "This computer has no Wi-Fi radio to scan with. Type the network name.",
+ "wifi.open": "Open network",
+ "wifi.openShort": "open",
+ "wifi.openWarn": "Prefer a network with a password.",
+ "wifi.openWarnTitle": "Anyone nearby can see open-network traffic",
+ "wifi.password": "Wi-Fi password",
+ "wifi.passwordHint": "8 to 63 characters.",
+ "wifi.pskNote": "The card stores the network's derived WPA2 key, not your password. A WPA3-only network needs the password itself: enter it on the board in Settings → Network.",
+ "wifi.scan": "Scan",
+ "wifi.scanNone": "No networks found nearby.",
+ "wifi.scanning": "Scanning…",
+ "wifi.security": "Security",
+ "wifi.ssid": "Network name (SSID)",
+ "wifi.ssidPh": "My network",
+ "wifi.wpa": "WPA2 / WPA3 password",
+ "write.amount": "{done} of {total}",
+ "write.cachedFor": "kept for next time",
+ "write.cancel": "Cancel",
+ "write.cancelledText": "The drive was cleared. Nothing else was changed.",
+ "write.cancelledTitle": "Writing cancelled",
+ "write.cancelling": "Cancelling…",
+ "write.eta": "{eta}",
+ "write.etaHours": "{h} h {m} min left",
+ "write.etaMinutes": "{m} min {s} s left",
+ "write.etaSeconds": "{n} s left",
+ "write.etaUnknown": "estimating time…",
+ "write.failedText": "The drive was cleared so it doesn't look half-written.",
+ "write.failedTitle": "Writing didn't finish",
+ "write.retry": "Try again",
+ "write.speed": "{speed}",
+ "write.start": "Erase and write",
+ "write.text": "Keep the drive plugged in. This takes a few minutes.",
+ "write.title": "Writing to {name}",
+ "write.why": "What happened"
+}
diff --git a/assets/locales/en/mascot.json b/assets/locales/en/mascot.json
index bb385da..f2035fa 100644
--- a/assets/locales/en/mascot.json
+++ b/assets/locales/en/mascot.json
@@ -4,5 +4,6 @@
"shield": "Lumo holding a shield",
"celebrate": "Lumo celebrating",
"confused": "Lumo looking confused",
- "sleep": "Lumo asleep on a laptop"
+ "sleep": "Lumo asleep on a laptop",
+ "run": "Lumo running"
}
diff --git a/assets/locales/en/status.json b/assets/locales/en/status.json
index 765cb0d..a5b1fe8 100644
--- a/assets/locales/en/status.json
+++ b/assets/locales/en/status.json
@@ -124,5 +124,11 @@
"remote.blocked": "{address} blocked",
"remote.unblocked": "{address} unblocked",
"remote.failures": "{count} failed sign-ins",
- "remote.failure": "Failed sign-in for {user} from {key} ({count})"
+ "remote.failure": "Failed sign-in for {user} from {key} ({count})",
+ "imager.cached": "Already downloaded",
+ "imager.fetched": "Downloaded",
+ "imager.cancelling": "Cancelling…",
+ "imager.cacheCleared": "Downloads cleared",
+ "imager.verifiedImage": "The image matches its signed SHA-256",
+ "imager.written": "Written and verified"
}
diff --git a/assets/locales/es/apps.json b/assets/locales/es/apps.json
index e4b3252..8d46bd0 100644
--- a/assets/locales/es/apps.json
+++ b/assets/locales/es/apps.json
@@ -27,5 +27,6 @@
"calendar": "Calendario",
"contacts": "Contactos",
"reminders": "Recordatorios",
- "mail": "Mail"
+ "mail": "Mail",
+ "imager": "LordOS Imager"
}
diff --git a/assets/locales/es/errors.json b/assets/locales/es/errors.json
index dbe9f7e..fd1254b 100644
--- a/assets/locales/es/errors.json
+++ b/assets/locales/es/errors.json
@@ -566,5 +566,26 @@
"hw.noKernelLog": "No se pudo leer el registro del kernel",
"app.codeRefused": "El código de esta app fue modificado y no se cargó",
"remote.badAddress": "No es una dirección o red válida",
- "remote.listFull": "La lista está llena (64 entradas)"
+ "remote.listFull": "La lista está llena (64 entradas)",
+ "imager.cacheFailed": "No se puede usar la carpeta de descargas del grabador (~/.cache/lordos/imager)",
+ "imager.noCurl": "La herramienta de descarga (curl) no está instalada",
+ "imager.fetchCancelled": "Descarga cancelada",
+ "imager.fetchTooLarge": "La descarga es más grande de lo esperado",
+ "imager.fetchNotFound": "No se encontró el archivo de la versión",
+ "imager.fetchNetwork": "No hay conexión con la página de versiones de LordOS",
+ "imager.fetchFailed": "La descarga falló (código {code})",
+ "imager.nothingRunning": "No se está descargando nada",
+ "imager.notRemovable": "{name} no es una unidad extraíble: el grabador solo graba tarjetas SD y unidades USB",
+ "imager.readOnly": "{name} está protegida contra escritura",
+ "imager.diskChanged": "{name} no es la unidad elegida (cambió o la reemplazaron)",
+ "imager.badImageName": "Ese archivo no es una imagen .img, .img.xz o .iso",
+ "imager.xzDamaged": "La imagen .xz está dañada o incompleta",
+ "imager.noXz": "La herramienta .xz (xz-utils) no está instalada",
+ "imager.noSignature": "No se pudieron leer los archivos de firma de la versión",
+ "imager.badSignature": "La firma de la versión no coincide con la clave de LordOS",
+ "imager.notListed": "La lista firmada no incluye {name}",
+ "imager.hashMismatch": "La imagen no coincide con su SHA-256 firmado: no se grabó",
+ "imager.cancelledWiped": "Cancelado: la unidad quedó limpia",
+ "imager.xzFailed": "No se pudo descomprimir la imagen",
+ "imager.imageChanged": "El archivo de imagen cambió mientras se grababa: la unidad quedó limpia"
}
diff --git a/assets/locales/es/imager.json b/assets/locales/es/imager.json
new file mode 100644
index 0000000..f031c02
--- /dev/null
+++ b/assets/locales/es/imager.json
@@ -0,0 +1,385 @@
+{
+ "back": "Atrás",
+ "cancelAsk.keep": "Seguir grabando",
+ "cancelAsk.ok": "Detener",
+ "cancelAsk.text": "La unidad va a quedar limpia y no va a arrancar. Las descargas ya hechas se conservan.",
+ "cancelAsk.title": "¿Detener la grabación?",
+ "confirm.cancel": "Cancelar",
+ "confirm.ok": "Borrar y grabar",
+ "confirm.text": "Todo lo que hay en esta unidad de {size} ({dev}) se va a borrar y reemplazar por LordOS.",
+ "confirm.title": "¿Borrar {name}?",
+ "cooling.active-cooler": "Disipador activo",
+ "cooling.active-coolerHint": "Un disipador con un ventilador encima.",
+ "cooling.case-fan": "Caja con ventilador",
+ "cooling.case-fanHint": "Una caja cuyo ventilador se conecta al conector de la placa.",
+ "cooling.none": "Nada",
+ "cooling.noneHint": "La placa sola.",
+ "cooling.noneWarn": "Con carga llega a 85 °C en minutos y baja la velocidad. Un pequeño disipador o un ventilador hacen una gran diferencia.",
+ "cooling.noneWarnTitle": "Sin refrigeración la placa se frena sola",
+ "cooling.overclock": "Overclock suave",
+ "cooling.overclockHint": "2,6 GHz en lugar de 2,4 GHz, sin más voltaje. Solo con ventilador.",
+ "cooling.overclockWarn": "Si la placa no arranca, abrí la partición de arranque de la tarjeta en otra computadora y borrá el bloque lordos-firstrun de config.txt.",
+ "cooling.overclockWarnTitle": "No todas las placas son estables con overclock",
+ "cooling.p.balanced": "Equilibrado",
+ "cooling.p.balancedHint": "El ventilador arranca a 55 °C y acelera con la temperatura. El predeterminado.",
+ "cooling.p.conservative": "Conservador",
+ "cooling.p.conservativeHint": "Una frecuencia máxima más baja (2,0 GHz) para que la placa se caliente menos y no se frene.",
+ "cooling.p.performance": "Rendimiento",
+ "cooling.p.performanceHint": "El ventilador arranca antes y el procesador se mantiene en su frecuencia máxima.",
+ "cooling.p.quiet": "Silencioso",
+ "cooling.p.quietHint": "El ventilador arranca más tarde (60 °C). Bien para uso liviano.",
+ "cooling.passive": "Caja pasiva",
+ "cooling.passiveHint": "Una caja de metal o un disipador, sin ventilador.",
+ "cooling.profile": "Perfil",
+ "cooling.text": "¿Qué mantiene fresca tu placa? LordOS maneja el ventilador según la temperatura y elige un perfil acorde.",
+ "cooling.unset": "Sin elegir: la placa mantiene sus valores de fábrica.",
+ "custom.fix": "Revisá {n} campo(s) antes de seguir",
+ "custom.on": "Personalizada",
+ "custom.skipText": "La placa arranca en modo de configuración: creá tu cuenta en Ajustes → Usuarios y reiniciá. Hasta entonces, mantenela fuera de la red.",
+ "custom.skipTitle": "Configuración en la placa",
+ "custom.skipped": "Sin personalizar",
+ "custom.text": "Ajustes que la placa aplica una sola vez, al arrancar por primera vez. Después podés cambiar todo en Ajustes.",
+ "custom.title": "Personalizá el primer arranque",
+ "custom.toggle": "Preparar el primer arranque",
+ "custom.toggleOff": "La placa arranca en modo de configuración y creás tu cuenta en ella.",
+ "custom.toggleOn": "Se graba en la tarjeta como un archivo de ajustes que se borra después de aplicarse.",
+ "device.liveUsb": "USB en vivo",
+ "device.never": "No está previsto",
+ "device.notYet": "Todavía no soportada",
+ "device.otherTitle": "Otras placas",
+ "device.pc": "PC (pendrive USB)",
+ "device.pc.text": "El sistema en vivo en un pendrive: probá LordOS e instalalo desde ahí.",
+ "device.pcFooter": "Los ajustes del primer arranque son para la Raspberry Pi; el sistema en vivo los pide al instalar.",
+ "device.pcText": "La imagen para PC es el sistema en vivo: arranca desde el pendrive y puede instalar LordOS en el disco de la computadora.",
+ "device.ram.comfortable": "Cómoda para el uso diario.",
+ "device.ram.max": "El mejor rendimiento, con lugar para todo.",
+ "device.ram.min": "El mínimo: funciona, pero las apps pesadas quedan justas.",
+ "device.ramFooter": "Se recomiendan un ventilador (el disipador activo o el de una caja) y la fuente de 27 W.",
+ "device.ramGb": "{n} GB",
+ "device.ramTitle": "Memoria",
+ "device.rpi5.text": "BCM2712, 4 núcleos a 2,4 GHz. Tarjeta SD o NVMe.",
+ "device.supported": "Soportada",
+ "device.text": "LordOS funciona en la Raspberry Pi 5 y en PC de 64 bits. Elegí dónde se va a usar esta tarjeta o pendrive.",
+ "device.title": "Elegí tu dispositivo",
+ "done.another": "Grabar otra tarjeta",
+ "done.custom": "Imagen sin firmar",
+ "done.ejected": "{name} está lista y se puede quitar.",
+ "done.newSetup": "Empezar de nuevo",
+ "done.next": "Próximos pasos",
+ "done.notEjected": "{name} está lista. Expulsala antes de quitarla.",
+ "done.notifyBody": "{name} está lista.",
+ "done.notifyTitle": "LordOS quedó grabado",
+ "done.pc1": "Conectá el pendrive a la PC",
+ "done.pc1Text": "Encendela y elegí la unidad USB en el menú de arranque (suele ser F12, F11, F8 o Esc).",
+ "done.pc2": "Probalo y después instalalo",
+ "done.pc2Text": "El sistema en vivo funciona desde el pendrive; Instalar LordOS lo pone en el disco de la computadora.",
+ "done.pi1": "Poné la tarjeta en la Raspberry Pi 5",
+ "done.pi1Text": "Conectá un monitor, el teclado y el mouse, y después la fuente.",
+ "done.pi2": "Esperá el primer arranque",
+ "done.pi2Custom": "Tarda alrededor de un minuto: el sistema crece hasta ocupar la tarjeta y aplica tus ajustes; después muestra la pantalla de ingreso.",
+ "done.pi2Setup": "Tarda alrededor de un minuto y arranca en modo de configuración: creá tu cuenta en Ajustes → Usuarios.",
+ "done.pi3": "Encontrala en la red",
+ "done.pi3Text": "Desde otra computadora de tu casa es {host}.",
+ "done.remote": "Escritorio remoto",
+ "done.ssh": "Inicio de sesión remoto",
+ "done.stats": "{s} s · {speed}",
+ "done.title": "¡Listo!",
+ "done.verified": "Grabada y verificada",
+ "err.badSignature": "La firma de la versión no coincide con la clave de LordOS. No se grabó nada.",
+ "err.hashFailed": "No se pudo calcular el hash de la contraseña.",
+ "err.hostChars": "Usá minúsculas, números y guiones, no al principio ni al final (y no solo números).",
+ "err.hostEmpty": "Ingresá un nombre para el equipo.",
+ "err.hostLong": "Hasta 63 caracteres.",
+ "err.keyComment": "El comentario de la clave tiene caracteres no válidos.",
+ "err.keyData": "Eso no parece una clave pública completa.",
+ "err.keyDss": "Las claves DSA ya no se aceptan. Creá una clave ed25519.",
+ "err.keyEmpty": "Primero pegá una clave pública.",
+ "err.keyRsaShort": "Las claves RSA deben tener al menos 2048 bits.",
+ "err.keyType": "No es un tipo de clave admitido (ed25519, ECDSA, llaves de seguridad o RSA).",
+ "err.nameChars": "Quitá : , = \\ y los caracteres de control.",
+ "err.nameLong": "Ese nombre es demasiado largo.",
+ "err.notListed": "La lista firmada no incluye esta imagen. No se grabó nada.",
+ "err.overclockNeedsFan": "El overclock necesita un ventilador.",
+ "err.passEmpty": "Ingresá una contraseña.",
+ "err.passLong": "Esa contraseña es demasiado larga.",
+ "err.passMismatch": "Las contraseñas no coinciden.",
+ "err.profileNeedsFan": "Este perfil necesita un ventilador.",
+ "err.remoteNeedsUser": "El escritorio remoto necesita una cuenta de usuario.",
+ "err.sshNeedsKey": "Agregá al menos una clave, o permití contraseñas.",
+ "err.sshNeedsUser": "SSH necesita una cuenta de usuario.",
+ "err.ssidChars": "El nombre de la red tiene un carácter no válido.",
+ "err.ssidEmpty": "Ingresá el nombre de la red.",
+ "err.ssidLong": "El nombre de una red tiene como máximo 32 bytes.",
+ "err.userChars": "Empezá con una minúscula; después minúsculas, números, _ o -.",
+ "err.userEmpty": "Ingresá un nombre de usuario.",
+ "err.userLong": "Hasta 32 caracteres.",
+ "err.userReserved": "Ese nombre lo reserva el sistema.",
+ "err.wifiPassChars": "Para una contraseña WPA2 usá letras, números y símbolos simples (sin tildes).",
+ "err.wifiPassLength": "Una contraseña de Wi-Fi tiene de 8 a 63 caracteres.",
+ "err.zone": "Elegí una zona horaria de la lista.",
+ "general.country": "País del Wi-Fi",
+ "general.countryHint": "Habilita los canales de radio permitidos donde vivís.",
+ "general.hostname": "Nombre del equipo",
+ "general.hostnameHint": "En tu red va a ser {name}.local. Minúsculas, números y guiones.",
+ "general.keyboard": "Distribución del teclado",
+ "general.language": "Idioma",
+ "general.zone": "Zona horaria",
+ "hint.common": "una contraseña muy común",
+ "hint.longer": "usá 12 caracteres o más",
+ "hint.mix": "mezclá letras, números y símbolos",
+ "hint.pattern": "evitá repeticiones y secuencias",
+ "image.beta": "Beta",
+ "image.cached": "Descargada",
+ "image.custom": "Usar un archivo de imagen…",
+ "image.customHint": ".img, .img.xz o .iso",
+ "image.customMeta": "{size} · {raw} al grabarla",
+ "image.customWarn": "LordOS no puede saber de dónde viene ni si alguien la cambió. Se graba y se lee de vuelta para comprobar la copia, pero solo las imágenes oficiales se verifican. Usá archivos en los que confíes.",
+ "image.customWarnTitle": "Esta imagen no está firmada",
+ "image.damaged": "No se puede leer su índice, así que no se sabe su tamaño. Descargalo de nuevo.",
+ "image.damagedTitle": "Este archivo .xz parece dañado",
+ "image.hideOld": "Solo la última",
+ "image.latest": "Última",
+ "image.loading": "Buscando la última versión…",
+ "image.meta": "Publicada el {date} · descarga de {size}",
+ "image.offlineText": "Revisá la conexión a internet y probá de nuevo, o usá un archivo de imagen que ya tengas.",
+ "image.offlineTitle": "No se pudo obtener la lista de versiones",
+ "image.partial": "{size} descargados, se reanuda",
+ "image.pickTitle": "Elegí un archivo de imagen",
+ "image.picking": "Elegí el archivo…",
+ "image.refresh": "Actualizar",
+ "image.showOld": "Versiones anteriores ({n})",
+ "image.signed": "Firmada por LordOS",
+ "image.staleText": "No hay internet en este momento. Las imágenes descargadas siguen sirviendo: se verifican otra vez antes de grabar.",
+ "image.staleTitle": "Se muestra la lista de antes",
+ "image.textPc": "El último sistema en vivo de LordOS para PC, firmado por el proyecto LordOS, o un archivo de imagen que ya tengas.",
+ "image.textPi": "El último LordOS para la Raspberry Pi 5, firmado por el proyecto LordOS, o un archivo de imagen que ya tengas.",
+ "image.title": "Elegí una imagen del sistema",
+ "look.accent": "Color de acento",
+ "look.accents.azul": "Azul",
+ "look.accents.grafito": "Grafito",
+ "look.accents.naranja": "Naranja",
+ "look.accents.rosa": "Rosa",
+ "look.accents.verde": "Verde",
+ "look.accents.violeta": "Violeta",
+ "look.dark": "Oscuro",
+ "look.light": "Claro",
+ "look.mode": "Modo",
+ "look.style": "Estilo del escritorio",
+ "look.theme.classic": "Clásico",
+ "look.theme.classicHint": "Una barra de tareas y un menú de inicio.",
+ "look.theme.default": "Lord Default",
+ "look.theme.defaultHint": "Barra de menús arriba y el Dock.",
+ "look.wallpaper": "Fondo de pantalla",
+ "more.bluetooth": "Bluetooth",
+ "more.bluetoothHint": "Apagalo si no lo usás. Ajustes → Bluetooth lo vuelve a encender.",
+ "more.privacy": "Privacidad",
+ "more.telemetry": "LordOS no recopila nada: ni datos de uso, ni informes de fallos, ni cuentas. El grabador tampoco.",
+ "more.telemetryTitle": "Sin telemetría",
+ "more.updates": "Buscar actualizaciones automáticamente",
+ "more.updatesHint": "Una vez al día LordOS descarga la lista firmada de actualizaciones y te avisa cuando hay algo nuevo. Nunca instala solo.",
+ "next": "Siguiente",
+ "options.auto": "Automático",
+ "options.cache": "Descargas",
+ "options.cacheMove": "Cambiar…",
+ "options.cacheSize": "{size} en uso",
+ "options.cacheWhere": "Se guardan en",
+ "options.clear": "Vaciar",
+ "options.clearing": "Vaciando…",
+ "options.done": "Listo",
+ "options.eject": "Expulsar al terminar",
+ "options.ejectHint": "La unidad se puede quitar enseguida.",
+ "options.followsSystem": "El idioma y la apariencia siguen a LordOS (Ajustes → General y Apariencia).",
+ "options.language": "Idioma",
+ "options.privacy": "Sin telemetría: el grabador solo contacta la página de versiones de LordOS para listar y descargar imágenes.",
+ "options.sound": "Sonar al terminar",
+ "options.theme": "Apariencia",
+ "options.title": "Opciones de la app",
+ "options.updates": "Buscar actualizaciones de la app",
+ "options.updatesHint": "Al abrirse, busca un LordOS Imager más nuevo en la página de versiones de LordOS.",
+ "options.updatesSystem": "El grabador es parte de LordOS: se actualiza con el sistema.",
+ "phase.check": "Verificando la imagen",
+ "phase.done": "Listo",
+ "phase.download": "Descargando",
+ "phase.eject": "Expulsando",
+ "phase.failed": "Detenida",
+ "phase.firstrun": "Guardando los ajustes del primer arranque",
+ "phase.prepare": "Preparando",
+ "phase.secrets": "Preparando el primer arranque",
+ "phase.signature": "Verificando la firma de la versión",
+ "phase.verify": "Leyendo de vuelta y comparando",
+ "phase.write": "Grabando",
+ "profiles.button": "Perfiles…",
+ "profiles.close": "Cerrar",
+ "profiles.delete": "Borrar",
+ "profiles.load": "Usar",
+ "profiles.name": "Nombre del perfil",
+ "profiles.none": "Todavía no hay perfiles guardados.",
+ "profiles.save": "Guardar",
+ "profiles.text": "Guardá estos ajustes para usarlos en la próxima tarjeta. Las contraseñas y las claves del Wi-Fi nunca se guardan: las volvés a escribir.",
+ "profiles.title": "Perfiles de personalización",
+ "remote.add": "Agregar clave",
+ "remote.addKey": "Clave pública",
+ "remote.addKeyHint": "Pegá el contenido de un archivo .pub (por ejemplo ~/.ssh/id_ed25519.pub). Hasta 16 claves.",
+ "remote.desktop": "Escritorio remoto de LordOS",
+ "remote.desktopFooter": "Solo la red local, cifrado, y las direcciones que fallan 3 veces al iniciar sesión se bloquean. Se cambia en Ajustes → Compartir.",
+ "remote.desktopHint": "Desde un navegador de tu red local: https://{host}.local:5673",
+ "remote.desktopOn": "Permitir el escritorio remoto",
+ "remote.needUser": "El acceso remoto necesita una cuenta con contraseña (root nunca inicia sesión). Agregala en la pestaña Usuario.",
+ "remote.needUserTitle": "Primero creá el usuario",
+ "remote.passwordWarn": "Se recomienda solo claves. Con contraseña, usá una fuerte y mantené la placa en tu red local.",
+ "remote.passwordWarnTitle": "Las contraseñas se pueden adivinar",
+ "remote.pickKey": "Elegir un archivo .pub…",
+ "remote.remove": "Quitar",
+ "remote.ssh": "Inicio de sesión remoto (SSH)",
+ "remote.sshKeys": "Solo claves",
+ "remote.sshOff": "Apagado",
+ "remote.sshPassword": "Contraseña y claves",
+ "remote.sshText": "Una terminal en la placa desde otra computadora.",
+ "review.autologin": "inicia sesión automáticamente",
+ "review.check": "Verificación",
+ "review.checkCustom": "Relectura de la unidad (el archivo no está firmado)",
+ "review.checkOfficial": "Firma de la versión, SHA-256 y relectura de la unidad",
+ "review.cooling": "Refrigeración",
+ "review.firstBoot": "Primer arranque",
+ "review.hidden": "oculta",
+ "review.host": "Nombre del equipo",
+ "review.keys": "{n} clave(s)",
+ "review.locale": "Idioma y región",
+ "review.look": "Apariencia",
+ "review.more": "Otros",
+ "review.off": "no",
+ "review.on": "sí",
+ "review.overclock": "overclock suave",
+ "review.remote": "Escritorio remoto",
+ "review.remoteOn": "Encendido, solo red local",
+ "review.ssh": "SSH",
+ "review.text": "Revisá que todo esté bien. La unidad se borra cuando confirmes.",
+ "review.title": "Listo para grabar",
+ "review.user": "Usuario",
+ "review.wifi": "Wi-Fi",
+ "search": "Buscar",
+ "step.customise": "Personalizar",
+ "step.device": "Dispositivo",
+ "step.image": "Imagen del sistema",
+ "step.storage": "Almacenamiento",
+ "step.write": "Grabar",
+ "steps": "Pasos",
+ "storage.bigText": "{size} no es común para una tarjeta SD o un pendrive. Asegurate de que no sea un disco de copias de seguridad.",
+ "storage.bigTitle": "Es una unidad grande",
+ "storage.eraseText": "Los {size} completos, cada partición y cada archivo. No se puede deshacer.",
+ "storage.eraseTitle": "Se va a borrar {name}",
+ "storage.hidden": "Los discos internos y el disco desde el que arranca esta computadora nunca se muestran.",
+ "storage.hiddenSome": "Los discos internos y el disco desde el que arranca esta computadora nunca se muestran ({n} ocultos).",
+ "storage.inUse": "En uso: {names}. Se va a desmontar.",
+ "storage.kind.sd": "Tarjeta SD",
+ "storage.kind.usb": "Unidad USB",
+ "storage.meta": "{size} · {dev}",
+ "storage.noneText": "Insertá una tarjeta SD (con un lector si hace falta) o conectá una unidad USB. Aparece acá sola.",
+ "storage.noneTitle": "No se encontró ninguna tarjeta ni unidad USB",
+ "storage.readOnly": "Protegida contra escritura: mové la traba de la tarjeta.",
+ "storage.text": "La tarjeta SD o la unidad USB donde se va a grabar LordOS.",
+ "storage.title": "Elegí el almacenamiento",
+ "storage.tooSmall": "Demasiado chica para esta imagen.",
+ "storage.tooSmallPc": "Demasiado chica: usá una unidad de al menos 2 GB.",
+ "storage.tooSmallPi": "Demasiado chica: usá una tarjeta de al menos 8 GB (16 GB o más es mejor).",
+ "subtitle": "Tarjetas SD y pendrives",
+ "tab.cooling": "Refrigeración",
+ "tab.general": "General",
+ "tab.look": "Apariencia",
+ "tab.more": "Más",
+ "tab.remote": "Acceso remoto",
+ "tab.user": "Usuario",
+ "tab.wifi": "Wi-Fi",
+ "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.",
+ "tip.customise.title": "Lista desde el primer arranque",
+ "tip.device.text": "Te acompaño en cada paso. Elegí la computadora para la que es la tarjeta; solo te ofrezco lo que LordOS soporta de verdad.",
+ "tip.device.title": "¡Hola, soy Lumo!",
+ "tip.erase.text": "Copiá antes lo que quieras conservar. Grabar borra la unidad entera.",
+ "tip.erase.title": "Se borra todo",
+ "tip.failed.text": "La unidad quedó limpia para que no parezca grabada a medias. Podés intentar de nuevo.",
+ "tip.failed.title": "Eso no funcionó",
+ "tip.image.text": "Las imágenes oficiales se verifican con la clave de las versiones de LordOS antes de borrar nada. Guardo la descarga, así la próxima tarjeta es más rápida.",
+ "tip.image.title": "Solo imágenes firmadas",
+ "tip.storage.text": "Acá solo aparecen tarjetas SD y unidades USB. El disco desde el que arranca esta computadora nunca se ofrece.",
+ "tip.storage.title": "Conectá tu tarjeta",
+ "tip.tab.cooling.text": "Con ventilador la placa puede ir a toda velocidad. Sin él, un reloj más suave evita que se frene.",
+ "tip.tab.cooling.title": "Que no se caliente",
+ "tip.tab.general.text": "El nombre del equipo es cómo vas a llegar a ella: nombre.local desde cualquier computadora de tu casa.",
+ "tip.tab.general.title": "Encontrala en la red",
+ "tip.tab.look.text": "Podés cambiar todo esto después en Ajustes → Apariencia.",
+ "tip.tab.look.title": "Hacela tuya",
+ "tip.tab.more.text": "LordOS no recopila nada sobre vos. Ni ahora ni después.",
+ "tip.tab.more.title": "Nada sale de la placa",
+ "tip.tab.remote.text": "SSH solo con claves no se puede adivinar. El escritorio remoto queda en tu red local.",
+ "tip.tab.remote.title": "Las claves son más seguras",
+ "tip.tab.user.text": "Tu contraseña se convierte en un hash irreversible justo antes de grabar. Una frase larga es una gran contraseña.",
+ "tip.tab.user.title": "En la tarjeta solo va un hash",
+ "tip.tab.wifi.text": "Guardo la clave derivada de la red, no la contraseña que escribís.",
+ "tip.tab.wifi.title": "Sin contraseña de Wi-Fi en la tarjeta",
+ "tip.write.text": "Revisá el resumen. Cuando confirmes, la unidad se borra y se graba.",
+ "tip.write.title": "Último repaso",
+ "tip.writing.text": "No saques la unidad. Voy a leer todo de vuelta para asegurarme de que quedó bien.",
+ "tip.writing.title": "¡En eso estoy!",
+ "title": "LordOS Imager",
+ "unavailable.text": "Necesita el asistente de administración de LordOS, que no está disponible en esta sesión.",
+ "unavailable.title": "El grabador no puede funcionar aquí",
+ "user.autologin": "Iniciar sesión automáticamente",
+ "user.autologinHint": "Abre el escritorio sin pedir la contraseña. Quien la encienda entra a tu sesión.",
+ "user.confirm": "Confirmá la contraseña",
+ "user.fullname": "Nombre completo",
+ "user.fullnamePh": "Ana Pérez",
+ "user.hashNote": "En la tarjeta solo se graba un hash yescrypt o SHA-512 de la contraseña, nunca la contraseña.",
+ "user.hide": "Ocultar las contraseñas",
+ "user.intro": "Una cuenta de administrador para vos. root sigue bloqueado; la cuenta de configuración se elimina.",
+ "user.introTitle": "Tu cuenta",
+ "user.name": "Nombre de usuario",
+ "user.nameHint": "Minúsculas, números, _ y -. Con él vas a iniciar sesión.",
+ "user.password": "Contraseña",
+ "user.show": "Mostrar las contraseñas",
+ "user.strength.0": "Muy débil",
+ "user.strength.1": "Débil",
+ "user.strength.2": "Aceptable",
+ "user.strength.3": "Buena",
+ "user.strength.4": "Fuerte",
+ "wifi.enable": "Conectarse al Wi-Fi",
+ "wifi.enableHint": "La placa se une a esta red en su primer arranque.",
+ "wifi.ethernet": "Sin Wi-Fi, conectá un cable de red: la placa obtiene su dirección sola.",
+ "wifi.hidden": "Red oculta",
+ "wifi.hiddenHint": "La red no anuncia su nombre.",
+ "wifi.noRadio": "Esta computadora no tiene Wi-Fi para buscar redes. Escribí el nombre de la red.",
+ "wifi.open": "Red abierta",
+ "wifi.openShort": "abierta",
+ "wifi.openWarn": "Mejor una red con contraseña.",
+ "wifi.openWarnTitle": "Cualquiera cerca puede ver el tráfico de una red abierta",
+ "wifi.password": "Contraseña del Wi-Fi",
+ "wifi.passwordHint": "De 8 a 63 caracteres.",
+ "wifi.pskNote": "La tarjeta guarda la clave WPA2 derivada de la red, no tu contraseña. Una red solo WPA3 necesita la contraseña: ingresala en la placa en Ajustes → Red.",
+ "wifi.scan": "Buscar",
+ "wifi.scanNone": "No hay redes cerca.",
+ "wifi.scanning": "Buscando…",
+ "wifi.security": "Seguridad",
+ "wifi.ssid": "Nombre de la red (SSID)",
+ "wifi.ssidPh": "Mi red",
+ "wifi.wpa": "Contraseña WPA2 / WPA3",
+ "write.amount": "{done} de {total}",
+ "write.cachedFor": "guardada para la próxima",
+ "write.cancel": "Cancelar",
+ "write.cancelledText": "La unidad quedó limpia. No se cambió nada más.",
+ "write.cancelledTitle": "Grabación cancelada",
+ "write.cancelling": "Cancelando…",
+ "write.eta": "{eta}",
+ "write.etaHours": "faltan {h} h {m} min",
+ "write.etaMinutes": "faltan {m} min {s} s",
+ "write.etaSeconds": "faltan {n} s",
+ "write.etaUnknown": "calculando el tiempo…",
+ "write.failedText": "La unidad quedó limpia para que no parezca grabada a medias.",
+ "write.failedTitle": "La grabación no terminó",
+ "write.retry": "Intentar de nuevo",
+ "write.speed": "{speed}",
+ "write.start": "Borrar y grabar",
+ "write.text": "No desconectes la unidad. Tarda unos minutos.",
+ "write.title": "Grabando en {name}",
+ "write.why": "Qué pasó"
+}
diff --git a/assets/locales/es/mascot.json b/assets/locales/es/mascot.json
index 959c58c..6737f7e 100644
--- a/assets/locales/es/mascot.json
+++ b/assets/locales/es/mascot.json
@@ -4,5 +4,6 @@
"shield": "Lumo con un escudo",
"celebrate": "Lumo celebrando",
"confused": "Lumo confundido",
- "sleep": "Lumo dormido sobre una laptop"
+ "sleep": "Lumo dormido sobre una laptop",
+ "run": "Lumo corriendo"
}
diff --git a/assets/locales/es/status.json b/assets/locales/es/status.json
index b5fed5c..0691938 100644
--- a/assets/locales/es/status.json
+++ b/assets/locales/es/status.json
@@ -124,5 +124,11 @@
"remote.blocked": "{address} bloqueada",
"remote.unblocked": "{address} desbloqueada",
"remote.failures": "{count} ingresos fallidos",
- "remote.failure": "Ingreso fallido de {user} desde {key} ({count})"
+ "remote.failure": "Ingreso fallido de {user} desde {key} ({count})",
+ "imager.cached": "Ya estaba descargado",
+ "imager.fetched": "Descargado",
+ "imager.cancelling": "Cancelando…",
+ "imager.cacheCleared": "Descargas borradas",
+ "imager.verifiedImage": "La imagen coincide con su SHA-256 firmado",
+ "imager.written": "Grabada y verificada"
}
diff --git a/assets/locales/pt/apps.json b/assets/locales/pt/apps.json
index a7fd855..d720e07 100644
--- a/assets/locales/pt/apps.json
+++ b/assets/locales/pt/apps.json
@@ -27,5 +27,6 @@
"calendar": "Calendário",
"contacts": "Contatos",
"reminders": "Lembretes",
- "mail": "Mail"
+ "mail": "Mail",
+ "imager": "LordOS Imager"
}
diff --git a/assets/locales/pt/errors.json b/assets/locales/pt/errors.json
index 4c53558..6cea98f 100644
--- a/assets/locales/pt/errors.json
+++ b/assets/locales/pt/errors.json
@@ -566,5 +566,26 @@
"hw.noKernelLog": "Não foi possível ler o registro do kernel",
"app.codeRefused": "O código deste app foi modificado e não foi carregado",
"remote.badAddress": "Não é um endereço ou rede válida",
- "remote.listFull": "A lista está cheia (64 entradas)"
+ "remote.listFull": "A lista está cheia (64 entradas)",
+ "imager.cacheFailed": "Não é possível usar a pasta de downloads do gravador (~/.cache/lordos/imager)",
+ "imager.noCurl": "A ferramenta de download (curl) não está instalada",
+ "imager.fetchCancelled": "Download cancelado",
+ "imager.fetchTooLarge": "O download é maior do que o esperado",
+ "imager.fetchNotFound": "O arquivo da versão não foi encontrado",
+ "imager.fetchNetwork": "Sem conexão com a página de versões do LordOS",
+ "imager.fetchFailed": "O download falhou (código {code})",
+ "imager.nothingRunning": "Nada está sendo baixado",
+ "imager.notRemovable": "{name} não é uma unidade removível: o gravador só grava cartões SD e unidades USB",
+ "imager.readOnly": "{name} está protegido contra gravação",
+ "imager.diskChanged": "{name} não é a unidade escolhida (ela mudou ou foi trocada)",
+ "imager.badImageName": "Esse arquivo não é uma imagem .img, .img.xz ou .iso",
+ "imager.xzDamaged": "A imagem .xz está danificada ou incompleta",
+ "imager.noXz": "A ferramenta .xz (xz-utils) não está instalada",
+ "imager.noSignature": "Não foi possível ler os arquivos de assinatura da versão",
+ "imager.badSignature": "A assinatura da versão não confere com a chave do LordOS",
+ "imager.notListed": "A lista assinada não inclui {name}",
+ "imager.hashMismatch": "A imagem não confere com o seu SHA-256 assinado: ela não foi gravada",
+ "imager.cancelledWiped": "Cancelado: a unidade foi limpa",
+ "imager.xzFailed": "Não foi possível descompactar a imagem",
+ "imager.imageChanged": "O arquivo de imagem mudou durante a gravação: a unidade foi limpa"
}
diff --git a/assets/locales/pt/imager.json b/assets/locales/pt/imager.json
new file mode 100644
index 0000000..52471d1
--- /dev/null
+++ b/assets/locales/pt/imager.json
@@ -0,0 +1,385 @@
+{
+ "back": "Voltar",
+ "cancelAsk.keep": "Continuar gravando",
+ "cancelAsk.ok": "Parar",
+ "cancelAsk.text": "A unidade vai ficar limpa e não vai iniciar. Os downloads já feitos são mantidos.",
+ "cancelAsk.title": "Parar a gravação?",
+ "confirm.cancel": "Cancelar",
+ "confirm.ok": "Apagar e gravar",
+ "confirm.text": "Tudo o que há nesta unidade de {size} ({dev}) será apagado e substituído pelo LordOS.",
+ "confirm.title": "Apagar {name}?",
+ "cooling.active-cooler": "Cooler ativo",
+ "cooling.active-coolerHint": "Um dissipador com uma ventoinha em cima.",
+ "cooling.case-fan": "Gabinete com ventoinha",
+ "cooling.case-fanHint": "Um gabinete cuja ventoinha se liga ao conector da placa.",
+ "cooling.none": "Nada",
+ "cooling.noneHint": "A placa sozinha.",
+ "cooling.noneWarn": "Com carga, chega a 85 °C em minutos e reduz a velocidade. Um pequeno dissipador ou uma ventoinha fazem muita diferença.",
+ "cooling.noneWarnTitle": "Sem resfriamento a placa desacelera sozinha",
+ "cooling.overclock": "Overclock leve",
+ "cooling.overclockHint": "2,6 GHz em vez de 2,4 GHz, sem tensão extra. Só com ventoinha.",
+ "cooling.overclockWarn": "Se a placa não iniciar, abra a partição de boot do cartão em outro computador e apague o bloco lordos-firstrun do config.txt.",
+ "cooling.overclockWarnTitle": "Nem toda placa fica estável com overclock",
+ "cooling.p.balanced": "Equilibrado",
+ "cooling.p.balancedHint": "A ventoinha liga a 55 °C e acelera com a temperatura. O padrão.",
+ "cooling.p.conservative": "Conservador",
+ "cooling.p.conservativeHint": "Um clock máximo menor (2,0 GHz) para a placa esquentar menos e não desacelerar.",
+ "cooling.p.performance": "Desempenho",
+ "cooling.p.performanceHint": "A ventoinha liga antes e o processador fica no clock máximo.",
+ "cooling.p.quiet": "Silencioso",
+ "cooling.p.quietHint": "A ventoinha liga mais tarde (60 °C). Bom para uso leve.",
+ "cooling.passive": "Gabinete passivo",
+ "cooling.passiveHint": "Um gabinete de metal ou um dissipador, sem ventoinha.",
+ "cooling.profile": "Perfil",
+ "cooling.text": "O que mantém a sua placa fresca? O LordOS controla a ventoinha pela temperatura e escolhe um perfil adequado.",
+ "cooling.unset": "Não escolhido: a placa mantém os padrões.",
+ "custom.fix": "Confira {n} campo(s) antes de continuar",
+ "custom.on": "Personalizado",
+ "custom.skipText": "A placa inicia no modo de configuração: crie a sua conta em Ajustes → Usuários e reinicie. Até lá, mantenha-a fora da rede.",
+ "custom.skipTitle": "Configuração na placa",
+ "custom.skipped": "Sem personalização",
+ "custom.text": "Ajustes que a placa aplica uma única vez, ao iniciar pela primeira vez. Depois você pode mudar tudo em Ajustes.",
+ "custom.title": "Personalize o primeiro boot",
+ "custom.toggle": "Preparar o primeiro boot",
+ "custom.toggleOff": "A placa inicia no modo de configuração e você cria a sua conta nela.",
+ "custom.toggleOn": "Gravado no cartão como um arquivo de ajustes que é apagado depois de aplicado.",
+ "device.liveUsb": "USB ao vivo",
+ "device.never": "Não previsto",
+ "device.notYet": "Ainda não suportado",
+ "device.otherTitle": "Outras placas",
+ "device.pc": "PC (pendrive USB)",
+ "device.pc.text": "O sistema ao vivo num pendrive: experimente o LordOS e instale a partir dele.",
+ "device.pcFooter": "Os ajustes do primeiro boot são para o Raspberry Pi; o sistema ao vivo pergunta por eles na instalação.",
+ "device.pcText": "A imagem para PC é o sistema ao vivo: ela inicia pelo pendrive e pode instalar o LordOS no disco do computador.",
+ "device.ram.comfortable": "Confortável para o dia a dia.",
+ "device.ram.max": "O melhor desempenho, com espaço para tudo.",
+ "device.ram.min": "O mínimo: funciona, mas apps pesados ficam apertados.",
+ "device.ramFooter": "Recomenda-se uma ventoinha (o cooler ativo ou a de um gabinete) e a fonte de 27 W.",
+ "device.ramGb": "{n} GB",
+ "device.ramTitle": "Memória",
+ "device.rpi5.text": "BCM2712, 4 núcleos a 2,4 GHz. Cartão SD ou NVMe.",
+ "device.supported": "Suportado",
+ "device.text": "O LordOS funciona no Raspberry Pi 5 e em PCs de 64 bits. Escolha onde este cartão ou pendrive será usado.",
+ "device.title": "Escolha o seu dispositivo",
+ "done.another": "Gravar outro cartão",
+ "done.custom": "Imagem sem assinatura",
+ "done.ejected": "{name} está pronto e pode ser removido.",
+ "done.newSetup": "Começar de novo",
+ "done.next": "Próximos passos",
+ "done.notEjected": "{name} está pronto. Ejete-o antes de remover.",
+ "done.notifyBody": "{name} está pronto.",
+ "done.notifyTitle": "O LordOS foi gravado",
+ "done.pc1": "Conecte o pendrive no PC",
+ "done.pc1Text": "Ligue-o e escolha a unidade USB no menu de boot (normalmente F12, F11, F8 ou Esc).",
+ "done.pc2": "Experimente e depois instale",
+ "done.pc2Text": "O sistema ao vivo roda a partir do pendrive; Instalar o LordOS o coloca no disco do computador.",
+ "done.pi1": "Coloque o cartão no Raspberry Pi 5",
+ "done.pi1Text": "Conecte um monitor, o teclado e o mouse, e depois a fonte.",
+ "done.pi2": "Espere o primeiro boot",
+ "done.pi2Custom": "Leva cerca de um minuto: o sistema cresce para ocupar o cartão e aplica os seus ajustes; depois mostra a tela de login.",
+ "done.pi2Setup": "Leva cerca de um minuto e inicia no modo de configuração: crie a sua conta em Ajustes → Usuários.",
+ "done.pi3": "Encontre-a na rede",
+ "done.pi3Text": "De outro computador da sua casa é {host}.",
+ "done.remote": "Área de trabalho remota",
+ "done.ssh": "Login remoto",
+ "done.stats": "{s} s · {speed}",
+ "done.title": "Tudo pronto!",
+ "done.verified": "Gravado e verificado",
+ "err.badSignature": "A assinatura da versão não confere com a chave do LordOS. Nada foi gravado.",
+ "err.hashFailed": "Não foi possível calcular o hash da senha.",
+ "err.hostChars": "Use letras minúsculas, números e hifens, não no começo nem no fim (e não só números).",
+ "err.hostEmpty": "Digite um nome para o computador.",
+ "err.hostLong": "Até 63 caracteres.",
+ "err.keyComment": "O comentário da chave tem caracteres inválidos.",
+ "err.keyData": "Isso não parece uma chave pública completa.",
+ "err.keyDss": "Chaves DSA não são mais aceitas. Crie uma chave ed25519.",
+ "err.keyEmpty": "Cole uma chave pública primeiro.",
+ "err.keyRsaShort": "Chaves RSA precisam ter pelo menos 2048 bits.",
+ "err.keyType": "Não é um tipo de chave aceito (ed25519, ECDSA, chaves de segurança ou RSA).",
+ "err.nameChars": "Remova : , = \\ e os caracteres de controle.",
+ "err.nameLong": "Esse nome é longo demais.",
+ "err.notListed": "A lista assinada não inclui esta imagem. Nada foi gravado.",
+ "err.overclockNeedsFan": "O overclock precisa de uma ventoinha.",
+ "err.passEmpty": "Digite uma senha.",
+ "err.passLong": "Essa senha é longa demais.",
+ "err.passMismatch": "As senhas não coincidem.",
+ "err.profileNeedsFan": "Este perfil precisa de uma ventoinha.",
+ "err.remoteNeedsUser": "A área de trabalho remota precisa de uma conta de usuário.",
+ "err.sshNeedsKey": "Adicione pelo menos uma chave, ou permita senhas.",
+ "err.sshNeedsUser": "O SSH precisa de uma conta de usuário.",
+ "err.ssidChars": "O nome da rede tem um caractere inválido.",
+ "err.ssidEmpty": "Digite o nome da rede.",
+ "err.ssidLong": "O nome de uma rede tem no máximo 32 bytes.",
+ "err.userChars": "Comece com uma letra minúscula; depois letras minúsculas, números, _ ou -.",
+ "err.userEmpty": "Digite um nome de usuário.",
+ "err.userLong": "Até 32 caracteres.",
+ "err.userReserved": "Esse nome é reservado pelo sistema.",
+ "err.wifiPassChars": "Para uma senha WPA2 use letras, números e símbolos simples (sem acentos).",
+ "err.wifiPassLength": "Uma senha de Wi-Fi tem de 8 a 63 caracteres.",
+ "err.zone": "Escolha um fuso horário da lista.",
+ "general.country": "País do Wi-Fi",
+ "general.countryHint": "Libera os canais de rádio permitidos onde você mora.",
+ "general.hostname": "Nome do computador",
+ "general.hostnameHint": "Na sua rede ele será {name}.local. Letras minúsculas, números e hifens.",
+ "general.keyboard": "Layout do teclado",
+ "general.language": "Idioma",
+ "general.zone": "Fuso horário",
+ "hint.common": "uma senha muito comum",
+ "hint.longer": "use 12 caracteres ou mais",
+ "hint.mix": "misture letras, números e símbolos",
+ "hint.pattern": "evite repetições e sequências",
+ "image.beta": "Beta",
+ "image.cached": "Baixada",
+ "image.custom": "Usar um arquivo de imagem…",
+ "image.customHint": ".img, .img.xz ou .iso",
+ "image.customMeta": "{size} · {raw} gravada",
+ "image.customWarn": "O LordOS não tem como saber de onde ela veio nem se alguém a alterou. Ela é gravada e lida de volta para conferir a cópia, mas só as imagens oficiais são verificadas. Use arquivos em que você confia.",
+ "image.customWarnTitle": "Esta imagem não é assinada",
+ "image.damaged": "Não dá para ler o seu índice, então o tamanho é desconhecido. Baixe-o de novo.",
+ "image.damagedTitle": "Este arquivo .xz parece danificado",
+ "image.hideOld": "Só a mais recente",
+ "image.latest": "Mais recente",
+ "image.loading": "Procurando a versão mais recente…",
+ "image.meta": "Publicada em {date} · download de {size}",
+ "image.offlineText": "Verifique a conexão com a internet e tente de novo, ou use um arquivo de imagem que você já tenha.",
+ "image.offlineTitle": "Não foi possível obter a lista de versões",
+ "image.partial": "{size} baixados, continua",
+ "image.pickTitle": "Escolha um arquivo de imagem",
+ "image.picking": "Escolha o arquivo…",
+ "image.refresh": "Atualizar",
+ "image.showOld": "Versões anteriores ({n})",
+ "image.signed": "Assinada pelo LordOS",
+ "image.staleText": "A internet não está acessível agora. As imagens baixadas continuam valendo: elas são conferidas de novo antes de gravar.",
+ "image.staleTitle": "Mostrando a lista de antes",
+ "image.textPc": "O sistema ao vivo mais recente do LordOS para PC, assinado pelo projeto LordOS, ou um arquivo de imagem que você já tenha.",
+ "image.textPi": "O LordOS mais recente para o Raspberry Pi 5, assinado pelo projeto LordOS, ou um arquivo de imagem que você já tenha.",
+ "image.title": "Escolha uma imagem do sistema",
+ "look.accent": "Cor de destaque",
+ "look.accents.azul": "Azul",
+ "look.accents.grafito": "Grafite",
+ "look.accents.naranja": "Laranja",
+ "look.accents.rosa": "Rosa",
+ "look.accents.verde": "Verde",
+ "look.accents.violeta": "Roxo",
+ "look.dark": "Escuro",
+ "look.light": "Claro",
+ "look.mode": "Modo",
+ "look.style": "Estilo da área de trabalho",
+ "look.theme.classic": "Clássico",
+ "look.theme.classicHint": "Uma barra de tarefas e um menu iniciar.",
+ "look.theme.default": "Lord Default",
+ "look.theme.defaultHint": "Barra de menus em cima e o Dock.",
+ "look.wallpaper": "Papel de parede",
+ "more.bluetooth": "Bluetooth",
+ "more.bluetoothHint": "Desligue se não usar. Ajustes → Bluetooth liga de novo.",
+ "more.privacy": "Privacidade",
+ "more.telemetry": "O LordOS não coleta nada: nem dados de uso, nem relatórios de falhas, nem contas. O gravador também não.",
+ "more.telemetryTitle": "Sem telemetria",
+ "more.updates": "Procurar atualizações automaticamente",
+ "more.updatesHint": "Uma vez por dia o LordOS baixa a lista assinada de atualizações e avisa quando há novidade. Ele nunca instala sozinho.",
+ "next": "Avançar",
+ "options.auto": "Automático",
+ "options.cache": "Downloads",
+ "options.cacheMove": "Mudar…",
+ "options.cacheSize": "{size} em uso",
+ "options.cacheWhere": "Guardados em",
+ "options.clear": "Limpar",
+ "options.clearing": "Limpando…",
+ "options.done": "Pronto",
+ "options.eject": "Ejetar ao terminar",
+ "options.ejectHint": "A unidade pode ser removida em seguida.",
+ "options.followsSystem": "O idioma e a aparência seguem o LordOS (Ajustes → Geral e Aparência).",
+ "options.language": "Idioma",
+ "options.privacy": "Sem telemetria: o gravador só acessa a página de versões do LordOS para listar e baixar imagens.",
+ "options.sound": "Tocar um som ao terminar",
+ "options.theme": "Aparência",
+ "options.title": "Opções do app",
+ "options.updates": "Procurar atualizações do app",
+ "options.updatesHint": "Ao abrir, procura um LordOS Imager mais novo na página de versões do LordOS.",
+ "options.updatesSystem": "O gravador faz parte do LordOS: ele é atualizado com o sistema.",
+ "phase.check": "Conferindo a imagem",
+ "phase.done": "Pronto",
+ "phase.download": "Baixando",
+ "phase.eject": "Ejetando",
+ "phase.failed": "Interrompida",
+ "phase.firstrun": "Salvando os ajustes do primeiro boot",
+ "phase.prepare": "Preparando",
+ "phase.secrets": "Preparando o primeiro boot",
+ "phase.signature": "Conferindo a assinatura da versão",
+ "phase.verify": "Lendo de volta e comparando",
+ "phase.write": "Gravando",
+ "profiles.button": "Perfis…",
+ "profiles.close": "Fechar",
+ "profiles.delete": "Apagar",
+ "profiles.load": "Usar",
+ "profiles.name": "Nome do perfil",
+ "profiles.none": "Ainda não há perfis salvos.",
+ "profiles.save": "Salvar",
+ "profiles.text": "Salve estes ajustes para usar no próximo cartão. Senhas e chaves do Wi-Fi nunca são salvas: você as digita de novo.",
+ "profiles.title": "Perfis de personalização",
+ "remote.add": "Adicionar chave",
+ "remote.addKey": "Chave pública",
+ "remote.addKeyHint": "Cole o conteúdo de um arquivo .pub (por exemplo ~/.ssh/id_ed25519.pub). Até 16 chaves.",
+ "remote.desktop": "Área de trabalho remota do LordOS",
+ "remote.desktopFooter": "Só a rede local, criptografada, e endereços que erram o login 3 vezes são bloqueados. Mude em Ajustes → Compartilhamento.",
+ "remote.desktopHint": "De um navegador na sua rede local: https://{host}.local:5673",
+ "remote.desktopOn": "Permitir a área de trabalho remota",
+ "remote.needUser": "O acesso remoto precisa de uma conta com senha (o root nunca entra). Adicione uma na aba Usuário.",
+ "remote.needUserTitle": "Crie o usuário primeiro",
+ "remote.passwordWarn": "O recomendado é só chaves. Com senha, use uma forte e mantenha a placa na sua rede local.",
+ "remote.passwordWarnTitle": "Senhas podem ser adivinhadas",
+ "remote.pickKey": "Escolher um arquivo .pub…",
+ "remote.remove": "Remover",
+ "remote.ssh": "Login remoto (SSH)",
+ "remote.sshKeys": "Só chaves",
+ "remote.sshOff": "Desligado",
+ "remote.sshPassword": "Senha e chaves",
+ "remote.sshText": "Um terminal na placa a partir de outro computador.",
+ "review.autologin": "entra automaticamente",
+ "review.check": "Verificação",
+ "review.checkCustom": "Leitura da unidade de volta (o arquivo não é assinado)",
+ "review.checkOfficial": "Assinatura da versão, SHA-256 e leitura da unidade de volta",
+ "review.cooling": "Resfriamento",
+ "review.firstBoot": "Primeiro boot",
+ "review.hidden": "oculta",
+ "review.host": "Nome do computador",
+ "review.keys": "{n} chave(s)",
+ "review.locale": "Idioma e região",
+ "review.look": "Aparência",
+ "review.more": "Outros",
+ "review.off": "não",
+ "review.on": "sim",
+ "review.overclock": "overclock leve",
+ "review.remote": "Área de trabalho remota",
+ "review.remoteOn": "Ligada, só rede local",
+ "review.ssh": "SSH",
+ "review.text": "Confira se está tudo certo. A unidade é apagada quando você confirmar.",
+ "review.title": "Pronto para gravar",
+ "review.user": "Usuário",
+ "review.wifi": "Wi-Fi",
+ "search": "Buscar",
+ "step.customise": "Personalizar",
+ "step.device": "Dispositivo",
+ "step.image": "Imagem do sistema",
+ "step.storage": "Armazenamento",
+ "step.write": "Gravar",
+ "steps": "Etapas",
+ "storage.bigText": "{size} não é comum para um cartão SD ou um pendrive. Confira se não é um disco de backup.",
+ "storage.bigTitle": "Esta é uma unidade grande",
+ "storage.eraseText": "Todos os {size}, cada partição e cada arquivo. Isso não pode ser desfeito.",
+ "storage.eraseTitle": "{name} será apagado",
+ "storage.hidden": "Discos internos e o disco de onde este computador inicia nunca aparecem.",
+ "storage.hiddenSome": "Discos internos e o disco de onde este computador inicia nunca aparecem ({n} ocultos).",
+ "storage.inUse": "Em uso: {names}. Será desmontada.",
+ "storage.kind.sd": "Cartão SD",
+ "storage.kind.usb": "Unidade USB",
+ "storage.meta": "{size} · {dev}",
+ "storage.noneText": "Insira um cartão SD (com um leitor, se precisar) ou conecte uma unidade USB. Ela aparece aqui sozinha.",
+ "storage.noneTitle": "Nenhum cartão ou unidade USB encontrado",
+ "storage.readOnly": "Protegido contra gravação: mova a trava do cartão.",
+ "storage.text": "O cartão SD ou a unidade USB onde o LordOS será gravado.",
+ "storage.title": "Escolha o armazenamento",
+ "storage.tooSmall": "Pequena demais para esta imagem.",
+ "storage.tooSmallPc": "Pequena demais: use uma unidade de pelo menos 2 GB.",
+ "storage.tooSmallPi": "Pequeno demais: use um cartão de pelo menos 8 GB (16 GB ou mais é melhor).",
+ "subtitle": "Cartões SD e pendrives",
+ "tab.cooling": "Resfriamento",
+ "tab.general": "Geral",
+ "tab.look": "Aparência",
+ "tab.more": "Mais",
+ "tab.remote": "Acesso remoto",
+ "tab.user": "Usuário",
+ "tab.wifi": "Wi-Fi",
+ "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.",
+ "tip.customise.title": "Pronta no primeiro boot",
+ "tip.device.text": "Vou te acompanhar. Escolha o computador para o qual é o cartão; só ofereço o que o LordOS realmente suporta.",
+ "tip.device.title": "Oi, eu sou o Lumo!",
+ "tip.erase.text": "Copie antes o que quiser guardar. Gravar apaga a unidade inteira.",
+ "tip.erase.title": "Tudo nele será apagado",
+ "tip.failed.text": "A unidade foi limpa para não parecer gravada pela metade. Você pode tentar de novo.",
+ "tip.failed.title": "Isso não deu certo",
+ "tip.image.text": "As imagens oficiais são conferidas com a chave das versões do LordOS antes de apagar qualquer coisa. Guardo o download, então o próximo cartão é mais rápido.",
+ "tip.image.title": "Só imagens assinadas",
+ "tip.storage.text": "Aqui só aparecem cartões SD e unidades USB. O disco de onde este computador inicia nunca é oferecido.",
+ "tip.storage.title": "Conecte o seu cartão",
+ "tip.tab.cooling.text": "Com ventoinha, a placa pode ficar na velocidade máxima. Sem ela, um clock mais suave evita que ela desacelere.",
+ "tip.tab.cooling.title": "Mantenha fresquinha",
+ "tip.tab.general.text": "O nome do computador é como você vai chegar até ela: nome.local de qualquer computador da sua casa.",
+ "tip.tab.general.title": "Encontre-a na rede",
+ "tip.tab.look.text": "Você pode mudar tudo isso depois em Ajustes → Aparência.",
+ "tip.tab.look.title": "Deixe com a sua cara",
+ "tip.tab.more.text": "O LordOS não coleta nada sobre você. Nem agora, nem depois.",
+ "tip.tab.more.title": "Nada sai da placa",
+ "tip.tab.remote.text": "SSH só com chaves não pode ser adivinhado. A área de trabalho remota fica na sua rede local.",
+ "tip.tab.remote.title": "Chaves são mais seguras",
+ "tip.tab.user.text": "A sua senha vira um hash irreversível logo antes da gravação. Uma frase longa é uma ótima senha.",
+ "tip.tab.user.title": "No cartão vai só um hash",
+ "tip.tab.wifi.text": "Guardo a chave derivada da rede, não a senha que você digita.",
+ "tip.tab.wifi.title": "Sem senha do Wi-Fi no cartão",
+ "tip.write.text": "Confira o resumo. Quando você confirmar, a unidade é apagada e gravada.",
+ "tip.write.title": "Última conferida",
+ "tip.writing.text": "Não remova a unidade. Vou ler tudo de volta para ter certeza de que ficou certo.",
+ "tip.writing.title": "Já estou nisso!",
+ "title": "LordOS Imager",
+ "unavailable.text": "Ele precisa do assistente de administração do LordOS, que não está disponível nesta sessão.",
+ "unavailable.title": "O gravador não pode funcionar aqui",
+ "user.autologin": "Entrar automaticamente",
+ "user.autologinHint": "Abre a área de trabalho sem pedir a senha. Quem ligar a placa entra na sua sessão.",
+ "user.confirm": "Confirme a senha",
+ "user.fullname": "Nome completo",
+ "user.fullnamePh": "Ana Pereira",
+ "user.hashNote": "No cartão é gravado só um hash yescrypt ou SHA-512 da senha, nunca a senha.",
+ "user.hide": "Ocultar as senhas",
+ "user.intro": "Uma conta de administrador para você. O root continua bloqueado; a conta de configuração é removida.",
+ "user.introTitle": "A sua conta",
+ "user.name": "Nome de usuário",
+ "user.nameHint": "Letras minúsculas, números, _ e -. Você vai entrar com ele.",
+ "user.password": "Senha",
+ "user.show": "Mostrar as senhas",
+ "user.strength.0": "Muito fraca",
+ "user.strength.1": "Fraca",
+ "user.strength.2": "Razoável",
+ "user.strength.3": "Boa",
+ "user.strength.4": "Forte",
+ "wifi.enable": "Conectar ao Wi-Fi",
+ "wifi.enableHint": "A placa entra nesta rede no primeiro boot.",
+ "wifi.ethernet": "Sem Wi-Fi, conecte um cabo de rede: a placa obtém o endereço sozinha.",
+ "wifi.hidden": "Rede oculta",
+ "wifi.hiddenHint": "A rede não anuncia o seu nome.",
+ "wifi.noRadio": "Este computador não tem Wi-Fi para procurar redes. Digite o nome da rede.",
+ "wifi.open": "Rede aberta",
+ "wifi.openShort": "aberta",
+ "wifi.openWarn": "Prefira uma rede com senha.",
+ "wifi.openWarnTitle": "Qualquer pessoa por perto pode ver o tráfego de uma rede aberta",
+ "wifi.password": "Senha do Wi-Fi",
+ "wifi.passwordHint": "De 8 a 63 caracteres.",
+ "wifi.pskNote": "O cartão guarda a chave WPA2 derivada da rede, não a sua senha. Uma rede só WPA3 precisa da própria senha: digite-a na placa em Ajustes → Rede.",
+ "wifi.scan": "Procurar",
+ "wifi.scanNone": "Nenhuma rede por perto.",
+ "wifi.scanning": "Procurando…",
+ "wifi.security": "Segurança",
+ "wifi.ssid": "Nome da rede (SSID)",
+ "wifi.ssidPh": "Minha rede",
+ "wifi.wpa": "Senha WPA2 / WPA3",
+ "write.amount": "{done} de {total}",
+ "write.cachedFor": "guardada para a próxima",
+ "write.cancel": "Cancelar",
+ "write.cancelledText": "A unidade foi limpa. Nada mais foi alterado.",
+ "write.cancelledTitle": "Gravação cancelada",
+ "write.cancelling": "Cancelando…",
+ "write.eta": "{eta}",
+ "write.etaHours": "faltam {h} h {m} min",
+ "write.etaMinutes": "faltam {m} min {s} s",
+ "write.etaSeconds": "faltam {n} s",
+ "write.etaUnknown": "estimando o tempo…",
+ "write.failedText": "A unidade foi limpa para não parecer gravada pela metade.",
+ "write.failedTitle": "A gravação não terminou",
+ "write.retry": "Tentar de novo",
+ "write.speed": "{speed}",
+ "write.start": "Apagar e gravar",
+ "write.text": "Mantenha a unidade conectada. Isso leva alguns minutos.",
+ "write.title": "Gravando em {name}",
+ "write.why": "O que aconteceu"
+}
diff --git a/assets/locales/pt/mascot.json b/assets/locales/pt/mascot.json
index 353f6c8..9d61e7f 100644
--- a/assets/locales/pt/mascot.json
+++ b/assets/locales/pt/mascot.json
@@ -4,5 +4,6 @@
"shield": "Lumo segurando um escudo",
"celebrate": "Lumo comemorando",
"confused": "Lumo confuso",
- "sleep": "Lumo dormindo sobre um notebook"
+ "sleep": "Lumo dormindo sobre um notebook",
+ "run": "Lumo correndo"
}
diff --git a/assets/locales/pt/status.json b/assets/locales/pt/status.json
index 0ec4b16..9148aab 100644
--- a/assets/locales/pt/status.json
+++ b/assets/locales/pt/status.json
@@ -124,5 +124,11 @@
"remote.blocked": "{address} bloqueado",
"remote.unblocked": "{address} desbloqueado",
"remote.failures": "{count} entradas com erro",
- "remote.failure": "Entrada com erro de {user} de {key} ({count})"
+ "remote.failure": "Entrada com erro de {user} de {key} ({count})",
+ "imager.cached": "Já estava baixado",
+ "imager.fetched": "Baixado",
+ "imager.cancelling": "Cancelando…",
+ "imager.cacheCleared": "Downloads apagados",
+ "imager.verifiedImage": "A imagem confere com o seu SHA-256 assinado",
+ "imager.written": "Gravada e verificada"
}
diff --git a/assets/mascot/lumo-run-256.png b/assets/mascot/lumo-run-256.png
new file mode 100644
index 0000000..f46943a
Binary files /dev/null and b/assets/mascot/lumo-run-256.png differ
diff --git a/assets/mascot/lumo-sleep-256.png b/assets/mascot/lumo-sleep-256.png
new file mode 100644
index 0000000..2b84210
Binary files /dev/null and b/assets/mascot/lumo-sleep-256.png differ
diff --git a/sdk/mascot.js b/sdk/mascot.js
index 47c4d10..6023d53 100644
--- a/sdk/mascot.js
+++ b/sdk/mascot.js
@@ -1,6 +1,6 @@
// mascot.js — Lumo, the LordOS guardian (docs/brand/README.md, "Lumo").
//
-// <Lumo pose="confused" size={96} /> a pose: 'wave' (welcome), 'shield' (security), 'celebrate'
+// <Lumo pose="confused" size={96} /> a pose: 'wave' (welcome), 'shield' (security), 'run' (busy), 'celebrate'
// (done), 'confused' (error, unavailable), 'sleep' (idle)
// <Lumo pose="avatar" size={24} /> the head in a violet circle (the simplified one up to 40 px)
//
@@ -13,7 +13,7 @@ import { createElement as h } from 'react';
import { Image } from '@lordos/runtime';
import { t } from './i18n.js';
-const POSES = new Set(['wave', 'shield', 'celebrate', 'confused', 'sleep']);
+const POSES = new Set(['wave', 'shield', 'celebrate', 'confused', 'sleep', 'run']);
export function lumoSource(pose = 'confused', size = 96) {
if (pose === 'avatar') return size <= 40 ? 'asset:mascot/lumo-avatar-small-64.png' : 'asset:mascot/lumo-avatar-128.png';
diff --git a/tools/gen-mascot.py b/tools/gen-mascot.py
index cdf5025..63c50e4 100644
--- a/tools/gen-mascot.py
+++ b/tools/gen-mascot.py
@@ -601,7 +601,7 @@ def build(only=None):
AVATARS = ('lumo-avatar', 'lumo-avatar-small')
UI_PNG = { # what the UI draws (sdk/mascot.js): twice the largest size it is shown at
- 'lumo-wave': [256], 'lumo-shield': [256], 'lumo-celebrate': [256], 'lumo-confused': [256],
+ 'lumo-wave': [256], 'lumo-shield': [256], 'lumo-celebrate': [256], 'lumo-confused': [256], 'lumo-run': [256], 'lumo-sleep': [256],
'lumo-avatar': [128], 'lumo-avatar-small': [64],
}