rename to "accept and elevate" button

This commit is contained in:
rustdesk 2023-06-14 21:30:05 +08:00
parent 4d65cc675e
commit 5f4a1960fa
36 changed files with 89 additions and 13 deletions

View File

@ -759,13 +759,14 @@ class _CmControlPanel extends StatelessWidget {
handleElevate(context); handleElevate(context);
windowManager.minimize(); windowManager.minimize();
}, },
text: 'Accept', text: 'Accept and Elevate',
icon: Icon( icon: Icon(
Icons.security_rounded, Icons.security_rounded,
color: Colors.white, color: Colors.white,
size: 14, size: 14,
), ),
textColor: Colors.white), textColor: Colors.white,
tooltip: 'accept_and_elevate_btn_tooltip'),
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -803,15 +804,14 @@ class _CmControlPanel extends StatelessWidget {
).marginOnly(bottom: buttonBottomMargin); ).marginOnly(bottom: buttonBottomMargin);
} }
Widget buildButton( Widget buildButton(BuildContext context,
BuildContext context, { {required Color? color,
required Color? color, required Function() onClick,
required Function() onClick, Icon? icon,
Icon? icon, BoxBorder? border,
BoxBorder? border, required String text,
required String text, required Color? textColor,
required Color? textColor, String? tooltip}) {
}) {
Widget textWidget; Widget textWidget;
if (icon != null) { if (icon != null) {
textWidget = Text( textWidget = Text(
@ -829,7 +829,7 @@ class _CmControlPanel extends StatelessWidget {
); );
} }
final borderRadius = BorderRadius.circular(10.0); final borderRadius = BorderRadius.circular(10.0);
return Container( final btn = Container(
height: 28, height: 28,
decoration: BoxDecoration( decoration: BoxDecoration(
color: color, borderRadius: borderRadius, border: border), color: color, borderRadius: borderRadius, border: border),
@ -844,7 +844,14 @@ class _CmControlPanel extends StatelessWidget {
], ],
), ),
), ),
).marginAll(4); );
return (tooltip != null
? Tooltip(
message: translate(tooltip),
child: btn,
)
: btn)
.marginAll(4);
} }
void handleDisconnect() { void handleDisconnect() {

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", "适应本地分辨率"), ("resolution_fit_local_tip", "适应本地分辨率"),
("resolution_custom_tip", "自定义分辨率"), ("resolution_custom_tip", "自定义分辨率"),
("Collapse toolbar", "折叠工具栏"), ("Collapse toolbar", "折叠工具栏"),
("Accept and Elevate", "接受并提权"),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", "Lokale Auflösung anpassen"), ("resolution_fit_local_tip", "Lokale Auflösung anpassen"),
("resolution_custom_tip", "Benutzerdefinierte Auflösung"), ("resolution_custom_tip", "Benutzerdefinierte Auflösung"),
("Collapse toolbar", "Symbolleiste einklappen"), ("Collapse toolbar", "Symbolleiste einklappen"),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -69,5 +69,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_original_tip", "Original resolution"), ("resolution_original_tip", "Original resolution"),
("resolution_fit_local_tip", "Fit local resolution"), ("resolution_fit_local_tip", "Fit local resolution"),
("resolution_custom_tip", "Custom resolution"), ("resolution_custom_tip", "Custom resolution"),
("accept_and_elevate_btn_tooltip", "Accept the connection and elevate UAC permissions."),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", "Ajustar resolución local"), ("resolution_fit_local_tip", "Ajustar resolución local"),
("resolution_custom_tip", "Resolución personalizada"), ("resolution_custom_tip", "Resolución personalizada"),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", "متناسب با وضوح محلی"), ("resolution_fit_local_tip", "متناسب با وضوح محلی"),
("resolution_custom_tip", "وضوح سفارشی"), ("resolution_custom_tip", "وضوح سفارشی"),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", "Adatta risoluzione locale"), ("resolution_fit_local_tip", "Adatta risoluzione locale"),
("resolution_custom_tip", "Risoluzione personalizzata"), ("resolution_custom_tip", "Risoluzione personalizzata"),
("Collapse toolbar", "Comprimi barra strumenti"), ("Collapse toolbar", "Comprimi barra strumenti"),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", "Lokale resolutie aanpassen"), ("resolution_fit_local_tip", "Lokale resolutie aanpassen"),
("resolution_custom_tip", "Aangepaste resolutie"), ("resolution_custom_tip", "Aangepaste resolutie"),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", "Adequar a resolução local"), ("resolution_fit_local_tip", "Adequar a resolução local"),
("resolution_custom_tip", "Customizar resolução"), ("resolution_custom_tip", "Customizar resolução"),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", "Соответствие локальному разрешению"), ("resolution_fit_local_tip", "Соответствие локальному разрешению"),
("resolution_custom_tip", "Произвольное разрешение"), ("resolution_custom_tip", "Произвольное разрешение"),
("Collapse toolbar", "Свернуть панель инструментов"), ("Collapse toolbar", "Свернуть панель инструментов"),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", "Припасувати поточну роздільну здатність"), ("resolution_fit_local_tip", "Припасувати поточну роздільну здатність"),
("resolution_custom_tip", "Користувацька роздільна здатність"), ("resolution_custom_tip", "Користувацька роздільна здатність"),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -509,5 +509,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_fit_local_tip", ""), ("resolution_fit_local_tip", ""),
("resolution_custom_tip", ""), ("resolution_custom_tip", ""),
("Collapse toolbar", ""), ("Collapse toolbar", ""),
("Accept and Elevate", ""),
("accept_and_elevate_btn_tooltip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }