mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-05-11 10:26:19 +02:00
refactor user login:
1. opt request json type. 2. desktop and mobile use same loginDialog. 3. opt loginDialog UI style. 4. opt login request Exception catch.
This commit is contained in:
parent
1867502ef7
commit
3e357159f3
9 changed files with 363 additions and 321 deletions
|
@ -7,10 +7,9 @@ import 'package:provider/provider.dart';
|
|||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../../common.dart';
|
||||
import '../../common/widgets/address_book.dart';
|
||||
import '../../common/widgets/peer_tab_page.dart';
|
||||
import '../../common/widgets/peers_view.dart';
|
||||
import '../../consts.dart';
|
||||
import '../../desktop/widgets/login.dart';
|
||||
import '../../models/model.dart';
|
||||
import '../../models/platform_model.dart';
|
||||
import 'home_page.dart';
|
||||
|
@ -258,7 +257,7 @@ class _WebMenuState extends State<WebMenu> {
|
|||
}
|
||||
if (value == 'login') {
|
||||
if (gFFI.userModel.userName.value.isEmpty) {
|
||||
showLogin(gFFI.dialogManager);
|
||||
loginDialog();
|
||||
} else {
|
||||
gFFI.userModel.logOut();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue