mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
feat: implement dialog callback
This commit is contained in:
@@ -589,7 +589,7 @@ void setPasswordDialog() async {
|
||||
MinCharactersValidationRule(8),
|
||||
];
|
||||
|
||||
gFFI.dialogManager.show((setState, close) {
|
||||
gFFI.dialogManager.show((setState, close, context) {
|
||||
submit() {
|
||||
setState(() {
|
||||
errMsg0 = "";
|
||||
|
||||
@@ -2016,7 +2016,7 @@ void changeSocks5Proxy() async {
|
||||
RxBool obscure = true.obs;
|
||||
|
||||
var isInProgress = false;
|
||||
gFFI.dialogManager.show((setState, close) {
|
||||
gFFI.dialogManager.show((setState, close, context) {
|
||||
submit() async {
|
||||
setState(() {
|
||||
proxyMsg = '';
|
||||
|
||||
@@ -643,7 +643,7 @@ class _FileManagerViewState extends State<FileManagerView> {
|
||||
MenuButton(
|
||||
onPressed: () {
|
||||
final name = TextEditingController();
|
||||
_ffi.dialogManager.show((setState, close) {
|
||||
_ffi.dialogManager.show((setState, close, context) {
|
||||
submit() {
|
||||
if (name.value.text.isNotEmpty) {
|
||||
controller.createDir(PathUtil.join(
|
||||
|
||||
@@ -293,7 +293,7 @@ class _InstallPageBodyState extends State<_InstallPageBody>
|
||||
),
|
||||
];
|
||||
gFFI.dialogManager.show(
|
||||
(setState, close) => CustomAlertDialog(
|
||||
(setState, close, context) => CustomAlertDialog(
|
||||
title: null,
|
||||
content: SelectionArea(
|
||||
child:
|
||||
|
||||
@@ -204,7 +204,7 @@ showKBLayoutTypeChooser(
|
||||
String localPlatform,
|
||||
OverlayDialogManager dialogManager,
|
||||
) {
|
||||
dialogManager.show((setState, close) {
|
||||
dialogManager.show((setState, close, context) {
|
||||
return CustomAlertDialog(
|
||||
title:
|
||||
Text('${translate('Select local keyboard type')} ($localPlatform)'),
|
||||
|
||||
@@ -687,7 +687,7 @@ Future<bool> toggleMaximize(bool isMainWindow) async {
|
||||
|
||||
Future<bool> closeConfirmDialog() async {
|
||||
var confirm = true;
|
||||
final res = await gFFI.dialogManager.show<bool>((setState, close) {
|
||||
final res = await gFFI.dialogManager.show<bool>((setState, close, context) {
|
||||
submit() {
|
||||
final opt = "enable-confirm-closing-tabs";
|
||||
String value = bool2option(opt, confirm);
|
||||
|
||||
Reference in New Issue
Block a user