mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-18 07:43:01 +08:00
copy id/password on double tap, some menu divider
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
043a3e5f34
commit
2a2017df67
@ -127,11 +127,16 @@ class _DesktopHomePageState extends State<DesktopHomePage> with TrayListener {
|
|||||||
})
|
})
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
TextFormField(
|
GestureDetector(
|
||||||
controller: model.serverId,
|
onDoubleTap: () {
|
||||||
enableInteractiveSelection: true,
|
Clipboard.setData(
|
||||||
readOnly: true,
|
ClipboardData(text: model.serverId.text));
|
||||||
),
|
showToast(translate("Copied"));
|
||||||
|
},
|
||||||
|
child: TextFormField(
|
||||||
|
controller: model.serverId,
|
||||||
|
readOnly: true,
|
||||||
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -151,7 +156,7 @@ class _DesktopHomePageState extends State<DesktopHomePage> with TrayListener {
|
|||||||
},
|
},
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final userName = await gFFI.userModel.getUserName();
|
final userName = await gFFI.userModel.getUserName();
|
||||||
var menu = [
|
var menu = <PopupMenuEntry>[
|
||||||
genEnablePopupMenuItem(
|
genEnablePopupMenuItem(
|
||||||
translate("Enable Keyboard/Mouse"),
|
translate("Enable Keyboard/Mouse"),
|
||||||
'enable-keyboard',
|
'enable-keyboard',
|
||||||
@ -169,6 +174,7 @@ class _DesktopHomePageState extends State<DesktopHomePage> with TrayListener {
|
|||||||
'enable-tunnel',
|
'enable-tunnel',
|
||||||
),
|
),
|
||||||
genAudioInputPopupMenuItem(),
|
genAudioInputPopupMenuItem(),
|
||||||
|
PopupMenuDivider(),
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
child: Text(translate("ID/Relay Server")),
|
child: Text(translate("ID/Relay Server")),
|
||||||
value: 'custom-server',
|
value: 'custom-server',
|
||||||
@ -181,7 +187,7 @@ class _DesktopHomePageState extends State<DesktopHomePage> with TrayListener {
|
|||||||
child: Text(translate("Socks5 Proxy")),
|
child: Text(translate("Socks5 Proxy")),
|
||||||
value: 'socks5-proxy',
|
value: 'socks5-proxy',
|
||||||
),
|
),
|
||||||
// sep
|
PopupMenuDivider(),
|
||||||
genEnablePopupMenuItem(
|
genEnablePopupMenuItem(
|
||||||
translate("Enable Service"),
|
translate("Enable Service"),
|
||||||
'stop-service',
|
'stop-service',
|
||||||
@ -195,6 +201,7 @@ class _DesktopHomePageState extends State<DesktopHomePage> with TrayListener {
|
|||||||
translate("Start ID/relay service"),
|
translate("Start ID/relay service"),
|
||||||
'stop-rendezvous-service',
|
'stop-rendezvous-service',
|
||||||
),
|
),
|
||||||
|
PopupMenuDivider(),
|
||||||
userName.isEmpty
|
userName.isEmpty
|
||||||
? PopupMenuItem(
|
? PopupMenuItem(
|
||||||
child: Text(translate("Login")),
|
child: Text(translate("Login")),
|
||||||
@ -208,6 +215,7 @@ class _DesktopHomePageState extends State<DesktopHomePage> with TrayListener {
|
|||||||
child: Text(translate("Change ID")),
|
child: Text(translate("Change ID")),
|
||||||
value: 'change-id',
|
value: 'change-id',
|
||||||
),
|
),
|
||||||
|
PopupMenuDivider(),
|
||||||
genEnablePopupMenuItem(
|
genEnablePopupMenuItem(
|
||||||
translate("Dark Theme"),
|
translate("Dark Theme"),
|
||||||
'allow-darktheme',
|
'allow-darktheme',
|
||||||
@ -252,10 +260,16 @@ class _DesktopHomePageState extends State<DesktopHomePage> with TrayListener {
|
|||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: TextFormField(
|
child: GestureDetector(
|
||||||
controller: model.serverPasswd,
|
onDoubleTap: () {
|
||||||
enableInteractiveSelection: true,
|
Clipboard.setData(
|
||||||
readOnly: true,
|
ClipboardData(text: model.serverPasswd.text));
|
||||||
|
showToast(translate("Copied"));
|
||||||
|
},
|
||||||
|
child: TextFormField(
|
||||||
|
controller: model.serverPasswd,
|
||||||
|
readOnly: true,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
@ -307,15 +321,15 @@ class _DesktopHomePageState extends State<DesktopHomePage> with TrayListener {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
value: value,
|
|
||||||
onTap: () => gFFI.serverModel.verificationMethod = value,
|
onTap: () => gFFI.serverModel.verificationMethod = value,
|
||||||
);
|
);
|
||||||
final temporary_enabled =
|
final temporary_enabled =
|
||||||
gFFI.serverModel.verificationMethod != kUsePermanentPassword;
|
gFFI.serverModel.verificationMethod != kUsePermanentPassword;
|
||||||
var menu = [
|
var menu = <PopupMenuEntry>[
|
||||||
method(translate("Use temporary password"), kUseTemporaryPassword),
|
method(translate("Use temporary password"), kUseTemporaryPassword),
|
||||||
method(translate("Use permanent password"), kUsePermanentPassword),
|
method(translate("Use permanent password"), kUsePermanentPassword),
|
||||||
method(translate("Use both passwords"), kUseBothPasswords),
|
method(translate("Use both passwords"), kUseBothPasswords),
|
||||||
|
PopupMenuDivider(),
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
child: Text(translate("Set permanent password")),
|
child: Text(translate("Set permanent password")),
|
||||||
value: 'set-permanent-password',
|
value: 'set-permanent-password',
|
||||||
@ -323,7 +337,10 @@ class _DesktopHomePageState extends State<DesktopHomePage> with TrayListener {
|
|||||||
kUseTemporaryPassword),
|
kUseTemporaryPassword),
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
child: PopupMenuButton(
|
child: PopupMenuButton(
|
||||||
child: Text("Set temporary password length"),
|
padding: EdgeInsets.zero,
|
||||||
|
child: Text(
|
||||||
|
translate("Set temporary password length"),
|
||||||
|
),
|
||||||
itemBuilder: (context) => ["6", "8", "10"]
|
itemBuilder: (context) => ["6", "8", "10"]
|
||||||
.map((e) => PopupMenuItem(
|
.map((e) => PopupMenuItem(
|
||||||
child: Row(
|
child: Row(
|
||||||
@ -338,7 +355,6 @@ class _DesktopHomePageState extends State<DesktopHomePage> with TrayListener {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
value: e,
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (gFFI.serverModel.temporaryPasswordLength !=
|
if (gFFI.serverModel.temporaryPasswordLength !=
|
||||||
e) {
|
e) {
|
||||||
@ -350,15 +366,12 @@ class _DesktopHomePageState extends State<DesktopHomePage> with TrayListener {
|
|||||||
.toList(),
|
.toList(),
|
||||||
enabled: temporary_enabled,
|
enabled: temporary_enabled,
|
||||||
),
|
),
|
||||||
value: 'set-temporary-password-length',
|
|
||||||
enabled: temporary_enabled),
|
enabled: temporary_enabled),
|
||||||
];
|
];
|
||||||
final v =
|
final v =
|
||||||
await showMenu(context: context, position: position, items: menu);
|
await showMenu(context: context, position: position, items: menu);
|
||||||
if (v != null) {
|
if (v == "set-permanent-password") {
|
||||||
if (v == "set-permanent-password") {
|
setPasswordDialog();
|
||||||
setPasswordDialog();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Icon(Icons.edit));
|
child: Icon(Icons.edit));
|
||||||
@ -1372,9 +1385,6 @@ void setPasswordDialog() {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(
|
|
||||||
height: 4.0,
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -299,5 +299,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Are you sure you want to restart", "确定要重启"),
|
("Are you sure you want to restart", "确定要重启"),
|
||||||
("Restarting Remote Device", "正在重启远程设备"),
|
("Restarting Remote Device", "正在重启远程设备"),
|
||||||
("remote_restarting_tip", "远程设备正在重启, 请关闭当前提示框, 并在一段时间后使用永久密码重新连接"),
|
("remote_restarting_tip", "远程设备正在重启, 请关闭当前提示框, 并在一段时间后使用永久密码重新连接"),
|
||||||
|
("Copied", "已复制"),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -299,5 +299,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Are you sure you want to restart", ""),
|
("Are you sure you want to restart", ""),
|
||||||
("Restarting Remote Device", ""),
|
("Restarting Remote Device", ""),
|
||||||
("remote_restarting_tip", ""),
|
("remote_restarting_tip", ""),
|
||||||
|
("Copied", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -299,5 +299,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Are you sure you want to restart", ""),
|
("Are you sure you want to restart", ""),
|
||||||
("Restarting Remote Device", ""),
|
("Restarting Remote Device", ""),
|
||||||
("remote_restarting_tip", ""),
|
("remote_restarting_tip", ""),
|
||||||
|
("Copied", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -299,5 +299,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Are you sure you want to restart", "Möchten Sie das entfernte Gerät wirklich neu starten?"),
|
("Are you sure you want to restart", "Möchten Sie das entfernte Gerät wirklich neu starten?"),
|
||||||
("Restarting Remote Device", "Entferntes Gerät wird neu gestartet"),
|
("Restarting Remote Device", "Entferntes Gerät wird neu gestartet"),
|
||||||
("remote_restarting_tip", "Entferntes Gerät startet neu, bitte schließen Sie diese Meldung und verbinden Sie sich mit dem dauerhaften Passwort erneut."),
|
("remote_restarting_tip", "Entferntes Gerät startet neu, bitte schließen Sie diese Meldung und verbinden Sie sich mit dem dauerhaften Passwort erneut."),
|
||||||
|
("Copied", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -299,5 +299,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Are you sure you want to restart", ""),
|
("Are you sure you want to restart", ""),
|
||||||
("Restarting Remote Device", ""),
|
("Restarting Remote Device", ""),
|
||||||
("remote_restarting_tip", ""),
|
("remote_restarting_tip", ""),
|
||||||
|
("Copied", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -299,5 +299,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Are you sure you want to restart", "Esta Seguro que desea reiniciar?"),
|
("Are you sure you want to restart", "Esta Seguro que desea reiniciar?"),
|
||||||
("Restarting Remote Device", "Reiniciando dispositivo remoto"),
|
("Restarting Remote Device", "Reiniciando dispositivo remoto"),
|
||||||
("remote_restarting_tip", "Dispositivo remoto reiniciando, favor de cerrar este mensaje y reconectarse con la contraseña permamente despues de un momento."),
|
("remote_restarting_tip", "Dispositivo remoto reiniciando, favor de cerrar este mensaje y reconectarse con la contraseña permamente despues de un momento."),
|
||||||
|
("Copied", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -299,5 +299,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Are you sure you want to restart", ""),
|
("Are you sure you want to restart", ""),
|
||||||
("Restarting Remote Device", ""),
|
("Restarting Remote Device", ""),
|
||||||
("remote_restarting_tip", ""),
|
("remote_restarting_tip", ""),
|
||||||
|
("Copied", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -299,5 +299,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Are you sure you want to restart", ""),
|
("Are you sure you want to restart", ""),
|
||||||
("Restarting Remote Device", ""),
|
("Restarting Remote Device", ""),
|
||||||
("remote_restarting_tip", ""),
|
("remote_restarting_tip", ""),
|
||||||
|
("Copied", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -299,5 +299,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Are you sure you want to restart", "Apakah Anda yakin untuk memulai ulang"),
|
("Are you sure you want to restart", "Apakah Anda yakin untuk memulai ulang"),
|
||||||
("Restarting Remote Device", "Memulai Ulang Perangkat Jarak Jauh"),
|
("Restarting Remote Device", "Memulai Ulang Perangkat Jarak Jauh"),
|
||||||
("remote_restarting_tip", ""),
|
("remote_restarting_tip", ""),
|
||||||
|
("Copied", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -299,5 +299,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Are you sure you want to restart", ""),
|
("Are you sure you want to restart", ""),
|
||||||
("Restarting Remote Device", ""),
|
("Restarting Remote Device", ""),
|
||||||
("remote_restarting_tip", ""),
|
("remote_restarting_tip", ""),
|
||||||
|
("Copied", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -300,5 +300,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Activate onetime password", "Aktywuj hasło jednorazowe"),
|
("Activate onetime password", "Aktywuj hasło jednorazowe"),
|
||||||
("Set security password", "Ustaw hasło zabezpieczające"),
|
("Set security password", "Ustaw hasło zabezpieczające"),
|
||||||
("Connection not allowed", "Połączenie niedozwolone"),
|
("Connection not allowed", "Połączenie niedozwolone"),
|
||||||
|
("Copied", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -299,5 +299,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Are you sure you want to restart", ""),
|
("Are you sure you want to restart", ""),
|
||||||
("Restarting Remote Device", ""),
|
("Restarting Remote Device", ""),
|
||||||
("remote_restarting_tip", ""),
|
("remote_restarting_tip", ""),
|
||||||
|
("Copied", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -299,5 +299,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Are you sure you want to restart", "Вы уверены, что хотите выполнить перезапуск?"),
|
("Are you sure you want to restart", "Вы уверены, что хотите выполнить перезапуск?"),
|
||||||
("Restarting Remote Device", "Перезагрузка удаленного устройства"),
|
("Restarting Remote Device", "Перезагрузка удаленного устройства"),
|
||||||
("remote_restarting_tip", "Удаленное устройство перезапускается. Пожалуйста, закройте это сообщение и через некоторое время переподключитесь, используя постоянный пароль."),
|
("remote_restarting_tip", "Удаленное устройство перезапускается. Пожалуйста, закройте это сообщение и через некоторое время переподключитесь, используя постоянный пароль."),
|
||||||
|
("Copied", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -299,5 +299,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Are you sure you want to restart", ""),
|
("Are you sure you want to restart", ""),
|
||||||
("Restarting Remote Device", ""),
|
("Restarting Remote Device", ""),
|
||||||
("remote_restarting_tip", ""),
|
("remote_restarting_tip", ""),
|
||||||
|
("Copied", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -299,5 +299,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Are you sure you want to restart", ""),
|
("Are you sure you want to restart", ""),
|
||||||
("Restarting Remote Device", ""),
|
("Restarting Remote Device", ""),
|
||||||
("remote_restarting_tip", ""),
|
("remote_restarting_tip", ""),
|
||||||
|
("Copied", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -299,5 +299,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Are you sure you want to restart", "Yeniden başlatmak istediğinize emin misin?"),
|
("Are you sure you want to restart", "Yeniden başlatmak istediğinize emin misin?"),
|
||||||
("Restarting Remote Device", "Uzaktan yeniden başlatılıyor"),
|
("Restarting Remote Device", "Uzaktan yeniden başlatılıyor"),
|
||||||
("remote_restarting_tip", ""),
|
("remote_restarting_tip", ""),
|
||||||
|
("Copied", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -299,5 +299,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Are you sure you want to restart", "确定要重启"),
|
("Are you sure you want to restart", "确定要重启"),
|
||||||
("Restarting Remote Device", "正在重啓遠程設備"),
|
("Restarting Remote Device", "正在重啓遠程設備"),
|
||||||
("remote_restarting_tip", "遠程設備正在重啓,請關閉當前提示框,並在一段時間後使用永久密碼重新連接"),
|
("remote_restarting_tip", "遠程設備正在重啓,請關閉當前提示框,並在一段時間後使用永久密碼重新連接"),
|
||||||
|
("Copied", "已複製"),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -299,5 +299,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Are you sure you want to restart", "Bạn có chắc bạn muốn khởi động lại không"),
|
("Are you sure you want to restart", "Bạn có chắc bạn muốn khởi động lại không"),
|
||||||
("Restarting Remote Device", "Đang khởi động lại thiết bị từ xa"),
|
("Restarting Remote Device", "Đang khởi động lại thiết bị từ xa"),
|
||||||
("remote_restarting_tip", "Thiết bị từ xa đang khởi động lại, hãy đóng cửa sổ tin nhắn này và kết nối lại với mật khẩu vĩnh viễn sau một khoảng thời gian"),
|
("remote_restarting_tip", "Thiết bị từ xa đang khởi động lại, hãy đóng cửa sổ tin nhắn này và kết nối lại với mật khẩu vĩnh viễn sau một khoảng thời gian"),
|
||||||
|
("Copied", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user