Add custom themes, holiday themes, chat backgrounds and holiday animations
- Themes: name + background + accent, derived surfaces/text/bubbles; editor with live preview; share codes and .jsonl import/export - Theme icons: swap tab, send, settings, node avatar and map marker icons for named icons or pictures (lossless JPEG XL) - Chat backgrounds per channel/DM (color or JPEG XL picture with fade); themes can set one, optionally for every chat - Map follows custom themes (panels, accent, tile tint, markers) - Holiday themes (Halloween, Thanksgiving, Christmas, New Year's) with generated backgrounds, icons and map markers; automatic switching from 17 days before each holiday - Holiday greeting animations (bats, turkeys, Santa, fireworks) matched across all app languages via translation strings
This commit is contained in:
1 parent
780183b586
commit
4a574185e8
124 files changed
+12686
-292
No files matched your search
+20
-5
@@ -33,6 +33,7 @@ import 'services/map_tile_cache_service.dart';
|
||||
import 'services/chat_text_scale_service.dart';
|
||||
import 'services/translation_service.dart';
|
||||
import 'services/ui_view_state_service.dart';
|
||||
import 'services/chat_background_service.dart';
|
||||
import 'services/timeout_prediction_service.dart';
|
||||
import 'storage/prefs_manager.dart';
|
||||
import 'theme/mesh_theme.dart';
|
||||
@@ -83,8 +84,13 @@ void main() async {
|
||||
// `appSettingsService.settings`, so this cannot stay where it used to be
|
||||
// (after the constructions) without those two starting out wrong.
|
||||
await appSettingsService.loadSettings();
|
||||
// Re-check the automatic holiday theme when the date changes.
|
||||
appSettingsService.startDateWatch();
|
||||
// Undo a review-mode session the app was killed in before it could exit.
|
||||
await endReviewModeSession(appSettingsService);
|
||||
final chatBackgroundService = ChatBackgroundService(appSettingsService);
|
||||
// Drop pictures left behind by removed backgrounds or abandoned edits.
|
||||
unawaited(chatBackgroundService.collectGarbage());
|
||||
|
||||
// ---- image messages (AEIC over GRP_DATA) --------------------------------
|
||||
// The codec owns the ONNX decoder; the store owns received-image state and
|
||||
@@ -209,6 +215,7 @@ void main() async {
|
||||
receivedImageStore: receivedImageStore,
|
||||
imageReassembler: imageReassembler,
|
||||
networkMapUploadService: networkMapUploadService,
|
||||
chatBackgroundService: chatBackgroundService,
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -354,6 +361,7 @@ class MeshCoreApp extends StatefulWidget {
|
||||
final ReceivedImageStore receivedImageStore;
|
||||
final ImageStreamReassembler imageReassembler;
|
||||
final NetworkMapUploadService networkMapUploadService;
|
||||
final ChatBackgroundService chatBackgroundService;
|
||||
|
||||
const MeshCoreApp({
|
||||
super.key,
|
||||
@@ -373,6 +381,7 @@ class MeshCoreApp extends StatefulWidget {
|
||||
required this.receivedImageStore,
|
||||
required this.imageReassembler,
|
||||
required this.networkMapUploadService,
|
||||
required this.chatBackgroundService,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -465,9 +474,11 @@ class _MeshCoreAppState extends State<MeshCoreApp> with WidgetsBindingObserver {
|
||||
ChangeNotifierProvider.value(value: widget.imageCodecService),
|
||||
ChangeNotifierProvider.value(value: widget.receivedImageStore),
|
||||
ChangeNotifierProvider.value(value: widget.networkMapUploadService),
|
||||
ChangeNotifierProvider.value(value: widget.chatBackgroundService),
|
||||
],
|
||||
child: Consumer<AppSettingsService>(
|
||||
builder: (context, settingsService, child) {
|
||||
final customTheme = settingsService.activeCustomTheme;
|
||||
return MaterialApp(
|
||||
title: 'MeshCore Open',
|
||||
debugShowCheckedModeBanner: false,
|
||||
@@ -481,11 +492,15 @@ class _MeshCoreAppState extends State<MeshCoreApp> with WidgetsBindingObserver {
|
||||
locale: _localeFromSetting(
|
||||
settingsService.settings.languageOverride,
|
||||
),
|
||||
theme: MeshTheme.light(),
|
||||
darkTheme: MeshTheme.dark(),
|
||||
themeMode: _themeModeFromSetting(
|
||||
settingsService.settings.themeMode,
|
||||
),
|
||||
theme: customTheme != null
|
||||
? MeshTheme.fromCustom(customTheme)
|
||||
: MeshTheme.light(),
|
||||
darkTheme: customTheme != null
|
||||
? MeshTheme.fromCustom(customTheme)
|
||||
: MeshTheme.dark(),
|
||||
themeMode: customTheme != null
|
||||
? (customTheme.isDark ? ThemeMode.dark : ThemeMode.light)
|
||||
: _themeModeFromSetting(settingsService.settings.themeMode),
|
||||
builder: (context, child) {
|
||||
// Update notification service with resolved locale
|
||||
final locale = Localizations.localeOf(context);
|
||||
|
||||
Reference in new issue
Block a user