Merge pull request #5550 from 21pages/ios_1.2.2
Ios 1.2.2 waitForImage and login menu
This commit is contained in:
commit
ab48ae6ca6
@ -211,25 +211,6 @@ class WebMenu extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _WebMenuState extends State<WebMenu> {
|
class _WebMenuState extends State<WebMenu> {
|
||||||
String url = "";
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
() async {
|
|
||||||
final urlRes = await bind.mainGetApiServer();
|
|
||||||
var update = false;
|
|
||||||
if (urlRes != url) {
|
|
||||||
url = urlRes;
|
|
||||||
update = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (update) {
|
|
||||||
setState(() {});
|
|
||||||
}
|
|
||||||
}();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
Provider.of<FfiModel>(context);
|
Provider.of<FfiModel>(context);
|
||||||
@ -251,16 +232,14 @@ class _WebMenuState extends State<WebMenu> {
|
|||||||
child: Text(translate('ID/Relay Server')),
|
child: Text(translate('ID/Relay Server')),
|
||||||
)
|
)
|
||||||
] +
|
] +
|
||||||
(url.contains('admin.rustdesk.com')
|
[
|
||||||
? <PopupMenuItem<String>>[]
|
|
||||||
: [
|
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
value: "login",
|
value: "login",
|
||||||
child: Text(gFFI.userModel.userName.value.isEmpty
|
child: Text(gFFI.userModel.userName.value.isEmpty
|
||||||
? translate("Login")
|
? translate("Login")
|
||||||
: '${translate("Logout")} (${gFFI.userModel.userName.value})'),
|
: '${translate("Logout")} (${gFFI.userModel.userName.value})'),
|
||||||
)
|
)
|
||||||
]) +
|
] +
|
||||||
[
|
[
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
value: "about",
|
value: "about",
|
||||||
|
@ -1623,6 +1623,12 @@ class FFI {
|
|||||||
elevationModel = ElevationModel(WeakReference(this));
|
elevationModel = ElevationModel(WeakReference(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Mobile reuse FFI
|
||||||
|
void mobileReset() {
|
||||||
|
_waitForImageDialogShow.clear();
|
||||||
|
_waitForFirstImage.clear();
|
||||||
|
}
|
||||||
|
|
||||||
/// Start with the given [id]. Only transfer file if [isFileTransfer], only port forward if [isPortForward].
|
/// Start with the given [id]. Only transfer file if [isFileTransfer], only port forward if [isPortForward].
|
||||||
void start(String id,
|
void start(String id,
|
||||||
{bool isFileTransfer = false,
|
{bool isFileTransfer = false,
|
||||||
@ -1633,6 +1639,7 @@ class FFI {
|
|||||||
bool? forceRelay}) {
|
bool? forceRelay}) {
|
||||||
closed = false;
|
closed = false;
|
||||||
auditNote = '';
|
auditNote = '';
|
||||||
|
if (isMobile) mobileReset();
|
||||||
assert(!(isFileTransfer && isPortForward), 'more than one connect type');
|
assert(!(isFileTransfer && isPortForward), 'more than one connect type');
|
||||||
if (isFileTransfer) {
|
if (isFileTransfer) {
|
||||||
connType = ConnType.fileTransfer;
|
connType = ConnType.fileTransfer;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user