фиксы
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:moonwell_launcher/app/launcher_version.dart';
|
||||
import 'package:moonwell_launcher/app/design_system/mw_shells.dart';
|
||||
import 'package:moonwell_launcher/app/theme/moonwell_design_system.dart';
|
||||
|
||||
@@ -47,6 +48,7 @@ class _MwAuthenticationFormState extends State<MwAuthenticationForm> {
|
||||
Widget build(BuildContext context) {
|
||||
final accent = MoonWellDesignTokens.of(context).accent;
|
||||
final registering = widget.mode == MwAuthenticationMode.registration;
|
||||
final launcherVersion = LauncherVersionScope.of(context);
|
||||
return AutofillGroup(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
@@ -259,10 +261,10 @@ class _MwAuthenticationFormState extends State<MwAuthenticationForm> {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 28),
|
||||
const Center(
|
||||
Center(
|
||||
child: Text(
|
||||
'MOONWELL · V 1.0.0 · PLAY.MOON-WELL.ONLINE',
|
||||
style: TextStyle(
|
||||
'MOONWELL · V $launcherVersion · PLAY.MOON-WELL.ONLINE',
|
||||
style: const TextStyle(
|
||||
fontFamily: 'JetBrains Mono',
|
||||
color: Color(0x52ECE4D0),
|
||||
fontSize: 8,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:moonwell_launcher/app/launcher_version.dart';
|
||||
import 'package:moonwell_launcher/app/design_system/mw_primitives.dart';
|
||||
import 'package:moonwell_launcher/app/theme/moonwell_design_system.dart';
|
||||
|
||||
@@ -718,37 +719,40 @@ class MwLauncherStatusBar extends StatelessWidget {
|
||||
final String? eta;
|
||||
final String? buildHash;
|
||||
@override
|
||||
Widget build(BuildContext context) => Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 32),
|
||||
decoration: const BoxDecoration(
|
||||
color: Color(0xD904060E),
|
||||
border: Border(top: BorderSide(color: _border)),
|
||||
),
|
||||
child: DefaultTextStyle(
|
||||
style: const TextStyle(
|
||||
fontFamily: 'JetBrains Mono',
|
||||
color: _muted,
|
||||
fontSize: 8,
|
||||
letterSpacing: .8,
|
||||
Widget build(BuildContext context) {
|
||||
final launcherVersion = LauncherVersionScope.of(context);
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 32),
|
||||
decoration: const BoxDecoration(
|
||||
color: Color(0xD904060E),
|
||||
border: Border(top: BorderSide(color: _border)),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(status, maxLines: 1, overflow: TextOverflow.ellipsis),
|
||||
),
|
||||
if (fileCount != null) Text(fileCount!),
|
||||
if (speed != null) ...[const SizedBox(width: 24), Text(speed!)],
|
||||
if (eta != null) ...[const SizedBox(width: 24), Text(eta!)],
|
||||
if (buildHash != null) ...[
|
||||
child: DefaultTextStyle(
|
||||
style: const TextStyle(
|
||||
fontFamily: 'JetBrains Mono',
|
||||
color: _muted,
|
||||
fontSize: 8,
|
||||
letterSpacing: .8,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(status, maxLines: 1, overflow: TextOverflow.ellipsis),
|
||||
),
|
||||
if (fileCount != null) Text(fileCount!),
|
||||
if (speed != null) ...[const SizedBox(width: 24), Text(speed!)],
|
||||
if (eta != null) ...[const SizedBox(width: 24), Text(eta!)],
|
||||
if (buildHash != null) ...[
|
||||
const SizedBox(width: 24),
|
||||
Text(buildHash!),
|
||||
],
|
||||
const SizedBox(width: 24),
|
||||
Text(buildHash!),
|
||||
Text('Лаунчер v$launcherVersion'),
|
||||
],
|
||||
const SizedBox(width: 24),
|
||||
const Text('Лаунчер v1.0.0'),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class MwAccountAffordance extends StatelessWidget {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:moonwell_launcher/app/launcher_version.dart';
|
||||
import 'package:moonwell_launcher/app/design_system/mw_launcher_components.dart';
|
||||
import 'package:moonwell_launcher/app/design_system/mw_window_chrome.dart';
|
||||
import 'package:moonwell_launcher/app/theme/moonwell_design_system.dart';
|
||||
@@ -302,21 +303,22 @@ class _LoginStatusBar extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final launcherVersion = LauncherVersionScope.of(context);
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 32),
|
||||
decoration: const BoxDecoration(
|
||||
color: Color(0xD904060E),
|
||||
border: Border(top: BorderSide(color: Color(0x247FB8D4))),
|
||||
),
|
||||
child: const Row(
|
||||
child: Row(
|
||||
children: [
|
||||
Text('Версия лаунчера 1.0.0'),
|
||||
SizedBox(width: 24),
|
||||
Text('·'),
|
||||
SizedBox(width: 24),
|
||||
Text('Соединение защищено TLS'),
|
||||
Spacer(),
|
||||
Text('© 2026 MoonWell'),
|
||||
Text('Версия лаунчера $launcherVersion'),
|
||||
const SizedBox(width: 24),
|
||||
const Text('·'),
|
||||
const SizedBox(width: 24),
|
||||
const Text('Соединение защищено TLS'),
|
||||
const Spacer(),
|
||||
const Text('© 2026 MoonWell'),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
class LauncherVersionScope extends InheritedWidget {
|
||||
const LauncherVersionScope({
|
||||
super.key,
|
||||
required this.version,
|
||||
required super.child,
|
||||
});
|
||||
|
||||
final String version;
|
||||
|
||||
static String of(BuildContext context) {
|
||||
return context
|
||||
.dependOnInheritedWidgetOfExactType<LauncherVersionScope>()
|
||||
?.version ??
|
||||
'dev';
|
||||
}
|
||||
|
||||
@override
|
||||
bool updateShouldNotify(LauncherVersionScope oldWidget) {
|
||||
return version != oldWidget.version;
|
||||
}
|
||||
}
|
||||
+14
-8
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:moonwell_launcher/app/design_system/mw_shells.dart';
|
||||
import 'package:moonwell_launcher/app/home_screen/home_screen.dart';
|
||||
import 'package:moonwell_launcher/app/launcher_version.dart';
|
||||
import 'package:moonwell_launcher/app/login_screen/login_screen.dart';
|
||||
import 'package:moonwell_launcher/app/theme/moonwell_design_system.dart';
|
||||
import 'package:moonwell_launcher/features/launcher/application/restore_launcher_session_use_case.dart';
|
||||
@@ -9,7 +10,9 @@ import 'package:moonwell_launcher/features/preferences/domain/repositories/prefe
|
||||
import 'package:moonwell_launcher/service_container.dart';
|
||||
|
||||
class MoonWellApp extends StatefulWidget {
|
||||
const MoonWellApp({super.key});
|
||||
const MoonWellApp({super.key, required this.launcherVersion});
|
||||
|
||||
final String launcherVersion;
|
||||
|
||||
@override
|
||||
State<MoonWellApp> createState() => _MoonWellAppState();
|
||||
@@ -35,13 +38,16 @@ class _MoonWellAppState extends State<MoonWellApp> {
|
||||
Widget build(BuildContext context) {
|
||||
return AnimatedBuilder(
|
||||
animation: _themeController,
|
||||
builder: (context, _) => LauncherThemeScope(
|
||||
controller: _themeController,
|
||||
child: MaterialApp(
|
||||
title: 'MoonWell',
|
||||
debugShowCheckedModeBanner: false,
|
||||
home: const _LauncherBootstrapScreen(),
|
||||
theme: MoonWellTheme.create(_themeController.variant),
|
||||
builder: (context, _) => LauncherVersionScope(
|
||||
version: widget.launcherVersion,
|
||||
child: LauncherThemeScope(
|
||||
controller: _themeController,
|
||||
child: MaterialApp(
|
||||
title: 'MoonWell',
|
||||
debugShowCheckedModeBanner: false,
|
||||
home: const _LauncherBootstrapScreen(),
|
||||
theme: MoonWellTheme.create(_themeController.variant),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user