Merge branch 'rustdesk:master' into master
This commit is contained in:
commit
4e359848d1
32
.github/workflows/flutter-build.yml
vendored
32
.github/workflows/flutter-build.yml
vendored
@ -96,6 +96,22 @@ jobs:
|
||||
VCPKG_ROOT: C:\rustdesk_thirdpary_lib\vcpkg
|
||||
run: python3 .\build.py --portable --hwcodec --flutter --feature IddDriver
|
||||
|
||||
- name: find Runner.res
|
||||
# Windows: find Runner.res (compiled from ./flutter/windows/runner/Runner.rc), copy to ./Runner.res
|
||||
# Runner.rc does not contain actual version, but Runner.res does
|
||||
continue-on-error: true
|
||||
shell: bash
|
||||
run: |
|
||||
runner_res=$(find . -name "Runner.res");
|
||||
if [ "$runner_res" == "" ]; then
|
||||
echo "Runner.res: not found";
|
||||
else
|
||||
echo "Runner.res: $runner_res";
|
||||
cp $runner_res ./libs/portable/Runner.res;
|
||||
echo "list ./libs/portable/Runner.res";
|
||||
ls -l ./libs/portable/Runner.res;
|
||||
fi
|
||||
|
||||
- name: Sign rustdesk files
|
||||
uses: GermanBluefox/code-sign-action@v7
|
||||
if: env.UPLOAD_ARTIFACT == 'true'
|
||||
@ -198,6 +214,22 @@ jobs:
|
||||
curl -LJ -o ./Release/sciter.dll https://github.com/c-smile/sciter-sdk/raw/master/bin.win/x32/sciter.dll
|
||||
echo "output_folder=./Release" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: find Runner.res
|
||||
# Windows: find Runner.res (compiled from ./flutter/windows/runner/Runner.rc), copy to ./Runner.res
|
||||
# Runner.rc does not contain actual version, but Runner.res does
|
||||
continue-on-error: true
|
||||
shell: bash
|
||||
run: |
|
||||
runner_res=$(find . -name "Runner.res");
|
||||
if [ "$runner_res" == "" ]; then
|
||||
echo "Runner.res: not found";
|
||||
else
|
||||
echo "Runner.res: $runner_res";
|
||||
cp $runner_res ./libs/portable/Runner.res;
|
||||
echo "list ./libs/portable/Runner.res";
|
||||
ls -l ./libs/portable/Runner.res;
|
||||
fi
|
||||
|
||||
- name: Sign rustdesk files
|
||||
uses: GermanBluefox/code-sign-action@v7
|
||||
if: env.UPLOAD_ARTIFACT == 'true'
|
||||
|
@ -1699,7 +1699,10 @@ Future<bool> restoreWindowPosition(WindowType type,
|
||||
}
|
||||
if (lpos.isMaximized == true) {
|
||||
await restoreFrame();
|
||||
await wc.maximize();
|
||||
// An duration is needed to avoid the window being restored after maximized.
|
||||
Future.delayed(Duration(milliseconds: 300), () async {
|
||||
await wc.maximize();
|
||||
});
|
||||
} else {
|
||||
await restoreFrame();
|
||||
}
|
||||
|
@ -106,7 +106,8 @@ class _ConnectionPageState extends State<ConnectionPage>
|
||||
@override
|
||||
void onWindowLeaveFullScreen() {
|
||||
// Restore edge border to default edge size.
|
||||
stateGlobal.resizeEdgeSize.value = kWindowEdgeSize;
|
||||
stateGlobal.resizeEdgeSize.value =
|
||||
stateGlobal.isMaximized.isTrue ? kMaximizeEdgeSize : kWindowEdgeSize;
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -440,7 +440,6 @@ class DesktopTab extends StatelessWidget {
|
||||
tabType: tabType,
|
||||
state: state,
|
||||
tail: tail,
|
||||
isMaximized: stateGlobal.isMaximized,
|
||||
showMinimize: showMinimize,
|
||||
showMaximize: showMaximize,
|
||||
showClose: showClose,
|
||||
@ -455,7 +454,6 @@ class WindowActionPanel extends StatefulWidget {
|
||||
final bool isMainWindow;
|
||||
final DesktopTabType tabType;
|
||||
final Rx<DesktopTabState> state;
|
||||
final RxBool isMaximized;
|
||||
|
||||
final bool showMinimize;
|
||||
final bool showMaximize;
|
||||
@ -468,7 +466,6 @@ class WindowActionPanel extends StatefulWidget {
|
||||
required this.isMainWindow,
|
||||
required this.tabType,
|
||||
required this.state,
|
||||
required this.isMaximized,
|
||||
this.tail,
|
||||
this.showMinimize = true,
|
||||
this.showMaximize = true,
|
||||
@ -495,18 +492,18 @@ class WindowActionPanelState extends State<WindowActionPanel>
|
||||
Future.delayed(Duration(milliseconds: 500), () {
|
||||
if (widget.isMainWindow) {
|
||||
windowManager.isMaximized().then((maximized) {
|
||||
if (widget.isMaximized.value != maximized) {
|
||||
if (stateGlobal.isMaximized.value != maximized) {
|
||||
WidgetsBinding.instance.addPostFrameCallback(
|
||||
(_) => setState(() => widget.isMaximized.value = maximized));
|
||||
(_) => setState(() => stateGlobal.setMaximized(maximized)));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
final wc = WindowController.fromWindowId(kWindowId!);
|
||||
wc.isMaximized().then((maximized) {
|
||||
debugPrint("isMaximized $maximized");
|
||||
if (widget.isMaximized.value != maximized) {
|
||||
if (stateGlobal.isMaximized.value != maximized) {
|
||||
WidgetsBinding.instance.addPostFrameCallback(
|
||||
(_) => setState(() => widget.isMaximized.value = maximized));
|
||||
(_) => setState(() => stateGlobal.setMaximized(maximized)));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -535,10 +532,6 @@ class WindowActionPanelState extends State<WindowActionPanel>
|
||||
|
||||
@override
|
||||
void onWindowMaximize() {
|
||||
// catch maximize from system
|
||||
if (!widget.isMaximized.value) {
|
||||
widget.isMaximized.value = true;
|
||||
}
|
||||
stateGlobal.setMinimized(false);
|
||||
_setMaximized(true);
|
||||
super.onWindowMaximize();
|
||||
@ -546,10 +539,6 @@ class WindowActionPanelState extends State<WindowActionPanel>
|
||||
|
||||
@override
|
||||
void onWindowUnmaximize() {
|
||||
// catch unmaximize from system
|
||||
if (widget.isMaximized.value) {
|
||||
widget.isMaximized.value = false;
|
||||
}
|
||||
stateGlobal.setMinimized(false);
|
||||
_setMaximized(false);
|
||||
super.onWindowUnmaximize();
|
||||
@ -632,9 +621,10 @@ class WindowActionPanelState extends State<WindowActionPanel>
|
||||
Offstage(
|
||||
offstage: !widget.showMaximize || Platform.isMacOS,
|
||||
child: Obx(() => ActionIcon(
|
||||
message:
|
||||
widget.isMaximized.value ? 'Restore' : 'Maximize',
|
||||
icon: widget.isMaximized.value
|
||||
message: stateGlobal.isMaximized.isTrue
|
||||
? 'Restore'
|
||||
: 'Maximize',
|
||||
icon: stateGlobal.isMaximized.isTrue
|
||||
? IconFont.restore
|
||||
: IconFont.max,
|
||||
onTap: _toggleMaximize,
|
||||
@ -671,10 +661,8 @@ class WindowActionPanelState extends State<WindowActionPanel>
|
||||
|
||||
void _toggleMaximize() {
|
||||
toggleMaximize(widget.isMainWindow).then((maximize) {
|
||||
if (widget.isMaximized.value != maximize) {
|
||||
// update state for sub window, wc.unmaximize/maximize() will not invoke onWindowMaximize/Unmaximize
|
||||
widget.isMaximized.value = maximize;
|
||||
}
|
||||
// update state for sub window, wc.unmaximize/maximize() will not invoke onWindowMaximize/Unmaximize
|
||||
stateGlobal.setMaximized(maximize);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -25,6 +25,9 @@ class _HomePageState extends State<HomePage> {
|
||||
var _selectedIndex = 0;
|
||||
int get selectedIndex => _selectedIndex;
|
||||
final List<PageShape> _pages = [];
|
||||
bool get isChatPageCurrentTab => isAndroid
|
||||
? _selectedIndex == 1
|
||||
: false; // change this when ios have chat page
|
||||
|
||||
void refreshPages() {
|
||||
setState(() {
|
||||
@ -79,13 +82,15 @@ class _HomePageState extends State<HomePage> {
|
||||
unselectedItemColor: MyTheme.darkGray,
|
||||
onTap: (index) => setState(() {
|
||||
// close chat overlay when go chat page
|
||||
if (index == 1 && _selectedIndex != index) {
|
||||
gFFI.chatModel.hideChatIconOverlay();
|
||||
gFFI.chatModel.hideChatWindowOverlay();
|
||||
gFFI.chatModel
|
||||
.mobileClearClientUnread(gFFI.chatModel.currentKey.connId);
|
||||
if (_selectedIndex != index) {
|
||||
_selectedIndex = index;
|
||||
if (isChatPageCurrentTab) {
|
||||
gFFI.chatModel.hideChatIconOverlay();
|
||||
gFFI.chatModel.hideChatWindowOverlay();
|
||||
gFFI.chatModel.mobileClearClientUnread(
|
||||
gFFI.chatModel.currentKey.connId);
|
||||
}
|
||||
}
|
||||
_selectedIndex = index;
|
||||
}),
|
||||
),
|
||||
body: _pages.elementAt(_selectedIndex),
|
||||
@ -95,7 +100,7 @@ class _HomePageState extends State<HomePage> {
|
||||
Widget appTitle() {
|
||||
final currentUser = gFFI.chatModel.currentUser;
|
||||
final currentKey = gFFI.chatModel.currentKey;
|
||||
if (_selectedIndex == 1 &&
|
||||
if (isChatPageCurrentTab &&
|
||||
currentUser != null &&
|
||||
currentKey.peerId.isNotEmpty) {
|
||||
final connected =
|
||||
|
@ -403,7 +403,7 @@ class ChatModel with ChangeNotifier {
|
||||
parent.target?.serverModel.jumpTo(id);
|
||||
}
|
||||
} else {
|
||||
if (HomePage.homeKey.currentState?.selectedIndex != 1 ||
|
||||
if (HomePage.homeKey.currentState?.isChatPageCurrentTab != true ||
|
||||
_currentKey != messagekey) {
|
||||
client.unreadChatMessageCount.value += 1;
|
||||
mobileUpdateUnreadSum();
|
||||
|
@ -451,6 +451,22 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
flex_color_picker:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flex_color_picker
|
||||
sha256: f37476ab3e80dcaca94e428e159944d465dd16312fda9ff41e07e86f04bfa51c
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.3.0"
|
||||
flex_seed_scheme:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flex_seed_scheme
|
||||
sha256: "29c12aba221eb8a368a119685371381f8035011d18de5ba277ad11d7dfb8657f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.4.0"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
@ -1558,4 +1574,4 @@ packages:
|
||||
version: "0.2.0"
|
||||
sdks:
|
||||
dart: ">=3.0.0 <4.0.0"
|
||||
flutter: ">=3.7.0-0"
|
||||
flutter: ">=3.10.0"
|
||||
|
@ -93,7 +93,7 @@ BEGIN
|
||||
VALUE "FileDescription", "rustdesk" "\0"
|
||||
VALUE "FileVersion", VERSION_AS_STRING "\0"
|
||||
VALUE "InternalName", "rustdesk" "\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2022 com.carriez. All rights reserved." "\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2023 com.carriez. All rights reserved." "\0"
|
||||
VALUE "OriginalFilename", "rustdesk.exe" "\0"
|
||||
VALUE "ProductName", "rustdesk" "\0"
|
||||
VALUE "ProductVersion", VERSION_AS_STRING "\0"
|
||||
|
@ -1,5 +1,10 @@
|
||||
extern crate embed_resource;
|
||||
use std::fs;
|
||||
|
||||
fn main() {
|
||||
embed_resource::compile("icon.rc", embed_resource::NONE);
|
||||
let runner_res_path = "Runner.res";
|
||||
match fs::metadata(runner_res_path) {
|
||||
Ok(_) => println!("cargo:rustc-link-lib=dylib:+verbatim=./libs/portable/Runner.res"),
|
||||
Err(_) => embed_resource::compile("icon.rc", embed_resource::NONE),
|
||||
}
|
||||
}
|
||||
|
@ -538,8 +538,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("pull_ab_failed_tip", "Impossibile aggiornare la rubrica"),
|
||||
("push_ab_failed_tip", "Impossibile sincronizzare la rubrica con il server"),
|
||||
("synced_peer_readded_tip", "I dispositivi presenti nelle sessioni recenti saranno sincronizzati di nuovo nella rubrica."),
|
||||
("Change Color", ""),
|
||||
("Primary Color", ""),
|
||||
("HSV Color", ""),
|
||||
("Change Color", "Modifica colore"),
|
||||
("Primary Color", "Colore primario"),
|
||||
("HSV Color", "Colore HSV"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user