A modern terminal with a built-in multiplexer: close it and your sessions keep running. Run shells and tons of AI agents across your machines, then pick them up from desktop, browser, TUI and more. Written in Rust with no UI framework: interface drawn straight on the GPU. No Electron, GPUI or webview.
Rust agentagent-orchestrationaiai-agentsclaude-codecodexcoding-agentlinuxmacosmultiplayermultiplexerrustterminalterminal-emulatorterminal-multiplexertmuxtuiweztermwindows
web: threads for the phone, previews in colour, and the terminal's preferences
RoversX6b7d1836b9f1
diff --git a/ios/Resources/strings.json b/ios/Resources/strings.jsonnew file mode 100644index 00000000..1b4a34e4--- /dev/null+++ b/ios/Resources/strings.json@@ -0,0 +1,1012 @@+{+ "de-DE": {+ "archived": "Archiviert",+ "back": "Zurück",+ "badge.key": "Schlüssel",+ "badge.password": "Passwort",+ "bell": "Signalton",+ "c.autoreconnect": "Automatisch neu verbinden",+ "c.background": "Sitzung im Hintergrund halten",+ "c.keepalive": "Keep-Alive",+ "cancel": "Abbrechen",+ "card.attaching": "ThinkTerm wird auf %@ gestartet",+ "card.connecting": "Verbinde mit %@",+ "card.failed": "Keine Verbindung zu %@",+ "card.reconnecting": "Neu verbinden mit %@…",+ "closepane": "Bereich schließen",+ "closetab": "Tab schließen",+ "conn.attaching": "ThinkTerm wird gestartet auf",+ "conn.connecting": "Verbinde mit",+ "conn.disconnected": "Getrennt",+ "conn.failed": "Keine Verbindung zu",+ "conn.reconnecting": "Neu verbinden mit",+ "conn.step1": "Sichere Verbindung",+ "conn.step2": "ThinkTerm auf dem Host",+ "connect": "Verbinden",+ "connecting": "Verbinden…",+ "contrast": "Mindestkontrast für Text",+ "contrast.3": "3:1",+ "contrast.45": "4.5:1",+ "contrast.7": "7:1",+ "contrast.off": "Aus",+ "copied": "Kopiert",+ "cursor": "Cursor",+ "cursor.auto": "Wie vom Programm gesetzt",+ "cursor.bar": "Strich",+ "cursor.blink": "Blinken",+ "cursor.block": "Block",+ "cursor.underline": "Unterstrich",+ "delete": "Löschen",+ "dev": "Entwicklung",+ "devmode": "Entwicklermodus",+ "diagnostics": "Diagnose",+ "disconnect": "Trennen",+ "done": "Fertig",+ "duplicate": "Duplizieren",+ "edit": "Bearbeiten",+ "edithost": "Host bearbeiten",+ "f.advanced": "Erweitert",+ "f.auth": "Authentifizierung",+ "f.group": "Gruppe",+ "f.groupfoot": "Gruppen werden zu Abschnitten in der Hostliste.",+ "f.host": "Host",+ "f.hostkey": "Hostschlüssel",+ "f.hostname": "Hostname",+ "f.key": "Privater Schlüssel",+ "f.method": "Methode",+ "f.name": "Name",+ "f.password": "Passwort",+ "f.port": "Port",+ "f.remotecmd": "Remote-Befehl",+ "f.remotecmd.foot": "Leer führt auf dem Host `thinkterm cli --prefer-mux proxy` aus.",+ "f.user": "Benutzer",+ "followhost": "Host folgen",+ "font.family": "Schriftfamilie",+ "forgetkey": "Hostschlüssel vergessen",+ "forgetretry": "Schlüssel vergessen & erneut",+ "g.longpress": "Langes Drücken wählt aus",+ "g.pinch": "Zoomen für Schriftgröße",+ "g.twofinger": "Zwei-Finger-Wisch blendet Tastatur aus",+ "hint.auth": "Der Host hat den Benutzernamen mit diesem Schlüssel oder Passwort nicht akzeptiert.",+ "hint.keychanged": "Der Hostschlüssel ist nicht der bekannte. Wurde der Host neu installiert, vergessen Sie den alten Schlüssel.",+ "hint.notfound": "ThinkTerm ist auf dem Host nicht installiert oder nicht im PATH.",+ "hint.unreachable": "Der Host antwortet nicht auf dieser Adresse und diesem Port. Prüfen Sie das Netzwerk oder ein VPN wie Tailscale.",+ "hint.version": "Auf dem Host läuft eine andere ThinkTerm-Version. Aktualisieren Sie eine von beiden.",+ "hist.empty": "Von hier wurde noch nichts gesendet",+ "host.copysuffix": " Kopie",+ "host.delete.body": "Der gesicherte Schlüssel oder das Passwort wird ebenfalls aus dem Schlüsselbund entfernt.",+ "host.delete.confirm": "%@ löschen",+ "host.delete.title": "Diesen Host löschen?",+ "hosts": "Hosts",+ "hosts.add": "Host hinzufügen",+ "hosts.empty": "Noch keine Hosts",+ "hosts.empty.body": "Fügen Sie einen Rechner mit ThinkTerm hinzu. Die App verbindet sich per ssh und übernimmt dessen Sitzungen.",+ "hosts.never": "Nie verbunden",+ "hosts.nomatch": "Keine Treffer",+ "hosts.nomatch.q": "Keine Hosts passen zu „%@“.",+ "hosts.other": "Andere",+ "hosts.search": "Hosts durchsuchen",+ "i.merged": "Zusammen",+ "i.onelevel": "Eine Ebene",+ "i.panebars": "Bereichsleisten",+ "i.sessionview": "Sitzungsansicht",+ "i.split": "Zwei Blätter",+ "i.tabbar": "Tableiste",+ "i.twolevel": "Zwei Ebenen",+ "k.autopanel": "Tastenfeld mit Tastatur öffnen",+ "k.control": "Steuerung",+ "k.function": "Funktion",+ "k.haptics": "Haptisches Feedback",+ "k.keybar": "Tastenleiste",+ "k.keybar.foot": "Die Tasten unter dem Terminal. Weitere liegen im Tastenfeld, über die Taste am rechten Ende der Leiste.",+ "k.navigation": "Navigation",+ "k.symbols": "Zeichen",+ "key.authorized": "Fügen Sie diese Zeile auf dem Host in ~/.ssh/authorized_keys ein.",+ "key.copypub": "Öffentlichen Schlüssel kopieren",+ "key.generate": "Neuen Schlüssel erzeugen",+ "key.import": "Datei importieren…",+ "key.importfailed": "Import fehlgeschlagen",+ "key.loaded": "Schlüssel geladen",+ "key.loaded.ed25519": "ed25519-Schlüssel geladen",+ "key.none": "Noch kein Schlüssel",+ "key.notext": "Diese Datei ist nicht als Text lesbar.",+ "key.passphrase": "Schlüssel-Passphrase (falls vorhanden)",+ "key.paste": "Aus der Zwischenablage einsetzen",+ "key.pastetext": "Schlüsseltext einsetzen",+ "key.stored": "Schlüssel gesichert",+ "language": "Sprache",+ "m.overview": "Übersicht…",+ "m.settings": "Einstellungen…",+ "m.threadstabs": "Threads & Tabs…",+ "more": "Mehr…",+ "newhost": "Neuer Host",+ "newtab": "Neuer Tab",+ "none": "Keine",+ "off": "Aus",+ "offline": "offline",+ "ok": "OK",+ "optional": "Optional",+ "otherwindows": "Andere Fenster",+ "overview": "Live-Übersicht",+ "overview.empty": "Keine aktiven Threads",+ "overview.none": "Keine Threads auf diesem Server.",+ "p.colors": "Farben",+ "p.customize": "Anpassen",+ "p.history": "Verlauf",+ "p.keys": "Tasten",+ "p.panel": "Panel",+ "p.run": "Start",+ "p.snippets": "Schnipsel",+ "pane": "Bereich…",+ "pane.title": "Bereich",+ "panes.n": "%d Bereiche",+ "paste": "Einsetzen",+ "pinned": "Angeheftet",+ "reconnect": "Erneut verbinden",+ "rename": "Umbenennen",+ "resize.auto": "Auto",+ "resize.live": "Live",+ "resize.mode": "Größenänderung von Remote-Splits",+ "resize.release": "Beim Loslassen",+ "retry": "Erneut",+ "save": "Sichern",+ "scroll.mode": "Scrollen",+ "scroll.smooth": "Weich",+ "scroll.stepped": "Zeilenweise",+ "scrollbar": "Bildlaufleiste",+ "search": "Suchen",+ "sec.about": "Über",+ "sec.appearance": "Darstellung",+ "sec.connection": "Verbindung",+ "sec.developer": "Entwickler",+ "sec.general": "Allgemein",+ "sec.gestures": "Gesten",+ "sec.interface": "Oberfläche",+ "sec.keyboard": "Tastatur",+ "sec.terminal": "Terminal",+ "settings": "Einstellungen",+ "showlog": "Protokoll zeigen",+ "showlog.foot": "Das Verbindungsprotokoll über dem Terminal, zum Melden von Problemen.",+ "snip.command": "Befehl",+ "snip.enter": "Nach dem Senden Enter drücken",+ "snip.new": "Neuer Schnipsel",+ "snip.title": "Schnipsel",+ "space.default": "Standard",+ "split.below": "Unten teilen",+ "split.right": "Rechts teilen",+ "st.attention": "Braucht Aufmerksamkeit",+ "st.done": "Fertig",+ "st.idle": "Inaktiv",+ "st.running": "Läuft",+ "system": "System",+ "tab.n": "%d Tabs",+ "tab.num": "Tab %d",+ "tab.one": "%d Tab",+ "tab.title": "Tab",+ "tabs": "Tabs",+ "textsize": "Schriftgröße",+ "theme": "Thema",+ "theme.dark": "Dunkel",+ "theme.light": "Hell",+ "theme.mode": "Design-Modus",+ "theme.search": "Farbschemas durchsuchen",+ "theme.system": "System",+ "thismac": "Dieser Mac",+ "thread.new": "Neuer Thread",+ "thread.off": "aus",+ "threads": "Threads",+ "threadstabs": "Threads & Tabs",+ "version": "Version",+ "window.n": "Fenster %d",+ "workspaces": "Workspaces",+ "zoom": "Bereich zoomen"+ },+ "en-US": {+ "archived": "Archived",+ "back": "Back",+ "badge.key": "key",+ "badge.password": "password",+ "bell": "Bell",+ "c.autoreconnect": "Auto reconnect",+ "c.background": "Keep session in background",+ "c.keepalive": "Keep-alive",+ "cancel": "Cancel",+ "card.attaching": "Starting ThinkTerm on %@",+ "card.connecting": "Connecting to %@",+ "card.failed": "Couldn’t connect to %@",+ "card.reconnecting": "Reconnecting to %@…",+ "closepane": "Close pane",+ "closetab": "Close tab",+ "conn.attaching": "Starting ThinkTerm on",+ "conn.connecting": "Connecting to",+ "conn.disconnected": "Disconnected",+ "conn.failed": "Couldn’t connect to",+ "conn.reconnecting": "Reconnecting to",+ "conn.step1": "Secure connection",+ "conn.step2": "ThinkTerm on the host",+ "connect": "Connect",+ "connecting": "Connecting…",+ "contrast": "Minimum text contrast",+ "contrast.3": "3:1",+ "contrast.45": "4.5:1",+ "contrast.7": "7:1",+ "contrast.off": "Off",+ "copied": "Copied",+ "cursor": "Cursor",+ "cursor.auto": "As the program sets",+ "cursor.bar": "Bar",+ "cursor.blink": "Blink",+ "cursor.block": "Block",+ "cursor.underline": "Underline",+ "delete": "Delete",+ "dev": "Development",+ "devmode": "Developer Mode",+ "diagnostics": "Diagnostics",+ "disconnect": "Disconnect",+ "done": "Done",+ "duplicate": "Duplicate",+ "edit": "Edit",+ "edithost": "Edit host",+ "f.advanced": "Advanced",+ "f.auth": "Authentication",+ "f.group": "Group",+ "f.groupfoot": "Groups become sections in the host list.",+ "f.host": "Host",+ "f.hostkey": "Host key",+ "f.hostname": "Hostname",+ "f.key": "Private key",+ "f.method": "Method",+ "f.name": "Name",+ "f.password": "Password",+ "f.port": "Port",+ "f.remotecmd": "Remote command",+ "f.remotecmd.foot": "Blank runs `thinkterm cli --prefer-mux proxy` on the host.",+ "f.user": "User",+ "followhost": "Follow host",+ "font.family": "Font Family",+ "forgetkey": "Forget host key",+ "forgetretry": "Forget key & retry",+ "g.longpress": "Long press selects",+ "g.pinch": "Pinch to resize text",+ "g.twofinger": "Two-finger swipe hides keyboard",+ "hint.auth": "The host did not accept the user name with this key or password.",+ "hint.keychanged": "The host's key is not the one seen before. If the host was reinstalled, forget the old key.",+ "hint.notfound": "ThinkTerm is not installed on the host, or not on its PATH.",+ "hint.unreachable": "The host did not answer on this address and port. Check the network, or a VPN such as Tailscale.",+ "hint.version": "The host runs another version of ThinkTerm. Update one of the two.",+ "hist.empty": "Nothing sent from here yet",+ "host.copysuffix": " copy",+ "host.delete.body": "Its saved key or password is removed from the Keychain too.",+ "host.delete.confirm": "Delete %@",+ "host.delete.title": "Delete this host?",+ "hosts": "Hosts",+ "hosts.add": "Add host",+ "hosts.empty": "No hosts yet",+ "hosts.empty.body": "Add a machine that has ThinkTerm installed. The app connects over ssh and attaches to its sessions.",+ "hosts.never": "Never connected",+ "hosts.nomatch": "No hosts match",+ "hosts.nomatch.q": "No hosts match “%@”.",+ "hosts.other": "Other",+ "hosts.search": "Search hosts",+ "i.merged": "Merged",+ "i.onelevel": "One level",+ "i.panebars": "Pane bars",+ "i.sessionview": "Session view",+ "i.split": "Two sheets",+ "i.tabbar": "Tab bar",+ "i.twolevel": "Two levels",+ "k.autopanel": "Open key panel with keyboard",+ "k.control": "Control",+ "k.function": "Function",+ "k.haptics": "Haptic feedback",+ "k.keybar": "Key bar keys",+ "k.keybar.foot": "The keys under the terminal. More of them live in the key panel, on the button at the bar's right end.",+ "k.navigation": "Navigation",+ "k.symbols": "Symbols",+ "key.authorized": "Add this line to ~/.ssh/authorized_keys on the host.",+ "key.copypub": "Copy public key",+ "key.generate": "Generate new key",+ "key.import": "Import file…",+ "key.importfailed": "Import failed",+ "key.loaded": "Key loaded",+ "key.loaded.ed25519": "ed25519 key loaded",+ "key.none": "No key yet",+ "key.notext": "That file is not readable as text.",+ "key.passphrase": "Key passphrase (if any)",+ "key.paste": "Paste from clipboard",+ "key.pastetext": "Paste key text",+ "key.stored": "Key stored",+ "language": "Language",+ "m.overview": "Overview…",+ "m.settings": "Settings…",+ "m.threadstabs": "Threads and tabs…",+ "more": "More…",+ "newhost": "New host",+ "newtab": "New tab",+ "none": "None",+ "off": "Off",+ "offline": "offline",+ "ok": "OK",+ "optional": "Optional",+ "otherwindows": "Other windows",+ "overview": "Live Overview",+ "overview.empty": "No live threads",+ "overview.none": "No threads on this server.",+ "p.colors": "Colors",+ "p.customize": "Customize",+ "p.history": "History",+ "p.keys": "Keys",+ "p.panel": "Panel",+ "p.run": "Run",+ "p.snippets": "Snippets",+ "pane": "Pane…",+ "pane.title": "Pane",+ "panes.n": "%d panes",+ "paste": "Paste",+ "pinned": "Pinned",+ "reconnect": "Reconnect",+ "rename": "Rename",+ "resize.auto": "Auto",+ "resize.live": "Live",+ "resize.mode": "Remote Split Resize",+ "resize.release": "On release",+ "retry": "Retry",+ "save": "Save",+ "scroll.mode": "Scrolling",+ "scroll.smooth": "Smooth",+ "scroll.stepped": "Stepped",+ "scrollbar": "Scrollbar",+ "search": "Search",+ "sec.about": "About",+ "sec.appearance": "Appearance",+ "sec.connection": "Connection",+ "sec.developer": "Developer",+ "sec.general": "General",+ "sec.gestures": "Gestures",+ "sec.interface": "Interface",+ "sec.keyboard": "Keyboard",+ "sec.terminal": "Terminal",+ "settings": "Settings",+ "showlog": "Show log",+ "showlog.foot": "The connection’s log over the terminal, for reporting a problem.",+ "snip.command": "Command",+ "snip.enter": "Press Enter after sending",+ "snip.new": "New snippet",+ "snip.title": "Snippet",+ "space.default": "Default",+ "split.below": "Split below",+ "split.right": "Split right",+ "st.attention": "Needs Attention",+ "st.done": "Done",+ "st.idle": "Idle",+ "st.running": "Running",+ "system": "System",+ "tab.n": "%d tabs",+ "tab.num": "Tab %d",+ "tab.one": "%d tab",+ "tab.title": "Tab",+ "tabs": "Tabs",+ "textsize": "Text size",+ "theme": "Theme",+ "theme.dark": "Dark",+ "theme.light": "Light",+ "theme.mode": "Theme Mode",+ "theme.search": "Search schemes",+ "theme.system": "System",+ "thismac": "This Mac",+ "thread.new": "New Thread",+ "thread.off": "off",+ "threads": "Threads",+ "threadstabs": "Threads & tabs",+ "version": "Version",+ "window.n": "Window %d",+ "workspaces": "Workspaces",+ "zoom": "Zoom pane"+ },+ "fr-FR": {+ "archived": "Archivés",+ "back": "Retour",+ "badge.key": "clé",+ "badge.password": "mot de passe",+ "bell": "Sonnerie",+ "c.autoreconnect": "Reconnexion auto",+ "c.background": "Garder la session en arrière-plan",+ "c.keepalive": "Maintien de connexion",+ "cancel": "Annuler",+ "card.attaching": "Démarrage de ThinkTerm sur %@",+ "card.connecting": "Connexion à %@",+ "card.failed": "Connexion impossible à %@",+ "card.reconnecting": "Reconnexion à %@…",+ "closepane": "Fermer le volet",+ "closetab": "Fermer l’onglet",+ "conn.attaching": "Démarrage de ThinkTerm sur",+ "conn.connecting": "Connexion à",+ "conn.disconnected": "Déconnecté",+ "conn.failed": "Connexion impossible à",+ "conn.reconnecting": "Reconnexion à",+ "conn.step1": "Connexion sécurisée",+ "conn.step2": "ThinkTerm sur l’hôte",+ "connect": "Connecter",+ "connecting": "Connexion…",+ "contrast": "Contraste minimal du texte",+ "contrast.3": "3:1",+ "contrast.45": "4.5:1",+ "contrast.7": "7:1",+ "contrast.off": "Désactivé",+ "copied": "Copié",+ "cursor": "Curseur",+ "cursor.auto": "Comme le programme",+ "cursor.bar": "Barre",+ "cursor.blink": "Clignotant",+ "cursor.block": "Bloc",+ "cursor.underline": "Souligné",+ "delete": "Supprimer",+ "dev": "Développement",+ "devmode": "Mode développeur",+ "diagnostics": "Diagnostics",+ "disconnect": "Déconnecter",+ "done": "OK",+ "duplicate": "Dupliquer",+ "edit": "Modifier",+ "edithost": "Modifier l’hôte",+ "f.advanced": "Avancé",+ "f.auth": "Authentification",+ "f.group": "Groupe",+ "f.groupfoot": "Les groupes deviennent des sections de la liste.",+ "f.host": "Hôte",+ "f.hostkey": "Clé de l’hôte",+ "f.hostname": "Nom d’hôte",+ "f.key": "Clé privée",+ "f.method": "Méthode",+ "f.name": "Nom",+ "f.password": "Mot de passe",+ "f.port": "Port",+ "f.remotecmd": "Commande distante",+ "f.remotecmd.foot": "Vide, la commande `thinkterm cli --prefer-mux proxy` est lancée sur l’hôte.",+ "f.user": "Utilisateur",+ "followhost": "Suivre l’hôte",+ "font.family": "Famille de police",+ "forgetkey": "Oublier la clé de l’hôte",+ "forgetretry": "Oublier la clé et réessayer",+ "g.longpress": "Appui long pour sélectionner",+ "g.pinch": "Pincer pour la taille du texte",+ "g.twofinger": "Balayer à deux doigts masque le clavier",+ "hint.auth": "L’hôte n’a pas accepté ce nom d’utilisateur avec cette clé ou ce mot de passe.",+ "hint.keychanged": "La clé de l’hôte n’est pas celle vue précédemment. Si l’hôte a été réinstallé, oubliez l’ancienne clé.",+ "hint.notfound": "ThinkTerm n’est pas installé sur l’hôte, ou n’est pas dans son PATH.",+ "hint.unreachable": "L’hôte n’a pas répondu à cette adresse et ce port. Vérifiez le réseau, ou un VPN tel que Tailscale.",+ "hint.version": "L’hôte utilise une autre version de ThinkTerm. Mettez l’un des deux à jour.",+ "hist.empty": "Rien n’a encore été envoyé d’ici",+ "host.copysuffix": " copie",+ "host.delete.body": "Sa clé ou son mot de passe enregistré est aussi retiré du trousseau.",+ "host.delete.confirm": "Supprimer %@",+ "host.delete.title": "Supprimer cet hôte ?",+ "hosts": "Hôtes",+ "hosts.add": "Ajouter un hôte",+ "hosts.empty": "Aucun hôte",+ "hosts.empty.body": "Ajoutez une machine où ThinkTerm est installé. L'app s'y connecte en ssh et rejoint ses sessions.",+ "hosts.never": "Jamais connecté",+ "hosts.nomatch": "Aucun hôte ne correspond",+ "hosts.nomatch.q": "Aucun hôte ne correspond à « %@ ».",+ "hosts.other": "Autres",+ "hosts.search": "Rechercher un hôte",+ "i.merged": "Fusionnée",+ "i.onelevel": "Un niveau",+ "i.panebars": "Barres de volet",+ "i.sessionview": "Vue des sessions",+ "i.split": "Deux feuilles",+ "i.tabbar": "Barre d’onglets",+ "i.twolevel": "Deux niveaux",+ "k.autopanel": "Ouvrir le panneau avec le clavier",+ "k.control": "Contrôle",+ "k.function": "Fonction",+ "k.haptics": "Retour haptique",+ "k.keybar": "Barre de touches",+ "k.keybar.foot": "Les touches sous le terminal. Les autres sont dans le panneau, ouvert par le bouton à droite de la barre.",+ "k.navigation": "Navigation",+ "k.symbols": "Symboles",+ "key.authorized": "Ajoutez cette ligne à ~/.ssh/authorized_keys sur l’hôte.",+ "key.copypub": "Copier la clé publique",+ "key.generate": "Générer une nouvelle clé",+ "key.import": "Importer un fichier…",+ "key.importfailed": "Échec de l’import",+ "key.loaded": "Clé chargée",+ "key.loaded.ed25519": "Clé ed25519 chargée",+ "key.none": "Pas encore de clé",+ "key.notext": "Ce fichier n’est pas lisible comme du texte.",+ "key.passphrase": "Phrase secrète de la clé (le cas échéant)",+ "key.paste": "Coller depuis le presse-papiers",+ "key.pastetext": "Coller le texte de la clé",+ "key.stored": "Clé enregistrée",+ "language": "Langue",+ "m.overview": "Vue d’ensemble…",+ "m.settings": "Réglages…",+ "m.threadstabs": "Fils et onglets…",+ "more": "Plus…",+ "newhost": "Nouvel hôte",+ "newtab": "Nouvel onglet",+ "none": "Aucun",+ "off": "Désactivé",+ "offline": "hors ligne",+ "ok": "OK",+ "optional": "Facultatif",+ "otherwindows": "Autres fenêtres",+ "overview": "Vue d’ensemble",+ "overview.empty": "Aucun fil actif",+ "overview.none": "Aucun fil sur ce serveur.",+ "p.colors": "Couleurs",+ "p.customize": "Personnaliser",+ "p.history": "Historique",+ "p.keys": "Touches",+ "p.panel": "Panneau",+ "p.run": "Exécuter",+ "p.snippets": "Extraits",+ "pane": "Volet…",+ "pane.title": "Volet",+ "panes.n": "%d volets",+ "paste": "Coller",+ "pinned": "Épinglées",+ "reconnect": "Reconnecter",+ "rename": "Renommer",+ "resize.auto": "Auto",+ "resize.live": "Direct",+ "resize.mode": "Redimensionnement des divisions distantes",+ "resize.release": "Au relâchement",+ "retry": "Réessayer",+ "save": "Enregistrer",+ "scroll.mode": "Défilement",+ "scroll.smooth": "Fluide",+ "scroll.stepped": "Par ligne",+ "scrollbar": "Barre de défilement",+ "search": "Rechercher",+ "sec.about": "À propos",+ "sec.appearance": "Apparence",+ "sec.connection": "Connexion",+ "sec.developer": "Développeur",+ "sec.general": "Général",+ "sec.gestures": "Gestes",+ "sec.interface": "Interface",+ "sec.keyboard": "Clavier",+ "sec.terminal": "Terminal",+ "settings": "Réglages",+ "showlog": "Afficher le journal",+ "showlog.foot": "Le journal de connexion par-dessus le terminal, pour signaler un problème.",+ "snip.command": "Commande",+ "snip.enter": "Appuyer sur Entrée après l’envoi",+ "snip.new": "Nouvel extrait",+ "snip.title": "Extrait",+ "space.default": "Par défaut",+ "split.below": "Diviser en bas",+ "split.right": "Diviser à droite",+ "st.attention": "Attention requise",+ "st.done": "Terminé",+ "st.idle": "Inactif",+ "st.running": "En cours",+ "system": "Système",+ "tab.n": "%d onglets",+ "tab.num": "Onglet %d",+ "tab.one": "%d onglet",+ "tab.title": "Onglet",+ "tabs": "Onglets",+ "textsize": "Taille du texte",+ "theme": "Thème",+ "theme.dark": "Sombre",+ "theme.light": "Clair",+ "theme.mode": "Mode du thème",+ "theme.search": "Rechercher un thème",+ "theme.system": "Système",+ "thismac": "Ce Mac",+ "thread.new": "Nouvelle session",+ "thread.off": "arrêté",+ "threads": "Fils",+ "threadstabs": "Fils et onglets",+ "version": "Version",+ "window.n": "Fenêtre %d",+ "workspaces": "Espaces de travail",+ "zoom": "Zoomer le volet"+ },+ "ja-JP": {+ "archived": "アーカイブ済み",+ "back": "戻る",+ "badge.key": "鍵",+ "badge.password": "パスワード",+ "bell": "ベル",+ "c.autoreconnect": "自動再接続",+ "c.background": "バックグラウンドで維持",+ "c.keepalive": "キープアライブ",+ "cancel": "キャンセル",+ "card.attaching": "%@ で ThinkTerm を起動中",+ "card.connecting": "%@ に接続中",+ "card.failed": "%@ に接続できません",+ "card.reconnecting": "%@ に再接続中…",+ "closepane": "ペインを閉じる",+ "closetab": "タブを閉じる",+ "conn.attaching": "ThinkTerm を起動中:",+ "conn.connecting": "接続中:",+ "conn.disconnected": "切断されました",+ "conn.failed": "接続できません:",+ "conn.reconnecting": "再接続中:",+ "conn.step1": "セキュア接続",+ "conn.step2": "ホスト側の ThinkTerm",+ "connect": "接続",+ "connecting": "接続中…",+ "contrast": "文字の最低コントラスト",+ "contrast.3": "3:1",+ "contrast.45": "4.5:1",+ "contrast.7": "7:1",+ "contrast.off": "オフ",+ "copied": "コピーしました",+ "cursor": "カーソル",+ "cursor.auto": "プログラムに従う",+ "cursor.bar": "バー",+ "cursor.blink": "点滅",+ "cursor.block": "ブロック",+ "cursor.underline": "下線",+ "delete": "削除",+ "dev": "開発",+ "devmode": "開発者モード",+ "diagnostics": "診断",+ "disconnect": "切断",+ "done": "完了",+ "duplicate": "複製",+ "edit": "編集",+ "edithost": "ホストを編集",+ "f.advanced": "詳細",+ "f.auth": "認証",+ "f.group": "グループ",+ "f.groupfoot": "グループはホスト一覧の見出しになります。",+ "f.host": "ホスト",+ "f.hostkey": "ホスト鍵",+ "f.hostname": "ホスト名",+ "f.key": "秘密鍵",+ "f.method": "方式",+ "f.name": "名前",+ "f.password": "パスワード",+ "f.port": "ポート",+ "f.remotecmd": "リモートコマンド",+ "f.remotecmd.foot": "空欄ならホストで `thinkterm cli --prefer-mux proxy` を実行します。",+ "f.user": "ユーザ",+ "followhost": "ホストに従う",+ "font.family": "フォントファミリー",+ "forgetkey": "ホスト鍵を忘れる",+ "forgetretry": "鍵を忘れて再試行",+ "g.longpress": "長押しで選択",+ "g.pinch": "ピンチで文字サイズ",+ "g.twofinger": "2 本指スワイプでキーボードを隠す",+ "hint.auth": "ホストがこのユーザ名と鍵(またはパスワード)を受け付けませんでした。",+ "hint.keychanged": "ホスト鍵が以前と違います。ホストを入れ直したなら、古い鍵を忘れてください。",+ "hint.notfound": "ホストに ThinkTerm が入っていないか、PATH にありません。",+ "hint.unreachable": "このアドレスとポートでホストが応答しません。ネットワークや Tailscale などの VPN を確認してください。",+ "hint.version": "ホストの ThinkTerm はバージョンが違います。どちらかを更新してください。",+ "hist.empty": "ここから送ったものはまだありません",+ "host.copysuffix": " のコピー",+ "host.delete.body": "保存された鍵やパスワードもキーチェーンから削除されます。",+ "host.delete.confirm": "%@ を削除",+ "host.delete.title": "このホストを削除しますか?",+ "hosts": "ホスト",+ "hosts.add": "ホストを追加",+ "hosts.empty": "ホストがありません",+ "hosts.empty.body": "ThinkTerm を入れたマシンを追加します。ssh で接続してセッションにアタッチします。",+ "hosts.never": "未接続",+ "hosts.nomatch": "一致するホストなし",+ "hosts.nomatch.q": "「%@」に一致するホストはありません。",+ "hosts.other": "その他",+ "hosts.search": "ホストを検索",+ "i.merged": "統合",+ "i.onelevel": "1 段",+ "i.panebars": "ペインバー",+ "i.sessionview": "セッション表示",+ "i.split": "2 シート",+ "i.tabbar": "タブバー",+ "i.twolevel": "2 段",+ "k.autopanel": "キーボードと同時にパネルを開く",+ "k.control": "コントロール",+ "k.function": "ファンクション",+ "k.haptics": "触覚フィードバック",+ "k.keybar": "キーバー",+ "k.keybar.foot": "ターミナル下のキーです。残りはキーバー右端のボタンで開くキーパネルにあります。",+ "k.navigation": "ナビゲーション",+ "k.symbols": "記号",+ "key.authorized": "この行をホストの ~/.ssh/authorized_keys に追加してください。",+ "key.copypub": "公開鍵をコピー",+ "key.generate": "新しい鍵を生成",+ "key.import": "ファイルを読み込む…",+ "key.importfailed": "読み込みに失敗しました",+ "key.loaded": "鍵を読み込みました",+ "key.loaded.ed25519": "ed25519 鍵を読み込みました",+ "key.none": "鍵がありません",+ "key.notext": "そのファイルはテキストとして読めません。",+ "key.passphrase": "鍵のパスフレーズ(あれば)",+ "key.paste": "クリップボードから貼り付け",+ "key.pastetext": "鍵のテキストを貼り付け",+ "key.stored": "鍵は保存済み",+ "language": "言語",+ "m.overview": "概要…",+ "m.settings": "設定…",+ "m.threadstabs": "スレッドとタブ…",+ "more": "その他…",+ "newhost": "新規ホスト",+ "newtab": "新規タブ",+ "none": "なし",+ "off": "オフ",+ "offline": "オフライン",+ "ok": "OK",+ "optional": "任意",+ "otherwindows": "ほかのウインドウ",+ "overview": "ライブ概要",+ "overview.empty": "稼働中のスレッドなし",+ "overview.none": "このサーバーにスレッドはありません。",+ "p.colors": "配色",+ "p.customize": "カスタマイズ",+ "p.history": "履歴",+ "p.keys": "キー",+ "p.panel": "パネル",+ "p.run": "実行",+ "p.snippets": "スニペット",+ "pane": "ペイン…",+ "pane.title": "ペイン",+ "panes.n": "ペイン %d",+ "paste": "ペースト",+ "pinned": "ピン留め",+ "reconnect": "再接続",+ "rename": "名前を変更",+ "resize.auto": "自動",+ "resize.live": "ライブ",+ "resize.mode": "リモート分割のサイズ変更",+ "resize.release": "離したとき",+ "retry": "再試行",+ "save": "保存",+ "scroll.mode": "スクロール方式",+ "scroll.smooth": "スムーズ",+ "scroll.stepped": "ステップ",+ "scrollbar": "スクロールバー",+ "search": "検索",+ "sec.about": "情報",+ "sec.appearance": "外観",+ "sec.connection": "接続",+ "sec.developer": "開発者",+ "sec.general": "一般",+ "sec.gestures": "ジェスチャ",+ "sec.interface": "インターフェース",+ "sec.keyboard": "キーボード",+ "sec.terminal": "ターミナル",+ "settings": "設定",+ "showlog": "ログを表示",+ "showlog.foot": "接続ログを端末の上に重ねて表示します。",+ "snip.command": "コマンド",+ "snip.enter": "送信後に Enter を押す",+ "snip.new": "新しいスニペット",+ "snip.title": "スニペット",+ "space.default": "デフォルト",+ "split.below": "下に分割",+ "split.right": "右に分割",+ "st.attention": "要確認",+ "st.done": "完了",+ "st.idle": "待機中",+ "st.running": "実行中",+ "system": "システム",+ "tab.n": "タブ %d",+ "tab.num": "タブ %d",+ "tab.one": "タブ %d",+ "tab.title": "タブ",+ "tabs": "タブ",+ "textsize": "文字サイズ",+ "theme": "テーマ",+ "theme.dark": "ダーク",+ "theme.light": "ライト",+ "theme.mode": "テーマモード",+ "theme.search": "配色を検索",+ "theme.system": "システム",+ "thismac": "このMac",+ "thread.new": "新しいセッション",+ "thread.off": "停止中",+ "threads": "スレッド",+ "threadstabs": "スレッドとタブ",+ "version": "バージョン",+ "window.n": "ウインドウ %d",+ "workspaces": "ワークスペース",+ "zoom": "ペインをズーム"+ },+ "zh-CN": {+ "archived": "已归档",+ "back": "返回",+ "badge.key": "密钥",+ "badge.password": "密码",+ "bell": "响铃",+ "c.autoreconnect": "自动重连",+ "c.background": "后台保持会话",+ "c.keepalive": "保活间隔",+ "cancel": "取消",+ "card.attaching": "正在 %@ 上启动 ThinkTerm",+ "card.connecting": "正在连接 %@",+ "card.failed": "无法连接 %@",+ "card.reconnecting": "正在重连 %@…",+ "closepane": "关闭 pane",+ "closetab": "关闭标签",+ "conn.attaching": "正在启动 ThinkTerm:",+ "conn.connecting": "正在连接",+ "conn.disconnected": "已断开",+ "conn.failed": "无法连接",+ "conn.reconnecting": "正在重连",+ "conn.step1": "安全连接",+ "conn.step2": "主机上的 ThinkTerm",+ "connect": "连接",+ "connecting": "正在连接…",+ "contrast": "最低文字对比度",+ "contrast.3": "3:1",+ "contrast.45": "4.5:1",+ "contrast.7": "7:1",+ "contrast.off": "关",+ "copied": "已复制",+ "cursor": "光标",+ "cursor.auto": "跟随程序",+ "cursor.bar": "竖线",+ "cursor.blink": "闪烁",+ "cursor.block": "方块",+ "cursor.underline": "下划线",+ "delete": "删除",+ "dev": "开发",+ "devmode": "开发者模式",+ "diagnostics": "诊断",+ "disconnect": "断开连接",+ "done": "完成",+ "duplicate": "复制",+ "edit": "编辑",+ "edithost": "编辑主机",+ "f.advanced": "高级",+ "f.auth": "认证",+ "f.group": "分组",+ "f.groupfoot": "分组会变成主机列表里的分节。",+ "f.host": "主机",+ "f.hostkey": "主机密钥",+ "f.hostname": "主机名",+ "f.key": "私钥",+ "f.method": "方式",+ "f.name": "名称",+ "f.password": "密码",+ "f.port": "端口",+ "f.remotecmd": "远程命令",+ "f.remotecmd.foot": "留空就在主机上跑 `thinkterm cli --prefer-mux proxy`。",+ "f.user": "用户",+ "followhost": "跟随主机",+ "font.family": "字体",+ "forgetkey": "忘记主机密钥",+ "forgetretry": "忘记密钥并重试",+ "g.longpress": "长按选择文本",+ "g.pinch": "捏合改字号",+ "g.twofinger": "两指下滑收键盘",+ "hint.auth": "主机不接受这个用户名配这把密钥或这个密码。",+ "hint.keychanged": "主机密钥和上次见到的不一样。如果主机重装过,就忘掉旧密钥。",+ "hint.notfound": "主机上没装 ThinkTerm,或者它不在 PATH 里。",+ "hint.unreachable": "主机在这个地址和端口上没有应答。检查网络,或者 Tailscale 这类 VPN。",+ "hint.version": "主机上的 ThinkTerm 是另一个版本。升级其中一边。",+ "hist.empty": "还没有从这里发送过内容",+ "host.copysuffix": " 副本",+ "host.delete.body": "保存的密钥或密码也会一并从钥匙串里删掉。",+ "host.delete.confirm": "删除 %@",+ "host.delete.title": "删除这台主机?",+ "hosts": "主机",+ "hosts.add": "添加主机",+ "hosts.empty": "还没有主机",+ "hosts.empty.body": "添加一台装了 ThinkTerm 的机器。App 通过 ssh 连上去,接管它的会话。",+ "hosts.never": "从未连接",+ "hosts.nomatch": "没有匹配的主机",+ "hosts.nomatch.q": "没有匹配“%@”的主机。",+ "hosts.other": "其他",+ "hosts.search": "搜索主机",+ "i.merged": "合一",+ "i.onelevel": "一层",+ "i.panebars": "Pane 栏",+ "i.sessionview": "会话视图",+ "i.split": "两个面板",+ "i.tabbar": "标签栏",+ "i.twolevel": "两层",+ "k.autopanel": "键盘弹出时一并展开面板",+ "k.control": "控制键",+ "k.function": "功能键",+ "k.haptics": "触感反馈",+ "k.keybar": "按键条",+ "k.keybar.foot": "终端下面那排键。更多按键在按键面板里,点按键条右端的按钮打开。",+ "k.navigation": "导航",+ "k.symbols": "符号",+ "key.authorized": "把这行加到主机的 ~/.ssh/authorized_keys 里。",+ "key.copypub": "复制公钥",+ "key.generate": "生成新密钥",+ "key.import": "导入文件…",+ "key.importfailed": "导入失败",+ "key.loaded": "已载入密钥",+ "key.loaded.ed25519": "已载入 ed25519 密钥",+ "key.none": "还没有密钥",+ "key.notext": "这个文件不是可读的文本。",+ "key.passphrase": "密钥口令(如果有)",+ "key.paste": "从剪贴板粘贴",+ "key.pastetext": "粘贴密钥文本",+ "key.stored": "密钥已保存",+ "language": "语言",+ "m.overview": "总览…",+ "m.settings": "设置…",+ "m.threadstabs": "线程与标签…",+ "more": "更多…",+ "newhost": "新建主机",+ "newtab": "新建标签",+ "none": "无",+ "off": "关",+ "offline": "离线",+ "ok": "好",+ "optional": "可选",+ "otherwindows": "其他窗口",+ "overview": "实时总览",+ "overview.empty": "没有活动的线程",+ "overview.none": "这台服务器上没有线程。",+ "p.colors": "配色",+ "p.customize": "自定义",+ "p.history": "历史",+ "p.keys": "按键",+ "p.panel": "面板",+ "p.run": "运行",+ "p.snippets": "片段",+ "pane": "窗格…",+ "pane.title": "窗格",+ "panes.n": "%d 个窗格",+ "paste": "粘贴",+ "pinned": "已置顶",+ "reconnect": "重新连接",+ "rename": "重命名",+ "resize.auto": "自动",+ "resize.live": "实时",+ "resize.mode": "远程分屏缩放",+ "resize.release": "松手后",+ "retry": "重试",+ "save": "保存",+ "scroll.mode": "滚动方式",+ "scroll.smooth": "平滑",+ "scroll.stepped": "逐行",+ "scrollbar": "滚动条",+ "search": "搜索",+ "sec.about": "关于",+ "sec.appearance": "外观",+ "sec.connection": "连接",+ "sec.developer": "开发者",+ "sec.general": "通用",+ "sec.gestures": "手势",+ "sec.interface": "界面",+ "sec.keyboard": "键盘",+ "sec.terminal": "终端",+ "settings": "设置",+ "showlog": "显示日志",+ "showlog.foot": "把连接日志盖在终端上,方便报问题。",+ "snip.command": "命令",+ "snip.enter": "发送后按回车",+ "snip.new": "新建片段",+ "snip.title": "片段",+ "space.default": "默认",+ "split.below": "向下分屏",+ "split.right": "向右分屏",+ "st.attention": "需要关注",+ "st.done": "已完成",+ "st.idle": "空闲",+ "st.running": "运行中",+ "system": "跟随系统",+ "tab.n": "%d 个标签",+ "tab.num": "标签 %d",+ "tab.one": "%d 个标签",+ "tab.title": "标签",+ "tabs": "标签",+ "textsize": "文字大小",+ "theme": "主题",+ "theme.dark": "深色",+ "theme.light": "浅色",+ "theme.mode": "主题模式",+ "theme.search": "搜索配色",+ "theme.system": "跟随系统",+ "thismac": "本机",+ "thread.new": "新建会话",+ "thread.off": "已关",+ "threads": "线程",+ "threadstabs": "线程与标签",+ "version": "版本",+ "window.n": "窗口 %d",+ "workspaces": "工作区",+ "zoom": "缩放 pane"+ }+}diff --git a/ios/Sources/KeyBar.swift b/ios/Sources/KeyBar.swiftnew file mode 100644index 00000000..6ace9740--- /dev/null+++ b/ios/Sources/KeyBar.swift@@ -0,0 +1,82 @@+import SwiftUI++/// The keys a soft keyboard has not got, with sticky Ctrl and Alt, and at+/// the row's right end — fixed, never scrolling away — the button that+/// opens the extension panel underneath. The panel is not the soft+/// keyboard's switch: it is the rest of the keys, the snippets, what was+/// sent, and the colours, as the prototype's `.keybar` + `.kpanel`.+struct KeyBar: View {+ @ObservedObject var model: TerminalModel+ /// `--keypanel` on the command line starts with the panel open: the+ /// simulator cannot be tapped, and a screenshot needs it showing.+ @State private var panelOpen = ProcessInfo.processInfo.arguments.contains("--keypanel")+ @State private var tab: KeyPanelTab = KeyBar.debugTab++ /// `--keypanel snippets` also picks the face it opens on.+ private static var debugTab: KeyPanelTab {+ let args = ProcessInfo.processInfo.arguments+ guard let i = args.firstIndex(of: "--keypanel"), i + 1 < args.count,+ let tab = KeyPanelTab(rawValue: args[i + 1]) else { return .keys }+ return tab+ }++ var body: some View {+ VStack(spacing: 0) {+ HStack(spacing: 0) {+ ScrollView(.horizontal, showsIndicators: false) {+ HStack(spacing: 6) {+ ForEach(KeyCaps.bar) { cap in+ key(cap)+ }+ }+ .padding(.horizontal, 6)+ }+ more+ }+ .frame(height: 38)+ if panelOpen {+ KeyPanel(model: model, tab: $tab)+ }+ }+ .background(model.background)+ }++ private func key(_ cap: KeyCap) -> some View {+ Button { KeyCaps.send(cap, to: model) } label: {+ Text(cap.label)+ .font(.system(size: 13, design: .monospaced))+ .padding(.horizontal, 10)+ .padding(.vertical, 6)+ .background(isHeld(cap) ? Color.accentColor : Color.white.opacity(0.08))+ .clipShape(RoundedRectangle(cornerRadius: 6))+ }+ .buttonStyle(.plain)+ .foregroundColor(.white)+ }++ /// A sticky modifier shows as pressed until the next key spends it.+ private func isHeld(_ cap: KeyCap) -> Bool {+ switch cap.action {+ case .sticky(.ctrl): return model.ctrlSticky+ case .sticky(.alt): return model.altSticky+ default: return false+ }+ }++ private var more: some View {+ Button {+ withAnimation(.easeOut(duration: 0.16)) { panelOpen.toggle() }+ KeyCaps.tap()+ } label: {+ Image(systemName: panelOpen ? "chevron.down" : "square.grid.2x2")+ .font(.system(size: 14, weight: .semibold))+ .frame(width: 40, height: 28)+ .background(panelOpen ? Color.accentColor : Color.white.opacity(0.14))+ .clipShape(RoundedRectangle(cornerRadius: 7))+ }+ .buttonStyle(.plain)+ .foregroundColor(.white)+ .padding(.leading, 4)+ .padding(.trailing, 6)+ }+}diff --git a/ios/Sources/KeyPanel.swift b/ios/Sources/KeyPanel.swiftnew file mode 100644index 00000000..6396b231--- /dev/null+++ b/ios/Sources/KeyPanel.swift@@ -0,0 +1,488 @@+import SwiftUI+import UIKit++/// One key, on the bar or in the panel: what it says and what it sends.+struct KeyCap: Identifiable {+ let label: String+ let action: Action+ var id: String { label }++ enum Action {+ /// A key by its DOM name, as the core takes it.+ case dom(name: String, ctrl: Bool, shift: Bool)+ /// Typed text, the character itself.+ case text(String)+ /// Ctrl or Alt held for the next key only.+ case sticky(Sticky)+ }++ enum Sticky {+ case ctrl, alt+ }++ static func dom(_ label: String, _ name: String, ctrl: Bool = false, shift: Bool = false) -> KeyCap {+ KeyCap(label: label, action: .dom(name: name, ctrl: ctrl, shift: shift))+ }++ static func text(_ label: String) -> KeyCap {+ KeyCap(label: label, action: .text(label))+ }+}++/// The key bar's row and the panel's grid, and the one place a cap turns+/// into input.+enum KeyCaps {+ /// The bar under the terminal: the keys a soft keyboard has not got.+ static let bar: [KeyCap] = [+ .dom("esc", "Escape"),+ .dom("tab", "Tab"),+ KeyCap(label: "ctrl", action: .sticky(.ctrl)),+ KeyCap(label: "alt", action: .sticky(.alt)),+ .dom("↑", "ArrowUp"),+ .dom("↓", "ArrowDown"),+ .dom("←", "ArrowLeft"),+ .dom("→", "ArrowRight"),+ .dom("home", "Home"),+ .dom("end", "End"),+ .dom("pgup", "PageUp"),+ .dom("pgdn", "PageDown"),+ .text("-"),+ .text("/"),+ .text("|"),+ .text("~"),+ .dom("^C", "c", ctrl: true),+ .dom("^D", "d", ctrl: true),+ .dom("^L", "l", ctrl: true),+ .dom("^Z", "z", ctrl: true),+ .dom("⌫", "Backspace"),+ ]++ static let functions: [KeyCap] = (1...12).map { .dom("F\($0)", "F\($0)") }++ static let navigation: [KeyCap] = [+ .dom("ins", "Insert"),+ .dom("del", "Delete"),+ .dom("home", "Home"),+ .dom("end", "End"),+ .dom("pgup", "PageUp"),+ .dom("pgdn", "PageDown"),+ .dom("←", "ArrowLeft"),+ .dom("↑", "ArrowUp"),+ .dom("↓", "ArrowDown"),+ .dom("→", "ArrowRight"),+ .dom("⇧tab", "Tab", shift: true),+ .dom("⏎", "Enter"),+ ]++ static let symbols: [KeyCap] = [+ .text("-"), .text("="), .text("/"), .text("|"), .text("~"), .text("^"),+ .text(":"), .text(";"), .text("!"), .text("*"), .text("$"), .text("%"),+ .text("<"), .text(">"), .text("("), .text(")"), .text("{"), .text("}"),+ .text("["), .text("]"), .text("'"), .text("\""), .text("`"), .text("\\"),+ ]++ /// The chords a terminal wants and a phone cannot type.+ static let chords: [KeyCap] = [+ .dom("^A", "a", ctrl: true),+ .dom("^C", "c", ctrl: true),+ .dom("^D", "d", ctrl: true),+ .dom("^E", "e", ctrl: true),+ .dom("^K", "k", ctrl: true),+ .dom("^L", "l", ctrl: true),+ .dom("^R", "r", ctrl: true),+ .dom("^U", "u", ctrl: true),+ .dom("^W", "w", ctrl: true),+ .dom("^X", "x", ctrl: true),+ .dom("^Y", "y", ctrl: true),+ .dom("^Z", "z", ctrl: true),+ ]++ /// Send one cap. Sticky Ctrl and Alt toggle here and are spent by the+ /// model on the next key.+ static func send(_ cap: KeyCap, to model: TerminalModel) {+ switch cap.action {+ case .dom(let name, let ctrl, let shift):+ model.key(name, ctrl: ctrl, shift: shift)+ case .text(let text):+ model.text(text)+ KeyHistory.shared.record(text)+ case .sticky(.ctrl):+ model.ctrlSticky.toggle()+ case .sticky(.alt):+ model.altSticky.toggle()+ }+ tap()+ }++ /// The little knock under a key, when the setting asks for it.+ static func tap() {+ guard AppSettings.shared.hapticKeys else { return }+ UIImpactFeedbackGenerator(style: .light).impactOccurred()+ }+}++/// The four faces of the extension panel.+enum KeyPanelTab: String, CaseIterable, Identifiable {+ case keys, snippets, history, colors++ var id: String { rawValue }++ var title: String {+ switch self {+ case .keys: return "Keys"+ case .snippets: return "Snippets"+ case .history: return "History"+ case .colors: return "Colors"+ }+ }+}++/// The panel under the key bar: the keys a phone keyboard has not got,+/// the user's snippets, what they sent last, and the colour schemes —+/// the prototype's `.kpanel`, on the terminal's own background.+struct KeyPanel: View {+ @ObservedObject var model: TerminalModel+ @Binding var tab: KeyPanelTab+ @ObservedObject private var snippets = SnippetStore.shared+ @ObservedObject private var history = KeyHistory.shared+ @ObservedObject private var settings = AppSettings.shared+ @State private var draft: SnippetDraft?+ /// `--settings` alongside `--keypanel` opens the settings sheet at+ /// launch: the simulator cannot be tapped, and a screenshot needs it.+ @State private var showSettings = ProcessInfo.processInfo.arguments.contains("--settings")++ private let columns = Array(repeating: GridItem(.flexible(), spacing: 8), count: 6)++ var body: some View {+ VStack(spacing: 0) {+ HStack(spacing: 10) {+ chip("gearshape", "Customize") { showSettings = true }+ chip("doc.on.clipboard", "Paste") { model.pasteFromClipboard() }+ }+ .padding(.horizontal, 10)+ .padding(.top, 8)+ .padding(.bottom, 6)++ body(for: tab)+ .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .top)++ Rectangle().fill(Color.white.opacity(0.08)).frame(height: 0.5)++ Picker("Panel", selection: $tab) {+ ForEach(KeyPanelTab.allCases) { Text($0.title).tag($0) }+ }+ .pickerStyle(.segmented)+ .labelsHidden()+ .padding(.horizontal, 10)+ .padding(.vertical, 8)+ }+ // The panel makes room for the home indicator; the bar above it+ // does not, as the prototype notes.+ .padding(.bottom, 20)+ .frame(height: 268)+ .background(model.background)+ .environment(\.colorScheme, .dark)+ .sheet(item: $draft) { draft in+ SnippetEditor(draft: draft)+ }+ .sheet(isPresented: $showSettings) {+ NavigationStack {+ SettingsView(model: model, showLog: nil)+ .toolbar {+ ToolbarItem(placement: .confirmationAction) {+ Button("Done") { showSettings = false }+ }+ }+ }+ }+ }++ @ViewBuilder+ private func body(for tab: KeyPanelTab) -> some View {+ switch tab {+ case .keys: keysGrid+ case .snippets: snippetList+ case .history: historyList+ case .colors: colorRow+ }+ }++ // MARK: keys++ private var keysGrid: some View {+ ScrollView {+ VStack(alignment: .leading, spacing: 10) {+ block("Function", KeyCaps.functions)+ block("Navigation", KeyCaps.navigation)+ block("Symbols", KeyCaps.symbols)+ block("Control", KeyCaps.chords)+ }+ .padding(.horizontal, 10)+ .padding(.vertical, 6)+ }+ }++ private func block(_ title: String, _ caps: [KeyCap]) -> some View {+ VStack(alignment: .leading, spacing: 6) {+ Text(title.uppercased())+ .font(.system(size: 10, weight: .semibold))+ .kerning(0.6)+ .foregroundColor(.white.opacity(0.45))+ LazyVGrid(columns: columns, spacing: 8) {+ ForEach(caps) { cap in+ Button { KeyCaps.send(cap, to: model) } label: {+ Text(cap.label)+ .font(.system(size: 13, design: .monospaced))+ .lineLimit(1)+ .minimumScaleFactor(0.7)+ .frame(maxWidth: .infinity)+ .frame(height: 38)+ .background(Color.white.opacity(0.07))+ .clipShape(RoundedRectangle(cornerRadius: 10))+ }+ .buttonStyle(.plain)+ .foregroundColor(.white)+ }+ }+ }+ }++ // MARK: snippets++ private var snippetList: some View {+ ScrollView {+ VStack(spacing: 8) {+ ForEach(snippets.items) { snippet in+ HStack(spacing: 0) {+ Button { run(snippet) } label: {+ HStack(spacing: 10) {+ Text(snippet.text)+ .font(.system(size: 13, design: .monospaced))+ .lineLimit(1)+ .truncationMode(.middle)+ .frame(maxWidth: .infinity, alignment: .leading)+ if snippet.runs {+ Text("Run")+ .font(.system(size: 12))+ .foregroundColor(.accentColor)+ }+ }+ .padding(.leading, 12)+ .padding(.trailing, 8)+ .frame(height: 42)+ }+ .buttonStyle(.plain)+ .foregroundColor(.white)+ Button { draft = SnippetDraft(snippet: snippet, isNew: false) } label: {+ Image(systemName: "slider.horizontal.3")+ .font(.system(size: 13))+ .frame(width: 40, height: 42)+ }+ .buttonStyle(.plain)+ .foregroundColor(.white.opacity(0.5))+ }+ .background(Color.white.opacity(0.07))+ .clipShape(RoundedRectangle(cornerRadius: 11))+ }+ Button {+ draft = SnippetDraft(snippet: Snippet(text: ""), isNew: true)+ } label: {+ Label("New snippet", systemImage: "plus")+ .font(.system(size: 14))+ .frame(maxWidth: .infinity)+ .frame(height: 42)+ .background(Color.white.opacity(0.07))+ .clipShape(RoundedRectangle(cornerRadius: 11))+ }+ .buttonStyle(.plain)+ .foregroundColor(.white.opacity(0.65))+ }+ .padding(.horizontal, 10)+ .padding(.vertical, 6)+ }+ }++ private func run(_ snippet: Snippet) {+ model.text(snippet.text)+ if snippet.runs { model.key("Enter") }+ KeyHistory.shared.record(snippet.text)+ KeyCaps.tap()+ }++ // MARK: history++ private var historyList: some View {+ ScrollView {+ if history.lines.isEmpty {+ Text("Nothing sent from here yet")+ .font(.system(size: 13))+ .foregroundColor(.white.opacity(0.45))+ .frame(maxWidth: .infinity)+ .padding(.top, 28)+ } else {+ VStack(spacing: 8) {+ ForEach(history.lines, id: \.self) { line in+ Button {+ model.text(line)+ KeyCaps.tap()+ } label: {+ Text(line)+ .font(.system(size: 13, design: .monospaced))+ .lineLimit(1)+ .truncationMode(.middle)+ .frame(maxWidth: .infinity, alignment: .leading)+ .padding(.horizontal, 12)+ .frame(height: 42)+ .background(Color.white.opacity(0.07))+ .clipShape(RoundedRectangle(cornerRadius: 11))+ }+ .buttonStyle(.plain)+ .foregroundColor(.white)+ }+ }+ .padding(.horizontal, 10)+ .padding(.vertical, 6)+ }+ }+ }++ // MARK: colours++ private var colorRow: some View {+ ScrollView(.horizontal, showsIndicators: false) {+ LazyHGrid(rows: [GridItem(.fixed(62)), GridItem(.fixed(62))], spacing: 10) {+ swatch(Schemes.followDesktop, label: "Follow host")+ ForEach(Schemes.names, id: \.self) { name in+ swatch(name, label: name)+ }+ }+ .padding(.horizontal, 10)+ .padding(.vertical, 6)+ }+ }++ /// A scheme's own foreground, so the "Aa" shows on a light swatch too.+ private func foreground(of name: String) -> Color {+ guard let json = Schemes.json(named: name),+ let start = json.range(of: "\"foreground\":\""),+ let end = json[start.upperBound...].firstIndex(of: "\"") else { return .white }+ return Color(hex: String(json[start.upperBound..<end])) ?? .white+ }++ private func swatch(_ name: String, label: String) -> some View {+ let picked = settings.schemeName == name+ return Button {+ settings.schemeName = name+ KeyCaps.tap()+ } label: {+ VStack(spacing: 5) {+ ZStack {+ RoundedRectangle(cornerRadius: 10)+ .fill(Schemes.background(of: name) ?? Color.white.opacity(0.12))+ RoundedRectangle(cornerRadius: 10)+ .stroke(picked ? Color.accentColor : Color.white.opacity(0.18),+ lineWidth: picked ? 2 : 1)+ if name == Schemes.followDesktop {+ Image(systemName: "desktopcomputer")+ .font(.system(size: 15))+ .foregroundColor(.white.opacity(0.8))+ } else {+ Text("Aa")+ .font(.system(size: 13, design: .monospaced))+ .foregroundColor(foreground(of: name))+ }+ }+ .frame(width: 64, height: 40)+ Text(label)+ .font(.system(size: 9.5))+ .lineLimit(1)+ .frame(width: 66)+ .foregroundColor(picked ? .accentColor : .white.opacity(0.6))+ }+ }+ .buttonStyle(.plain)+ .foregroundColor(.white)+ }++ // MARK: chrome++ private func chip(_ icon: String, _ title: String, action: @escaping () -> Void) -> some View {+ Button(action: action) {+ HStack(spacing: 7) {+ Image(systemName: icon).font(.system(size: 13))+ Text(title).font(.system(size: 14))+ }+ .frame(maxWidth: .infinity)+ .frame(height: 36)+ .background(Color.white.opacity(0.07))+ .clipShape(RoundedRectangle(cornerRadius: 10))+ }+ .buttonStyle(.plain)+ .foregroundColor(.white.opacity(0.75))+ }+}++/// The snippet being written, new or old, for the editor's sheet.+struct SnippetDraft: Identifiable {+ var id: UUID { snippet.id }+ var snippet: Snippet+ var isNew: Bool+}++/// One snippet's text and whether it runs itself; Delete throws it away.+struct SnippetEditor: View {+ let draft: SnippetDraft+ @Environment(\.dismiss) private var dismiss+ @State private var text: String+ @State private var runs: Bool++ init(draft: SnippetDraft) {+ self.draft = draft+ _text = State(initialValue: draft.snippet.text)+ _runs = State(initialValue: draft.snippet.runs)+ }++ var body: some View {+ NavigationStack {+ Form {+ Section {+ TextField("Command", text: $text, axis: .vertical)+ .font(.system(size: 14, design: .monospaced))+ .lineLimit(1...6)+ .autocorrectionDisabled()+ .textInputAutocapitalization(.never)+ Toggle("Press Enter after sending", isOn: $runs)+ }+ if !draft.isNew {+ Section {+ Button("Delete", role: .destructive) {+ SnippetStore.shared.remove(draft.snippet)+ dismiss()+ }+ }+ }+ }+ .navigationTitle(draft.isNew ? "New snippet" : "Snippet")+ .navigationBarTitleDisplayMode(.inline)+ .toolbar {+ ToolbarItem(placement: .cancellationAction) {+ Button("Cancel") { dismiss() }+ }+ ToolbarItem(placement: .confirmationAction) {+ Button("Save") { save() }+ .disabled(text.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty)+ }+ }+ }+ .presentationDetents([.medium])+ }++ private func save() {+ if draft.isNew {+ SnippetStore.shared.add(text: text, runs: runs)+ } else {+ SnippetStore.shared.replace(Snippet(id: draft.snippet.id, text: text, runs: runs))+ }+ dismiss()+ }+}diff --git a/ios/Sources/SidebarSheet.swift b/ios/Sources/SidebarSheet.swiftdeleted file mode 100644index ba2e387b..00000000--- a/ios/Sources/SidebarSheet.swift+++ /dev/null@@ -1,177 +0,0 @@-import SwiftUI--/// The desktop's sidebar as a sheet: the Space on show, its projects and-/// their threads, the other windows. Rows come from the App; a tap is-/// the App's own click.-struct SidebarSheet: View {- @ObservedObject var model: TerminalModel- @Binding var isPresented: Bool- @State private var renaming: (kind: String, id: String)?- @State private var renameText = ""- @State private var newProjectPath = ""- @State private var spaceMenu: [MenuItem] = []-- var body: some View {- NavigationStack {- List {- ForEach(model.sidebar?.rows ?? []) { row in- rowView(row)- }- if let error = model.sidebar?.new_project_error {- Text(error).font(.caption).foregroundColor(.red)- }- }- .listStyle(.plain)- .navigationTitle("Threads")- .navigationBarTitleDisplayMode(.inline)- .toolbar {- ToolbarItem(placement: .cancellationAction) {- Button("Done") { isPresented = false }- }- ToolbarItemGroup(placement: .topBarTrailing) {- Menu {- ForEach(spaceMenu, id: \.rowId) { item in- if item.kind == "item" {- Button {- model.menuAction(item.id)- reloadSpaces()- } label: {- Label(item.label, systemImage: item.checked ? "checkmark" : "")- }- }- }- } label: { Image(systemName: "square.stack.3d.up") }- Button { model.sideClick("new-project") } label: { Image(systemName: "folder.badge.plus") }- }- }- .alert("Rename", isPresented: Binding(get: { renaming != nil }, set: { if !$0 { renaming = nil } })) {- TextField("Name", text: $renameText)- Button("Save") {- model.sideKey("Enter", value: renameText)- renaming = nil- }- Button("Cancel", role: .cancel) {- model.sideKey("Escape", value: "")- renaming = nil- }- }- }- .onAppear {- model.refreshViews()- reloadSpaces()- }- .onChange(of: model.sidebar?.editing) { _, editing in- // The App opened a field (a rename, a new project): show it.- guard let editing else { return }- switch editing.kind {- case "thread", "project", "space":- if renaming == nil {- renameText = ""- renaming = (editing.kind, editing.id ?? "")- }- case "new-project":- if renaming == nil {- renameText = ""- renaming = ("new-project", "")- }- default:- break- }- }- }-- private func reloadSpaces() {- spaceMenu = model.contextMenu("space", id: "")- }-- @ViewBuilder- private func rowView(_ row: SideRow) -> some View {- switch row {- case .space(_, let name):- Text(name).font(.headline).listRowBackground(Color.clear)- case .newThread:- Button {- model.sideClick("new-thread")- isPresented = false- } label: {- Label("New thread", systemImage: "plus")- }- case .pinned:- Text("Pinned").font(.caption).foregroundColor(.secondary)- case .workspaces:- Text("Workspaces").font(.caption).foregroundColor(.secondary)- case .project(let id, let name, let path, let collapsed, _):- Button {- model.sideClick("toggle-project", id: id)- } label: {- HStack {- Image(systemName: collapsed ? "chevron.right" : "chevron.down").font(.caption)- VStack(alignment: .leading) {- Text(name).font(.subheadline.weight(.semibold))- Text(path).font(.caption2).foregroundColor(.secondary).lineLimit(1)- }- Spacer()- Button { model.sideClick("new-thread", id: id) } label: { Image(systemName: "plus") }- .buttonStyle(.borderless)- }- }- .contextMenu {- Button("Rename") { model.sideClick("rename-project", id: id) }- Button("Archive") { model.sideClick("archive", id: id) }- }- case .thread(let t):- Button {- model.sideClick("thread", id: t.id)- isPresented = false- } label: {- HStack(spacing: 8) {- Circle().fill(dotColor(t)).frame(width: 8, height: 8)- Text(t.name).fontWeight(t.unread ? .semibold : .regular)- Spacer()- if t.pinned { Image(systemName: "pin.fill").font(.caption2).foregroundColor(.secondary) }- if !t.live { Text("off").font(.caption2).foregroundColor(.secondary) }- }- .padding(.leading, 12)- }- .listRowBackground(t.selected ? Color.accentColor.opacity(0.2) : nil)- .swipeActions(edge: .trailing) {- Button(role: .destructive) { model.sideClick("delete", id: t.id) } label: { Label("Delete", systemImage: "trash") }- Button { model.sideClick("pin", id: t.id, flag: !t.pinned) } label: { Label(t.pinned ? "Unpin" : "Pin", systemImage: "pin") }- }- .contextMenu {- Button("Rename") { model.sideClick("rename-thread", id: t.id) }- Button(t.pinned ? "Unpin" : "Pin") { model.sideClick("pin", id: t.id, flag: !t.pinned) }- Button("Delete", role: .destructive) { model.sideClick("delete", id: t.id) }- }- case .archived(let count, let open, let label):- Button { model.sideClick("toggle-archived") } label: {- HStack {- Image(systemName: open ? "chevron.down" : "chevron.right").font(.caption)- Text("\(label) (\(count))").font(.caption)- }- }- case .others:- Text("Other windows").font(.caption).foregroundColor(.secondary)- case .window(let id, let title, let selected):- Button {- model.sideClick("window", id: String(id))- isPresented = false- } label: {- HStack {- Image(systemName: "macwindow")- Text(title.isEmpty ? "Window \(id)" : title)- }- }- .listRowBackground(selected ? Color.accentColor.opacity(0.2) : nil)- }- }-- private func dotColor(_ t: ThreadRow) -> Color {- switch t.status {- case "Running": return .green- case "NeedsAttention": return .orange- case "Done": return .blue- default: return t.live ? .gray : .gray.opacity(0.4)- }- }-}diff --git a/ios/Sources/Snippets.swift b/ios/Sources/Snippets.swiftnew file mode 100644index 00000000..025acf2e--- /dev/null+++ b/ios/Sources/Snippets.swift@@ -0,0 +1,92 @@+import Foundation+import Combine++/// A command the user saved. Tapped in the key panel it goes to the pane+/// as typed text; `runs` adds the Enter that runs it.+struct Snippet: Identifiable, Codable, Equatable {+ var id = UUID()+ var text: String+ var runs: Bool = true+}++/// The saved snippets, as JSON in UserDefaults under "keypanel.snippets".+/// A handful of short strings: kept whole in memory, rewritten on change.+final class SnippetStore: ObservableObject {+ static let shared = SnippetStore()+ private static let key = "keypanel.snippets"++ @Published var items: [Snippet] {+ didSet { save() }+ }++ private init() {+ let data = UserDefaults.standard.data(forKey: Self.key)+ items = data.flatMap { try? JSONDecoder().decode([Snippet].self, from: $0) } ?? Self.starter+ }++ func add(text: String, runs: Bool) {+ let clean = text.trimmingCharacters(in: .whitespacesAndNewlines)+ guard !clean.isEmpty else { return }+ items.append(Snippet(text: clean, runs: runs))+ }++ func replace(_ snippet: Snippet) {+ guard let i = items.firstIndex(where: { $0.id == snippet.id }) else { return }+ let clean = snippet.text.trimmingCharacters(in: .whitespacesAndNewlines)+ if clean.isEmpty {+ items.remove(at: i)+ } else {+ items[i] = Snippet(id: snippet.id, text: clean, runs: snippet.runs)+ }+ }++ func remove(_ snippet: Snippet) {+ items.removeAll { $0.id == snippet.id }+ }++ private func save() {+ guard let data = try? JSONEncoder().encode(items) else { return }+ UserDefaults.standard.set(data, forKey: Self.key)+ }++ /// What a fresh install starts with, from the prototype's list.+ private static let starter: [Snippet] = [+ Snippet(text: "git status -sb"),+ Snippet(text: "thinkterm cli --prefer-mux list"),+ Snippet(text: "journalctl -u thinkterm-mux -f"),+ Snippet(text: "btop"),+ ]+}++/// The last commands the key panel sent, newest first. The terminal's own+/// model cannot be asked what was typed, so this is only what went through+/// the key bar and the panel; it outlives the app in UserDefaults.+final class KeyHistory: ObservableObject {+ static let shared = KeyHistory()+ private static let key = "keypanel.history"+ private static let limit = 50++ @Published private(set) var lines: [String]++ private init() {+ lines = UserDefaults.standard.stringArray(forKey: Self.key) ?? []+ }++ func record(_ text: String) {+ let line = text.trimmingCharacters(in: .whitespacesAndNewlines)+ // A lone bracket or pipe from the key grid is not worth keeping;+ // a snippet or a pasted command is.+ guard line.count > 1 else { return }+ lines.removeAll { $0 == line }+ lines.insert(line, at: 0)+ if lines.count > Self.limit {+ lines.removeLast(lines.count - Self.limit)+ }+ UserDefaults.standard.set(lines, forKey: Self.key)+ }++ func clear() {+ lines = []+ UserDefaults.standard.removeObject(forKey: Self.key)+ }+}diff --git a/ios/Sources/Strings.swift b/ios/Sources/Strings.swiftnew file mode 100644index 00000000..df52c89b--- /dev/null+++ b/ios/Sources/Strings.swift@@ -0,0 +1,66 @@+import Foundation+import Combine++/// The app's text in the prototype's five languages. The tables ship as+/// Resources/strings.json, built by ios/tools/gen-strings.py; English+/// stands in for a key a table has not got.+enum L10n {+ /// language tag -> key -> text.+ static let tables: [String: [String: String]] = {+ guard let url = Bundle.main.url(forResource: "strings", withExtension: "json"),+ let data = try? Data(contentsOf: url),+ let tables = try? JSONDecoder().decode([String: [String: String]].self, from: data) else {+ NSLog("strings.json is missing: the app shows its keys")+ return [:]+ }+ return tables+ }()++ static let fallback = "en-US"++ /// The phone's own language, matched against the tables once.+ static let systemTag: String = {+ for preferred in Locale.preferredLanguages {+ if let tag = match(preferred) { return tag }+ }+ return fallback+ }()++ /// "zh-Hans-CN" and "zh" both find the "zh-CN" table.+ private static func match(_ language: String) -> String? {+ if tables[language] != nil { return language }+ let code = language.split(separator: "-").first.map(String.init) ?? language+ return tables.keys.sorted().first { $0.split(separator: "-").first.map(String.init) == code }+ }++ /// The tag in force: the phone's own when the setting is "system".+ /// Dates and times are formatted for it too.+ static var currentTag: String {+ let language = AppSettings.shared.language+ return language == "system" ? systemTag : (match(language) ?? fallback)+ }++ static func table(for language: String) -> [String: String] {+ let tag = language == "system" ? systemTag : (match(language) ?? fallback)+ return tables[tag] ?? tables[fallback] ?? [:]+ }++ static func text(_ key: String) -> String {+ if let text = table(for: AppSettings.shared.language)[key] { return text }+ return tables[fallback]?[key] ?? key+ }+}++/// One string by key; any extra arguments fill its %@ and %d.+func tr(_ key: String, _ args: CVarArg...) -> String {+ let format = L10n.text(key)+ return args.isEmpty ? format : String(format: format, arguments: args)+}++/// What the views follow to relabel themselves. AppSettings publishes the+/// chosen tag here, and every view that calls `tr` observes it, so the+/// switch takes effect without a relaunch. Main thread only.+final class AppLanguage: ObservableObject {+ static let shared = AppLanguage()+ @Published var tag: String = AppSettings.shared.language+}diff --git a/ios/Sources/TreeSheet.swift b/ios/Sources/TreeSheet.swiftnew file mode 100644index 00000000..42c1b0c3--- /dev/null+++ b/ios/Sources/TreeSheet.swift@@ -0,0 +1,385 @@+import SwiftUI++/// The desktop's sidebar and tab strip in one list, the way both are on+/// screen at once on the desktop: the Space, its pinned threads, its+/// projects with their threads, and under an opened thread its tabs, and+/// under a tab with several panes, its panes. Everything is named as the+/// desktop names it: thread, tab, pane.+struct TreeSheet: View {+ @ObservedObject var model: TerminalModel+ @Binding var isPresented: Bool+ @Binding var menu: MenuSheet?+ @State private var openThreads: Set<String> = []+ @State private var openTabs: Set<String> = []+ @State private var spaceMenu: [MenuItem] = []+ @State private var renaming: (kind: String, id: String)?+ @State private var renameText = ""++ private var threads: [ThreadView] { model.threads?.threads ?? [] }++ var body: some View {+ NavigationStack {+ List {+ ForEach(model.sidebar?.rows ?? []) { row in+ rowView(row)+ }+ if let error = model.sidebar?.new_project_error {+ Text(error).font(.caption).foregroundColor(.red)+ }+ }+ .listStyle(.plain)+ .navigationTitle("Threads")+ .navigationBarTitleDisplayMode(.inline)+ .toolbar {+ ToolbarItem(placement: .cancellationAction) {+ Button("Done") { isPresented = false }+ }+ ToolbarItemGroup(placement: .topBarTrailing) {+ Menu {+ ForEach(spaceMenu, id: \.rowId) { item in+ if item.kind == "item" {+ Button {+ model.menuAction(item.id)+ reloadSpaces()+ } label: {+ Label(item.label, systemImage: item.checked ? "checkmark" : "")+ }+ }+ }+ } label: { Image(systemName: "square.stack.3d.up") }+ Button { model.chromeClick("new-tab") } label: { Image(systemName: "plus") }+ }+ }+ .alert("Rename", isPresented: Binding(get: { renaming != nil }, set: { if !$0 { renaming = nil } })) {+ TextField("Name", text: $renameText)+ Button("Save") {+ model.sideKey("Enter", value: renameText)+ renaming = nil+ }+ Button("Cancel", role: .cancel) {+ model.sideKey("Escape", value: "")+ renaming = nil+ }+ }+ }+ .onAppear {+ model.refreshViews()+ reloadSpaces()+ // The current thread starts open: its tabs are what the strip shows.+ if let current = threads.first(where: { $0.current }) {+ openThreads.insert(current.id)+ }+ }+ .onChange(of: model.sidebar?.editing) { _, editing in+ guard let editing, editing.kind != "none", let id = editing.id else { return }+ if renaming == nil {+ renameText = ""+ renaming = (editing.kind, id)+ }+ }+ }++ private func reloadSpaces() {+ spaceMenu = model.contextMenu("space", id: "")+ }++ @ViewBuilder+ private func rowView(_ row: SideRow) -> some View {+ switch row {+ case .space(_, let name):+ Text(name).font(.headline)+ case .newThread:+ Button { model.sideClick("new-thread") } label: {+ Label("New thread", systemImage: "plus").foregroundColor(.accentColor)+ }+ case .pinned:+ caption("Pinned")+ case .workspaces:+ caption("Workspaces")+ case .project(let id, let name, let path, let collapsed, let archived):+ HStack {+ Button { model.sideClick("toggle-project", id: id) } label: {+ Image(systemName: "chevron.right")+ .rotationEffect(.degrees(collapsed ? 0 : 90))+ .foregroundColor(.secondary)+ .font(.caption)+ }+ .buttonStyle(.plain)+ VStack(alignment: .leading, spacing: 1) {+ Text(name).font(.subheadline.weight(.semibold))+ Text(path).font(.caption2).foregroundColor(.secondary).lineLimit(1)+ }+ Spacer()+ if !archived {+ Button { model.sideClick("new-thread", id: id) } label: { Image(systemName: "plus") }+ .buttonStyle(.plain)+ .foregroundColor(.accentColor)+ }+ }+ .contextMenu {+ Button("More…") { menu = MenuSheet(kind: archived ? "archived-project" : "project", id: id, title: name) }+ }+ case .thread(let t):+ if let thread = threads.first(where: { $0.id == t.id }) {+ threadRows(thread, indent: t.project.isEmpty ? 0 : 14)+ } else {+ Text(t.name)+ }+ case .archived(let count, let open, let label):+ Button { model.sideClick("toggle-archived", flag: !open) } label: {+ HStack {+ Image(systemName: "chevron.right").rotationEffect(.degrees(open ? 90 : 0)).font(.caption)+ Text("\(label) (\(count))")+ }+ .font(.footnote)+ .foregroundColor(.secondary)+ }+ case .others:+ caption("Other windows")+ case .window(let id, let title, let selected):+ Button { model.sideClick("window", id: String(id)) } label: {+ HStack {+ Image(systemName: "macwindow").foregroundColor(.secondary)+ Text(title.isEmpty ? "Window \(id)" : title)+ }+ }+ .listRowBackground(selected ? Color.accentColor.opacity(0.2) : nil)+ }+ }++ private func caption(_ text: String) -> some View {+ Text(text.uppercased()).font(.caption2).foregroundColor(.secondary).padding(.top, 6)+ }++ /// A thread, and when open, its tabs under it.+ @ViewBuilder+ private func threadRows(_ thread: ThreadView, indent: CGFloat) -> some View {+ let open = openThreads.contains(thread.id)+ HStack(spacing: 8) {+ Circle().fill(TerminalScreen.threadColor(status: thread.status, live: thread.live)).frame(width: 8, height: 8)+ Button {+ model.sideClick("thread", id: thread.id)+ isPresented = false+ } label: {+ Text(thread.name)+ .fontWeight(thread.unread ? .semibold : .regular)+ .frame(maxWidth: .infinity, alignment: .leading)+ }+ .buttonStyle(.plain)+ if thread.pinned {+ Image(systemName: "pin").font(.caption).foregroundColor(.secondary)+ }+ Text(thread.live ? "\(thread.tabs.count) tab\(thread.tabs.count == 1 ? "" : "s")" : "off")+ .font(.caption2).foregroundColor(.secondary)+ if !thread.tabs.isEmpty {+ Button {+ if open { openThreads.remove(thread.id) } else { openThreads.insert(thread.id) }+ } label: {+ Image(systemName: "chevron.down")+ .rotationEffect(.degrees(open ? 0 : -90))+ .font(.caption)+ .foregroundColor(.secondary)+ .frame(width: 24, height: 24)+ }+ .buttonStyle(.plain)+ }+ }+ .padding(.leading, indent)+ .listRowBackground(thread.current ? Color.accentColor.opacity(0.18) : nil)+ .contextMenu {+ Button("More…") { menu = MenuSheet(kind: "thread", id: thread.id, title: thread.name) }+ }+ if open {+ ForEach(thread.tabs) { tab in+ tabRows(thread, tab, indent: indent + 20)+ }+ }+ }++ /// A tab, and when open, its panes.+ @ViewBuilder+ private func tabRows(_ thread: ThreadView, _ tab: ThreadTab, indent: CGFloat) -> some View {+ let key = thread.id + ":" + String(tab.tab)+ let open = openTabs.contains(key)+ let current = thread.current && tab.current+ HStack(spacing: 8) {+ Image(systemName: "terminal").foregroundColor(current ? .accentColor : .secondary)+ Button {+ model.chromeClick("pane", pane: tab.target)+ isPresented = false+ } label: {+ HStack(spacing: 6) {+ Text(tab.title.isEmpty ? "Tab \(tab.tab)" : tab.title)+ if let first = tab.panes.first, !first.title.isEmpty, first.title != tab.title {+ Text(first.title).font(.caption).foregroundColor(.secondary)+ }+ }+ .frame(maxWidth: .infinity, alignment: .leading)+ }+ .buttonStyle(.plain)+ if current {+ Image(systemName: "checkmark").foregroundColor(.accentColor)+ }+ if tab.panes.count > 1 {+ Text("\(tab.panes.count) panes").font(.caption2).foregroundColor(.secondary)+ Button {+ if open { openTabs.remove(key) } else { openTabs.insert(key) }+ } label: {+ Image(systemName: "chevron.down")+ .rotationEffect(.degrees(open ? 0 : -90))+ .font(.caption)+ .foregroundColor(.secondary)+ .frame(width: 24, height: 24)+ }+ .buttonStyle(.plain)+ }+ }+ .padding(.leading, indent)+ .contextMenu {+ Button("Close tab", role: .destructive) { model.chromeClick("close-tab", tab: tab.tab) }+ Button("More…") { menu = MenuSheet(kind: "tab", id: String(tab.tab), title: tab.title) }+ }+ if open {+ ForEach(tab.panes) { pane in+ Button {+ model.chromeClick("pane", pane: pane.pane)+ isPresented = false+ } label: {+ HStack(spacing: 8) {+ RoundedRectangle(cornerRadius: 1).fill(Color.secondary).frame(width: 6, height: 6)+ Text(pane.title.isEmpty ? "shell" : pane.title).font(.subheadline)+ Spacer()+ if thread.current, model.tabs?.tabs.first(where: { $0.current })?.panes.first(where: { $0.current })?.pane == pane.pane {+ Image(systemName: "checkmark").foregroundColor(.accentColor)+ }+ }+ }+ .buttonStyle(.plain)+ .padding(.leading, indent + 22)+ }+ }+ }+}++/// The desktop's Live Overview, one column of cards: a card per thread,+/// grouped by project, with its tabs as dots (the rest folded into +N),+/// an offline badge, and the last rows of its terminal as a preview.+struct OverviewScreen: View {+ @ObservedObject var model: TerminalModel+ @Binding var isPresented: Bool+ private let dots = 4++ private var threads: [ThreadView] { model.threads?.threads ?? [] }++ private var groups: [(project: String, threads: [ThreadView])] {+ var order: [String] = []+ var byProject: [String: [ThreadView]] = [:]+ for t in threads {+ if byProject[t.project] == nil { order.append(t.project) }+ byProject[t.project, default: []].append(t)+ }+ return order.map { ($0, byProject[$0] ?? []) }+ }++ var body: some View {+ NavigationStack {+ ScrollView {+ if threads.isEmpty {+ Text("No threads on this server.")+ .foregroundColor(.secondary)+ .padding(.top, 60)+ } else {+ LazyVStack(alignment: .leading, spacing: 10) {+ ForEach(groups, id: \.project) { group in+ HStack(spacing: 6) {+ Text(model.threads?.space ?? "")+ Text("·").foregroundColor(.secondary)+ Text(group.project)+ Rectangle().fill(Color.secondary.opacity(0.3)).frame(height: 1)+ Text("\(group.threads.count)").foregroundColor(.secondary)+ }+ .font(.caption)+ .padding(.horizontal, 12)+ .padding(.top, 8)+ ForEach(group.threads) { thread in+ card(thread)+ .padding(.horizontal, 12)+ }+ }+ }+ .padding(.vertical, 8)+ }+ }+ .background(Color(white: 0.06))+ .navigationTitle("Overview")+ .navigationBarTitleDisplayMode(.inline)+ .toolbar {+ ToolbarItem(placement: .cancellationAction) { Button("Done") { isPresented = false } }+ }+ }+ .onAppear { model.refreshViews() }+ }++ private func card(_ thread: ThreadView) -> some View {+ let shown = Array(thread.tabs.prefix(dots))+ let folded = thread.tabs.count - shown.count+ let currentTab = thread.tabs.first(where: { $0.current }) ?? thread.tabs.first+ return Button {+ model.sideClick("thread", id: thread.id)+ isPresented = false+ } label: {+ VStack(alignment: .leading, spacing: 6) {+ HStack(spacing: 8) {+ Circle().fill(TerminalScreen.threadColor(status: thread.status, live: thread.live)).frame(width: 8, height: 8)+ Text(thread.name).font(.subheadline.weight(.semibold)).lineLimit(1)+ Spacer()+ }+ HStack(spacing: 4) {+ ForEach(shown) { tab in+ Circle()+ .fill(thread.current && tab.current ? Color.white : Color.white.opacity(0.3))+ .frame(width: 7, height: 7)+ }+ if folded > 0 {+ Text("+\(folded)").font(.caption2).foregroundColor(.secondary)+ }+ Text(currentTab?.title ?? "").font(.caption).foregroundColor(.secondary).lineLimit(1)+ Spacer()+ if !thread.live {+ Text("offline")+ .font(.caption2)+ .padding(.horizontal, 6).padding(.vertical, 2)+ .background(Color.white.opacity(0.1))+ .clipShape(Capsule())+ }+ }+ Text(preview(thread))+ .font(.system(size: 9, design: .monospaced))+ .foregroundColor(.secondary)+ .lineLimit(7)+ .frame(maxWidth: .infinity, alignment: .leading)+ .padding(8)+ .background(model.background)+ .clipShape(RoundedRectangle(cornerRadius: 8))+ }+ .padding(10)+ .background(Color.white.opacity(thread.current ? 0.12 : 0.06))+ .clipShape(RoundedRectangle(cornerRadius: 12))+ .overlay(RoundedRectangle(cornerRadius: 12).stroke(thread.current ? Color.accentColor : Color.clear, lineWidth: 1))+ }+ .buttonStyle(.plain)+ .foregroundColor(.white)+ }++ /// The current thread's terminal, its last rows; another thread's is+ /// not on this phone, and shows what it holds.+ private func preview(_ thread: ThreadView) -> String {+ if thread.current, let screen = ViewJSON.decode(ScreenText.self, model.core.screenText()) {+ let rows = screen.text.split(separator: "\n", omittingEmptySubsequences: false)+ .map { $0.replacingOccurrences(of: "\u{2060}", with: "").trimmingCharacters(in: .whitespaces) }+ let kept = rows.reversed().drop(while: { $0.isEmpty }).reversed().suffix(7)+ return kept.joined(separator: "\n")+ }+ return thread.tabs.map { "· " + ($0.title.isEmpty ? "Tab \($0.tab)" : $0.title) }.joined(separator: "\n")+ }+}diff --git a/ios/ThinkTerm.icon/Assets/Vector.png b/ios/ThinkTerm.icon/Assets/Vector.pngnew file mode 100644index 00000000..cb898cf2Binary files /dev/null and b/ios/ThinkTerm.icon/Assets/Vector.png differdiff --git a/ios/ThinkTerm.icon/icon.json b/ios/ThinkTerm.icon/icon.jsonnew file mode 100644index 00000000..f1a34b10--- /dev/null+++ b/ios/ThinkTerm.icon/icon.json@@ -0,0 +1,66 @@+{+ "fill" : {+ "linear-gradient" : [+ "srgb:0.01961,0.01961,0.18039,1.00000",+ "srgb:0.10196,0.14902,0.78431,1.00000"+ ],+ "orientation" : {+ "start" : {+ "x" : 0.5,+ "y" : 0+ },+ "stop" : {+ "x" : 0.5,+ "y" : 1+ }+ }+ },+ "groups" : [+ {+ "layers" : [+ {+ "fill" : {+ "linear-gradient" : [+ "extended-gray:1.00000,1.00000",+ "extended-gray:1.00000,1.00000"+ ],+ "orientation" : {+ "start" : {+ "x" : 0.5,+ "y" : 0+ },+ "stop" : {+ "x" : 0.35579199446386944,+ "y" : 0.8626027647282886+ }+ }+ },+ "glass" : true,+ "image-name" : "Vector.png",+ "name" : "Vector",+ "position" : {+ "scale" : 0.66,+ "translation-in-points" : [+ 0,+ 0+ ]+ }+ }+ ],+ "shadow" : {+ "kind" : "neutral",+ "opacity" : 0.5+ },+ "translucency" : {+ "enabled" : true,+ "value" : 0.5+ }+ }+ ],+ "supported-platforms" : {+ "circles" : [+ "watchOS"+ ],+ "squares" : "shared"+ }+}diff --git a/ios/tools/gen-strings.py b/ios/tools/gen-strings.pynew file mode 100644index 00000000..55428d35--- /dev/null+++ b/ios/tools/gen-strings.py@@ -0,0 +1,314 @@+#!/usr/bin/env python3+"""Build ios/Resources/strings.json, the app's string tables.++The prototype's tables (research/mobile-ui/i18n.js) are the source for the+keys it already had; EXTRA below carries the keys only the Swift app needs,+in the same five languages. research/ is not in the repository, so the+merged JSON is what ships: with the JS absent the script keeps the strings+already in strings.json and only adds what EXTRA brings.++ python3 ios/tools/gen-strings.py+"""++import json+import os+import re+import sys++HERE = os.path.dirname(os.path.abspath(__file__))+ROOT = os.path.dirname(os.path.dirname(HERE))+PROTO = os.path.join(ROOT, "research", "mobile-ui", "i18n.js")+OUT = os.path.join(ROOT, "ios", "Resources", "strings.json")++LANGS = ["en-US", "zh-CN", "ja-JP", "fr-FR", "de-DE"]++# Keys the phone app has and the prototype never had. Same order as LANGS.+EXTRA = {+ # common+ "ok": ["OK", "好", "OK", "OK", "OK"],+ "more": ["More…", "更多…", "その他…", "Plus…", "Mehr…"],+ "rename": ["Rename", "重命名", "名前を変更", "Renommer", "Umbenennen"],+ "none": ["None", "无", "なし", "Aucun", "Keine"],+ "optional": ["Optional", "可选", "任意", "Facultatif", "Optional"],+ # hosts+ "hosts.nomatch.q": [+ "No hosts match “%@”.",+ "没有匹配“%@”的主机。",+ "「%@」に一致するホストはありません。",+ "Aucun hôte ne correspond à « %@ ».",+ "Keine Hosts passen zu „%@“.",+ ],+ "host.delete.title": [+ "Delete this host?",+ "删除这台主机?",+ "このホストを削除しますか?",+ "Supprimer cet hôte ?",+ "Diesen Host löschen?",+ ],+ "host.delete.confirm": ["Delete %@", "删除 %@", "%@ を削除", "Supprimer %@", "%@ löschen"],+ "host.delete.body": [+ "Its saved key or password is removed from the Keychain too.",+ "保存的密钥或密码也会一并从钥匙串里删掉。",+ "保存された鍵やパスワードもキーチェーンから削除されます。",+ "Sa clé ou son mot de passe enregistré est aussi retiré du trousseau.",+ "Der gesicherte Schlüssel oder das Passwort wird ebenfalls aus dem Schlüsselbund entfernt.",+ ],+ "host.copysuffix": [" copy", " 副本", " のコピー", " copie", " Kopie"],+ "badge.key": ["key", "密钥", "鍵", "clé", "Schlüssel"],+ "badge.password": ["password", "密码", "パスワード", "mot de passe", "Passwort"],+ # host editor+ "f.method": ["Method", "方式", "方式", "Méthode", "Methode"],+ "key.paste": [+ "Paste from clipboard",+ "从剪贴板粘贴",+ "クリップボードから貼り付け",+ "Coller depuis le presse-papiers",+ "Aus der Zwischenablage einsetzen",+ ],+ "key.import": ["Import file…", "导入文件…", "ファイルを読み込む…", "Importer un fichier…", "Datei importieren…"],+ "key.generate": [+ "Generate new key",+ "生成新密钥",+ "新しい鍵を生成",+ "Générer une nouvelle clé",+ "Neuen Schlüssel erzeugen",+ ],+ "key.pastetext": [+ "Paste key text",+ "粘贴密钥文本",+ "鍵のテキストを貼り付け",+ "Coller le texte de la clé",+ "Schlüsseltext einsetzen",+ ],+ "key.passphrase": [+ "Key passphrase (if any)",+ "密钥口令(如果有)",+ "鍵のパスフレーズ(あれば)",+ "Phrase secrète de la clé (le cas échéant)",+ "Schlüssel-Passphrase (falls vorhanden)",+ ],+ "key.loaded": ["Key loaded", "已载入密钥", "鍵を読み込みました", "Clé chargée", "Schlüssel geladen"],+ "key.loaded.ed25519": [+ "ed25519 key loaded",+ "已载入 ed25519 密钥",+ "ed25519 鍵を読み込みました",+ "Clé ed25519 chargée",+ "ed25519-Schlüssel geladen",+ ],+ "key.stored": ["Key stored", "密钥已保存", "鍵は保存済み", "Clé enregistrée", "Schlüssel gesichert"],+ "key.none": ["No key yet", "还没有密钥", "鍵がありません", "Pas encore de clé", "Noch kein Schlüssel"],+ "key.copypub": [+ "Copy public key",+ "复制公钥",+ "公開鍵をコピー",+ "Copier la clé publique",+ "Öffentlichen Schlüssel kopieren",+ ],+ "key.authorized": [+ "Add this line to ~/.ssh/authorized_keys on the host.",+ "把这行加到主机的 ~/.ssh/authorized_keys 里。",+ "この行をホストの ~/.ssh/authorized_keys に追加してください。",+ "Ajoutez cette ligne à ~/.ssh/authorized_keys sur l’hôte.",+ "Fügen Sie diese Zeile auf dem Host in ~/.ssh/authorized_keys ein.",+ ],+ "key.importfailed": [+ "Import failed",+ "导入失败",+ "読み込みに失敗しました",+ "Échec de l’import",+ "Import fehlgeschlagen",+ ],+ "key.notext": [+ "That file is not readable as text.",+ "这个文件不是可读的文本。",+ "そのファイルはテキストとして読めません。",+ "Ce fichier n’est pas lisible comme du texte.",+ "Diese Datei ist nicht als Text lesbar.",+ ],+ "f.remotecmd": ["Remote command", "远程命令", "リモートコマンド", "Commande distante", "Remote-Befehl"],+ "f.remotecmd.foot": [+ "Blank runs `thinkterm cli --prefer-mux proxy` on the host.",+ "留空就在主机上跑 `thinkterm cli --prefer-mux proxy`。",+ "空欄ならホストで `thinkterm cli --prefer-mux proxy` を実行します。",+ "Vide, la commande `thinkterm cli --prefer-mux proxy` est lancée sur l’hôte.",+ "Leer führt auf dem Host `thinkterm cli --prefer-mux proxy` aus.",+ ],+ "f.hostkey": ["Host key", "主机密钥", "ホスト鍵", "Clé de l’hôte", "Hostschlüssel"],+ # settings+ "cursor.auto": [+ "As the program sets",+ "跟随程序",+ "プログラムに従う",+ "Comme le programme",+ "Wie vom Programm gesetzt",+ ],+ "k.keybar.foot": [+ "The keys under the terminal. More of them live in the key panel, on the button at the bar's right end.",+ "终端下面那排键。更多按键在按键面板里,点按键条右端的按钮打开。",+ "ターミナル下のキーです。残りはキーバー右端のボタンで開くキーパネルにあります。",+ "Les touches sous le terminal. Les autres sont dans le panneau, ouvert par le bouton à droite de la barre.",+ "Die Tasten unter dem Terminal. Weitere liegen im Tastenfeld, über die Taste am rechten Ende der Leiste.",+ ],+ "theme.search": [+ "Search schemes",+ "搜索配色",+ "配色を検索",+ "Rechercher un thème",+ "Farbschemas durchsuchen",+ ],+ # tree and overview+ "otherwindows": ["Other windows", "其他窗口", "ほかのウインドウ", "Autres fenêtres", "Andere Fenster"],+ "window.n": ["Window %d", "窗口 %d", "ウインドウ %d", "Fenêtre %d", "Fenster %d"],+ "tab.one": ["%d tab", "%d 个标签", "タブ %d", "%d onglet", "%d Tab"],+ "tab.n": ["%d tabs", "%d 个标签", "タブ %d", "%d onglets", "%d Tabs"],+ "panes.n": ["%d panes", "%d 个窗格", "ペイン %d", "%d volets", "%d Bereiche"],+ "thread.off": ["off", "已关", "停止中", "arrêté", "aus"],+ "tab.num": ["Tab %d", "标签 %d", "タブ %d", "Onglet %d", "Tab %d"],+ "overview.none": [+ "No threads on this server.",+ "这台服务器上没有线程。",+ "このサーバーにスレッドはありません。",+ "Aucun fil sur ce serveur.",+ "Keine Threads auf diesem Server.",+ ],+ # terminal screen+ "m.threadstabs": ["Threads and tabs…", "线程与标签…", "スレッドとタブ…", "Fils et onglets…", "Threads & Tabs…"],+ "m.overview": ["Overview…", "总览…", "概要…", "Vue d’ensemble…", "Übersicht…"],+ "m.settings": ["Settings…", "设置…", "設定…", "Réglages…", "Einstellungen…"],+ "pane.title": ["Pane", "窗格", "ペイン", "Volet", "Bereich"],+ "tab.title": ["Tab", "标签", "タブ", "Onglet", "Tab"],+ "card.connecting": [+ "Connecting to %@",+ "正在连接 %@",+ "%@ に接続中",+ "Connexion à %@",+ "Verbinde mit %@",+ ],+ "card.attaching": [+ "Starting ThinkTerm on %@",+ "正在 %@ 上启动 ThinkTerm",+ "%@ で ThinkTerm を起動中",+ "Démarrage de ThinkTerm sur %@",+ "ThinkTerm wird auf %@ gestartet",+ ],+ "card.reconnecting": [+ "Reconnecting to %@…",+ "正在重连 %@…",+ "%@ に再接続中…",+ "Reconnexion à %@…",+ "Neu verbinden mit %@…",+ ],+ "card.failed": [+ "Couldn’t connect to %@",+ "无法连接 %@",+ "%@ に接続できません",+ "Connexion impossible à %@",+ "Keine Verbindung zu %@",+ ],+ "forgetretry": [+ "Forget key & retry",+ "忘记密钥并重试",+ "鍵を忘れて再試行",+ "Oublier la clé et réessayer",+ "Schlüssel vergessen & erneut",+ ],+ "hint.auth": [+ "The host did not accept the user name with this key or password.",+ "主机不接受这个用户名配这把密钥或这个密码。",+ "ホストがこのユーザ名と鍵(またはパスワード)を受け付けませんでした。",+ "L’hôte n’a pas accepté ce nom d’utilisateur avec cette clé ou ce mot de passe.",+ "Der Host hat den Benutzernamen mit diesem Schlüssel oder Passwort nicht akzeptiert.",+ ],+ "hint.keychanged": [+ "The host's key is not the one seen before. If the host was reinstalled, forget the old key.",+ "主机密钥和上次见到的不一样。如果主机重装过,就忘掉旧密钥。",+ "ホスト鍵が以前と違います。ホストを入れ直したなら、古い鍵を忘れてください。",+ "La clé de l’hôte n’est pas celle vue précédemment. Si l’hôte a été réinstallé, oubliez l’ancienne clé.",+ "Der Hostschlüssel ist nicht der bekannte. Wurde der Host neu installiert, vergessen Sie den alten Schlüssel.",+ ],+ "hint.unreachable": [+ "The host did not answer on this address and port. Check the network, or a VPN such as Tailscale.",+ "主机在这个地址和端口上没有应答。检查网络,或者 Tailscale 这类 VPN。",+ "このアドレスとポートでホストが応答しません。ネットワークや Tailscale などの VPN を確認してください。",+ "L’hôte n’a pas répondu à cette adresse et ce port. Vérifiez le réseau, ou un VPN tel que Tailscale.",+ "Der Host antwortet nicht auf dieser Adresse und diesem Port. Prüfen Sie das Netzwerk oder ein VPN wie Tailscale.",+ ],+ "hint.notfound": [+ "ThinkTerm is not installed on the host, or not on its PATH.",+ "主机上没装 ThinkTerm,或者它不在 PATH 里。",+ "ホストに ThinkTerm が入っていないか、PATH にありません。",+ "ThinkTerm n’est pas installé sur l’hôte, ou n’est pas dans son PATH.",+ "ThinkTerm ist auf dem Host nicht installiert oder nicht im PATH.",+ ],+ "hint.version": [+ "The host runs another version of ThinkTerm. Update one of the two.",+ "主机上的 ThinkTerm 是另一个版本。升级其中一边。",+ "ホストの ThinkTerm はバージョンが違います。どちらかを更新してください。",+ "L’hôte utilise une autre version de ThinkTerm. Mettez l’un des deux à jour.",+ "Auf dem Host läuft eine andere ThinkTerm-Version. Aktualisieren Sie eine von beiden.",+ ],+ # key bar and panel+ "k.function": ["Function", "功能键", "ファンクション", "Fonction", "Funktion"],+ "k.navigation": ["Navigation", "导航", "ナビゲーション", "Navigation", "Navigation"],+ "k.symbols": ["Symbols", "符号", "記号", "Symboles", "Zeichen"],+ "k.control": ["Control", "控制键", "コントロール", "Contrôle", "Steuerung"],+ "p.panel": ["Panel", "面板", "パネル", "Panneau", "Panel"],+ "snip.new": ["New snippet", "新建片段", "新しいスニペット", "Nouvel extrait", "Neuer Schnipsel"],+ "snip.title": ["Snippet", "片段", "スニペット", "Extrait", "Schnipsel"],+ "snip.command": ["Command", "命令", "コマンド", "Commande", "Befehl"],+ "snip.enter": [+ "Press Enter after sending",+ "发送后按回车",+ "送信後に Enter を押す",+ "Appuyer sur Entrée après l’envoi",+ "Nach dem Senden Enter drücken",+ ],+ "hist.empty": [+ "Nothing sent from here yet",+ "还没有从这里发送过内容",+ "ここから送ったものはまだありません",+ "Rien n’a encore été envoyé d’ici",+ "Von hier wurde noch nichts gesendet",+ ],+}+++def prototype_tables():+ """The prototype's window.I18N object, or None when research/ is absent."""+ if not os.path.exists(PROTO):+ return None+ text = open(PROTO, encoding="utf-8").read()+ match = re.search(r"window\.I18N\s*=\s*(\{.*?\});\s*\n", text, re.S)+ if not match:+ sys.exit("i18n.js: no window.I18N object")+ return json.loads(match.group(1))+++def main():+ tables = prototype_tables()+ if tables is None:+ if not os.path.exists(OUT):+ sys.exit("no research/mobile-ui/i18n.js and no strings.json to extend")+ tables = json.load(open(OUT, encoding="utf-8"))+ print("research/ absent: extending the shipped strings.json")+ for lang in LANGS:+ tables.setdefault(lang, {})+ for key, values in EXTRA.items():+ for lang, value in zip(LANGS, values):+ tables[lang][key] = value+ out = {lang: dict(sorted(tables[lang].items())) for lang in LANGS}+ with open(OUT, "w", encoding="utf-8") as f:+ json.dump(out, f, ensure_ascii=False, indent=1, sort_keys=True)+ f.write("\n")+ missing = [+ (lang, key)+ for key in out["en-US"]+ for lang in LANGS+ if key not in out[lang]+ ]+ print("%d keys x %d languages -> %s" % (len(out["en-US"]), len(LANGS), OUT))+ if missing:+ print("missing: %s" % missing[:10])+++main()diff --git a/thinkterm-web/src/app.rs b/thinkterm-web/src/app.rsindex b16b982d..45f85341 100644--- a/thinkterm-web/src/app.rs+++ b/thinkterm-web/src/app.rs@@ -34,6 +34,97 @@ pub enum Pointer {Up,}+/// A row of a thumbnail: runs of text with their foreground, as hex,+/// trailing blanks dropped.+#[derive(Debug, Clone, serde::Serialize)]+pub struct PreviewRow {+ pub runs: Vec<PreviewRun>,+}++#[derive(Debug, Clone, serde::Serialize)]+pub struct PreviewRun {+ pub text: String,+ pub fg: String,+}++/// A line's cells as runs of one colour: a thumbnail keeps the terminal's+/// colours, which is most of what makes it recognisable at that size.+fn preview_row(line: &termwiz::surface::Line, palette: &ColorPalette) -> PreviewRow {+ use wezterm_term::color::ColorAttribute;+ let mut runs: Vec<PreviewRun> = Vec::new();+ let mut at = 0usize;+ for cell in line.visible_cells() {+ let col = cell.cell_index();+ let attrs = cell.attrs();+ let fg = match attrs.foreground() {+ ColorAttribute::Default => palette.foreground,+ other => palette.resolve_fg(other),+ };+ let hex = fg.to_rgb_string();+ let mut text = String::new();+ while at < col {+ text.push(' ');+ at += 1;+ }+ text.push_str(cell.str());+ at += cell.width().max(1);+ match runs.last_mut() {+ Some(last) if last.fg == hex => last.text.push_str(&text),+ _ => runs.push(PreviewRun { text, fg: hex }),+ }+ }+ // Trailing blanks go: a thumbnail's row ends where its text does.+ while let Some(last) = runs.last_mut() {+ let trimmed = last.text.trim_end().len();+ if trimmed == 0 {+ runs.pop();+ } else {+ last.text.truncate(trimmed);+ break;+ }+ }+ PreviewRow { runs }+}++/// See `App::threads_view`.+#[derive(Debug, Clone, serde::Serialize)]+pub struct ThreadsView {+ pub space: String,+ pub threads: Vec<ThreadView>,+}++#[derive(Debug, Clone, serde::Serialize)]+pub struct ThreadView {+ pub id: String,+ pub name: String,+ pub project: String,+ pub project_id: String,+ pub status: crate::tree::Status,+ pub dot: crate::tree::Dot,+ pub live: bool,+ pub pinned: bool,+ pub unread: bool,+ pub current: bool,+ pub window: Option<thinkterm_proto::WindowId>,+ pub tabs: Vec<ThreadTab>,+}++#[derive(Debug, Clone, serde::Serialize)]+pub struct ThreadTab {+ pub tab: TabId,+ pub title: String,+ /// The pane a tap shows.+ pub target: PaneId,+ pub current: bool,+ pub panes: Vec<PaneRef>,+}++#[derive(Debug, Clone, serde::Serialize)]+pub struct PaneRef {+ pub pane: PaneId,+ pub title: String,+}+/// See `App::screen_text`.#[derive(Debug, Clone, serde::Serialize)]pub struct ScreenText {@@ -250,6 +341,10 @@ pub struct Inner<P: Platform, L: Link> {/// says after enough of them.reconnect_delay: f64,reconnect_pending: bool,+ /// The cursor blink's phase, while `cursor_blink` is on: shown, or not.+ blink_shown: bool,+ /// The blink's tick runs once started; it does nothing while off.+ blink_ticking: bool,reconnect_attempts: u32,/// When the current connection came up, until it has lasted long enough/// to be called good. `None` once the backoff has been forgiven.@@ -340,7 +435,7 @@ enum AfterTakeOver {}pub struct App<P: Platform, L: Link> {- platform: Rc<P>,+ pub platform: Rc<P>,inner: RefCell<Inner<P, L>>,frame_requested: Cell<bool>,/// The atlas backoff's own wake-up. Everything else here is driven by@@ -493,6 +588,8 @@ impl<P: Platform, L: Link> App<P, L> {disconnected: None,reconnect_delay: RECONNECT_MIN_MS,reconnect_pending: false,+ blink_shown: true,+ blink_ticking: false,reconnect_attempts: 0,connected_since: None,capacity: Capacity::new(),@@ -747,6 +844,76 @@ impl<P: Platform, L: Link> App<P, L> {]}+ /// The threads of the Space on show with their tabs, in the sidebar's+ /// order (pinned first, then by project), for a phone that shows the+ /// desktop's sidebar layer and its tab strip as two rows. The current+ /// thread's tabs come from the strip (labels and panes as shown);+ /// another thread's from the session state.+ pub fn threads_view(&self) -> ThreadsView {+ let inner = self.inner.borrow();+ let space = inner+ .tree+ .current_space()+ .map(|s| s.name.clone())+ .unwrap_or_else(|| "Default".to_string());+ let strip = Self::strip_model(&inner).map(|(tabs, _)| tabs).unwrap_or_default();+ let mut threads = Vec::new();+ for row in Self::side_rows(&inner) {+ let crate::tree::Row::Thread(t) = row else {+ continue;+ };+ let Some(thread) = inner.tree.thread(&t.id) else {+ continue;+ };+ let project = inner+ .tree+ .project_of(&t.id)+ .map(|p| p.name.clone())+ .unwrap_or_default();+ let window = thread.tabs.first().map(|tab| tab.window_id);+ let tabs = thread+ .tabs+ .iter()+ .map(|tab| {+ let shown = strip.iter().find(|s| s.tab_id == tab.tab_id);+ let panes = match shown {+ Some(s) => s.panes.iter().map(|p| PaneRef { pane: p.pane_id, title: p.title.clone() }).collect(),+ None => tab+ .pane_ids+ .iter()+ .map(|p| PaneRef { pane: *p, title: String::new() })+ .collect(),+ };+ let target = shown.map(|s| s.target).or_else(|| tab.pane_ids.first().copied()).unwrap_or(0);+ ThreadTab {+ tab: tab.tab_id,+ title: shown+ .map(|s| s.label.clone())+ .unwrap_or_else(|| crate::navbar::display_title(&tab.title).0.to_string()),+ target,+ current: t.selected && tab.tab_id == inner.tab_id,+ panes,+ }+ })+ .collect();+ threads.push(ThreadView {+ id: t.id.clone(),+ name: t.name.clone(),+ project,+ project_id: t.project_id.clone(),+ status: t.status,+ dot: t.dot,+ live: t.live,+ pinned: t.pinned,+ unread: t.unread,+ current: t.selected,+ window,+ tabs,+ });+ }+ ThreadsView { space, threads }+ }+pub fn tabs_view(&self) -> crate::views::TabsView {let inner = self.inner.borrow();let (tabs, controls) = Self::strip_model(&inner).unwrap_or_default();@@ -882,6 +1049,49 @@ impl<P: Platform, L: Link> App<P, L> {}/// What is selected in the focused pane, for the platform's clipboard.+ /// The `rows` rows of any pane on the server ending at its cursor's+ /// row, as text, for a thumbnail of a tab this page is not showing: a+ /// fresh shell's prompt sits at the top of a tall pane, and the rows+ /// under it are nothing to look at. Two round trips: the pane's+ /// dimensions, then its lines.+ pub fn preview_lines(self: &Rc<Self>, pane_id: PaneId, rows: usize) -> crate::platform::LocalFuture<Result<Vec<PreviewRow>>> {+ let link = self.inner.borrow().link.clone();+ // The pane's own colours if it is drawn here, else the scheme's.+ let palette = {+ let inner = self.inner.borrow();+ inner.panes.get(&pane_id).map(|c| c.palette.clone()).unwrap_or_else(|| inner.configured())+ };+ Box::pin(async move {+ let (dims, cursor) = thinkterm_session::host::request(+ &link,+ Pdu::GetPaneRenderableDimensions(codec::GetPaneRenderableDimensions { pane_id }),+ |pdu| match pdu {+ Pdu::GetPaneRenderableDimensionsResponse(r) => Ok((r.dimensions, r.cursor_position)),+ other => Err(other),+ },+ )+ .await?;+ let bottom = (cursor.y + 1).min(dims.physical_top + dims.viewport_rows as StableRowIndex);+ let top = (bottom - rows as StableRowIndex).max(dims.scrollback_top);+ let response = thinkterm_session::host::request(+ &link,+ Pdu::GetLines(codec::GetLines { pane_id, lines: vec![top..bottom] }),+ |pdu| match pdu {+ Pdu::GetLinesResponse(r) => Ok(r),+ other => Err(other),+ },+ )+ .await?;+ let (lines, _) = response.lines.extract_data();+ let mut out: Vec<(StableRowIndex, PreviewRow)> = lines+ .into_iter()+ .map(|(row, line)| (row, preview_row(&line, &palette)))+ .collect();+ out.sort_by_key(|(row, _)| *row);+ Ok(out.into_iter().map(|(_, row)| row).collect())+ })+ }+pub fn selected_text(&self) -> Option<String> {Self::selection_text(&self.inner.borrow())}@@ -1070,6 +1280,13 @@ impl<P: Platform, L: Link> App<P, L> {if inner.reconnect_pending || inner.disconnected.is_none() {return;}+ if !inner.settings.auto_reconnect {+ // Asked not to: the remark stays, sticky, until a reconnect+ // is asked for.+ let reason = inner.disconnected.clone().unwrap_or_default();+ Self::set_status(&inner, &format!("connection lost ({reason})"));+ return;+ }inner.reconnect_pending = true;}let app = Rc::clone(self);@@ -1673,6 +1890,10 @@ impl<P: Platform, L: Link> App<P, L> {inner.divider_claim_next = Some((idx, cells));return;}+ if inner.settings.resize_mode == crate::settings::ResizeMode::Release {+ // The picture moves; the server hears when the finger lifts.+ return;+ }inner.divider_claim_busy = true;(link, tab_id)};@@ -2201,6 +2422,8 @@ impl<P: Platform, L: Link> App<P, L> {};cell.scroll_px = 0.0;}+ // The scroll position is in the layout view: a scrollbar reads it.+ Self::notify(&inner);drop(inner);self.request_frame();true@@ -2245,6 +2468,12 @@ impl<P: Platform, L: Link> App<P, L> {lease.fit,inner.following,);+ // Where the focused pane is in its scrollback: rows above the+ // bottom, and rows there are to scroll through.+ if let Some(cell) = inner.panes.get(&inner.focused_pane) {+ let max = max_scroll(&cell.session.dimensions());+ json.push_str(&format!(",\"scroll\":[{},{}]", cell.scroll_from_bottom, max));+ }match &inner.tab_layout {Some(layout) => {json.push_str(&format!(",\"cols\":{},\"rows\":{},\"zoomed\":", layout.cols, layout.rows));@@ -2355,7 +2584,7 @@ impl<P: Platform, L: Link> App<P, L> {/// pane bare, as its terminal apps do; the bar appears with a split,/// when there is something to tell apart.fn nav_rows_for(inner: &Inner<P, L>, panes: usize) -> usize {- if inner.platform.is_mobile() && panes <= 1 {+ if inner.platform.is_mobile() && (panes <= 1 || !inner.settings.pane_bars) {return 0;}crate::navbar::nav_rows(Self::nav_css(inner) * inner.dpr, inner.glyphs.metrics.cell_size.height as f64)@@ -3675,11 +3904,50 @@ impl<P: Platform, L: Link> App<P, L> {Self::notify(&self.inner.borrow());self.request_frame();}+ "cursor-blink" => {+ // Read first: `set_blinking` borrows mutably.+ let on = self.inner.borrow().settings.cursor_blink;+ self.set_blinking(on);+ }+ "cursor-style" | "min-contrast" | "pane-bars" => {+ if key == "pane-bars" {+ // The rows the bars take changed: the grid is laid out again.+ self.inner.borrow_mut().cols = 0;+ self.resize();+ }+ self.request_frame();+ }_ => Self::notify(&self.inner.borrow()),}Ok(())}+ /// Blink the cursor: a half-second tick that hides it every other+ /// beat. Intervals cannot be cancelled, so the tick starts once and+ /// idles while blinking is off.+ fn set_blinking(self: &Rc<Self>, on: bool) {+ let mut inner = self.inner.borrow_mut();+ inner.blink_shown = true;+ if on && !inner.blink_ticking {+ inner.blink_ticking = true;+ let app = Rc::clone(self);+ inner.platform.set_interval(+ 530.0,+ Box::new(move || {+ let mut inner = app.inner.borrow_mut();+ if !inner.settings.cursor_blink || inner.panes.is_empty() {+ return;+ }+ inner.blink_shown = !inner.blink_shown;+ drop(inner);+ app.request_frame();+ }),+ );+ }+ drop(inner);+ self.request_frame();+ }+fn apply_language(&self, preference: &str) {let languages = self.inner.borrow().languages.clone();thinkterm_i18n::activate_preference(preference, &languages);@@ -4958,6 +5226,14 @@ impl<P: Platform, L: Link> App<P, L> {clip,hsv,draw_cursor: is_focused,+ cursor_shape: match inner.settings.cursor_style {+ crate::settings::CursorStyle::Auto => None,+ crate::settings::CursorStyle::Block => Some(termwiz::surface::CursorShape::SteadyBlock),+ crate::settings::CursorStyle::Bar => Some(termwiz::surface::CursorShape::SteadyBar),+ crate::settings::CursorStyle::Underline => Some(termwiz::surface::CursorShape::SteadyUnderline),+ },+ cursor_hidden: inner.settings.cursor_blink && !inner.blink_shown,+ min_contrast: inner.settings.min_contrast,};if px > 0.0 && (i == 0 || i == last) {// Only the two rows that hang over the content box arediff --git a/thinkterm-web/src/emit.rs b/thinkterm-web/src/emit.rsindex 9e9d1a1e..8dfa02af 100644--- a/thinkterm-web/src/emit.rs+++ b/thinkterm-web/src/emit.rs@@ -44,6 +44,13 @@ pub struct LineParams<'a> {pub hsv: Option<HsbTransform>,/// Only the focused pane shows its cursor.pub draw_cursor: bool,+ /// A shape the page prefers over the program's.+ pub cursor_shape: Option<CursorShape>,+ /// The blink's off phase: the cursor is not drawn this frame.+ pub cursor_hidden: bool,+ /// A WCAG contrast ratio text is lifted to against its background;+ /// under 1 is off.+ pub min_contrast: f32,}/// A flat rectangle at `at` of `size`, both in device pixels from the@@ -161,9 +168,12 @@ pub fn emit_line(} else {p.selection.start as f32 * cell_width..p.selection.end as f32 * cell_width};- let cursor_visible =- p.draw_cursor && cursor_on_row && p.cursor.visibility == CursorVisibility::Visible;- let filled_cursor = cursor_visible && p.focused && is_block(p.cursor.shape);+ let cursor_visible = p.draw_cursor+ && cursor_on_row+ && !p.cursor_hidden+ && p.cursor.visibility == CursorVisibility::Visible;+ let cursor_shape = p.cursor_shape.unwrap_or(p.cursor.shape);+ let filled_cursor = cursor_visible && p.focused && is_block(cursor_shape);let selection_fg = p.palette.selection_fg.to_linear();let selection_bg = p.palette.selection_bg.to_linear();@@ -211,6 +221,15 @@ pub fn emit_line(} else {(fg, bg, bg_is_default)};+ // The floor lifts dim text off its ground, as the desktop's+ // minimum contrast does; the ground of a default cell is the+ // palette's.+ let fg = if p.min_contrast > 1.0 {+ let ground = if bg_is_default { p.palette.background.to_linear() } else { bg };+ fg.ensure_contrast_ratio(&ground, p.min_contrast).unwrap_or(fg)+ } else {+ fg+ };let underline = if attrs.underline() != Underline::None|| attrs.strikethrough()|| attrs.overline()@@ -339,10 +358,10 @@ pub fn emit_line(if cursor_visible {let (shape, color) = if !p.focused {(CursorShape::SteadyBlock, cursor_border)- } else if is_block(p.cursor.shape) {+ } else if is_block(cursor_shape) {(CursorShape::Default, cursor_bg)} else {- (p.cursor.shape, cursor_bg)+ (cursor_shape, cursor_bg)};let layer = match shape {CursorShape::BlinkingBar | CursorShape::SteadyBar => 2,diff --git a/thinkterm-web/src/host.rs b/thinkterm-web/src/host.rsindex ff5831fd..e6ca23ce 100644--- a/thinkterm-web/src/host.rs+++ b/thinkterm-web/src/host.rs@@ -37,6 +37,8 @@ impl<P: Platform> Spawner for PlatformSpawner<P> {pub struct Events {dirty: RefCell<std::collections::HashSet<HostPaneId>>,wake: RefCell<Option<Rc<dyn Fn()>>>,+ /// A pane rang its bell; the platform decides what that sounds like.+ bell: RefCell<Option<Rc<dyn Fn(HostPaneId)>>>,}impl Events {@@ -44,6 +46,10 @@ impl Events {*self.wake.borrow_mut() = Some(wake);}+ pub fn set_bell(&self, bell: Rc<dyn Fn(HostPaneId)>) {+ *self.bell.borrow_mut() = Some(bell);+ }+pub fn take_dirty(&self) -> std::collections::HashSet<HostPaneId> {std::mem::take(&mut *self.dirty.borrow_mut())}@@ -60,7 +66,13 @@ impl SessionEvents for Events {fn pane_output(&self, pane: HostPaneId) {self.mark(pane);}- fn alert(&self, _pane: HostPaneId, _alert: wezterm_term::Alert) {}+ fn alert(&self, pane: HostPaneId, alert: wezterm_term::Alert) {+ if matches!(alert, wezterm_term::Alert::Bell) {+ if let Some(bell) = self.bell.borrow().clone() {+ bell(pane);+ }+ }+ }fn agent_status_changed(&self, _pane: HostPaneId) {}fn pane_removed(&self, pane: HostPaneId) {self.mark(pane);diff --git a/thinkterm-web/src/platform.rs b/thinkterm-web/src/platform.rsindex 3bf10f52..62523bd3 100644--- a/thinkterm-web/src/platform.rs+++ b/thinkterm-web/src/platform.rs@@ -123,6 +123,9 @@ pub trait Platform: 'static {fn focus_input(&self);/// The pointer's shape over the terminal (`text`, `col-resize`...).fn set_cursor(&self, cursor: &str);+ /// A pane rang its bell. Nothing, unless the platform has a sound+ /// or a buzz for it.+ fn bell(&self) {}/// Where the cursor cell is, in the viewport's units, so the IME's/// candidate window can sit by it.fn set_ime_anchor(&self, anchor: crate::ime::Anchor);diff --git a/thinkterm-web/src/settings.rs b/thinkterm-web/src/settings.rsindex 712bb283..a2f66969 100644--- a/thinkterm-web/src/settings.rs+++ b/thinkterm-web/src/settings.rs@@ -47,6 +47,19 @@ pub struct WebSettings {/// `"desktop"` follows the server's configured scheme; anything else/// names a scheme this browser picked.pub terminal_scheme: String,+ /// The cursor's shape, over what the program asked for.+ pub cursor_style: CursorStyle,+ /// Whether the cursor blinks (the page keeps it steady otherwise).+ pub cursor_blink: bool,+ /// A floor for text against its background, as a WCAG ratio; 0 is off.+ pub min_contrast: f32,+ /// Whether a divider drag reshapes the server's panes as it goes, or+ /// once, when the finger lifts.+ pub resize_mode: ResizeMode,+ /// Redial on a lost connection, or wait to be asked.+ pub auto_reconnect: bool,+ /// The bars over the panes; a phone can do without them.+ pub pane_bars: bool,}/// A colour scheme as the page hands it over, straight out of@@ -107,10 +120,32 @@ impl Default for WebSettings {sidebar_width: 220.0,scroll_mode: ScrollMode::Smooth,terminal_scheme: FOLLOW_DESKTOP.to_string(),+ cursor_style: CursorStyle::Auto,+ cursor_blink: false,+ min_contrast: 0.0,+ resize_mode: ResizeMode::Live,+ auto_reconnect: true,+ pane_bars: true,}}}+#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]+#[serde(rename_all = "kebab-case")]+pub enum CursorStyle {+ Auto,+ Block,+ Bar,+ Underline,+}++#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]+#[serde(rename_all = "kebab-case")]+pub enum ResizeMode {+ Live,+ Release,+}+#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]#[serde(rename_all = "kebab-case")]pub enum Theme {