1. fix cm window size onToggle Chat.

2. no need to show remote info in cm chat_page.
3. hide Chat IconButton when client unauthorized
4. update lang
This commit is contained in:
csf 2022-09-26 18:10:54 +08:00
parent 536f25f33c
commit 52c6e309ce
25 changed files with 42 additions and 17 deletions

View File

@ -310,14 +310,15 @@ class _CmHeaderState extends State<_CmHeader>
],
),
),
Offstage(
offstage: client.isFileTransfer,
Consumer<ServerModel>(
builder: (_, model, child) => Offstage(
offstage: !client.authorized || client.isFileTransfer,
child: IconButton(
onPressed: () => checkClickTime(
client.id, () => gFFI.chatModel.toggleCMChatPage(client.id)),
onPressed: () => checkClickTime(client.id,
() => gFFI.chatModel.toggleCMChatPage(client.id)),
icon: Icon(Icons.message_outlined),
),
)
))
],
);
}

View File

@ -62,6 +62,7 @@ class ChatPage extends StatelessWidget implements PageShape {
inputOptions: InputOptions(
sendOnEnter: true,
inputDecoration: defaultInputDecoration(
hintText: "${translate('Write a message')}...",
fillColor: Theme.of(context).backgroundColor),
sendButtonBuilder: defaultSendButton(
color: Theme.of(context)
@ -87,6 +88,7 @@ class ChatPage extends StatelessWidget implements PageShape {
)),
);
}),
desktopType == DesktopType.cm ||
chatModel.currentID == ChatModel.clientModeID
? SizedBox.shrink()
: Padding(

View File

@ -166,12 +166,12 @@ class ChatModel with ChangeNotifier {
if (_isShowChatPage) {
_isShowChatPage = !_isShowChatPage;
notifyListeners();
await windowManager.setSize(Size(400, 600));
await windowManager.setSize(Size(300, 400));
await windowManager.setAlignment(Alignment.topRight);
} else {
await windowManager.setSize(Size(800, 600));
await windowManager.center();
await windowManager.setSize(Size(600, 400));
await Future.delayed(Duration(milliseconds: 100));
await windowManager.setAlignment(Alignment.topRight);
_isShowChatPage = !_isShowChatPage;
notifyListeners();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "取消固定菜单栏"),
("Enable LAN Discovery", "允许局域网发现"),
("Deny LAN Discovery", "拒绝局域网发现"),
("Write a message", "输入聊天消息"),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Odepnout panel nabídek"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Frigør menulinjen"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Menüleiste lösen"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Malfiksi menubreton"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Desbloquear barra de menú"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Détacher la barre de menu"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Menüsor rögzítésének feloldása"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Unpin menubar"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Sblocca la barra dei menu"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "メニューバーのピン留めを外す"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "메뉴 모음 고정 해제"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Мәзір жолағын босату"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Odepnij pasek menu"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Desenganxa la barra de menús"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", ""),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Открепить строку меню"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Uvoľniť panel s ponukami"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", ""),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Menü çubuğunun sabitlemesini kaldır"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -327,14 +327,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Account", "賬戶"),
("Theme", "主題"),
("Dark Theme", "暗黑主題"),
("Dark", ""),
("Light", ""),
("Follow System", ""),
("Dark", "黑暗"),
("Light", "明亮"),
("Follow System", "跟隨系統"),
("Enable hardware codec", "使用硬件編解碼"),
("Unlock Security Settings", "解鎖安全設置"),
("Enable Audio", "允許傳輸音頻"),
("Temporary Password Length", "临时密码长"),
("Unlock Network Settings", "臨時密碼長度"),
("Temporary Password Length", "臨時密碼長"),
("Unlock Network Settings", "解鎖網絡設置"),
("Server", "服務器"),
("Direct IP Access", "IP直接訪問"),
("Proxy", "代理"),
@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "取消固定菜單欄"),
("Enable LAN Discovery", "允許局域網發現"),
("Deny LAN Discovery", "拒絕局域網發現"),
("Write a message", "輸入聊天消息"),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Bỏ ghim thanh menu"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}