mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
rename temporary password to one-time password
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:auto_size_text/auto_size_text.dart';
|
||||
import 'package:flutter/material.dart' hide MenuItem;
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_hbb/common.dart';
|
||||
@@ -202,10 +203,11 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
translate("Password"),
|
||||
AutoSizeText(
|
||||
translate("One-time Password"),
|
||||
style: TextStyle(
|
||||
fontSize: 14, color: textColor?.withOpacity(0.5)),
|
||||
maxLines: 1,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
|
||||
@@ -586,7 +586,7 @@ class _SafetyState extends State<_Safety> with AutomaticKeepAliveClientMixin {
|
||||
kUseBothPasswords,
|
||||
];
|
||||
List<String> passwordValues = [
|
||||
translate('Use temporary password'),
|
||||
translate('Use one-time password'),
|
||||
translate('Use permanent password'),
|
||||
translate('Use both passwords'),
|
||||
];
|
||||
@@ -665,7 +665,7 @@ class _SafetyState extends State<_Safety> with AutomaticKeepAliveClientMixin {
|
||||
Offstage(
|
||||
offstage: !usePassword,
|
||||
child: _SubLabeledWidget(
|
||||
'Temporary Password Length',
|
||||
'One-time password length',
|
||||
Row(
|
||||
children: [
|
||||
...lengthRadios,
|
||||
|
||||
@@ -35,7 +35,8 @@ class ServerModel with ChangeNotifier {
|
||||
|
||||
late String _emptyIdShow;
|
||||
late final IDTextEditingController _serverId;
|
||||
final _serverPasswd = TextEditingController(text: "");
|
||||
final _serverPasswd =
|
||||
TextEditingController(text: translate("Generating ..."));
|
||||
|
||||
final tabController = DesktopTabController(tabType: DesktopTabType.cm);
|
||||
|
||||
@@ -170,7 +171,8 @@ class ServerModel with ChangeNotifier {
|
||||
update = true;
|
||||
}
|
||||
final oldPwdText = _serverPasswd.text;
|
||||
if (_serverPasswd.text != temporaryPassword) {
|
||||
if (_serverPasswd.text != temporaryPassword &&
|
||||
temporaryPassword.isNotEmpty) {
|
||||
_serverPasswd.text = temporaryPassword;
|
||||
}
|
||||
if (verificationMethod == kUsePermanentPassword ||
|
||||
|
||||
Reference in New Issue
Block a user