Skip to content

Commit 2ee045f

Browse files
committed
[ver1.2.0] ohos icon fix
1 parent 51f6a19 commit 2ee045f

File tree

33 files changed

+40
-12
lines changed

33 files changed

+40
-12
lines changed

android/app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
2323

2424
def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
2525
if (flutterVersionCode == null) {
26-
flutterVersionCode = "182"
26+
flutterVersionCode = "188"
2727
}
2828

29-
def flutterVersionName = "1.2.0Beta1"
29+
def flutterVersionName = "1.2.0"
3030
//def flutterVersionName = localProperties.getProperty("flutter.versionName")
3131
//if (flutterVersionName == null) {
3232
// flutterVersionName = "1.0Beta3"
@@ -65,8 +65,8 @@ android {
6565
versionName = flutterVersionName
6666
ndk {
6767
//noinspection ChromeOsAbiSupport
68-
//abiFilters 'armeabi-v7a', 'armeabi', 'arm64-v8a'
69-
abiFilters 'arm64-v8a'
68+
abiFilters 'armeabi-v7a', 'armeabi'
69+
//abiFilters 'arm64-v8a'
7070
}
7171
}
7272

lib/help_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ ConnSSH 版本 1.2.0
7272
• 重新制作了设置页面和帮助页面
7373
• 新增了全局主题功能,支持调整主题色
7474
• 增加了生成并上传密钥对(RSA、ECDSA)功能
75-
• 支持了终端字体、类型、主题的全局设置,新增终端浅色主题,快捷栏支持收起(todo)
75+
• 支持了终端字体、类型、主题的全局设置,新增终端浅色主题,快捷栏支持收起
7676
• SFTP新增内建文本编辑器,支持代码高亮等功能
7777
• 初步支持了telnet(Beta)
7878

lib/terminal_page.dart

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class _TerminalPageState extends State<TerminalPage> {
5656
bool _ismobile = defaultTargetPlatform == TargetPlatform.android ||
5757
defaultTargetPlatform == TargetPlatform.ohos ||
5858
defaultTargetPlatform == TargetPlatform.iOS;
59+
bool _showToolbar = false; // 添加:快捷栏显示状态
5960

6061
// 主题选择
6162
bool _isThemeSelectorVisible = false;
@@ -82,6 +83,8 @@ class _TerminalPageState extends State<TerminalPage> {
8283
@override
8384
void initState() {
8485
super.initState();
86+
// 初始化快捷栏显示状态,默认与设备类型一致
87+
_showToolbar = _ismobile;
8588

8689
_statuses[0] = '连接中...';
8790
_isConnectings[0] = true;
@@ -358,6 +361,11 @@ class _TerminalPageState extends State<TerminalPage> {
358361
const PopupMenuItem<String>(value: 'clear', child: Text('清屏')),
359362
const PopupMenuItem<String>(value: 'fontsize', child: Text('字体大小')),
360363
const PopupMenuItem<String>(value: 'theme', child: Text('主题')),
364+
// 添加快捷栏切换菜单项
365+
PopupMenuItem<String>(
366+
value: 'toggle_toolbar',
367+
child: Text(_showToolbar ? '收起快捷栏' : '展示快捷栏'),
368+
),
361369
const PopupMenuItem<String>(value: 'disconnect', child: Text('断开连接并返回')),
362370
];
363371
}
@@ -379,12 +387,24 @@ class _TerminalPageState extends State<TerminalPage> {
379387
case 'theme':
380388
_showThemeSelector();
381389
break;
390+
case 'toggle_toolbar': // 添加快捷栏切换处理
391+
_toggleToolbar();
392+
break;
382393
case 'disconnect':
383394
Navigator.of(context).pop();
384395
break;
385396
}
386397
}
387398

399+
// 添加快捷栏切换方法
400+
void _toggleToolbar() {
401+
setState(() {
402+
_showToolbar = !_showToolbar;
403+
});
404+
// 切换后恢复焦点到终端
405+
if (_isConnected) _terminalFocusNode.requestFocus();
406+
}
407+
388408
void _showThemeSelector() {
389409
if (_isThemeSelectorVisible) return;
390410
setState(() => _isThemeSelectorVisible = true);
@@ -863,7 +883,7 @@ class _TerminalPageState extends State<TerminalPage> {
863883
textStyle:
864884
TerminalStyle(fontSize: _fontSize, fontFamily: 'maple'),
865885
theme: _currentTheme,
866-
showToolbar: _ismobile,
886+
showToolbar: _showToolbar, // 修改为使用 _showToolbar 变量
867887
readOnly: _shouldBeReadOnly,
868888
)
869889
: const Center(

ohos/AppScope/app.json5

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"app": {
33
"bundleName": "com.samuioto.connecter",
44
"vendor": "samuioto",
5-
"versionCode": 179,
6-
"versionName": "1.1.0",
7-
"icon": "$media:app_icon",
5+
"versionCode": 188,
6+
"versionName": "1.2.0",
7+
"icon": "$media:app_layered_image",
88
"label": "$string:app_name"
99
}
1010
}
-3.4 KB
Binary file not shown.
-2.18 KB
Binary file not shown.
-1.43 KB
Binary file not shown.
-5.05 KB
Binary file not shown.
-8.46 KB
Binary file not shown.
-13 KB
Binary file not shown.

0 commit comments

Comments
 (0)