mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-06-19 17:05:33 +10:00
Add radio statistics and localization updates
- Implemented radio statistics features in multiple screens including chat, channels, and settings. - Added localization for new strings in Swedish, Ukrainian, and Chinese. - Introduced a setting to jump to the oldest unread message in chat and channels. - Enhanced path management and display for contacts and messages. - Updated app settings to include new boolean for jumping to the oldest unread message. - Improved battery indicator and radio stats display in the app bar. - Removed unused wakelock_plus dependency and updated plugin registrations.
This commit is contained in:
@@ -5,6 +5,17 @@ import '../l10n/l10n.dart';
|
||||
import '../utils/platform_info.dart';
|
||||
|
||||
class LinkHandler {
|
||||
static TextStyle defaultLinkStyle(BuildContext context, TextStyle base) {
|
||||
final brightness = Theme.of(context).brightness;
|
||||
final orange = brightness == Brightness.dark
|
||||
? const Color(0xFFFFB74D)
|
||||
: const Color(0xFFE65100);
|
||||
return base.copyWith(
|
||||
color: orange,
|
||||
decoration: TextDecoration.underline,
|
||||
);
|
||||
}
|
||||
|
||||
/// Returns a [SelectableLinkify] on desktop or a [Linkify] on mobile.
|
||||
static Widget buildLinkifyText({
|
||||
required BuildContext context,
|
||||
@@ -13,13 +24,9 @@ class LinkHandler {
|
||||
TextStyle? linkStyle,
|
||||
}) {
|
||||
final effectiveLinkStyle =
|
||||
linkStyle ??
|
||||
style.copyWith(
|
||||
color: Colors.green,
|
||||
decoration: TextDecoration.underline,
|
||||
);
|
||||
linkStyle ?? defaultLinkStyle(context, style);
|
||||
const options = LinkifyOptions(humanize: false, defaultToHttps: false);
|
||||
const linkifiers = [UrlLinkifier()];
|
||||
const linkifiers = [UrlLinkifier(), EmailLinkifier()];
|
||||
void onOpen(LinkableElement link) => handleLinkTap(context, link.url);
|
||||
|
||||
if (PlatformInfo.isDesktop) {
|
||||
|
||||
Reference in New Issue
Block a user