mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-01 01:29:02 +08:00
Merge pull request #4699 from 21pages/trustThisDevice
rename autoLogin to trustThisDevice
This commit is contained in:
commit
2e5eb86c97
@ -67,7 +67,7 @@ class LoginRequest {
|
||||
String? password;
|
||||
String? id;
|
||||
String? uuid;
|
||||
bool? autoLogin;
|
||||
bool? trustThisDevice;
|
||||
String? type;
|
||||
String? verificationCode;
|
||||
Map<String, dynamic> deviceInfo = DeviceInfo.toJson();
|
||||
@ -77,7 +77,7 @@ class LoginRequest {
|
||||
this.password,
|
||||
this.id,
|
||||
this.uuid,
|
||||
this.autoLogin,
|
||||
this.trustThisDevice,
|
||||
this.type,
|
||||
this.verificationCode});
|
||||
|
||||
@ -87,7 +87,7 @@ class LoginRequest {
|
||||
data['password'] = password ?? '';
|
||||
data['id'] = id ?? '';
|
||||
data['uuid'] = uuid ?? '';
|
||||
data['autoLogin'] = autoLogin ?? '';
|
||||
data['trustThisDevice'] = trustThisDevice ?? '';
|
||||
data['type'] = type ?? '';
|
||||
data['verificationCode'] = verificationCode ?? '';
|
||||
data['deviceInfo'] = deviceInfo;
|
||||
|
@ -416,7 +416,7 @@ Future<bool?> loginDialog() async {
|
||||
password: password.text,
|
||||
id: await bind.mainGetMyId(),
|
||||
uuid: await bind.mainGetUuid(),
|
||||
autoLogin: true,
|
||||
trustThisDevice: false,
|
||||
type: HttpType.kAuthReqTypeAccount));
|
||||
|
||||
switch (resp.type) {
|
||||
@ -476,7 +476,9 @@ Future<bool?> loginDialog() async {
|
||||
ConfigOP(op: 'GitHub', iconWidth: 20),
|
||||
ConfigOP(op: 'Google', iconWidth: 20),
|
||||
ConfigOP(op: 'Okta', iconWidth: 38),
|
||||
].where((op) => oidcOptions.contains(op.op.toLowerCase())).toList(),
|
||||
]
|
||||
.where((op) => oidcOptions.contains(op.op.toLowerCase()))
|
||||
.toList(),
|
||||
curOP: curOP,
|
||||
cbLogin: (String username) {
|
||||
gFFI.userModel.userName.value = username;
|
||||
@ -524,7 +526,7 @@ Future<bool?> loginDialog() async {
|
||||
}
|
||||
|
||||
Future<bool?> verificationCodeDialog(UserPayload? user) async {
|
||||
var autoLogin = true;
|
||||
var trustThisDevice = false;
|
||||
var isInProgress = false;
|
||||
String? errorText;
|
||||
|
||||
@ -557,7 +559,7 @@ Future<bool?> verificationCodeDialog(UserPayload? user) async {
|
||||
username: user?.name,
|
||||
id: await bind.mainGetMyId(),
|
||||
uuid: await bind.mainGetUuid(),
|
||||
autoLogin: autoLogin,
|
||||
trustThisDevice: trustThisDevice,
|
||||
type: HttpType.kAuthReqTypeEmailCode));
|
||||
|
||||
switch (resp.type) {
|
||||
@ -605,6 +607,7 @@ Future<bool?> verificationCodeDialog(UserPayload? user) async {
|
||||
focusNode: focusNode,
|
||||
helperText: translate('verification_tip'),
|
||||
),
|
||||
/*
|
||||
CheckboxListTile(
|
||||
contentPadding: const EdgeInsets.all(0),
|
||||
dense: true,
|
||||
@ -612,12 +615,13 @@ Future<bool?> verificationCodeDialog(UserPayload? user) async {
|
||||
title: Row(children: [
|
||||
Expanded(child: Text(translate("Trust this device")))
|
||||
]),
|
||||
value: autoLogin,
|
||||
value: trustThisDevice,
|
||||
onChanged: (v) {
|
||||
if (v == null) return;
|
||||
setState(() => autoLogin = !autoLogin);
|
||||
setState(() => trustThisDevice = !trustThisDevice);
|
||||
},
|
||||
),
|
||||
*/
|
||||
Offstage(
|
||||
offstage: !isInProgress,
|
||||
child: const LinearProgressIndicator()),
|
||||
|
@ -221,7 +221,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Remember me", "记住我"),
|
||||
("Trust this device", "信任此设备"),
|
||||
("Verification code", "验证码"),
|
||||
("verification_tip", "检测到新设备登录,已向注册邮箱发送了登录验证码,请输入验证码继续登录"),
|
||||
("verification_tip", "已向注册邮箱发送了登录验证码,请输入验证码继续登录"),
|
||||
("Logout", "登出"),
|
||||
("Tags", "标签"),
|
||||
("Search ID", "查找 ID"),
|
||||
|
@ -37,7 +37,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("hide_cm_tip", "Allow hiding only if accepting sessions via password and using permanent password"),
|
||||
("wayland_experiment_tip", "Wayland support is in experimental stage, please use X11 if you require unattended access."),
|
||||
("Slogan_tip", "Made with heart in this chaotic world!"),
|
||||
("verification_tip", "A new device has been detected, and a verification code has been sent to the registered email address, enter the verification code to continue logging in."),
|
||||
("verification_tip", "A verification code has been sent to the registered email address, enter the verification code to continue logging in."),
|
||||
("software_render_tip", "If you're using Nvidia graphics card under Linux and the remote window closes immediately after connecting, switching to the open-source Nouveau driver and choosing to use software rendering may help. A software restart is required."),
|
||||
("config_input", "In order to control remote desktop with keyboard, you need to grant RustDesk \"Input Monitoring\" permissions."),
|
||||
("request_elevation_tip", "You can also request elevation if there is someone on the remote side."),
|
||||
|
@ -221,7 +221,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Remember me", "記住我"),
|
||||
("Trust this device", "信任此裝置"),
|
||||
("Verification code", "驗證碼"),
|
||||
("verification_tip", "檢測到新裝置登入,已向註冊電子信箱發送了登入驗證碼,請輸入驗證碼以繼續登入"),
|
||||
("verification_tip", "已向註冊電子信箱發送了登入驗證碼,請輸入驗證碼以繼續登入"),
|
||||
("Logout", "登出"),
|
||||
("Tags", "標籤"),
|
||||
("Search ID", "搜尋 ID"),
|
||||
|
@ -1195,7 +1195,7 @@ function login() {
|
||||
}
|
||||
abLoading = true;
|
||||
var url = handler.get_api_server();
|
||||
httpRequest(url + "/api/login", #post, {username: name, password: pass, id: my_id, uuid: handler.get_uuid()}, function(data) {
|
||||
httpRequest(url + "/api/login", #post, {username: name, password: pass, id: my_id, uuid: handler.get_uuid(), type: 'account'}, function(data) {
|
||||
if (data.error) {
|
||||
abLoading = false;
|
||||
var err = translate(data.error);
|
||||
|
Loading…
Reference in New Issue
Block a user