Release Lunaris 2.0 customization update

This commit is contained in:
2026-05-26 12:45:46 +03:00
parent 9cff9e5307
commit f65efe7cf7
21 changed files with 514 additions and 189 deletions
+29 -16
View File
@@ -31,18 +31,24 @@ class GelRuleApp extends ConsumerWidget {
themeMode: ThemeMode.dark,
home: _StartupErrorScreen(error: error),
),
data: (_) => MaterialApp.router(
title: 'Lunaris',
debugShowCheckedModeBanner: false,
theme: buildTheme(Brightness.light),
darkTheme: buildTheme(Brightness.dark),
themeMode: settings.maybeWhen(
data: (value) => parseThemeMode(value.themeMode),
orElse: () => ThemeMode.dark,
),
routerConfig: router,
builder: (context, child) => _AppOverlay(child: child),
),
data: (_) {
final appSettings = settings.value ?? AppSettings.defaults;
return MaterialApp.router(
title: 'Lunaris',
debugShowCheckedModeBanner: false,
theme: buildTheme(
Brightness.light,
seedColor: appSettings.appSeedColor,
),
darkTheme: buildTheme(
Brightness.dark,
seedColor: appSettings.appSeedColor,
),
themeMode: parseThemeMode(appSettings.themeMode),
routerConfig: router,
builder: (context, child) => _AppOverlay(child: child),
);
},
);
}
}
@@ -79,7 +85,9 @@ class _AppOverlayState extends ConsumerState<_AppOverlay> {
await showDialog<void>(
context: context,
builder: (context) => AlertDialog(
title: Text('Lunaris ${info.version} is available'),
title: Text(_ru
? 'Доступен Lunaris ${info.version}'
: 'Lunaris ${info.version} is available'),
content: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 520),
child: SingleChildScrollView(
@@ -106,14 +114,14 @@ class _AppOverlayState extends ConsumerState<_AppOverlay> {
await ref.read(updateServiceProvider).skipVersion(info);
if (context.mounted) Navigator.pop(context);
},
child: const Text('Skip this version'),
child: Text(_ru ? 'Пропустить' : 'Skip this version'),
),
TextButton(
onPressed: () async {
await ref.read(updateServiceProvider).remindLater();
if (context.mounted) Navigator.pop(context);
},
child: const Text('Later'),
child: Text(_ru ? 'Позже' : 'Later'),
),
FilledButton.icon(
onPressed: () async {
@@ -121,7 +129,7 @@ class _AppOverlayState extends ConsumerState<_AppOverlay> {
if (context.mounted) Navigator.pop(context);
},
icon: const Icon(Icons.download_rounded),
label: const Text('Download & open'),
label: Text(_ru ? 'Скачать и открыть' : 'Download & open'),
),
],
),
@@ -129,6 +137,11 @@ class _AppOverlayState extends ConsumerState<_AppOverlay> {
ref.invalidate(appSettingsProvider);
}
bool get _ru =>
(ref.read(appSettingsProvider).value ?? AppSettings.defaults)
.languageCode ==
'ru';
Future<void> _downloadUpdate(AppUpdateInfo info) async {
final updateService = ref.read(updateServiceProvider);
final assetUrl = updateService.assetUrlForCurrentPlatform(info);
+3 -3
View File
@@ -1,3 +1,3 @@
const appDisplayVersion = '1.1.2';
const appBuildNumber = 13;
const appReleaseChannel = 'Experimental';
const appDisplayVersion = '2.0.0';
const appBuildNumber = 20;
const appReleaseChannel = 'Stable';
+11
View File
@@ -1,4 +1,15 @@
const lunarisChangelog = [
LunarisChange(
version: '2.0.0',
title: 'Customization and provider polish',
bullets: [
'Settings now include app customization: accent color, language, visible tabs and beta update channel.',
'The Artists tab disappears automatically when Kemono and Coomer are disabled.',
'All-provider feed mixing is more natural instead of provider-by-provider blocks.',
'Post cards use wider aspect ranges so images, GIFs and videos leave less empty space.',
'Kemono and Coomer creator search uses the current mbahArip keyword endpoints with public API fallbacks.',
],
),
LunarisChange(
version: '1.1.2',
title: 'Experimental tag and Artists update',
+2 -2
View File
@@ -1,9 +1,9 @@
import 'package:flutter/material.dart';
ThemeData buildTheme(Brightness brightness) {
ThemeData buildTheme(Brightness brightness, {int seedColor = 0xFFE84D8A}) {
final dark = brightness == Brightness.dark;
final scheme = ColorScheme.fromSeed(
seedColor: const Color(0xFFE84D8A),
seedColor: Color(seedColor),
brightness: brightness,
);
return ThemeData(