strom-research 1.12.0 → 1.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/lang/cs.json +44 -0
- package/assets/lang/de.json +44 -0
- package/dist/cli/main.js +3 -1
- package/dist/cli/menu-links.js +207 -43
- package/dist/cli/menu.js +3 -3
- package/dist/cli/move.js +116 -0
- package/dist/cli/ui.js +44 -0
- package/dist/cli/wizard.js +38 -32
- package/dist/commands/links.js +1 -1
- package/dist/commands/setup.js +3 -0
- package/dist/commands/start.js +30 -13
- package/dist/commands/sync.js +9 -7
- package/dist/commands/trees.js +24 -16
- package/dist/core/appbrowser.js +52 -0
- package/dist/core/chromium.js +114 -15
- package/dist/core/config.js +7 -0
- package/dist/core/links.js +51 -1
- package/dist/core/live.js +47 -9
- package/dist/core/stromapp.js +4 -2
- package/dist/core/sync.js +70 -10
- package/dist/core/transfer.js +172 -0
- package/dist/core/tree.js +1 -1
- package/package.json +1 -1
package/assets/lang/cs.json
CHANGED
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"ui.doc.links.isolated": "izolovaná instalace: odkazy nezapisuje",
|
|
67
67
|
"ui.doc.app.isolated": "izolovaná instalace: úmyslně se nepoužívá",
|
|
68
68
|
"ui.doc.shortcut.isolated": "izolovaná instalace: úmyslně žádný",
|
|
69
|
+
"ui.doc.shortcut.no": "nechtěný (strom setup se zeptá znovu)",
|
|
69
70
|
"ui.dialog.waiting": "Otázka čeká v okně systému na obrazovce (může být za ostatními okny) – odpověď patří tam, čeká se nejvýš {minutes} min: {question}",
|
|
70
71
|
"ui.consent.level.auto": "Nechat agenta pracovat samostatně? Ptát se bude jen u riskantních kroků.",
|
|
71
72
|
"ui.consent.level.full": "Povolit agentovi dělat bez ptaní všechno kromě toho, co strom zakazuje?\n\nJen pro počítač, na kterém není nic jiného důležitého.",
|
|
@@ -415,6 +416,9 @@
|
|
|
415
416
|
"ui.o.disk": "disk",
|
|
416
417
|
"ui.o.disk.tidy": "vedle výzkumu si strom drží {strom}, z toho jde uvolnit {size} – řekni to jednou uživateli: strom tidy to s jeho souhlasem uvolní (výzkum zůstane)",
|
|
417
418
|
"ui.app.drag": "Aplikace Strom se otevřela. Do jejího okna přetáhnout soubor {file}{shown} – poprvé z něj bude nový rodokmen, příště se tentýž rodokmen aktualizuje. S Chrome nebo Edge na tomto počítači ho strom předá sám.",
|
|
419
|
+
"ui.app.browser.gone": "Aplikace Strom se otevírala v {gone}, ten už na tomto počítači není; nově se otevírá v {now} (jiný: strom config set app.browser chrome|edge|brave|opera|firefox|chromium).",
|
|
420
|
+
"ui.app.browser.gone.none": "Aplikace Strom se otevírala v {gone}, ten už na tomto počítači není, a jiný prohlížeč, ze kterého se k výzkumu připojí (Chrome, Edge, Brave, Firefox), tu není. Po instalaci některého z nich ho strom app otevře v něm.",
|
|
421
|
+
"ui.app.moved": "Strom výzkumu se otevírá v {browser}: přenos stromu je tím dokončený, aplikace Strom pokračuje tam a s výzkumem je spojená. Fotky stromu ve výzkumu nejsou – zůstaly v {from} a v souboru {file}.",
|
|
418
422
|
"ui.app.drag.shown": " (je ukázaný v okně se soubory)",
|
|
419
423
|
"ui.app.nolive": "Průběžné sledování výzkumu potřebuje Chrome nebo Edge – Safari webové stránce nedovolí přístup k tomuto počítači.",
|
|
420
424
|
"ui.app.images": "S obrázky: {n} zápisů vyříznutých ze skenů ({mb} MB).",
|
|
@@ -1042,14 +1046,54 @@
|
|
|
1042
1046
|
"ui.link.new.wait": "Čekám, až aplikace Strom strom předá – potvrdit to v ní (nejvýš {min} min; Ctrl+C přeruší).",
|
|
1043
1047
|
"ui.link.new.elsewhere": "Tahle kopie aplikace Strom ten strom nezná. Otevřít adresu výše v té, ve které to začalo (třeba v betě) – výzkum na ni počká.",
|
|
1044
1048
|
"ui.link.new.none": "Aplikace Strom žádný strom nepředala. Výzkum „{name}“ tu je, zatím prázdný: začít znovu z aplikace, nebo do něj přidat v nabídce stromu.",
|
|
1049
|
+
"ui.link.new.none.trashed": "Aplikace Strom žádný strom nepředala, výzkum „{name}“ se tedy nezaložil (jeho prázdná složka je v koši). Začít znovu jde z aplikace.",
|
|
1045
1050
|
"ui.link.new.waited": "Z aplikace Strom do {min} min žádný strom nepřišel. Výzkum „{name}“ tu je, zatím prázdný.",
|
|
1051
|
+
"ui.link.new.blocked": "Aplikace Strom se k výzkumu zatím nepřipojila. Možná příčina: prohlížeč jí zablokoval přístup k aplikacím na tomto zařízení (místní síť) – Chrome, Edge a Brave se na to ptají, Firefox podle svého nastavení. Povolit to jde ikonou vlevo od adresy → přístup k místní síti / k tomuto zařízení → Povolit, potom stránku načíst znovu.",
|
|
1052
|
+
"ui.link.new.blocked.chromium": "Aplikace Strom se k výzkumu zatím nepřipojila. Možná příčina: {browser} jí zablokoval přístup k aplikacím na tomto zařízení. Povolit to jde ikonou vlevo od adresy → Aplikace na zařízení (anglicky Apps on device; ve starších verzích Přístup k místní síti) → Povolit, potom stránku načíst znovu.",
|
|
1053
|
+
"ui.link.new.blocked.brave": "Aplikace Strom se k výzkumu zatím nepřipojila. Možná příčina: Brave jí zablokoval přístup k localhostu. Povolit to jde ikonou vlevo od adresy → Přístup k localhostu (anglicky Localhost access) → Povolit, potom stránku načíst znovu.",
|
|
1054
|
+
"ui.link.new.blocked.firefox": "Aplikace Strom se k výzkumu zatím nepřipojila. Možná příčina: Firefox jí zablokoval přístup k aplikacím a službám na tomto zařízení. Povolit to jde ikonou vlevo od adresy → přístup k aplikacím a službám na tomto zařízení → Povolit, potom stránku načíst znovu.",
|
|
1055
|
+
"ui.link.new.into.ask": "Výzkum „{name}“ (založený {when}) strom z aplikace Strom zatím nedostal. Přidat strom do něj?",
|
|
1056
|
+
"ui.link.new.into": "Do výzkumu „{name}“",
|
|
1057
|
+
"ui.link.new.into.new": "Založit nový výzkum",
|
|
1046
1058
|
"ui.link.new.empty": "Strom, který aplikace Strom poslala, nemá žádné osoby – není co zkoumat. Výzkum „{name}“ tu je, zatím prázdný.",
|
|
1047
1059
|
"ui.link.new.failed": "Aplikace Strom strom předat nemohla. Výzkum „{name}“ tu je, zatím prázdný: zkusit to z aplikace znovu.",
|
|
1048
1060
|
"ui.link.new.taken": "✓ Rodokmen je ve výzkumu „{name}“: osob {persons}, rodin {families}, pramenů {sources} – jako vodítka; co doloží záznamy, najde agent.",
|
|
1049
1061
|
"ui.link.new.taken.archive": "✓ Rodokmen je ve výzkumu „{name}“: osob {persons}, rodin {families}, pramenů {sources} – jako vodítka; co doloží záznamy, najde agent, až bude zapnutý.",
|
|
1062
|
+
"ui.link.new.taken.empty": "✓ Aplikace Strom předala strom, zatím prázdný: výzkum „{name}“ je s ní propojený. Osoby přidané v aplikaci přijdou do výzkumu, až se odešlou.",
|
|
1050
1063
|
"ui.link.new.back": "Aplikace Strom teď strom ukazuje jako strom výzkumu.",
|
|
1051
1064
|
"ui.link.new.chat": "Začít teď rozhovor s agentem?",
|
|
1052
1065
|
"ui.link.new.say": "Předal(a) jsem náš rodokmen z aplikace Strom – podívej se, co v něm je, a navrhni, čím začít.",
|
|
1066
|
+
"ui.move.file": "Soubor stromu z aplikace Strom: {file}",
|
|
1067
|
+
"ui.move.file.ask": "Soubor stromu z aplikace Strom ({name}) se mezi staženými soubory nenašel. Cesta k němu – soubor lze přetáhnout do tohoto okna (0: zrušit)",
|
|
1068
|
+
"ui.move.file.other": "Tenhle soubor není strom, který aplikace Strom přenáší (jiný strom, nebo jiný druh souboru).",
|
|
1069
|
+
"ui.move.file.kept": "Soubor stromu zůstává na místě: {file}",
|
|
1070
|
+
"ui.move.file.trashed": "Strom je teď ve výzkumu i v prohlížeči; jeho soubor šel do koše: {file}",
|
|
1071
|
+
"ui.move.fresh": "{browser} se při prvním spuštění může ptát na přihlášení a výchozí prohlížeč. Až to bude zodpovězené a aplikace Strom se v něm neotevře, otevřít v {browser} adresu níže.",
|
|
1072
|
+
"ui.move.ask": "Strom „{tree}“ (osob: {persons}) se přenese do {browser} a dál se bude pracovat tam. Přenést?",
|
|
1073
|
+
"ui.move.which": "Do kterého prohlížeče se strom „{tree}“ (osob: {persons}) přenese?",
|
|
1074
|
+
"ui.move.yes": "Přenést",
|
|
1075
|
+
"ui.move.no": "Ne",
|
|
1076
|
+
"ui.move.none": "Nepřenášet",
|
|
1077
|
+
"ui.move.empty": "Aplikace Strom se otevře v {browser} a dál se bude pracovat tam. Pokračovat?",
|
|
1078
|
+
"ui.move.empty.which": "Ve kterém prohlížeči se aplikace Strom otevře?",
|
|
1079
|
+
"ui.move.go": "Pokračovat",
|
|
1080
|
+
"ui.move.stays": "Strom zůstává v {from}, nic se nezaložilo.",
|
|
1081
|
+
"ui.move.from.other": "původním prohlížeči",
|
|
1082
|
+
"ui.move.from.mobile": "telefonu nebo tabletu",
|
|
1083
|
+
"ui.move.then": "Co dál?",
|
|
1084
|
+
"ui.move.end": "Konec",
|
|
1085
|
+
"ui.move.cancel": "Zrušit",
|
|
1086
|
+
"ui.move.cancelled": "Nic se nezaložilo.",
|
|
1087
|
+
"ui.move.without": "Pokračovat bez prohlížeče: výzkum (nebo archiv) ze souboru",
|
|
1088
|
+
"ui.move.without.what": "Aplikace v {from} se k výzkumu nepřipojí: nic z aplikace nepůjde živě – ani výzkum, ani archiv. Změny z aplikace jdou do výzkumu souborem (v aplikaci Export → GEDCOM, ve výzkumu strom sync <soubor>), verze výzkumu se do aplikace vrací importem souboru a fotky touto cestou nejdou.",
|
|
1089
|
+
"ui.move.without.later.here": "Plné spojení je jen přes Chrome, Edge, Brave nebo Firefox a {browser} tu je: strom app (v menu Aplikace Strom) v něm kdykoli otevře výzkum a přenos se tím dokončí.",
|
|
1090
|
+
"ui.move.without.later.none": "Plné spojení je jen přes Chrome, Edge, Brave nebo Firefox: po instalaci některého z nich strom app (v menu Aplikace Strom) otevře výzkum v něm a přenos se tím dokončí.",
|
|
1091
|
+
"ui.move.nobrowser": "Na tomto počítači není prohlížeč, ze kterého se aplikace Strom k výzkumu připojí. Strom se může přenést do prohlížeče, který to umí – Google Chrome nebo Microsoft Edge, ke stažení zdarma.",
|
|
1092
|
+
"ui.move.get.chrome": "Otevřít stránku ke stažení Google Chrome (nic se neinstaluje samo)",
|
|
1093
|
+
"ui.move.get.edge": "Otevřít stránku ke stažení Microsoft Edge (nic se neinstaluje samo)",
|
|
1094
|
+
"ui.move.get.opened": "Stránka ke stažení je otevřená ve výchozím prohlížeči: {url}",
|
|
1095
|
+
"ui.move.get.wait": "Po instalaci prohlížeče (toto okno zatím nechat otevřené): Enter pokračuje – prohlížeč se hledá znovu a teprve potom výzkum čeká na strom",
|
|
1096
|
+
"ui.move.terminal": "Přenos stromu potřebuje odpověď člověka v terminálu, nic se nezaložilo.",
|
|
1053
1097
|
"ui.more.sync.noapp": "Načíst změny z jiného rodokmenu (.ged, .json)",
|
|
1054
1098
|
"ui.sync.path.noapp": "Přetáhnout sem soubor s rodokmenem (.ged nebo .json), nebo napsat cestu (Enter nebo 0 zpět)",
|
|
1055
1099
|
"ui.sync.path": "Přetáhnout sem soubor vyexportovaný z aplikace Strom (.ged nebo .json), nebo napsat cestu (Enter nebo 0 zpět)",
|
package/assets/lang/de.json
CHANGED
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"ui.doc.links.isolated": "isolierte Installation: registriert keine Links",
|
|
67
67
|
"ui.doc.app.isolated": "isolierte Installation: absichtlich nicht verwendet",
|
|
68
68
|
"ui.doc.shortcut.isolated": "isolierte Installation: absichtlich keine",
|
|
69
|
+
"ui.doc.shortcut.no": "nicht gewünscht (strom setup fragt erneut)",
|
|
69
70
|
"ui.dialog.waiting": "Die Frage wartet in einem Systemfenster auf dem Bildschirm (es kann hinter anderen Fenstern liegen) – dort antworten, gewartet wird höchstens {minutes} Min.: {question}",
|
|
70
71
|
"ui.consent.level.auto": "Den Agenten selbstständig arbeiten lassen? Er fragt nur bei riskanten Schritten nach.",
|
|
71
72
|
"ui.consent.level.full": "Dem Agenten erlauben, ohne Nachfrage alles zu tun außer dem, was strom verbietet?\n\nNur auf einem Computer, auf dem sonst nichts Wichtiges liegt.",
|
|
@@ -415,6 +416,9 @@
|
|
|
415
416
|
"ui.o.disk": "Speicher",
|
|
416
417
|
"ui.o.disk.tidy": "neben der Forschung hält strom {strom}, davon lassen sich {size} freigeben – sag es dem Benutzer einmal: strom tidy gibt es mit seiner Zustimmung frei (die Forschung bleibt)",
|
|
417
418
|
"ui.app.drag": "Die Strom-App ist geöffnet. Die Datei {file}{shown} in ihr Fenster ziehen – beim ersten Mal wird daraus ein neuer Stammbaum, danach wird derselbe Stammbaum aktualisiert. Mit Chrome oder Edge auf diesem Computer übergibt strom sie selbst.",
|
|
419
|
+
"ui.app.browser.gone": "Die Strom-App öffnete sich in {gone}, der nicht mehr auf diesem Computer ist; ab jetzt öffnet sie sich in {now} (ein anderer: strom config set app.browser chrome|edge|brave|opera|firefox|chromium).",
|
|
420
|
+
"ui.app.browser.gone.none": "Die Strom-App öffnete sich in {gone}, der nicht mehr auf diesem Computer ist, und kein anderer Browser hier erreicht die Forschung (Chrome, Edge, Brave, Firefox). Sobald einer installiert ist, öffnet strom app die Forschung dort.",
|
|
421
|
+
"ui.app.moved": "Der Stammbaum der Forschung öffnet sich in {browser}: die Übertragung des Stammbaums ist damit abgeschlossen, die Strom-App arbeitet dort weiter und ist mit der Forschung verbunden. Fotos des Stammbaums sind nicht in der Forschung – sie blieben in {from} und in der Datei {file}.",
|
|
418
422
|
"ui.app.drag.shown": " (im Dateifenster angezeigt)",
|
|
419
423
|
"ui.app.nolive": "Die Forschung laufend zu verfolgen braucht Chrome oder Edge – Safari lässt eine Webseite nicht auf diesen Computer zugreifen.",
|
|
420
424
|
"ui.app.images": "Mit Bildern: {n} Einträge aus ihren Scans ausgeschnitten ({mb} MB).",
|
|
@@ -1042,14 +1046,54 @@
|
|
|
1042
1046
|
"ui.link.new.wait": "Ich warte, bis die Strom-App den Stammbaum übergibt – dort bestätigen (höchstens {min} Min.; Strg+C bricht ab).",
|
|
1043
1047
|
"ui.link.new.elsewhere": "Diese Kopie der Strom-App kennt den Stammbaum nicht. Die Adresse oben in der Kopie öffnen, in der alles begann (etwa in der Beta) – die Forschung wartet darauf.",
|
|
1044
1048
|
"ui.link.new.none": "Die Strom-App hat keinen Stammbaum übergeben. Die Forschung „{name}“ ist hier, noch leer: erneut aus der App beginnen, oder im Menü von strom etwas hinzufügen.",
|
|
1049
|
+
"ui.link.new.none.trashed": "Die Strom-App hat keinen Stammbaum übergeben, die Forschung „{name}“ wurde also nicht angelegt (ihr leerer Ordner ist im Papierkorb). Erneut aus der App beginnen.",
|
|
1045
1050
|
"ui.link.new.waited": "Innerhalb von {min} Min. kam kein Stammbaum aus der Strom-App. Die Forschung „{name}“ ist hier, noch leer.",
|
|
1051
|
+
"ui.link.new.blocked": "Die Strom-App hat die Forschung noch nicht erreicht. Mögliche Ursache: der Browser hat ihr den Zugriff auf Apps auf diesem Gerät (das lokale Netzwerk) gesperrt – Chrome, Edge und Brave fragen danach, Firefox je nach Einstellung. Erlauben: Symbol links neben der Adresse → Zugriff auf das lokale Netzwerk / dieses Gerät → Erlauben, dann die Seite neu laden.",
|
|
1052
|
+
"ui.link.new.blocked.chromium": "Die Strom-App hat die Forschung noch nicht erreicht. Mögliche Ursache: {browser} hat ihr den Zugriff auf Apps auf diesem Gerät gesperrt. Erlauben: Symbol links neben der Adresse → Apps auf dem Gerät (englisch Apps on device; in älteren Versionen Zugriff auf das lokale Netzwerk) → Erlauben, dann die Seite neu laden.",
|
|
1053
|
+
"ui.link.new.blocked.brave": "Die Strom-App hat die Forschung noch nicht erreicht. Mögliche Ursache: Brave hat ihr den Zugriff auf localhost gesperrt. Erlauben: Symbol links neben der Adresse → Zugriff auf localhost (englisch Localhost access) → Erlauben, dann die Seite neu laden.",
|
|
1054
|
+
"ui.link.new.blocked.firefox": "Die Strom-App hat die Forschung noch nicht erreicht. Mögliche Ursache: Firefox hat ihr den Zugriff auf Apps und Dienste auf diesem Gerät gesperrt. Erlauben: Symbol links neben der Adresse → Zugriff auf Apps und Dienste auf diesem Gerät → Erlauben, dann die Seite neu laden.",
|
|
1055
|
+
"ui.link.new.into.ask": "Die Forschung „{name}“ (angelegt {when}) hat ihren Stammbaum aus der Strom-App noch nicht bekommen. Den Stammbaum dort hinzufügen?",
|
|
1056
|
+
"ui.link.new.into": "In die Forschung „{name}“",
|
|
1057
|
+
"ui.link.new.into.new": "Eine neue Forschung anlegen",
|
|
1046
1058
|
"ui.link.new.empty": "Der Stammbaum, den die Strom-App geschickt hat, hat keine Personen – es gibt nichts zu erforschen. Die Forschung „{name}“ ist hier, noch leer.",
|
|
1047
1059
|
"ui.link.new.failed": "Die Strom-App konnte den Stammbaum nicht übergeben. Die Forschung „{name}“ ist hier, noch leer: es erneut aus der App versuchen.",
|
|
1048
1060
|
"ui.link.new.taken": "✓ Der Stammbaum ist in der Forschung „{name}“: {persons} Personen, {families} Familien, {sources} Quellen – als Hinweise; was Quellen belegen, findet der Agent.",
|
|
1049
1061
|
"ui.link.new.taken.archive": "✓ Der Stammbaum ist in der Forschung „{name}“: {persons} Personen, {families} Familien, {sources} Quellen – als Hinweise; was Quellen belegen, findet ein Agent, sobald einer eingeschaltet ist.",
|
|
1062
|
+
"ui.link.new.taken.empty": "✓ Die Strom-App hat ihren Stammbaum übergeben, noch leer: die Forschung „{name}“ ist mit ihr verbunden. Die in der App hinzugefügten Personen kommen in die Forschung, sobald sie gesendet werden.",
|
|
1050
1063
|
"ui.link.new.back": "Die Strom-App zeigt den Stammbaum jetzt als Stammbaum der Forschung.",
|
|
1051
1064
|
"ui.link.new.chat": "Jetzt das Gespräch mit dem Agenten beginnen?",
|
|
1052
1065
|
"ui.link.new.say": "Ich habe unseren Stammbaum aus der Strom-App übergeben – schau dir an, was darin ist, und schlag vor, womit wir beginnen.",
|
|
1066
|
+
"ui.move.file": "Datei des Stammbaums aus der Strom-App: {file}",
|
|
1067
|
+
"ui.move.file.ask": "Die Datei des Stammbaums aus der Strom-App ({name}) wurde bei den Downloads nicht gefunden. Pfad zur Datei – sie kann in dieses Fenster gezogen werden (0: abbrechen)",
|
|
1068
|
+
"ui.move.file.other": "Diese Datei ist nicht der Stammbaum, den die Strom-App überträgt (ein anderer Stammbaum oder eine andere Art von Datei).",
|
|
1069
|
+
"ui.move.file.kept": "Die Datei des Stammbaums bleibt, wo sie ist: {file}",
|
|
1070
|
+
"ui.move.file.trashed": "Der Stammbaum ist jetzt in der Forschung und im Browser; seine Datei kam in den Papierkorb: {file}",
|
|
1071
|
+
"ui.move.fresh": "{browser} fragt beim ersten Start womöglich nach Anmeldung und Standardbrowser. Ist das beantwortet und hat sich die Strom-App darin nicht geöffnet, die Adresse unten in {browser} öffnen.",
|
|
1072
|
+
"ui.move.ask": "Der Stammbaum „{tree}“ (Personen: {persons}) zieht in {browser} um, und dort wird weitergearbeitet. Übertragen?",
|
|
1073
|
+
"ui.move.which": "In welchen Browser zieht der Stammbaum „{tree}“ (Personen: {persons}) um?",
|
|
1074
|
+
"ui.move.yes": "Übertragen",
|
|
1075
|
+
"ui.move.no": "Nein",
|
|
1076
|
+
"ui.move.none": "Nicht übertragen",
|
|
1077
|
+
"ui.move.empty": "Die Strom-App öffnet sich in {browser}, und dort wird weitergearbeitet. Fortfahren?",
|
|
1078
|
+
"ui.move.empty.which": "In welchem Browser öffnet sich die Strom-App?",
|
|
1079
|
+
"ui.move.go": "Fortfahren",
|
|
1080
|
+
"ui.move.stays": "Der Stammbaum bleibt in {from}; nichts wurde angelegt.",
|
|
1081
|
+
"ui.move.from.other": "dem ursprünglichen Browser",
|
|
1082
|
+
"ui.move.from.mobile": "dem Telefon oder Tablet",
|
|
1083
|
+
"ui.move.then": "Wie weiter?",
|
|
1084
|
+
"ui.move.end": "Ende",
|
|
1085
|
+
"ui.move.cancel": "Abbrechen",
|
|
1086
|
+
"ui.move.cancelled": "Nichts wurde angelegt.",
|
|
1087
|
+
"ui.move.without": "Ohne Browser weiter: die Forschung (oder ein Archiv) aus der Datei",
|
|
1088
|
+
"ui.move.without.what": "Die App in {from} verbindet sich nicht mit der Forschung: nichts aus der App geht live – weder eine Forschung noch ein Archiv. Änderungen aus der App gehen als Datei in die Forschung (in der App Export → GEDCOM, in der Forschung strom sync <Datei>), die Version der Forschung kommt per Dateiimport zurück, und Fotos gehen diesen Weg nicht.",
|
|
1089
|
+
"ui.move.without.later.here": "Die volle Verbindung gibt es nur über Chrome, Edge, Brave oder Firefox, und {browser} ist hier: strom app (im Menü die Strom-App) öffnet die Forschung jederzeit darin, und die Übertragung ist abgeschlossen.",
|
|
1090
|
+
"ui.move.without.later.none": "Die volle Verbindung gibt es nur über Chrome, Edge, Brave oder Firefox: sobald einer installiert ist, öffnet strom app (im Menü die Strom-App) die Forschung dort, und die Übertragung ist abgeschlossen.",
|
|
1091
|
+
"ui.move.nobrowser": "Auf diesem Computer gibt es keinen Browser, aus dem sich die Strom-App mit der Forschung verbindet. Der Stammbaum kann in einen Browser umziehen, der es kann – Google Chrome oder Microsoft Edge, kostenlos herunterzuladen.",
|
|
1092
|
+
"ui.move.get.chrome": "Die Download-Seite von Google Chrome öffnen (nichts wird von selbst installiert)",
|
|
1093
|
+
"ui.move.get.edge": "Die Download-Seite von Microsoft Edge öffnen (nichts wird von selbst installiert)",
|
|
1094
|
+
"ui.move.get.opened": "Die Download-Seite ist im Standardbrowser geöffnet: {url}",
|
|
1095
|
+
"ui.move.get.wait": "Nach der Installation des Browsers (dieses Fenster bleibt so lange offen): Enter macht weiter – der Browser wird erneut gesucht, und erst dann wartet die Forschung auf den Stammbaum",
|
|
1096
|
+
"ui.move.terminal": "Das Übertragen des Stammbaums braucht die Antwort eines Menschen im Terminal; nichts wurde angelegt.",
|
|
1053
1097
|
"ui.more.sync.noapp": "Änderungen aus einem anderen Stammbaum übernehmen (.ged, .json)",
|
|
1054
1098
|
"ui.sync.path.noapp": "Die Stammbaum-Datei (.ged oder .json) hierher ziehen oder den Pfad eingeben (Enter oder 0 zurück)",
|
|
1055
1099
|
"ui.sync.path": "Die aus der Strom-App exportierte Datei (.ged oder .json) hierher ziehen oder den Pfad eingeben (Enter oder 0 zurück)",
|
package/dist/cli/main.js
CHANGED
|
@@ -17,7 +17,7 @@ import { noticeStromApp } from "../core/stromapp.js";
|
|
|
17
17
|
import { isNewer } from "../core/update.js";
|
|
18
18
|
import { installation } from "../core/self.js";
|
|
19
19
|
import { refreshGlobal } from "../agents/global.js";
|
|
20
|
-
import { refreshLinks } from "../core/links.js";
|
|
20
|
+
import { expandFromLine, refreshLinks } from "../core/links.js";
|
|
21
21
|
import { clockLine, FINISH_LINE, finishAsked } from "../core/clock.js";
|
|
22
22
|
import { currentSession } from "../core/session.js";
|
|
23
23
|
import { checkArgs, GroupOnly, parseOptions, resolveCommand, splitPassthrough } from "./execute.js";
|
|
@@ -106,6 +106,8 @@ export async function main(argv, io, env, cwd) {
|
|
|
106
106
|
const json = argv.includes("--json");
|
|
107
107
|
const debug = argv.includes("--debug");
|
|
108
108
|
resetCache(undefined, "command");
|
|
109
|
+
// the app's install line in its one variable (STROM_FROM): read as the five of an older line
|
|
110
|
+
expandFromLine(env);
|
|
109
111
|
// what ran, for the reminder of the session's time
|
|
110
112
|
let ran;
|
|
111
113
|
let command;
|
package/dist/cli/menu-links.js
CHANGED
|
@@ -12,10 +12,16 @@ import { lines, truncate } from "./format.js";
|
|
|
12
12
|
import { isArchive } from "../core/mode.js";
|
|
13
13
|
import { Tree } from "../core/tree.js";
|
|
14
14
|
import { monthSpend } from "../core/session.js";
|
|
15
|
-
import { adoptFailedSince, adoptedAt, awaitAdoption, nothingSince, undoSync } from "../core/sync.js";
|
|
15
|
+
import { adoptAskedSince, adoptFailedSince, adoptedAt, adoptionNeverCame, awaitAdoption, nothingSince, SYNC_INBOX, undoSync, withoutImages } from "../core/sync.js";
|
|
16
|
+
import { moveToTrash } from "../core/trash.js";
|
|
17
|
+
import { noteMovedByFile } from "../core/transfer.js";
|
|
18
|
+
import { appBrowsers, browserKind, kindReaches } from "../core/chromium.js";
|
|
19
|
+
import { appWindow } from "../core/appbrowser.js";
|
|
20
|
+
import { moveTree } from "./move.js";
|
|
16
21
|
import { changeLines } from "../core/changelog.js";
|
|
17
22
|
import { startLive } from "../core/live.js";
|
|
18
23
|
import { adoptAppUrl, appTreeNameFromInstall } from "../core/stromapp.js";
|
|
24
|
+
import { stromReadsTags } from "../gedcom/export.js";
|
|
19
25
|
import { appMarkFromInstall } from "../core/links.js";
|
|
20
26
|
import { settleFromApp } from "./wizard.js";
|
|
21
27
|
import { isValidLang } from "../core/lang.js";
|
|
@@ -25,6 +31,7 @@ import { claimText } from "../core/people.js";
|
|
|
25
31
|
import { PROFILES } from "../agents/profiles.js";
|
|
26
32
|
import { foldText, safeFolderName } from "../core/text.js";
|
|
27
33
|
import { StromError } from "../core/errors.js";
|
|
34
|
+
import { forgetTree } from "../commands/trees.js";
|
|
28
35
|
/** What the Strom app asks, said before anything is done; true when the person goes on. */
|
|
29
36
|
export async function asks(ctx, lang, root, what, note, suggested = true) {
|
|
30
37
|
const name = Tree.open(root, ctx.env).config.name;
|
|
@@ -32,6 +39,8 @@ export async function asks(ctx, lang, root, what, note, suggested = true) {
|
|
|
32
39
|
return ctx.confirm(translator(lang)("ui.link.go"), suggested);
|
|
33
40
|
}
|
|
34
41
|
const out = (ctx, line) => ctx.io.stdout(line + "\n");
|
|
42
|
+
/** The app that loads the research's version itself right after a hand-over (the research's numbers for its people). */
|
|
43
|
+
const APP_LOADS_ADOPTED = "3.9.0";
|
|
35
44
|
/** What stopped it, said; nothing was done. */
|
|
36
45
|
function stop(ctx, line) {
|
|
37
46
|
out(ctx, line);
|
|
@@ -213,12 +222,51 @@ export async function undoSending(ctx, run, lang, root, id, fromMenu = false) {
|
|
|
213
222
|
return false;
|
|
214
223
|
return (await run(["sync", "undo", id])) === 0;
|
|
215
224
|
}
|
|
225
|
+
/**
|
|
226
|
+
* The research made from the tree's file with no browser to connect: taken in as the app's trees are (strom sync
|
|
227
|
+
* --apply --force, without its images: its sources the research's), then what came of it said — and the first
|
|
228
|
+
* conversation offered.
|
|
229
|
+
*/
|
|
230
|
+
async function fromFile(ctx, run, root, name, file, from) {
|
|
231
|
+
const t = translator(Tree.open(root, ctx.env).lang);
|
|
232
|
+
// the move is finished later — strom app, once a browser that reaches strom is here (D10)
|
|
233
|
+
noteMovedByFile(root, { from, file });
|
|
234
|
+
const dir = path.join(root, SYNC_INBOX);
|
|
235
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
236
|
+
const kept = path.join(dir, `${safeFolderName(name)}.json`);
|
|
237
|
+
fs.writeFileSync(kept, withoutImages(fs.readFileSync(file, "utf8")));
|
|
238
|
+
if ((await run(["sync", kept, "--apply", "--force"], true)) !== 0)
|
|
239
|
+
return stop(ctx, t("ui.link.new.failed", { name }));
|
|
240
|
+
const tree = Tree.open(root, ctx.env);
|
|
241
|
+
const sources = tree.list("source").filter((s) => !s.retracted && s.kind !== "family-tree").length;
|
|
242
|
+
// a tree with no people yet (C1): handed over all the same — the research linked, its people come by the app's sends
|
|
243
|
+
if (tree.countLive("person") === 0)
|
|
244
|
+
out(ctx, t("ui.link.new.taken.empty", { name }));
|
|
245
|
+
else
|
|
246
|
+
out(ctx, t(isArchive(tree) ? "ui.link.new.taken.archive" : "ui.link.new.taken", { name, persons: tree.countLive("person"), families: tree.countLive("family"), sources }));
|
|
247
|
+
if (isArchive(tree))
|
|
248
|
+
out(ctx, t("ui.link.new.archive"));
|
|
249
|
+
else
|
|
250
|
+
await offerChat(ctx, run, tree.lang, root, t("ui.link.new.chat"), t("ui.link.new.say"));
|
|
251
|
+
return true;
|
|
252
|
+
}
|
|
216
253
|
/**
|
|
217
254
|
* A tree of the Strom app becomes a new research (strom-research://new?app=<its mark>): named, its language and
|
|
218
255
|
* agent chosen, made; the app opened to hand the tree over (?adopt=<the bridge>), the tree taken in as leads,
|
|
219
256
|
* the research sent back to the app — then the conversation offered.
|
|
220
257
|
*/
|
|
221
|
-
export async function newFromApp(ctx, runIn, token, openAt, forward) {
|
|
258
|
+
export async function newFromApp(ctx, runIn, token, openAt, forward, opts = {}) {
|
|
259
|
+
// The browser the app runs in (its link's browser=, the line's STROM_FROM_BROWSER — the app's 3.9.1): the app keeps
|
|
260
|
+
// the tree there. One the app cannot reach strom from (Safari), or the tree saved as a file for that (STROM_FROM_FILE):
|
|
261
|
+
// the tree moves to a browser that can — asked first, before anything is set up (no: nothing is)
|
|
262
|
+
const from = opts.browser ?? browserKind(ctx.env.STROM_FROM_BROWSER);
|
|
263
|
+
const given = opts.file ?? (ctx.env.STROM_FROM_FILE?.trim() || undefined);
|
|
264
|
+
let move;
|
|
265
|
+
if (given || (from && !kindReaches(from))) {
|
|
266
|
+
move = await moveTree(ctx, token, from, given);
|
|
267
|
+
if (!move)
|
|
268
|
+
return false;
|
|
269
|
+
}
|
|
222
270
|
// strom not set up yet (the app is how this person came): the setup first — the agent and where to talk with it
|
|
223
271
|
// chosen there, not asked again
|
|
224
272
|
const setUp = !ctx.settings.home()?.value;
|
|
@@ -230,6 +278,13 @@ export async function newFromApp(ctx, runIn, token, openAt, forward) {
|
|
|
230
278
|
}
|
|
231
279
|
else if (appMarkFromInstall(ctx.env))
|
|
232
280
|
await settleFromApp(ctx, ctx.uiLang(), { shortcut: true });
|
|
281
|
+
// the copy of the app the tree comes from, carried by its file when the line had no room for it (Win + R: 259
|
|
282
|
+
// characters) — kept as the line's STROM_APP_URL is
|
|
283
|
+
if (move?.mark.app && !ctx.env.STROM_APP_URL?.trim()) {
|
|
284
|
+
ctx.settings.reload();
|
|
285
|
+
ctx.settings.config.stromAppUrl = move.mark.app;
|
|
286
|
+
ctx.settings.save();
|
|
287
|
+
}
|
|
233
288
|
let lang = ctx.uiLang();
|
|
234
289
|
let t = translator(lang);
|
|
235
290
|
out(ctx, t("ui.link.new.title"));
|
|
@@ -237,62 +292,120 @@ export async function newFromApp(ctx, runIn, token, openAt, forward) {
|
|
|
237
292
|
// the name; an empty research of that name (a handover that did not come) is taken again
|
|
238
293
|
let name = "";
|
|
239
294
|
let root;
|
|
240
|
-
//
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
295
|
+
// a research made for a tree of the app that never came (installed from an older app, the tree stayed in Safari):
|
|
296
|
+
// the tree goes into it, nothing set up again (suggested) — or a new research (D4)
|
|
297
|
+
const waiting = ctx
|
|
298
|
+
.knownTrees()
|
|
299
|
+
.map((k) => ({ ...k, never: adoptionNeverCame(k.root) }))
|
|
300
|
+
.filter((k) => Boolean(k.never))
|
|
301
|
+
.sort((a, b) => Date.parse(b.never.at) - Date.parse(a.never.at))[0];
|
|
302
|
+
if (waiting) {
|
|
303
|
+
const tw = Tree.open(waiting.root, ctx.env);
|
|
304
|
+
const i = await ctx.choose(t("ui.link.new.into.ask", { name: tw.config.name, when: humanWhen(waiting.never.at, lang) }), [{ label: t("ui.link.new.into", { name: tw.config.name }) }, { label: t("ui.link.new.into.new") }], 0, { back: t("ui.move.cancel") });
|
|
305
|
+
if (i === undefined) {
|
|
306
|
+
if (move)
|
|
307
|
+
out(ctx, t("ui.move.file.kept", { file: ctx.display(move.file) }));
|
|
245
308
|
return false;
|
|
246
|
-
const same = ctx.knownTrees().find((k) => foldText(k.name) === foldText(name) || path.basename(k.root) === safeFolderName(name));
|
|
247
|
-
if (!same)
|
|
248
|
-
break;
|
|
249
|
-
if (Tree.open(same.root, ctx.env).count("person") === 0) {
|
|
250
|
-
root = same.root;
|
|
251
|
-
break;
|
|
252
309
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
for (;;) {
|
|
258
|
-
const a = (await ctx.ask(t("ui.setup.lang"), lang)).trim().toLowerCase();
|
|
259
|
-
if (a === "0")
|
|
260
|
-
return false;
|
|
261
|
-
if (isValidLang(a)) {
|
|
262
|
-
lang = a;
|
|
310
|
+
if (i === 0) {
|
|
311
|
+
root = waiting.root;
|
|
312
|
+
name = tw.config.name;
|
|
313
|
+
lang = tw.lang;
|
|
263
314
|
t = translator(lang);
|
|
264
|
-
break;
|
|
265
315
|
}
|
|
266
|
-
if (outOfAnswers(ctx))
|
|
267
|
-
return false;
|
|
268
316
|
}
|
|
317
|
+
const joined = Boolean(root);
|
|
318
|
+
// suggested: the app's tree's name (its line carries it), else the usual one — Enter never ends the handover
|
|
319
|
+
const suggested = (move?.mark.tree || undefined) ?? appTreeNameFromInstall(ctx.env) ?? t("ui.tree.default");
|
|
269
320
|
const ways = waysHere(agentsHere(ctx.env));
|
|
270
321
|
const mine = ctx.settings.agent().value;
|
|
271
322
|
let agent = mine;
|
|
272
323
|
let where;
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
324
|
+
let archive = false;
|
|
325
|
+
// asked step by step, 0 one step back (the name's 0: nothing set up, found on a Mac: 0 at the agent ended it all); a
|
|
326
|
+
// research joined asks none. With an agent here the research with it is suggested and an archive is the other choice,
|
|
327
|
+
// as in the setup (an archive the setup chose, or the setup just run: as it is); each agent's app and terminal a line
|
|
328
|
+
// of their own
|
|
329
|
+
for (let step = joined ? 3 : 0; step < 3;) {
|
|
330
|
+
if (step === 0) {
|
|
331
|
+
name = ((await ctx.ask(t("ui.link.new.name"), suggested)) || suggested).trim().replace(/\s+/gu, " ");
|
|
332
|
+
if (!name || name === "0") {
|
|
333
|
+
if (move)
|
|
334
|
+
out(ctx, t("ui.move.file.kept", { file: ctx.display(move.file) }));
|
|
335
|
+
return false;
|
|
336
|
+
}
|
|
337
|
+
const same = ctx.knownTrees().find((k) => foldText(k.name) === foldText(name) || path.basename(k.root) === safeFolderName(name));
|
|
338
|
+
root = same?.root;
|
|
339
|
+
if (same && Tree.open(same.root, ctx.env).count("person") > 0) {
|
|
340
|
+
root = undefined;
|
|
341
|
+
out(ctx, t("ui.link.new.exists", { name }));
|
|
342
|
+
if (outOfAnswers(ctx))
|
|
343
|
+
return false;
|
|
344
|
+
continue;
|
|
345
|
+
}
|
|
346
|
+
step = 1;
|
|
347
|
+
}
|
|
348
|
+
else if (step === 1) {
|
|
349
|
+
const a = (await ctx.ask(t("ui.setup.lang"), lang)).trim().toLowerCase();
|
|
350
|
+
if (a === "0")
|
|
351
|
+
step = 0;
|
|
352
|
+
else if (isValidLang(a)) {
|
|
353
|
+
lang = a;
|
|
354
|
+
t = translator(lang);
|
|
355
|
+
step = 2;
|
|
356
|
+
}
|
|
357
|
+
else if (outOfAnswers(ctx))
|
|
358
|
+
return false;
|
|
359
|
+
}
|
|
360
|
+
else {
|
|
361
|
+
step = 3;
|
|
362
|
+
// no agent here: an archive, nothing asked (N9: the setup run before an agent left, its research mode kept)
|
|
363
|
+
if (!root && ways.length === 0)
|
|
364
|
+
archive = true;
|
|
365
|
+
if (root || setUp || ways.length === 0 || ctx.settings.config.mode === "archive")
|
|
366
|
+
continue;
|
|
367
|
+
const pick = suggestedWay(ways, mine, ctx.settings.agentWhere());
|
|
368
|
+
const k = await ctx.choose(t("ui.setup.fromapp"), [{ label: t("ui.setup.fromapp.archive") }, { label: t("ui.setup.fromapp.agent", { agent: PROFILES[ways[pick].agent].name }) }], 1, { back: t("ui.browse.back") });
|
|
369
|
+
archive = k === 0;
|
|
370
|
+
if (k === undefined)
|
|
371
|
+
step = 1;
|
|
372
|
+
else if (k === 1 && ways.length > 1) {
|
|
373
|
+
const i = await chooseWay(ctx, lang, ways, pick, { back: t("ui.browse.back") });
|
|
374
|
+
if (i === undefined)
|
|
375
|
+
step = 2;
|
|
376
|
+
else {
|
|
377
|
+
agent = ways[i].agent;
|
|
378
|
+
where = ways[i].where;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
280
382
|
}
|
|
383
|
+
// made here: an empty research of it is not left behind when the app hands nothing over (N4)
|
|
384
|
+
const made = !root;
|
|
281
385
|
if (!root) {
|
|
282
386
|
let said = "";
|
|
283
|
-
const code = await (await runIn(undefined))(["init", name, "--lang", lang, "--json"], true, (s) => (said += s));
|
|
387
|
+
const code = await (await runIn(undefined))(["init", name, "--lang", lang, ...(archive ? ["--mode", "archive"] : []), "--json"], true, (s) => (said += s));
|
|
284
388
|
if (code !== 0)
|
|
285
389
|
return false;
|
|
286
390
|
root = JSON.parse(said).root;
|
|
287
391
|
}
|
|
288
392
|
const run = await runIn(root);
|
|
289
|
-
if (agent !== mine)
|
|
393
|
+
if (!archive && agent !== mine)
|
|
290
394
|
await run(["agents", "use", agent, "--for-tree"], true);
|
|
291
395
|
// where the person talks with the agents (the setting of this computer, as the setup keeps it)
|
|
292
396
|
if (where && where !== ctx.settings.agentWhere())
|
|
293
397
|
await run(["config", "set", "agent.where", where], true);
|
|
294
|
-
// the
|
|
295
|
-
|
|
398
|
+
// no browser: the research made from the file — the app and the research go on through files
|
|
399
|
+
if (move && "without" in move)
|
|
400
|
+
return fromFile(ctx, run, root, name, move.file, move.from);
|
|
401
|
+
// the browser the app opens in from now on: the one it moves to, else the one the tree came from (while it is here)
|
|
402
|
+
const keep = move && "browser" in move ? move.browser.kind : from && kindReaches(from) && appBrowsers(ctx.env).some((b) => b.kind === from) ? from : undefined;
|
|
403
|
+
if (keep && keep !== ctx.settings.appBrowser()) {
|
|
404
|
+
await run(["config", "set", "app.browser", keep], true);
|
|
405
|
+
ctx.settings.reload();
|
|
406
|
+
}
|
|
407
|
+
// the app hands its tree over to the bridge of this research (a tree moving: the app there takes its file first)
|
|
408
|
+
awaitAdoption(root, token, move?.file, !made);
|
|
296
409
|
const info = startLive(root, ctx.env, { current: true });
|
|
297
410
|
if (!info)
|
|
298
411
|
throw new StromError("the bridge did not start", { hint: "strom live serve shows why" });
|
|
@@ -300,7 +413,26 @@ export async function newFromApp(ctx, runIn, token, openAt, forward) {
|
|
|
300
413
|
const since = Date.now();
|
|
301
414
|
const waitMs = Number(ctx.env.STROM_ADOPT_WAIT_MS ?? 30 * 60_000);
|
|
302
415
|
const minutes = Math.max(1, Math.round(waitMs / 60_000));
|
|
416
|
+
// a browser installed just now asks its own questions at its first start (signing in, the default browser): the
|
|
417
|
+
// address to open in it once they are answered (D8)
|
|
418
|
+
if (move && "browser" in move && move.installed)
|
|
419
|
+
out(ctx, t("ui.move.fresh", { browser: move.browser.name }));
|
|
303
420
|
out(ctx, openAt(url) ? `${t("ui.link.new.wait", { min: minutes })}\n${t("ui.sync.wait.open", { url })}` : t("ui.app.url", { url }));
|
|
421
|
+
// the file of the move: in the trash once the tree is handed over, else kept where it is (said, D9)
|
|
422
|
+
const keptFile = () => {
|
|
423
|
+
if (move)
|
|
424
|
+
out(ctx, t("ui.move.file.kept", { file: ctx.display(move.file) }));
|
|
425
|
+
};
|
|
426
|
+
// the app has not asked the research a thing for a while: a browser may keep it from strom (its permission for the
|
|
427
|
+
// local network, D7) — said once, and again at the end
|
|
428
|
+
const blockedAfter = Number(ctx.env.STROM_ADOPT_HINT_MS ?? 2 * 60_000);
|
|
429
|
+
let toldBlocked = false;
|
|
430
|
+
// named as the browser the app opened in names it (Edge 154: Apps on device, not Local network — F5)
|
|
431
|
+
const opensIn = appWindow(ctx.settings, ctx.env).browser;
|
|
432
|
+
const blocked = opensIn?.kind === "brave" ? t("ui.link.new.blocked.brave")
|
|
433
|
+
: opensIn?.kind === "firefox" ? t("ui.link.new.blocked.firefox")
|
|
434
|
+
: opensIn && kindReaches(opensIn.kind) ? t("ui.link.new.blocked.chromium", { browser: opensIn.name })
|
|
435
|
+
: t("ui.link.new.blocked");
|
|
304
436
|
// the bridge takes the tree in itself (as the app's trees are, its sources the research's): whether or not this
|
|
305
437
|
// terminal still waits, it is in once the app has handed it over — here only what came of it
|
|
306
438
|
let done;
|
|
@@ -314,6 +446,7 @@ export async function newFromApp(ctx, runIn, token, openAt, forward) {
|
|
|
314
446
|
const failed = adoptFailedSince(root, since);
|
|
315
447
|
if (failed) {
|
|
316
448
|
forward();
|
|
449
|
+
keptFile();
|
|
317
450
|
return stop(ctx, [t(failed.why === "empty" ? "ui.link.new.empty" : "ui.link.new.failed", { name }), failed.reason].filter(Boolean).join("\n"));
|
|
318
451
|
}
|
|
319
452
|
const nothing = nothingSince(root, since);
|
|
@@ -324,20 +457,51 @@ export async function newFromApp(ctx, runIn, token, openAt, forward) {
|
|
|
324
457
|
}
|
|
325
458
|
else if (nothing) {
|
|
326
459
|
forward();
|
|
327
|
-
|
|
460
|
+
// the app said no (Nepředávat): nothing set up halfway — the research made for it, still empty, into the trash
|
|
461
|
+
if (made && Tree.open(root, ctx.env).count("person") === 0) {
|
|
462
|
+
forgetTree(ctx, root, "the Strom app handed no tree over");
|
|
463
|
+
out(ctx, t("ui.link.new.none.trashed", { name }));
|
|
464
|
+
}
|
|
465
|
+
else
|
|
466
|
+
out(ctx, t("ui.link.new.none", { name }));
|
|
467
|
+
keptFile();
|
|
328
468
|
return false;
|
|
329
469
|
}
|
|
470
|
+
if (!toldBlocked && Date.now() - since > blockedAfter && !adoptAskedSince(root, since)) {
|
|
471
|
+
toldBlocked = true;
|
|
472
|
+
out(ctx, blocked);
|
|
473
|
+
}
|
|
330
474
|
await new Promise((r) => setTimeout(r, 500));
|
|
331
475
|
}
|
|
332
476
|
forward();
|
|
333
|
-
if (!done)
|
|
334
|
-
|
|
477
|
+
if (!done) {
|
|
478
|
+
keptFile();
|
|
479
|
+
return stop(ctx, lines(t("ui.link.new.waited", { name, min: minutes }), adoptAskedSince(root, since) ? undefined : blocked));
|
|
480
|
+
}
|
|
481
|
+
// handed over: the file of the move is the browser's now — into the trash (never deleted for good)
|
|
482
|
+
if (move && "browser" in move && fs.existsSync(move.file)) {
|
|
483
|
+
try {
|
|
484
|
+
moveToTrash(move.file, ctx.env);
|
|
485
|
+
out(ctx, t("ui.move.file.trashed", { file: ctx.display(move.file) }));
|
|
486
|
+
}
|
|
487
|
+
catch {
|
|
488
|
+
keptFile();
|
|
489
|
+
}
|
|
490
|
+
}
|
|
335
491
|
const tree = Tree.open(root, ctx.env);
|
|
336
492
|
const sources = tree.list("source").filter((s) => !s.retracted && s.kind !== "family-tree").length;
|
|
337
|
-
|
|
338
|
-
|
|
493
|
+
// a tree with no people yet (C1): handed over all the same — the research linked, its people come by the app's sends
|
|
494
|
+
if (tree.countLive("person") === 0)
|
|
495
|
+
out(ctx, t("ui.link.new.taken.empty", { name }));
|
|
496
|
+
else
|
|
497
|
+
out(ctx, t(isArchive(tree) ? "ui.link.new.taken.archive" : "ui.link.new.taken", { name, persons: tree.countLive("person"), families: tree.countLive("family"), sources }));
|
|
498
|
+
// the research as it is now back into the app's window: the same tree, now of the research (not opened: its address
|
|
499
|
+
// said) — an app from 3.9.0 loads it itself right after the hand-over, so nothing is opened a second time (N12: a
|
|
500
|
+
// second tab asking to load the research's version)
|
|
339
501
|
let said = "";
|
|
340
|
-
if (
|
|
502
|
+
if (done?.app && stromReadsTags(done.app, APP_LOADS_ADOPTED))
|
|
503
|
+
out(ctx, t("ui.link.new.back"));
|
|
504
|
+
else if ((await run(["app", "--json"], true, (s) => (said += s))) === 0) {
|
|
341
505
|
const shown = JSON.parse(said);
|
|
342
506
|
// no browser to hand it over: the file to drag into the app
|
|
343
507
|
if (shown.via === "drag" && shown.file)
|
package/dist/cli/menu.js
CHANGED
|
@@ -23,7 +23,7 @@ import { othersAtWork } from "../core/session.js";
|
|
|
23
23
|
import { DEFAULT_RUN_MINUTES } from "../core/config.js";
|
|
24
24
|
import { truncate } from "./format.js";
|
|
25
25
|
import { installedStromApp, noticeStromApp, stromAppState, stromAppUrl } from "../core/stromapp.js";
|
|
26
|
-
import {
|
|
26
|
+
import { appBrowsers } from "../core/chromium.js";
|
|
27
27
|
import { liveWorkers, runsAtWork } from "../core/workers.js";
|
|
28
28
|
import { askStromApp, settleInstall, shortcutName } from "./wizard.js";
|
|
29
29
|
import { openForUser } from "../core/open.js";
|
|
@@ -252,9 +252,9 @@ export async function runMenu(ctx, run) {
|
|
|
252
252
|
out(t("ui.run.which.bad", { n: shown.length }));
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
-
// With the Strom app, the work can be watched live meanwhile (a
|
|
255
|
+
// With the Strom app, the work can be watched live meanwhile (a browser here reaches the bridge); the last answer is suggested.
|
|
256
256
|
const app = stromAppState(ctx.settings);
|
|
257
|
-
if ((app === "yes" || app === "seen") &&
|
|
257
|
+
if ((app === "yes" || app === "seen") && appBrowsers(ctx.env).length > 0) {
|
|
258
258
|
const follow = await ctx.confirm(t("ui.run.follow"), ctx.settings.config.stromAppFollow !== "no");
|
|
259
259
|
if (ctx.settings.config.stromAppFollow !== (follow ? "yes" : "no")) {
|
|
260
260
|
ctx.settings.config.stromAppFollow = follow ? "yes" : "no";
|