Skip to content

Commit b0e7fda

Browse files
feat: terminal fail safe (#2144)
1 parent e0eafd0 commit b0e7fda

37 files changed

Lines changed: 186 additions & 46 deletions

src/components/terminal/terminal.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,25 @@ export default class TerminalComponent {
598598

599599
// Start AXS if not running
600600
if (!(await Terminal.isAxsRunning())) {
601-
await Terminal.startAxs(false, () => {}, console.error);
601+
const values = appSettings.value;
602+
// Initialize terminal settings with defaults if not present
603+
if (!values.terminalSettings) {
604+
values.terminalSettings = {
605+
...DEFAULT_TERMINAL_SETTINGS,
606+
fontFamily:
607+
DEFAULT_TERMINAL_SETTINGS.fontFamily ||
608+
appSettings.value.fontFamily,
609+
};
610+
}
611+
612+
const terminalValues = values.terminalSettings;
613+
614+
await Terminal.startAxs(
615+
false,
616+
() => {},
617+
console.error,
618+
terminalValues.failsafeMode,
619+
);
602620

603621
// Check if AXS started with interval polling
604622
const maxRetries = 10;

src/components/terminal/terminalDefaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const DEFAULT_TERMINAL_SETTINGS = {
1515
imageSupport: false,
1616
fontLigatures: false,
1717
confirmTabClose: true,
18+
failsafeMode: false,
1819
// Touch selection settings
1920
touchSelectionTapHoldDuration: 600,
2021
touchSelectionMoveThreshold: 8,

src/lang/ar-ye.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,5 +738,7 @@
738738
"iap-pro-purchase-warning": "لن تتم مزامنة عملية الشراء هذه مع حساب Acode الخاص بك. استخدم نفس حساب Google في متجر Play لاستعادة عملية الشراء.",
739739
"confirm-login": "لم تقم بتسجيل الدخول إلى Acode، هل تريد تسجيل الدخول الآن؟",
740740
"local word completion": "Local word completion",
741-
"settings-info-editor-local-word-completion": "Suggest words from the current file."
741+
"settings-info-editor-local-word-completion": "Suggest words from the current file.",
742+
"terminal:failsafe": "FailSafe mode",
743+
"terminal:failsafe-info": "Start terminal with system shell"
742744
}

src/lang/be-by.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,5 +738,7 @@
738738
"iap-pro-purchase-warning": "Гэтая пакупка не будзе сінхранізавана з вашым уліковым запісам Acode. Выкарыстоўвайце той жа ўліковы запіс Google у Play Store для аднаўлення пакупкі.",
739739
"confirm-login": "Вы не ўвайшлі ў Acode, увайсці зараз?",
740740
"local word completion": "Local word completion",
741-
"settings-info-editor-local-word-completion": "Suggest words from the current file."
741+
"settings-info-editor-local-word-completion": "Suggest words from the current file.",
742+
"terminal:failsafe": "FailSafe mode",
743+
"terminal:failsafe-info": "Start terminal with system shell"
742744
}

src/lang/bn-bd.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,5 +738,7 @@
738738
"iap-pro-purchase-warning": "এই ক্রয়টি আপনার Acode অ্যাকাউন্টের সাথে সিঙ্ক হবে না। আপনার ক্রয় পুনরুদ্ধার করতে প্লে স্টোরে একই Google অ্যাকাউন্ট ব্যবহার করুন।",
739739
"confirm-login": "আপনি Acode-এ সাইন ইন করেননি, এখন সাইন ইন করবেন?",
740740
"local word completion": "Local word completion",
741-
"settings-info-editor-local-word-completion": "Suggest words from the current file."
741+
"settings-info-editor-local-word-completion": "Suggest words from the current file.",
742+
"terminal:failsafe": "FailSafe mode",
743+
"terminal:failsafe-info": "Start terminal with system shell"
742744
}

src/lang/cs-cz.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,5 +738,7 @@
738738
"iap-pro-purchase-warning": "Tento nákup nebude synchronizován s vaším účtem Acode. Pro obnovení nákupu použijte stejný účet Google v Obchodě Play.",
739739
"confirm-login": "Nejste přihlášeni do Acode, přihlásit se nyní?",
740740
"local word completion": "Local word completion",
741-
"settings-info-editor-local-word-completion": "Suggest words from the current file."
741+
"settings-info-editor-local-word-completion": "Suggest words from the current file.",
742+
"terminal:failsafe": "FailSafe mode",
743+
"terminal:failsafe-info": "Start terminal with system shell"
742744
}

src/lang/de-de.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,5 +738,7 @@
738738
"iap-pro-purchase-warning": "Dieser Kauf wird nicht mit Ihrem Acode-Konto synchronisiert. Verwenden Sie dasselbe Google-Konto im Play Store, um Ihren Kauf wiederherzustellen.",
739739
"confirm-login": "Sie sind nicht bei Acode angemeldet, jetzt anmelden?",
740740
"local word completion": "Local word completion",
741-
"settings-info-editor-local-word-completion": "Suggest words from the current file."
741+
"settings-info-editor-local-word-completion": "Suggest words from the current file.",
742+
"terminal:failsafe": "FailSafe mode",
743+
"terminal:failsafe-info": "Start terminal with system shell"
742744
}

src/lang/en-us.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,5 +738,7 @@
738738
"login-to-view": "Please login to view this...",
739739
"iap-plugin-purchase-warning": "Purchased plugin are not synced to your Acode account. Use same Google account in play store to restore your purchase.",
740740
"iap-pro-purchase-warning": "This purchase will not be synced to your Acode account. Use same Google account in play store to restore your purchase.",
741-
"confirm-login": "You are not singed in to Acode, sign in now?"
741+
"confirm-login": "You are not singed in to Acode, sign in now?",
742+
"terminal:failsafe": "FailSafe mode",
743+
"terminal:failsafe-info": "Start terminal with system shell"
742744
}

src/lang/es-sv.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,5 +738,7 @@
738738
"iap-pro-purchase-warning": "Esta compra no se sincronizará con tu cuenta de Acode. Usa la misma cuenta de Google en Play Store para restaurar tu compra.",
739739
"confirm-login": "No has iniciado sesión en Acode, ¿iniciar sesión ahora?",
740740
"local word completion": "Local word completion",
741-
"settings-info-editor-local-word-completion": "Suggest words from the current file."
741+
"settings-info-editor-local-word-completion": "Suggest words from the current file.",
742+
"terminal:failsafe": "FailSafe mode",
743+
"terminal:failsafe-info": "Start terminal with system shell"
742744
}

src/lang/fr-fr.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,5 +738,7 @@
738738
"iap-pro-purchase-warning": "Cet achat ne sera pas synchronisé avec votre compte Acode. Utilisez le même compte Google dans le Play Store pour restaurer votre achat.",
739739
"confirm-login": "Vous n'êtes pas connecté à Acode, vous connecter maintenant ?",
740740
"local word completion": "Local word completion",
741-
"settings-info-editor-local-word-completion": "Suggest words from the current file."
741+
"settings-info-editor-local-word-completion": "Suggest words from the current file.",
742+
"terminal:failsafe": "FailSafe mode",
743+
"terminal:failsafe-info": "Start terminal with system shell"
742744
}

0 commit comments

Comments
 (0)