Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions src/components/terminal/terminalManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ class TerminalManager {

let lastWidth = 0;
let lastHeight = 0;
const resizeObserver = new ResizeObserver((entries) => {
const handleResize = (entries) => {
const now = Date.now();
const entry = entries && entries[0];
const cr = entry?.contentRect;
Expand Down Expand Up @@ -706,15 +706,30 @@ class TerminalManager {
console.error(`Resize error for terminal ${terminalId}:`, error);
}
}, RESIZE_DEBOUNCE);
});
};

const resizeObserver =
typeof ResizeObserver === "function"
? new ResizeObserver(handleResize)
: null;
let resizeFallbackInterval = null;

// Wait for the terminal container to be available, then observe it
setTimeout(() => {
const containerElement = terminalFile.content;
if (containerElement && containerElement instanceof Element) {
resizeObserver.observe(containerElement);
// store observer so we can disconnect on close
terminalFile._resizeObserver = resizeObserver;
if (resizeObserver) {
resizeObserver.observe(containerElement);
// store observer so we can disconnect on close
terminalFile._resizeObserver = resizeObserver;
} else {
resizeFallbackInterval = setInterval(() => handleResize(), 500);
terminalFile._resizeObserver = {
disconnect() {
clearInterval(resizeFallbackInterval);
},
};
}
} else {
console.warn("Terminal container not available for ResizeObserver");
}
Expand Down
2 changes: 2 additions & 0 deletions src/lang/ar-ye.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "إعدادات التطبيق",
"disable in-app-browser caching": "تعطيل التخزين المؤقت للمتصفح الداخلي",
"copied to clipboard": "تم النسخ إلى الحافظة",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "تذكر الملفات المفتوحة",
"remember opened folders": "تذكر المجلدات المفتوحة",
"no suggestions": "بدون اقتراحات",
Expand Down Expand Up @@ -499,6 +500,7 @@
"info-developermode": "تمكين أدوات المطور (Eruda) لتصحيح الإضافات ومعاينة حالة التطبيق. سيتم تفعيل المستكشف عند بدء التشغيل.",
"developer mode enabled": "تم تفعيل وضع المطور. استخدم لوحة الأوامر لتبديل المستكشف (Ctrl+Shift+I).",
"developer mode disabled": "تم تعطيل وضع المطور",
"copy relative path": "Copy Relative Path",
"shortcut request sent": "Shortcut request opened. Tap Add to finish.",
"add to home screen": "Add to home screen",
"pin shortcuts not supported": "Home screen shortcuts are not supported on this device.",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/be-by.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@
"normal": "Звычайны",
"app settings": "Налады праграмы",
"disable in-app-browser caching": "Адключыць кэшаванне ў праграмным сродку агляду",
"Should use Current File For preview instead of default (index.html)": "Для папярэдняга прагляду варта выкарыстоўваць бягучы файл замест прадвызначанага (index.html)",
"copied to clipboard": "Скапіявана ў буфер абмену",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "Запамінаць адкрытыя файлы",
"remember opened folders": "Запамінаць адкрытыя каталогі",
"no suggestions": "Няма прапаноў",
Expand Down
1 change: 1 addition & 0 deletions src/lang/bn-bd.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "অ্যাপ সেটিংস",
"disable in-app-browser caching": "ইন-অ্যাপ ব্রাউজারের ক্যাশ বন্ধ করুন",
"copied to clipboard": "ক্লিপবোর্ডে কপি করা হয়েছে",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "খোলা ফাইলগুলো মনে রাখুন",
"remember opened folders": "খোলা ফোল্ডারগুলো মনে রাখুন",
"no suggestions": "কোনো পরামর্শ নেই",
Expand Down
1 change: 1 addition & 0 deletions src/lang/cs-cz.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "Nastavení aplikace",
"disable in-app-browser caching": "Zakázat ukládání do mezipaměti v prohlížeči aplikace",
"copied to clipboard": "Zkopírováno do schránky",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "Zapamatovat si otevřené soubory",
"remember opened folders": "Zapamatovat si otevřené složky",
"no suggestions": "Žádné návrhy",
Expand Down
1 change: 1 addition & 0 deletions src/lang/de-de.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "App-Einstellungen",
"disable in-app-browser caching": "In-App-Browser-Cache abschalten",
"copied to clipboard": "In die Zwischenablage kopiert",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "Geöffnete Dateien merken",
"remember opened folders": "Geöffnete Ordner merken",
"no suggestions": "Keine Vorschläge",
Expand Down
1 change: 1 addition & 0 deletions src/lang/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@
"app settings": "App settings",
"disable in-app-browser caching": "Disable in-app-browser caching",
"copied to clipboard": "Copied to clipboard",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "Remember opened files",
"remember opened folders": "Remember opened folders",
"no suggestions": "No suggestions",
Expand Down
1 change: 1 addition & 0 deletions src/lang/es-sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "Ajustes de aplicacion",
"disable in-app-browser caching": "Desactivar el almacenamiento en caché de la aplicación en el navegador",
"copied to clipboard": "Copiado al portapapeles",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "Recordar archivos abiertos",
"remember opened folders": "Recordar carpetas abiertas",
"no suggestions": "No hay sugerencias",
Expand Down
1 change: 1 addition & 0 deletions src/lang/fr-fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "Paramètres de l'application",
"disable in-app-browser caching": "Désactiver la mise en cache dans le navigateur de l'application",
"copied to clipboard": "Copié dans le presse-papiers",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "Mémoriser les fichiers ouverts",
"remember opened folders": "Mémoriser les dossiers ouverts",
"no suggestions": "Aucune suggestion",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/he-il.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@
"normal": "רגיל",
"app settings": "הגדרות האפליקציה",
"disable in-app-browser caching": "השבתת אחסון במטמון בדפדפן בתוך האפליקציה",
"Should use Current File For preview instead of default (index.html)": "יש להשתמש בקובץ הנוכחי לתצוגה מקדימה במקום ברירת המחדל (index.html)",
"copied to clipboard": "הועתק",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "זכור קבצים שנפתחו",
"remember opened folders": "זכור תקיות שנפתחו",
"no suggestions": "אין הצעות",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/hi-in.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"paste": "पेस्ट",
"preview mode": "पूर्वावलोकन मोड",
"read only file": "यह फाइल सेव नहीं की सकती, किर्प्या इसे 'सेव एज' से सेव करे",
"redo": "रीडू",
"replace": "इससे बदलें",
"reload": "रिलोड",
"rename": "नाम बदलने",
Expand Down Expand Up @@ -210,6 +209,7 @@
"app settings": "एप्लिकेशन सेटिंग",
"disable in-app-browser caching": "इन-ऐप-ब्राउज़र कैशिंग बंद करें",
"copied to clipboard": "क्लिपबोर्ड पर कॉपी किया गया",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "खोली गई फ़ाइलें याद रखें",
"remember opened folders": "खोले गए फोल्डर याद रखें",
"no suggestions": "कोई सुझाव नहीं",
Expand Down
1 change: 1 addition & 0 deletions src/lang/hu-hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "Alkalmazás-beállítások",
"disable in-app-browser caching": "Az alkalmazáson belüli böngésző gyorsítótárazásának letiltása",
"copied to clipboard": "Vágólapra másolva",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "Megnyitott fájlok megjegyzése",
"remember opened folders": "Megnyitott mappák megjegyzése",
"no suggestions": "Javaslatok nélkül",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/id-id.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@
"normal": "Normal",
"app settings": "Pengaturan Aplikasi",
"disable in-app-browser caching": "Nonaktifkan caching peramban-dalam-aplikasi",
"Should use Current File For preview instead of default (index.html)": "Harus menggunakan berkas saat ini untuk pratinjau alih-alih default (index.html)",
"copied to clipboard": "Disalin ke clipboard",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "Ingat berkas yang dibuka",
"remember opened folders": "Ingat folder yang dibuka",
"no suggestions": "Tidak ada saran",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/ir-fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"paste": "چسباندن",
"preview mode": "حالت پیش نمایش",
"read only file": "نمیتوانم فایل های فقط خواندنی(read only) را ویرایش کنم. گزینه (ذخیره به عنوان) را امتحان کنید.",
"redo defination": "پسرو",
"reload": "بارگذاری مجدد",
"rename": "تغییرنام",
"replace": "جایگذاری",
Expand Down Expand Up @@ -210,6 +209,7 @@
"app settings": "App settings",
"disable in-app-browser caching": "Disable in-app-browser caching",
"copied to clipboard": "Copied to clipboard",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "Remember opened files",
"remember opened folders": "Remember opened folders",
"no suggestions": "No suggestions",
Expand Down
1 change: 1 addition & 0 deletions src/lang/it-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "App settings",
"disable in-app-browser caching": "Disable in-app-browser caching",
"copied to clipboard": "Copied to clipboard",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "Remember opened files",
"remember opened folders": "Remember opened folders",
"no suggestions": "No suggestions",
Expand Down
1 change: 1 addition & 0 deletions src/lang/ja-jp.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "アプリ設定",
"disable in-app-browser caching": "アプリ内ブラウザのキャッシュを無効",
"copied to clipboard": "クリップボードにコピーしました",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "開いたファイルを記憶する",
"remember opened folders": "開いたフォルダを記憶する",
"no suggestions": "候補を表示しない",
Expand Down
1 change: 1 addition & 0 deletions src/lang/ko-kr.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "App settings",
"disable in-app-browser caching": "Disable in-app-browser caching",
"copied to clipboard": "Copied to clipboard",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "Remember opened files",
"remember opened folders": "Remember opened folders",
"no suggestions": "No suggestions",
Expand Down
1 change: 1 addition & 0 deletions src/lang/ml-in.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "ആപ്പ് സെറ്റിംഗ്സ്",
"disable in-app-browser caching": "ഇൻ-ആപ്പ്-ബ്രൗസർ കാഷിംഗ് പ്രവർത്തനരഹിതമാക്കുക",
"copied to clipboard": "ക്ലിപ്പ് ബോർഡിൽ കോപ്പി ചെയ്തു ",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "ഓപ്പൺഡ് ഫയൽസ് റിമെംബേർ ചെയുക",
"remember opened folders": "ഓപ്പൺഡ് ഫോൾഡർ റിമെംബേർ ചെയുക",
"no suggestions": "നോ സഗ്ഗെസ്ഷൻ ",
Expand Down
1 change: 1 addition & 0 deletions src/lang/mm-unicode.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "App settings",
"disable in-app-browser caching": "Disable in-app-browser caching",
"copied to clipboard": "Copied to clipboard",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "Remember opened files",
"remember opened folders": "Remember opened folders",
"no suggestions": "No suggestions",
Expand Down
1 change: 1 addition & 0 deletions src/lang/mm-zawgyi.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "App settings",
"disable in-app-browser caching": "Disable in-app-browser caching",
"copied to clipboard": "Copied to clipboard",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "Remember opened files",
"remember opened folders": "Remember opened folders",
"no suggestions": "No suggestions",
Expand Down
1 change: 1 addition & 0 deletions src/lang/pl-pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "Ustawienia aplikacji",
"disable in-app-browser caching": "Wyłącz cache w wbudowanej przeglądarce",
"copied to clipboard": "Skopiowano do schowka",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "Zapamiętaj otwarte pliki",
"remember opened folders": "Zapamiętaj otwarte foldery",
"no suggestions": "Bez sugestii",
Expand Down
1 change: 1 addition & 0 deletions src/lang/pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "Configurações do aplicativo",
"disable in-app-browser caching": "Desativar o cache do navegador no aplicativo",
"copied to clipboard": "Copiado para a área de transferência",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "Manter arquivos abertos",
"remember opened folders": "Manter pastas abertas",
"no suggestions": "Nenhuma sugestão",
Expand Down
1 change: 1 addition & 0 deletions src/lang/pu-in.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "ਐਪ ਸੈਟਿੰਗਾਂ",
"disable in-app-browser caching": "ਇਨ-ਐਪ-ਬ੍ਰਾਊਜ਼ਰ ਕੈਚਿੰਗ ਨੂੰ ਅਸਮਰੱਥ ਬਣਾਓ",
"copied to clipboard": "ਕਲਿੱਪਬੋਰਡ 'ਤੇ ਕਾਪੀ ਕੀਤਾ ਗਿਆ",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "ਖੋਲ੍ਹੀਆਂ ਫਾਈਲਾਂ ਨੂੰ ਯਾਦ ਰੱਖੋ",
"remember opened folders": "ਖੋਲ੍ਹੇ ਫੋਲਡਰਾਂ ਨੂੰ ਯਾਦ ਰੱਖੋ",
"no suggestions": "ਕੋਈ ਸੁਝਾਅ ਨਹੀਂ",
Expand Down
1 change: 1 addition & 0 deletions src/lang/ru-ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "Настройки приложения",
"disable in-app-browser caching": "Отключить кэширование во встроенном браузере",
"copied to clipboard": "Скопировано в буфер обмена",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "Запоминать открытые файлы",
"remember opened folders": "Запоминать открытые папки",
"no suggestions": "Откл. подсказок",
Expand Down
1 change: 1 addition & 0 deletions src/lang/tl-ph.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "Mga settings sa app",
"disable in-app-browser caching": "I-disable ang in-app-browser caching",
"copied to clipboard": "Kinopya sa clipboard",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "Tandaan ang mga nabuksan na file",
"remember opened folders": "Tandaan ang mga nabuksan na folder",
"no suggestions": "Walang suggestions",
Expand Down
1 change: 1 addition & 0 deletions src/lang/tr-tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "App settings",
"disable in-app-browser caching": "Disable in-app-browser caching",
"copied to clipboard": "Copied to clipboard",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "Remember opened files",
"remember opened folders": "Remember opened folders",
"no suggestions": "No suggestions",
Expand Down
1 change: 1 addition & 0 deletions src/lang/uk-ua.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "Налаштування програми",
"disable in-app-browser caching": "Вимкнути кешування в оглядачі програми",
"copied to clipboard": "Скопійовано до буфера обміну",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "Памʼятати відкриті файли",
"remember opened folders": "Памʼятати відкриті теки",
"no suggestions": "Без пропозицій",
Expand Down
1 change: 1 addition & 0 deletions src/lang/uz-uz.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "App settings",
"disable in-app-browser caching": "Disable in-app-browser caching",
"copied to clipboard": "Copied to clipboard",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "Remember opened files",
"remember opened folders": "Remember opened folders",
"no suggestions": "No suggestions",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/vi-vn.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@
"normal": "Bình thường",
"app settings": "Cài đặt ứng dụng",
"disable in-app-browser caching": "Tắt bộ nhớ đệm trong trình duyệt ứng dụng",
"Should use Current File For preview instead of default (index.html)": "Nên sử dụng Tệp hiện tại để xem trước thay vì mặc định (index.html)",
"copied to clipboard": "Đã sao chép vào bảng nhớ tạm",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "Ghi nhớ các tệp đã mở",
"remember opened folders": "Ghi nhớ các thư mục đã mở",
"no suggestions": "Không có gợi ý",
Expand Down
1 change: 1 addition & 0 deletions src/lang/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "应用设置",
"disable in-app-browser caching": "关闭内置浏览器缓存",
"copied to clipboard": "复制到剪贴板",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "记住打开过的文件",
"remember opened folders": "记住打开过的文件夹",
"no suggestions": "不显示建议",
Expand Down
1 change: 1 addition & 0 deletions src/lang/zh-hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "應用設置",
"disable in-app-browser caching": "關閉內置瀏覽器緩存",
"copied to clipboard": "復製到剪貼板",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "記住打開過的文件",
"remember opened folders": "記住打開過的文件夾",
"no suggestions": "不顯示建議",
Expand Down
1 change: 1 addition & 0 deletions src/lang/zh-tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"app settings": "應用程式設定",
"disable in-app-browser caching": "關閉內建瀏覽器快取",
"copied to clipboard": "已複製到剪貼簿",
"clipboard not available": "Clipboard is not available.",
"remember opened files": "記住開啟過的檔案",
"remember opened folders": "記住開啟過的資料夾",
"no suggestions": "不顯示建議",
Expand Down
8 changes: 7 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,17 @@ async function setDebugInfo() {
// Extract Chrome/WebView version
const chromeMatch = userAgent.match(/Chrome\/([0-9.]+)/);
const webviewVersion = chromeMatch ? chromeMatch[1] : "Unknown";
const webviewMajor = Number.parseInt(webviewVersion, 10);
const minWebviewMajor = window.__ACODE_MIN_WEBVIEW_MAJOR__ || 84;
const webviewStatus =
Number.isFinite(webviewMajor) && webviewMajor < minWebviewMajor
? ` (minimum supported: ${minWebviewMajor})`
: "";

const info = [
`App: v${version} (${versionCode})`,
`Android: ${androidVersion}`,
`WebView: ${webviewVersion}`,
`WebView: ${webviewVersion}${webviewStatus}`,
`Language: ${language}`,
].join("\n");

Expand Down
13 changes: 12 additions & 1 deletion src/pages/fileBrowser/fileBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,18 @@ function FileBrowserInclude(mode, info, doesOpenLast = true) {
break;

case "copyuri":
navigator.clipboard.writeText(url);
if (typeof cordova !== "undefined" && cordova?.plugins?.clipboard) {
cordova.plugins.clipboard.copy(url);
} else if (navigator.clipboard?.writeText) {
await navigator.clipboard.writeText(url);
} else {
alert(
strings.error,
strings["clipboard not available"] ||
"Clipboard is not available.",
);
break;
}
alert(strings.success, strings["copied to clipboard"]);
Comment thread
bajrangCoder marked this conversation as resolved.
break;

Expand Down
12 changes: 12 additions & 0 deletions src/utils/polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ export default function loadPolyFill() {
};
}

if (!window.queueMicrotask) {
window.queueMicrotask = function (callback) {
Promise.resolve()
.then(callback)
.catch((error) =>
setTimeout(() => {
throw error;
}),
);
};
}

if (!HTMLElement.prototype.getParent) {
HTMLElement.prototype.getParent = function (queryString) {
const $$ = [...document.querySelectorAll(queryString)];
Expand Down
Loading