Hide 'powered by RustDesk' link on login page

loadPowered() in flutter/lib/common.dart now always returns SizedBox.shrink()
for the SoonDesk fork. The link is misleading for a non-official build
and clutters the login page.

Upstream behavior (controlled by the 'hide-powered-by-me' builtin option)
is preserved in commented-out form for reference.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
xuwenwei
2026-06-10 13:48:03 +08:00
parent 7edd24854f
commit 53ba2d753e
+26 -21
View File
@@ -3690,27 +3690,32 @@ Color? disabledTextColor(BuildContext context, bool enabled) {
}
Widget loadPowered(BuildContext context) {
if (bind.mainGetBuildinOption(key: "hide-powered-by-me") == 'Y') {
return SizedBox.shrink();
}
return MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
onTap: () {
launchUrl(Uri.parse('https://rustdesk.com'));
},
child: Opacity(
opacity: 0.5,
child: Text(
translate("powered_by_me"),
overflow: TextOverflow.clip,
style: Theme.of(context)
.textTheme
.bodySmall
?.copyWith(fontSize: 9, decoration: TextDecoration.underline),
)),
),
).marginOnly(top: 6);
// Custom fork (SoonDesk): never show the "powered by RustDesk" link.
// For non-official builds this is misleading (we're not "powered by"
// upstream RustDesk), and clutters the login page.
return SizedBox.shrink();
// (Upstream behavior kept below for reference.)
// if (bind.mainGetBuildinOption(key: "hide-powered-by-me") == 'Y') {
// return SizedBox.shrink();
// }
// return MouseRegion(
// cursor: SystemMouseCursors.click,
// child: GestureDetector(
// onTap: () {
// launchUrl(Uri.parse('https://rustdesk.com'));
// },
// child: Opacity(
// opacity: 0.5,
// child: Text(
// translate("powered_by_me"),
// overflow: TextOverflow.clip,
// style: Theme.of(context)
// .textTheme
// .bodySmall
// ?.copyWith(fontSize: 9, decoration: TextDecoration.underline),
// )),
// ),
// ).marginOnly(top: 6);
}
// max 300 x 60