mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
#65 new: custom keyboard type
This commit is contained in:
@@ -606,6 +606,18 @@ abstract class S {
|
|||||||
/// **'Key Auth'**
|
/// **'Key Auth'**
|
||||||
String get keyAuth;
|
String get keyAuth;
|
||||||
|
|
||||||
|
/// No description provided for @keyboardCompatibility.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Possible to improve input method compatibility'**
|
||||||
|
String get keyboardCompatibility;
|
||||||
|
|
||||||
|
/// No description provided for @keyboardType.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Keyborad type'**
|
||||||
|
String get keyboardType;
|
||||||
|
|
||||||
/// No description provided for @language.
|
/// No description provided for @language.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
|
|||||||
@@ -279,6 +279,12 @@ class SDe extends S {
|
|||||||
@override
|
@override
|
||||||
String get keyAuth => 'Schlüsselauthentifzierung';
|
String get keyAuth => 'Schlüsselauthentifzierung';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get keyboardCompatibility => 'Possible to improve input method compatibility';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get keyboardType => 'Keyborad type';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get language => 'Sprache';
|
String get language => 'Sprache';
|
||||||
|
|
||||||
|
|||||||
@@ -279,6 +279,12 @@ class SEn extends S {
|
|||||||
@override
|
@override
|
||||||
String get keyAuth => 'Key Auth';
|
String get keyAuth => 'Key Auth';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get keyboardCompatibility => 'Possible to improve input method compatibility';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get keyboardType => 'Keyborad type';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get language => 'Language';
|
String get language => 'Language';
|
||||||
|
|
||||||
|
|||||||
@@ -279,6 +279,12 @@ class SZh extends S {
|
|||||||
@override
|
@override
|
||||||
String get keyAuth => '密钥认证';
|
String get keyAuth => '密钥认证';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get keyboardCompatibility => '可能会改善输入法兼容性';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get keyboardType => '键盘类型';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get language => '语言';
|
String get language => '语言';
|
||||||
|
|
||||||
@@ -901,6 +907,12 @@ class SZhTw extends SZh {
|
|||||||
@override
|
@override
|
||||||
String get keyAuth => '密鑰認證';
|
String get keyAuth => '密鑰認證';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get keyboardCompatibility => '可能會改善輸入法兼容性';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get keyboardType => '鍵盤類型';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get language => '語言';
|
String get language => '語言';
|
||||||
|
|
||||||
|
|||||||
@@ -360,7 +360,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 361;
|
CURRENT_PROJECT_VERSION = 362;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||||
@@ -368,7 +368,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.361;
|
MARKETING_VERSION = 1.0.362;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
@@ -491,7 +491,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 361;
|
CURRENT_PROJECT_VERSION = 362;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||||
@@ -499,7 +499,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.361;
|
MARKETING_VERSION = 1.0.362;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
@@ -516,7 +516,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 361;
|
CURRENT_PROJECT_VERSION = 362;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||||
@@ -524,7 +524,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.361;
|
MARKETING_VERSION = 1.0.362;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
class BuildData {
|
class BuildData {
|
||||||
static const String name = "ServerBox";
|
static const String name = "ServerBox";
|
||||||
static const int build = 361;
|
static const int build = 362;
|
||||||
static const String engine = "3.10.0";
|
static const String engine = "3.10.0";
|
||||||
static const String buildAt = "2023-06-21 18:31:01.595350";
|
static const String buildAt = "2023-06-23 16:49:18.940704";
|
||||||
static const int modifications = 2;
|
static const int modifications = 14;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:toolbox/core/persistant_store.dart';
|
import 'package:toolbox/core/persistant_store.dart';
|
||||||
import 'package:toolbox/core/utils/platform.dart';
|
import 'package:toolbox/core/utils/platform.dart';
|
||||||
|
|
||||||
@@ -72,4 +73,7 @@ class SettingStore extends PersistentStore {
|
|||||||
|
|
||||||
StoreProperty<bool> get fullScreenJitter =>
|
StoreProperty<bool> get fullScreenJitter =>
|
||||||
property('fullScreenJitter', defaultValue: true);
|
property('fullScreenJitter', defaultValue: true);
|
||||||
|
|
||||||
|
StoreProperty<int> get keyboardType =>
|
||||||
|
property('keyboardType', defaultValue: TextInputType.text.index);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,6 +85,8 @@
|
|||||||
"isBusy": "Is busy now",
|
"isBusy": "Is busy now",
|
||||||
"keepForeground": "Keep app foreground!",
|
"keepForeground": "Keep app foreground!",
|
||||||
"keyAuth": "Key Auth",
|
"keyAuth": "Key Auth",
|
||||||
|
"keyboardCompatibility": "Possible to improve input method compatibility",
|
||||||
|
"keyboardType": "Keyborad type",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"languageName": "English",
|
"languageName": "English",
|
||||||
"lastTry": "Last try",
|
"lastTry": "Last try",
|
||||||
|
|||||||
@@ -85,6 +85,8 @@
|
|||||||
"isBusy": "当前正忙",
|
"isBusy": "当前正忙",
|
||||||
"keepForeground": "请保持应用处于前台!",
|
"keepForeground": "请保持应用处于前台!",
|
||||||
"keyAuth": "密钥认证",
|
"keyAuth": "密钥认证",
|
||||||
|
"keyboardCompatibility": "可能会改善输入法兼容性",
|
||||||
|
"keyboardType": "键盘类型",
|
||||||
"language": "语言",
|
"language": "语言",
|
||||||
"languageName": "简体中文",
|
"languageName": "简体中文",
|
||||||
"lastTry": "最后尝试",
|
"lastTry": "最后尝试",
|
||||||
|
|||||||
@@ -82,6 +82,8 @@
|
|||||||
"isBusy": "當前正忙",
|
"isBusy": "當前正忙",
|
||||||
"keepForeground": "請保持應用處於前台!",
|
"keepForeground": "請保持應用處於前台!",
|
||||||
"keyAuth": "密鑰認證",
|
"keyAuth": "密鑰認證",
|
||||||
|
"keyboardCompatibility": "可能會改善輸入法兼容性",
|
||||||
|
"keyboardType": "鍵盤類型",
|
||||||
"language": "語言",
|
"language": "語言",
|
||||||
"languageName": "繁體中文",
|
"languageName": "繁體中文",
|
||||||
"lastTry": "最後嘗試",
|
"lastTry": "最後嘗試",
|
||||||
|
|||||||
@@ -292,12 +292,12 @@ class _HomePageState extends State<HomePage>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> afterFirstLayout(BuildContext context) async {
|
Future<void> afterFirstLayout(BuildContext context) async {
|
||||||
|
doUpdate(context);
|
||||||
await GetIt.I.allReady();
|
await GetIt.I.allReady();
|
||||||
await _serverProvider.loadLocalData();
|
await _serverProvider.loadLocalData();
|
||||||
await _serverProvider.refreshData();
|
await _serverProvider.refreshData();
|
||||||
await doUpdate(context);
|
|
||||||
if (!Analysis.enabled) {
|
if (!Analysis.enabled) {
|
||||||
await Analysis.init();
|
Analysis.init();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ class _ProcessPageState extends State<ProcessPage> {
|
|||||||
} else {
|
} else {
|
||||||
child = ListView.builder(
|
child = ListView.builder(
|
||||||
itemCount: _result.procs.length,
|
itemCount: _result.procs.length,
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 3, horizontal: 7),
|
||||||
itemBuilder: (ctx, idx) {
|
itemBuilder: (ctx, idx) {
|
||||||
final proc = _result.procs[idx];
|
final proc = _result.procs[idx];
|
||||||
return _buildListItem(proc);
|
return _buildListItem(proc);
|
||||||
|
|||||||
@@ -35,13 +35,13 @@ class SettingPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _SettingPageState extends State<SettingPage> {
|
class _SettingPageState extends State<SettingPage> {
|
||||||
final themeKey = GlobalKey<PopupMenuButtonState<int>>();
|
final _themeKey = GlobalKey<PopupMenuButtonState<int>>();
|
||||||
final startPageKey = GlobalKey<PopupMenuButtonState<int>>();
|
final _startPageKey = GlobalKey<PopupMenuButtonState<int>>();
|
||||||
final updateIntervalKey = GlobalKey<PopupMenuButtonState<int>>();
|
final _updateIntervalKey = GlobalKey<PopupMenuButtonState<int>>();
|
||||||
final maxRetryKey = GlobalKey<PopupMenuButtonState<int>>();
|
final _maxRetryKey = GlobalKey<PopupMenuButtonState<int>>();
|
||||||
final fontSizeKey = GlobalKey<PopupMenuButtonState<double>>();
|
final _localeKey = GlobalKey<PopupMenuButtonState<String>>();
|
||||||
final localeKey = GlobalKey<PopupMenuButtonState<String>>();
|
final _editorThemeKey = GlobalKey<PopupMenuButtonState<String>>();
|
||||||
final editorThemeKey = GlobalKey<PopupMenuButtonState<String>>();
|
final _keyboardTypeKey = GlobalKey<PopupMenuButtonState<int>>();
|
||||||
|
|
||||||
late final SettingStore _setting;
|
late final SettingStore _setting;
|
||||||
late final ServerProvider _serverProvider;
|
late final ServerProvider _serverProvider;
|
||||||
@@ -56,6 +56,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
final _fontSize = ValueNotifier(0.0);
|
final _fontSize = ValueNotifier(0.0);
|
||||||
final _localeCode = ValueNotifier('');
|
final _localeCode = ValueNotifier('');
|
||||||
final _editorTheme = ValueNotifier('');
|
final _editorTheme = ValueNotifier('');
|
||||||
|
final _keyboardType = ValueNotifier(0);
|
||||||
|
|
||||||
final _pushToken = ValueNotifier<String?>(null);
|
final _pushToken = ValueNotifier<String?>(null);
|
||||||
|
|
||||||
@@ -79,6 +80,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
_selectedColorValue.value = _setting.primaryColor.fetch()!;
|
_selectedColorValue.value = _setting.primaryColor.fetch()!;
|
||||||
_fontSize.value = _setting.termFontSize.fetch()!;
|
_fontSize.value = _setting.termFontSize.fetch()!;
|
||||||
_editorTheme.value = _setting.editorTheme.fetch()!;
|
_editorTheme.value = _setting.editorTheme.fetch()!;
|
||||||
|
_keyboardType.value = _setting.keyboardType.fetch()!;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -157,6 +159,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
_buildFont(),
|
_buildFont(),
|
||||||
_buildTermFontSize(),
|
_buildTermFontSize(),
|
||||||
_buildSSHVirtualKeyAutoOff(),
|
_buildSSHVirtualKeyAutoOff(),
|
||||||
|
_buildKeyboardType(),
|
||||||
].map((e) => RoundRectCard(e)).toList(),
|
].map((e) => RoundRectCard(e)).toList(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -212,12 +215,12 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
style: grey,
|
style: grey,
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
updateIntervalKey.currentState?.showButtonMenu();
|
_updateIntervalKey.currentState?.showButtonMenu();
|
||||||
},
|
},
|
||||||
trailing: ValueBuilder(
|
trailing: ValueBuilder(
|
||||||
listenable: _updateInterval,
|
listenable: _updateInterval,
|
||||||
build: () => PopupMenuButton(
|
build: () => PopupMenuButton(
|
||||||
key: updateIntervalKey,
|
key: _updateIntervalKey,
|
||||||
itemBuilder: (_) => items,
|
itemBuilder: (_) => items,
|
||||||
initialValue: _updateInterval.value,
|
initialValue: _updateInterval.value,
|
||||||
onSelected: (int val) {
|
onSelected: (int val) {
|
||||||
@@ -291,12 +294,12 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
_s.launchPage,
|
_s.launchPage,
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
startPageKey.currentState?.showButtonMenu();
|
_startPageKey.currentState?.showButtonMenu();
|
||||||
},
|
},
|
||||||
trailing: ValueBuilder(
|
trailing: ValueBuilder(
|
||||||
listenable: _launchPageIdx,
|
listenable: _launchPageIdx,
|
||||||
build: () => PopupMenuButton(
|
build: () => PopupMenuButton(
|
||||||
key: startPageKey,
|
key: _startPageKey,
|
||||||
itemBuilder: (BuildContext context) => items,
|
itemBuilder: (BuildContext context) => items,
|
||||||
initialValue: _launchPageIdx.value,
|
initialValue: _launchPageIdx.value,
|
||||||
onSelected: (int idx) {
|
onSelected: (int idx) {
|
||||||
@@ -335,11 +338,11 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
),
|
),
|
||||||
subtitle: Text(help, style: grey),
|
subtitle: Text(help, style: grey),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
maxRetryKey.currentState?.showButtonMenu();
|
_maxRetryKey.currentState?.showButtonMenu();
|
||||||
},
|
},
|
||||||
trailing: ValueBuilder(
|
trailing: ValueBuilder(
|
||||||
build: () => PopupMenuButton(
|
build: () => PopupMenuButton(
|
||||||
key: maxRetryKey,
|
key: _maxRetryKey,
|
||||||
itemBuilder: (BuildContext context) => items,
|
itemBuilder: (BuildContext context) => items,
|
||||||
initialValue: _maxRetryCount.value,
|
initialValue: _maxRetryCount.value,
|
||||||
onSelected: (int val) {
|
onSelected: (int val) {
|
||||||
@@ -374,12 +377,12 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
_s.themeMode,
|
_s.themeMode,
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
themeKey.currentState?.showButtonMenu();
|
_themeKey.currentState?.showButtonMenu();
|
||||||
},
|
},
|
||||||
trailing: ValueBuilder(
|
trailing: ValueBuilder(
|
||||||
listenable: _nightMode,
|
listenable: _nightMode,
|
||||||
build: () => PopupMenuButton(
|
build: () => PopupMenuButton(
|
||||||
key: themeKey,
|
key: _themeKey,
|
||||||
itemBuilder: (BuildContext context) => items,
|
itemBuilder: (BuildContext context) => items,
|
||||||
initialValue: _nightMode.value,
|
initialValue: _nightMode.value,
|
||||||
onSelected: (int idx) {
|
onSelected: (int idx) {
|
||||||
@@ -601,12 +604,12 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text(_s.language),
|
title: Text(_s.language),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
localeKey.currentState?.showButtonMenu();
|
_localeKey.currentState?.showButtonMenu();
|
||||||
},
|
},
|
||||||
trailing: ValueBuilder(
|
trailing: ValueBuilder(
|
||||||
listenable: _localeCode,
|
listenable: _localeCode,
|
||||||
build: () => PopupMenuButton(
|
build: () => PopupMenuButton(
|
||||||
key: localeKey,
|
key: _localeKey,
|
||||||
itemBuilder: (BuildContext context) => items,
|
itemBuilder: (BuildContext context) => items,
|
||||||
initialValue: _localeCode.value,
|
initialValue: _localeCode.value,
|
||||||
onSelected: (String idx) {
|
onSelected: (String idx) {
|
||||||
@@ -644,7 +647,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
trailing: ValueBuilder(
|
trailing: ValueBuilder(
|
||||||
listenable: _editorTheme,
|
listenable: _editorTheme,
|
||||||
build: () => PopupMenuButton(
|
build: () => PopupMenuButton(
|
||||||
key: editorThemeKey,
|
key: _editorThemeKey,
|
||||||
itemBuilder: (BuildContext context) => items,
|
itemBuilder: (BuildContext context) => items,
|
||||||
initialValue: _editorTheme.value,
|
initialValue: _editorTheme.value,
|
||||||
onSelected: (String idx) {
|
onSelected: (String idx) {
|
||||||
@@ -658,7 +661,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
editorThemeKey.currentState?.showButtonMenu();
|
_editorThemeKey.currentState?.showButtonMenu();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -681,4 +684,54 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
trailing: buildSwitch(context, _setting.fullScreenJitter),
|
trailing: buildSwitch(context, _setting.fullScreenJitter),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _buildKeyboardType() {
|
||||||
|
const List<String> names = <String>[
|
||||||
|
'text',
|
||||||
|
'multiline',
|
||||||
|
'number',
|
||||||
|
'phone',
|
||||||
|
'datetime',
|
||||||
|
'emailAddress',
|
||||||
|
'url',
|
||||||
|
'visiblePassword',
|
||||||
|
'name',
|
||||||
|
'address',
|
||||||
|
'none',
|
||||||
|
];
|
||||||
|
if (names.length != TextInputType.values.length) {
|
||||||
|
throw 'names.length != TextInputType.values.length';
|
||||||
|
}
|
||||||
|
final items = TextInputType.values.map(
|
||||||
|
(key) {
|
||||||
|
return PopupMenuItem<int>(
|
||||||
|
value: key.index,
|
||||||
|
child: Text(names[key.index]),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
).toList();
|
||||||
|
return ListTile(
|
||||||
|
title: Text(_s.keyboardType),
|
||||||
|
subtitle: Text(_s.keyboardCompatibility, style: grey),
|
||||||
|
trailing: ValueBuilder(
|
||||||
|
listenable: _keyboardType,
|
||||||
|
build: () => PopupMenuButton<int>(
|
||||||
|
key: _keyboardTypeKey,
|
||||||
|
itemBuilder: (BuildContext context) => items,
|
||||||
|
initialValue: _keyboardType.value,
|
||||||
|
onSelected: (idx) {
|
||||||
|
_keyboardType.value = idx;
|
||||||
|
_setting.keyboardType.put(idx);
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
names[_keyboardType.value],
|
||||||
|
style: textSize15,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
_keyboardTypeKey.currentState?.showButtonMenu();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ class _SSHPageState extends State<SSHPage> {
|
|||||||
late S _s;
|
late S _s;
|
||||||
late TerminalStyle _terminalStyle;
|
late TerminalStyle _terminalStyle;
|
||||||
late TerminalTheme _terminalTheme;
|
late TerminalTheme _terminalTheme;
|
||||||
|
late TextInputType _keyboardType;
|
||||||
|
|
||||||
var _isDark = false;
|
var _isDark = false;
|
||||||
|
|
||||||
@@ -60,6 +61,7 @@ class _SSHPageState extends State<SSHPage> {
|
|||||||
fontSize: _setting.termFontSize.fetch()!,
|
fontSize: _setting.termFontSize.fetch()!,
|
||||||
);
|
);
|
||||||
_terminalStyle = TerminalStyle.fromTextStyle(textStyle);
|
_terminalStyle = TerminalStyle.fromTextStyle(textStyle);
|
||||||
|
_keyboardType = TextInputType.values[_setting.keyboardType.fetch()!];
|
||||||
initTerminal();
|
initTerminal();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,8 +98,6 @@ class _SSHPageState extends State<SSHPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildBody() {
|
Widget _buildBody() {
|
||||||
final keyboardType =
|
|
||||||
isIOS ? TextInputType.emailAddress : TextInputType.visiblePassword;
|
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: _media.size.height -
|
height: _media.size.height -
|
||||||
_virtualKeyboardHeight -
|
_virtualKeyboardHeight -
|
||||||
@@ -106,7 +106,7 @@ class _SSHPageState extends State<SSHPage> {
|
|||||||
child: TerminalView(
|
child: TerminalView(
|
||||||
_terminal,
|
_terminal,
|
||||||
controller: _terminalController,
|
controller: _terminalController,
|
||||||
keyboardType: keyboardType,
|
keyboardType: _keyboardType,
|
||||||
textStyle: _terminalStyle,
|
textStyle: _terminalStyle,
|
||||||
theme: _terminalTheme,
|
theme: _terminalTheme,
|
||||||
deleteDetection: isIOS,
|
deleteDetection: isIOS,
|
||||||
|
|||||||
@@ -475,9 +475,9 @@
|
|||||||
baseConfigurationReference = C1C758C41C4E208965A68933 /* Pods-RunnerTests.debug.xcconfig */;
|
baseConfigurationReference = C1C758C41C4E208965A68933 /* Pods-RunnerTests.debug.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CURRENT_PROJECT_VERSION = 361;
|
CURRENT_PROJECT_VERSION = 362;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0.361;
|
MARKETING_VERSION = 1.0.362;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@@ -490,9 +490,9 @@
|
|||||||
baseConfigurationReference = 15AF97DF993E8968098D6EBE /* Pods-RunnerTests.release.xcconfig */;
|
baseConfigurationReference = 15AF97DF993E8968098D6EBE /* Pods-RunnerTests.release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CURRENT_PROJECT_VERSION = 361;
|
CURRENT_PROJECT_VERSION = 362;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0.361;
|
MARKETING_VERSION = 1.0.362;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@@ -505,9 +505,9 @@
|
|||||||
baseConfigurationReference = 7CFA7DE7FABA75685DFB6948 /* Pods-RunnerTests.profile.xcconfig */;
|
baseConfigurationReference = 7CFA7DE7FABA75685DFB6948 /* Pods-RunnerTests.profile.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CURRENT_PROJECT_VERSION = 361;
|
CURRENT_PROJECT_VERSION = 362;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0.361;
|
MARKETING_VERSION = 1.0.362;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
|||||||
Reference in New Issue
Block a user