Tester feedback: offline mode, pt-PT, menus, layout and translations
Offline (read-only) mode - The last connected radio is remembered; with no radio the app opens on its saved contacts, channels, messages and unread counts. - Main screens stay open on disconnect. A Connect button replaces the battery and signal indicators, with a sheet to reconnect, choose a radio or stop a pending reconnect. - While disconnected everything is read-only: the composer becomes a "connect to send" bar (drafts kept) and controls that change the radio or stored history are disabled or hidden. - Resending while disconnected no longer deletes the message; a different radio no longer shows the previous radio's channels. - Notification taps open the saved chat while offline. Chats and menus - Channel chat menu: notifications, edit channel, delete channel; the filter row lines up with the others; bell moved out of the app bar. - DM and room menus: remove from contacts; rooms get room management. - Search field uses the full app bar; long-press a result to copy. - Hashtag channel titles no longer read "# #name"; more room around the radio activity dot. - Repeat filter: short messages from one sender are caught at the same count as long ones. Layout - Shared menu row (wraps to two lines) and segment label (never splits a word) used across the app. - One Scan button on the scanner; consistent settings tile titles; contact "last seen" wraps instead of truncating; unfetched repeater settings are dimmed. Localization - New European Portuguese locale (pt_PT); regional locales are handled by the language picker, notifications and the background service. - Fill 67 missing strings per locale, including backup and restore. - Keep "Flood" and "Zero Hop" untranslated, shorten "last seen" and routing labels, and fix mistranslated scan, theme and hop strings. - Received-image strings, badge and caption come from translations. - Regenerate the Czech localizations, which were missing strings. Docs - Add documentation/design.md (UI reference) and offline-mode.md; update channel, chat, navigation and scanner docs.
This commit is contained in:
1 parent
47f2293a5c
commit
462159e803
108 files changed
+17435
-4536
No files matched your search
@@ -6,7 +6,9 @@ import '../helpers/gif_helper.dart';
|
||||
import '../l10n/l10n.dart';
|
||||
import '../services/app_settings_service.dart';
|
||||
import '../theme/mesh_theme.dart';
|
||||
import '../utils/radio_guard.dart';
|
||||
import 'byte_count_input.dart';
|
||||
import 'connect_sheet.dart';
|
||||
import 'gif_message.dart';
|
||||
import 'gif_picker.dart';
|
||||
import 'mesh_ui.dart';
|
||||
@@ -116,13 +118,7 @@ class ChatComposer extends StatelessWidget {
|
||||
for (final action in actions)
|
||||
PopupMenuItem(
|
||||
value: action.id,
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(action.icon),
|
||||
const SizedBox(width: 12),
|
||||
Flexible(child: Text(action.label)),
|
||||
],
|
||||
),
|
||||
child: MeshMenuItemRow(icon: action.icon, label: action.label),
|
||||
),
|
||||
],
|
||||
);
|
||||
@@ -133,6 +129,9 @@ class ChatComposer extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final scheme = Theme.of(context).colorScheme;
|
||||
// Offline the chat is read-only. The draft stays in [controller] (owned
|
||||
// by the screen) and is back when the radio reconnects.
|
||||
if (context.radioReadOnly) return const OfflineComposerBar();
|
||||
final translation = context
|
||||
.select<AppSettingsService, (bool, bool, String?)>(
|
||||
(s) => (
|
||||
@@ -290,3 +289,70 @@ class ChatComposer extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// Stands in for the composer while no radio is connected.
|
||||
class OfflineComposerBar extends StatelessWidget {
|
||||
const OfflineComposerBar({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final scheme = Theme.of(context).colorScheme;
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: scheme.surfaceContainerLow,
|
||||
border: Border(top: BorderSide(color: scheme.outlineVariant, width: 1)),
|
||||
),
|
||||
child: SafeArea(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 10, 12, 10),
|
||||
child: LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final message = Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.cloud_off,
|
||||
color: scheme.onSurfaceVariant,
|
||||
size: 24,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Text(
|
||||
context.l10n.chat_composerOffline,
|
||||
style: Theme.of(
|
||||
context,
|
||||
).textTheme.bodyLarge?.copyWith(color: scheme.onSurface),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
// Side by side when there is room; otherwise the button goes
|
||||
// under the message so large text never squeezes it.
|
||||
final roomy =
|
||||
constraints.maxWidth /
|
||||
MediaQuery.textScalerOf(context).scale(1) >=
|
||||
420;
|
||||
if (roomy) {
|
||||
return Row(
|
||||
children: [
|
||||
Expanded(child: message),
|
||||
const SizedBox(width: 8),
|
||||
const ConnectButton(),
|
||||
],
|
||||
);
|
||||
}
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
message,
|
||||
const SizedBox(height: 8),
|
||||
const ConnectButton(),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user