fix: build web (#9259)

1. Web, build.
2. Web and mobile, `onSubmitted` for ID text field.
3. Web, remove unused key 'toggle_option'.

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou 2024-09-04 22:27:52 +08:00 committed by GitHub
parent e40243b55d
commit 5f29016861
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 3 deletions

View file

@ -249,6 +249,9 @@ class _ConnectionPageState extends State<ConnectionPage> {
), ),
), ),
inputFormatters: [IDTextInputFormatter()], inputFormatters: [IDTextInputFormatter()],
onSubmitted: (_) {
onConnect();
},
); );
}, },
onSelected: (option) { onSelected: (option) {

View file

@ -46,10 +46,11 @@ class HomePageState extends State<HomePage> {
void initPages() { void initPages() {
_pages.clear(); _pages.clear();
if (!bind.isIncomingOnly()) if (!bind.isIncomingOnly()) {
_pages.add(ConnectionPage( _pages.add(ConnectionPage(
appBarActions: [], appBarActions: [],
)); ));
}
if (isAndroid && !bind.isOutgoingOnly()) { if (isAndroid && !bind.isOutgoingOnly()) {
_chatPageTabIndex = _pages.length; _chatPageTabIndex = _pages.length;
_pages.addAll([ChatPage(type: ChatPageType.mobileMain), ServerPage()]); _pages.addAll([ChatPage(type: ChatPageType.mobileMain), ServerPage()]);

View file

@ -187,7 +187,7 @@ class RustdeskImpl {
Future<void> sessionToggleOption( Future<void> sessionToggleOption(
{required UuidValue sessionId, required String value, dynamic hint}) { {required UuidValue sessionId, required String value, dynamic hint}) {
return Future( return Future(
() => js.context.callMethod('setByName', ['toggle_option', value])); () => js.context.callMethod('setByName', ['option:toggle', value]));
} }
Future<void> sessionTogglePrivacyMode( Future<void> sessionTogglePrivacyMode(
@ -196,7 +196,7 @@ class RustdeskImpl {
required bool on, required bool on,
dynamic hint}) { dynamic hint}) {
return Future(() => js.context.callMethod('setByName', [ return Future(() => js.context.callMethod('setByName', [
'toggle_option', 'option:toggle',
jsonEncode({implKey, on}) jsonEncode({implKey, on})
])); ]));
} }
@ -1704,6 +1704,10 @@ class RustdeskImpl {
throw UnimplementedError(); throw UnimplementedError();
} }
int mainMaxEncryptLen({dynamic hint}) {
throw UnimplementedError();
}
sessionRenameFile( sessionRenameFile(
{required UuidValue sessionId, {required UuidValue sessionId,
required int actId, required int actId,