mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-06-22 10:02:20 +00:00
Fix const constructor error and finalize UI changes
This commit is contained in:
parent
c8fb883ec6
commit
0341835777
1 changed files with 11 additions and 30 deletions
|
|
@ -34,7 +34,7 @@ class DesktopHomePage extends StatefulWidget {
|
|||
}
|
||||
|
||||
const borderColor = Color(0xFF2F65BA);
|
||||
// 联系方式配置(请根据实际情况修改)
|
||||
// 联系方式配置
|
||||
const String _contactPhone = "+852 23889095";
|
||||
const String _whatsappUrl = "https://wa.me/85269994200";
|
||||
const String _whatsappNumber = "+852 69994200";
|
||||
|
|
@ -69,9 +69,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
|||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
buildLeftPane(context),
|
||||
// 删除右侧分隔线和右侧面板
|
||||
// if (!isIncomingOnly) const VerticalDivider(width: 1),
|
||||
// if (!isIncomingOnly) Expanded(child: buildRightPane(context)),
|
||||
// 删除右侧面板
|
||||
],
|
||||
));
|
||||
}
|
||||
|
|
@ -166,7 +164,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
|||
if (data.hasData) {
|
||||
if (isIncomingOnly) {
|
||||
if (isInHomePage()) {
|
||||
Future.delayed(Duration(milliseconds: 300), () {
|
||||
Future.delayed(const Duration(milliseconds: 300), () {
|
||||
_updateWindowSize();
|
||||
});
|
||||
}
|
||||
|
|
@ -180,13 +178,13 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
|||
buildPluginEntry(),
|
||||
];
|
||||
|
||||
// 始终添加服务状态控件(原本在右侧面板底部)
|
||||
// 添加服务状态控件
|
||||
children.addAll([
|
||||
const Divider(),
|
||||
OnlineStatusWidget(
|
||||
onSvcStatusChanged: () {
|
||||
if (isInHomePage()) {
|
||||
Future.delayed(Duration(milliseconds: 300), () {
|
||||
Future.delayed(const Duration(milliseconds: 300), () {
|
||||
_updateWindowSize();
|
||||
});
|
||||
}
|
||||
|
|
@ -194,7 +192,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
|||
).marginOnly(bottom: 6, right: 6),
|
||||
]);
|
||||
|
||||
// 添加联系方式(放在最底部)
|
||||
// 添加联系方式
|
||||
children.add(_buildContactInfo(context));
|
||||
|
||||
final textColor = Theme.of(context).textTheme.titleLarge?.color;
|
||||
|
|
@ -306,7 +304,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
|||
child: TextFormField(
|
||||
controller: model.serverId,
|
||||
readOnly: true,
|
||||
decoration: InputDecoration(
|
||||
decoration: const InputDecoration(
|
||||
border: InputBorder.none,
|
||||
contentPadding: EdgeInsets.only(top: 10, bottom: 10),
|
||||
),
|
||||
|
|
@ -367,7 +365,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
|||
final showOneTime = model.approveMode != 'click' &&
|
||||
model.verificationMethod != kUsePermanentPassword;
|
||||
return Container(
|
||||
margin: EdgeInsets.only(left: 20.0, right: 16, top: 13, bottom: 13),
|
||||
margin: const EdgeInsets.only(left: 20.0, right: 16, top: 13, bottom: 13),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.baseline,
|
||||
textBaseline: TextBaseline.alphabetic,
|
||||
|
|
@ -375,7 +373,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
|||
Container(
|
||||
width: 2,
|
||||
height: 52,
|
||||
decoration: BoxDecoration(color: MyTheme.accent),
|
||||
decoration: const BoxDecoration(color: MyTheme.accent),
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
|
|
@ -403,7 +401,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
|||
child: TextFormField(
|
||||
controller: model.serverPasswd,
|
||||
readOnly: true,
|
||||
decoration: InputDecoration(
|
||||
decoration: const InputDecoration(
|
||||
border: InputBorder.none,
|
||||
contentPadding:
|
||||
EdgeInsets.only(top: 14, bottom: 10),
|
||||
|
|
@ -574,22 +572,12 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
|||
bind.mainIsInstalledDaemon(prompt: true);
|
||||
});
|
||||
}
|
||||
//// Disable microphone configuration for macOS. We will request the permission when needed.
|
||||
// else if ((await osxCanRecordAudio() !=
|
||||
// PermissionAuthorizeType.authorized)) {
|
||||
// return buildInstallCard("Permissions", "config_microphone", "Configure",
|
||||
// () async {
|
||||
// osxRequestAudio();
|
||||
// watchIsCanRecordAudio = true;
|
||||
// });
|
||||
// }
|
||||
} else if (isLinux) {
|
||||
if (bind.isOutgoingOnly()) {
|
||||
return Container();
|
||||
}
|
||||
final LinuxCards = <Widget>[];
|
||||
if (bind.isSelinuxEnforcing()) {
|
||||
// Check is SELinux enforcing, but show user a tip of is SELinux enabled for simple.
|
||||
final keyShowSelinuxHelpTip = "show-selinux-help-tip";
|
||||
if (bind.mainGetLocalOption(key: keyShowSelinuxHelpTip) != 'N') {
|
||||
LinuxCards.add(buildInstallCard(
|
||||
|
|
@ -631,7 +619,6 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
|||
child: OutlinedButton(
|
||||
onPressed: () {
|
||||
SystemNavigator.pop(); // Close the application
|
||||
// https://github.com/flutter/flutter/issues/66631
|
||||
if (isWindows) {
|
||||
exit(0);
|
||||
}
|
||||
|
|
@ -794,10 +781,6 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
|||
if (watchIsInputMonitoring) {
|
||||
if (bind.mainIsCanInputMonitoring(prompt: false)) {
|
||||
watchIsInputMonitoring = false;
|
||||
// Do not notify for now.
|
||||
// Monitoring may not take effect until the process is restarted.
|
||||
// rustDeskWinManager.call(
|
||||
// WindowType.RemoteDesktop, kWindowDisableGrabKeyboard, '');
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
|
|
@ -839,7 +822,6 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
|||
switch (methodName) {
|
||||
case kWindowBumpMouse: return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -993,7 +975,6 @@ void setPasswordDialog({VoidCallback? notEmptyCallback}) async {
|
|||
DigitValidationRule(),
|
||||
UppercaseValidationRule(),
|
||||
LowercaseValidationRule(),
|
||||
// SpecialCharacterValidationRule(),
|
||||
MinCharactersValidationRule(8),
|
||||
];
|
||||
final maxLength = bind.mainMaxEncryptLen();
|
||||
|
|
@ -1213,4 +1194,4 @@ void setPasswordDialog({VoidCallback? notEmptyCallback}) async {
|
|||
onCancel: close,
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue