mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-02 12:21:28 +03:00
add options: disable-change-permanent-password, disable-change-id, disable-unlock-pin (#13929)
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
@@ -61,12 +61,13 @@ class _DropDownAction extends StatelessWidget {
|
||||
final isAllowNumericOneTimePassword =
|
||||
gFFI.serverModel.allowNumericOneTimePassword;
|
||||
return [
|
||||
PopupMenuItem(
|
||||
enabled: gFFI.serverModel.connectStatus > 0,
|
||||
value: "changeID",
|
||||
child: Text(translate("Change ID")),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
if (!isChangeIdDisabled())
|
||||
PopupMenuItem(
|
||||
enabled: gFFI.serverModel.connectStatus > 0,
|
||||
value: "changeID",
|
||||
child: Text(translate("Change ID")),
|
||||
),
|
||||
if (!isChangeIdDisabled()) const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
value: 'AcceptSessionsViaPassword',
|
||||
child: listTile(
|
||||
@@ -87,7 +88,8 @@ class _DropDownAction extends StatelessWidget {
|
||||
),
|
||||
if (showPasswordOption) const PopupMenuDivider(),
|
||||
if (showPasswordOption &&
|
||||
verificationMethod != kUseTemporaryPassword)
|
||||
verificationMethod != kUseTemporaryPassword &&
|
||||
!isChangePermanentPasswordDisabled())
|
||||
PopupMenuItem(
|
||||
value: "setPermanentPassword",
|
||||
child: Text(translate("Set permanent password")),
|
||||
@@ -149,6 +151,10 @@ class _DropDownAction extends StatelessWidget {
|
||||
|
||||
if (value == kUsePermanentPassword &&
|
||||
(await bind.mainGetPermanentPassword()).isEmpty) {
|
||||
if (isChangePermanentPasswordDisabled()) {
|
||||
callback();
|
||||
return;
|
||||
}
|
||||
setPasswordDialog(notEmptyCallback: callback);
|
||||
} else {
|
||||
callback();
|
||||
@@ -648,9 +654,8 @@ class ConnectionManager extends StatelessWidget {
|
||||
return Column(
|
||||
children: serverModel.clients
|
||||
.map((client) => PaddingCard(
|
||||
title: translate(client.isFileTransfer
|
||||
? "Transfer file"
|
||||
: "Share screen"),
|
||||
title: translate(
|
||||
client.isFileTransfer ? "Transfer file" : "Share screen"),
|
||||
titleIcon: client.isFileTransfer
|
||||
? Icon(Icons.folder_outlined)
|
||||
: Icon(Icons.mobile_screen_share),
|
||||
|
||||
Reference in New Issue
Block a user