Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27091ab5d1 | ||
|
|
6a6971e1cb | ||
|
|
edea4ce0d2 | ||
|
|
b431428260 |
@@ -5,6 +5,7 @@ import android.view.View;
|
|||||||
import android.webkit.WebView;
|
import android.webkit.WebView;
|
||||||
|
|
||||||
import androidx.activity.OnBackPressedCallback;
|
import androidx.activity.OnBackPressedCallback;
|
||||||
|
import androidx.core.graphics.Insets;
|
||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.core.view.WindowInsetsCompat;
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
@@ -25,13 +26,19 @@ public class MainActivity extends BridgeActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Edge-to-Edge: Bei offener Tastatur den WebView um die Tastaturhöhe verkleinern,
|
// Edge-to-Edge: Ränder für Status- und Navigationsleiste setzt diese Ansicht. Den Platz für die Tastatur
|
||||||
// damit Terminal und Zusatztasten sichtbar bleiben
|
// schafft Android/WebView selbst – hier nur melden, ob sie offen ist (sonst würde doppelt verkleinert).
|
||||||
View parent = (View) web.getParent();
|
View parent = (View) web.getParent();
|
||||||
|
parent.setBackgroundColor(0xFF14161D);
|
||||||
|
final boolean[] imeOpen = { false };
|
||||||
ViewCompat.setOnApplyWindowInsetsListener(parent, (v, insets) -> {
|
ViewCompat.setOnApplyWindowInsetsListener(parent, (v, insets) -> {
|
||||||
int ime = insets.getInsets(WindowInsetsCompat.Type.ime()).bottom;
|
Insets bars = insets.getInsets(WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout());
|
||||||
v.setPadding(0, 0, 0, ime);
|
boolean open = insets.isVisible(WindowInsetsCompat.Type.ime());
|
||||||
web.evaluateJavascript("window.mrtermIme && window.mrtermIme(" + (ime > 0) + ")", null);
|
v.setPadding(bars.left, bars.top, bars.right, open ? 0 : bars.bottom);
|
||||||
|
if (open != imeOpen[0]) {
|
||||||
|
imeOpen[0] = open;
|
||||||
|
web.evaluateJavascript("window.mrtermIme && window.mrtermIme(" + open + ")", null);
|
||||||
|
}
|
||||||
return insets;
|
return insets;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,8 +13,9 @@
|
|||||||
--orange: #ffb347;
|
--orange: #ffb347;
|
||||||
--radius: 14px;
|
--radius: 14px;
|
||||||
/* Capacitor setzt --safe-area-inset-* bei Edge-to-Edge; env() als Rückfall */
|
/* Capacitor setzt --safe-area-inset-* bei Edge-to-Edge; env() als Rückfall */
|
||||||
--top: max(env(safe-area-inset-top, 0px), var(--safe-area-inset-top, 0px));
|
/* Status-/Navigationsleiste und Tastatur rechnet MainActivity als Rand um den WebView heraus */
|
||||||
--bottom: max(env(safe-area-inset-bottom, 0px), var(--safe-area-inset-bottom, 0px));
|
--top: 0px;
|
||||||
|
--bottom: 0px;
|
||||||
color-scheme: dark;
|
color-scheme: dark;
|
||||||
}
|
}
|
||||||
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
|
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "mrterm",
|
"name": "mrterm",
|
||||||
"version": "0.11.2",
|
"version": "0.11.4",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "mrterm",
|
"name": "mrterm",
|
||||||
"version": "0.11.2",
|
"version": "0.11.4",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@xterm/addon-fit": "^0.11.0",
|
"@xterm/addon-fit": "^0.11.0",
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "mrterm",
|
"name": "mrterm",
|
||||||
"productName": "MrTerm",
|
"productName": "MrTerm",
|
||||||
"version": "0.11.2",
|
"version": "0.11.4",
|
||||||
"description": "Moderner SSH-, SFTP- und RDP-Client",
|
"description": "Moderner SSH-, SFTP- und RDP-Client",
|
||||||
"main": "src/main/main.js",
|
"main": "src/main/main.js",
|
||||||
"author": "MrBlake",
|
"author": "MrBlake",
|
||||||
|
|||||||
Reference in New Issue
Block a user