An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
Rust androidanydeskdartflatpakflutterflutter-appsioslinuxmacosp2prdpremote-controlremote-desktoprustrust-langteamviewervncwaylandwindows
feat, web toast (#9686)
fufesouae8dfe84a078
diff --git a/flutter/lib/models/model.dart b/flutter/lib/models/model.dartindex 2833f3834..71effd797 100644--- a/flutter/lib/models/model.dart+++ b/flutter/lib/models/model.dart@@ -4,6 +4,7 @@ import 'dart:math';import 'dart:typed_data';import 'dart:ui' as ui;+import 'package:bot_toast/bot_toast.dart';import 'package:desktop_multi_window/desktop_multi_window.dart';import 'package:flutter/material.dart';import 'package:flutter/services.dart';@@ -269,6 +270,8 @@ class FfiModel with ChangeNotifier {var name = evt['name'];if (name == 'msgbox') {handleMsgBox(evt, sessionId, peerId);+ } else if (name == 'toast') {+ handleToast(evt, sessionId, peerId);} else if (name == 'set_multiple_windows_session') {handleMultipleWindowsSession(evt, sessionId, peerId);} else if (name == 'peer_info') {@@ -595,6 +598,37 @@ class FfiModel with ChangeNotifier {}}+ handleToast(Map<String, dynamic> evt, SessionID sessionId, String peerId) {+ final type = evt['type'] ?? 'info';+ final text = evt['text'] ?? '';+ final durMsc = evt['dur_msec'] ?? 2000;+ final duration = Duration(milliseconds: durMsc);+ if ((text).isEmpty) {+ BotToast.showLoading(+ duration: duration,+ clickClose: true,+ allowClick: true,+ );+ } else {+ if (type.contains('error')) {+ BotToast.showText(+ contentColor: Colors.red,+ text: translate(text),+ duration: duration,+ clickClose: true,+ onlyOne: true,+ );+ } else {+ BotToast.showText(+ text: translate(text),+ duration: duration,+ clickClose: true,+ onlyOne: true,+ );+ }+ }+ }+/// Show a message box with [type], [title] and [text].showMsgBox(SessionID sessionId, String type, String title, String text,String link, bool hasRetry, OverlayDialogManager dialogManager,diff --git a/src/lang/ar.rs b/src/lang/ar.rsindex 879414cd6..6cae020b6 100644--- a/src/lang/ar.rs+++ b/src/lang/ar.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/be.rs b/src/lang/be.rsindex 501438fd0..7e9f928ae 100644--- a/src/lang/be.rs+++ b/src/lang/be.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/bg.rs b/src/lang/bg.rsindex cf972ee76..9f6282e75 100644--- a/src/lang/bg.rs+++ b/src/lang/bg.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/ca.rs b/src/lang/ca.rsindex 4001c1e6e..64748c9ac 100644--- a/src/lang/ca.rs+++ b/src/lang/ca.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/cn.rs b/src/lang/cn.rsindex 17b3ba159..5ad91ada8 100644--- a/src/lang/cn.rs+++ b/src/lang/cn.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", "下载"),("Upload folder", "上传文件夹"),("Upload files", "上传文件"),+ ("Clipboard is synchronized", "剪贴板已同步"),].iter().cloned().collect();}diff --git a/src/lang/cs.rs b/src/lang/cs.rsindex 8404ee3e4..8db1470b9 100644--- a/src/lang/cs.rs+++ b/src/lang/cs.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/da.rs b/src/lang/da.rsindex c59f3efc9..f867cac46 100644--- a/src/lang/da.rs+++ b/src/lang/da.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/de.rs b/src/lang/de.rsindex f54cddac9..73e57183d 100644--- a/src/lang/de.rs+++ b/src/lang/de.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", "Herunterladen"),("Upload folder", "Ordner hochladen"),("Upload files", "Dateien hochladen"),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/el.rs b/src/lang/el.rsindex eaa31c55f..625867c34 100644--- a/src/lang/el.rs+++ b/src/lang/el.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/eo.rs b/src/lang/eo.rsindex e7daf0ff7..217b37a6a 100644--- a/src/lang/eo.rs+++ b/src/lang/eo.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/es.rs b/src/lang/es.rsindex bd7e4df15..70bd9d9e5 100644--- a/src/lang/es.rs+++ b/src/lang/es.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/et.rs b/src/lang/et.rsindex 131e3b215..8187759d5 100644--- a/src/lang/et.rs+++ b/src/lang/et.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/eu.rs b/src/lang/eu.rsindex 267431efd..f8ba679a7 100644--- a/src/lang/eu.rs+++ b/src/lang/eu.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/fa.rs b/src/lang/fa.rsindex c070f18e2..cf5ce0f0f 100644--- a/src/lang/fa.rs+++ b/src/lang/fa.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/fr.rs b/src/lang/fr.rsindex 2fa41f3fe..0fd093688 100644--- a/src/lang/fr.rs+++ b/src/lang/fr.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/he.rs b/src/lang/he.rsindex 5d5e4637e..e36252afe 100644--- a/src/lang/he.rs+++ b/src/lang/he.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/hr.rs b/src/lang/hr.rsindex 378f0e909..e2480eb63 100644--- a/src/lang/hr.rs+++ b/src/lang/hr.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/hu.rs b/src/lang/hu.rsindex 8aaaa3a13..00c56edfb 100644--- a/src/lang/hu.rs+++ b/src/lang/hu.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/id.rs b/src/lang/id.rsindex 44703afc6..2f95411f0 100644--- a/src/lang/id.rs+++ b/src/lang/id.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/it.rs b/src/lang/it.rsindex b791276b9..8fff93a6e 100644--- a/src/lang/it.rs+++ b/src/lang/it.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", "Download"),("Upload folder", "Cartella upload"),("Upload files", "File upload"),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/ja.rs b/src/lang/ja.rsindex 41fcca10c..dbc40b789 100644--- a/src/lang/ja.rs+++ b/src/lang/ja.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/ko.rs b/src/lang/ko.rsindex 5c9660560..966ac9009 100644--- a/src/lang/ko.rs+++ b/src/lang/ko.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/kz.rs b/src/lang/kz.rsindex 3b5aba5e4..d62bbc393 100644--- a/src/lang/kz.rs+++ b/src/lang/kz.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/lt.rs b/src/lang/lt.rsindex c6915aab3..bc7d856b1 100644--- a/src/lang/lt.rs+++ b/src/lang/lt.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/lv.rs b/src/lang/lv.rsindex 4a24a38a0..fa266ac2e 100644--- a/src/lang/lv.rs+++ b/src/lang/lv.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/nb.rs b/src/lang/nb.rsindex a5b501aa4..d91eb9325 100644--- a/src/lang/nb.rs+++ b/src/lang/nb.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/nl.rs b/src/lang/nl.rsindex 6263cccb8..b780ce7da 100644--- a/src/lang/nl.rs+++ b/src/lang/nl.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/pl.rs b/src/lang/pl.rsindex 8479949b3..8e9989084 100644--- a/src/lang/pl.rs+++ b/src/lang/pl.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/pt_PT.rs b/src/lang/pt_PT.rsindex a30692c42..4c01d0b62 100644--- a/src/lang/pt_PT.rs+++ b/src/lang/pt_PT.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/ptbr.rs b/src/lang/ptbr.rsindex 45dc2259b..240fae99a 100644--- a/src/lang/ptbr.rs+++ b/src/lang/ptbr.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/ro.rs b/src/lang/ro.rsindex 506876865..26858b134 100644--- a/src/lang/ro.rs+++ b/src/lang/ro.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/ru.rs b/src/lang/ru.rsindex 4bc1516d1..d011eae60 100644--- a/src/lang/ru.rs+++ b/src/lang/ru.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/sk.rs b/src/lang/sk.rsindex dabec3ed3..28e322460 100644--- a/src/lang/sk.rs+++ b/src/lang/sk.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/sl.rs b/src/lang/sl.rsindex f834687c7..e7f624816 100755--- a/src/lang/sl.rs+++ b/src/lang/sl.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/sq.rs b/src/lang/sq.rsindex acc5a627f..58dc1ed55 100644--- a/src/lang/sq.rs+++ b/src/lang/sq.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/sr.rs b/src/lang/sr.rsindex 0ade32f81..d38d20e9e 100644--- a/src/lang/sr.rs+++ b/src/lang/sr.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/sv.rs b/src/lang/sv.rsindex 5dd93ea4e..cfbac29b9 100644--- a/src/lang/sv.rs+++ b/src/lang/sv.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/template.rs b/src/lang/template.rsindex eb62d5621..1c4606e94 100644--- a/src/lang/template.rs+++ b/src/lang/template.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/th.rs b/src/lang/th.rsindex deb7f9741..2dbb564e8 100644--- a/src/lang/th.rs+++ b/src/lang/th.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/tr.rs b/src/lang/tr.rsindex 656feb0ef..9bdbec110 100644--- a/src/lang/tr.rs+++ b/src/lang/tr.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/tw.rs b/src/lang/tw.rsindex 1f96700b0..b37949206 100644--- a/src/lang/tw.rs+++ b/src/lang/tw.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", "下載"),("Upload folder", "上傳資料夾"),("Upload files", "上傳檔案"),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/uk.rs b/src/lang/uk.rsindex 35ffa1c29..2bce8cc81 100644--- a/src/lang/uk.rs+++ b/src/lang/uk.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}diff --git a/src/lang/vn.rs b/src/lang/vn.rsindex d07225ba0..9693d35c3 100644--- a/src/lang/vn.rs+++ b/src/lang/vn.rs@@ -651,5 +651,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("Download", ""),("Upload folder", ""),("Upload files", ""),+ ("Clipboard is synchronized", ""),].iter().cloned().collect();}