feat: implement in-app ChangeLog from git history
This commit is contained in:
@@ -18,6 +18,7 @@ build/
|
||||
Thumbs.db
|
||||
|
||||
# --- Environment & Secrets ---
|
||||
assets/changelog.txt
|
||||
.env
|
||||
.env.local
|
||||
.envrc
|
||||
|
||||
+5
-3
@@ -188,7 +188,7 @@ tasks:
|
||||
|
||||
build-linux:
|
||||
desc: Build the Linux desktop app (debug)
|
||||
deps: [_preflight, _linux-deps-check, _codegen]
|
||||
deps: [_preflight, _linux-deps-check, _codegen, generate-changelog]
|
||||
method: timestamp
|
||||
sources:
|
||||
- lib/**/*.dart
|
||||
@@ -201,7 +201,7 @@ tasks:
|
||||
|
||||
build-linux-release:
|
||||
desc: Build the Linux desktop app (release)
|
||||
deps: [_preflight, _linux-deps-check, _codegen]
|
||||
deps: [_preflight, _linux-deps-check, _codegen, generate-changelog]
|
||||
method: timestamp
|
||||
sources:
|
||||
- lib/**/*.dart
|
||||
@@ -235,6 +235,8 @@ tasks:
|
||||
internal: true
|
||||
run: once
|
||||
preconditions:
|
||||
- list_directory:
|
||||
dir_path: ${ANDROID_HOME:-$HOME/Android/Sdk}
|
||||
- sh: test -d "${ANDROID_HOME:-$HOME/Android/Sdk}"
|
||||
msg: |
|
||||
Android SDK not found. Install it with:
|
||||
@@ -250,7 +252,7 @@ tasks:
|
||||
|
||||
build-android:
|
||||
desc: Build a release APK
|
||||
deps: [_preflight, _android-sdk-check, _pub-get]
|
||||
deps: [_preflight, _android-sdk-check, _pub-get, generate-changelog]
|
||||
method: timestamp
|
||||
sources:
|
||||
- lib/**/*.dart
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:sharedinbox/core/models/sieve_script.dart';
|
||||
import 'package:sharedinbox/ui/screens/account_list_screen.dart';
|
||||
import 'package:sharedinbox/ui/screens/add_account_screen.dart';
|
||||
import 'package:sharedinbox/ui/screens/address_emails_screen.dart';
|
||||
import 'package:sharedinbox/ui/screens/changelog_screen.dart';
|
||||
import 'package:sharedinbox/ui/screens/compose_screen.dart';
|
||||
import 'package:sharedinbox/ui/screens/edit_account_screen.dart';
|
||||
import 'package:sharedinbox/ui/screens/email_detail_screen.dart';
|
||||
@@ -36,6 +37,10 @@ final router = GoRouter(
|
||||
path: 'undo-log',
|
||||
builder: (ctx, state) => const UndoLogScreen(),
|
||||
),
|
||||
GoRoute(
|
||||
path: 'changelog',
|
||||
builder: (ctx, state) => const ChangeLogScreen(),
|
||||
),
|
||||
GoRoute(
|
||||
path: ':accountId/edit',
|
||||
builder: (ctx, state) => EditAccountScreen(
|
||||
|
||||
@@ -28,6 +28,27 @@ class AccountListScreen extends ConsumerWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
drawer: Drawer(
|
||||
child: ListView(
|
||||
children: [
|
||||
const DrawerHeader(
|
||||
decoration: BoxDecoration(color: Colors.blueGrey),
|
||||
child: Text(
|
||||
'SharedInbox',
|
||||
style: TextStyle(color: Colors.white, fontSize: 24),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.update),
|
||||
title: const Text('ChangeLog'),
|
||||
onTap: () {
|
||||
Navigator.pop(context); // Close drawer
|
||||
unawaited(context.push('/accounts/changelog'));
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
body: StreamBuilder(
|
||||
stream: ref.watch(accountRepositoryProvider).observeAccounts(),
|
||||
builder: (ctx, snap) {
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart' show rootBundle;
|
||||
|
||||
class ChangeLogScreen extends StatelessWidget {
|
||||
const ChangeLogScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('ChangeLog'),
|
||||
),
|
||||
body: FutureBuilder<String>(
|
||||
future: rootBundle.loadString('assets/changelog.txt'),
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
if (snapshot.hasError) {
|
||||
return Center(
|
||||
child: Text('Error loading changelog: ${snapshot.error}'),
|
||||
);
|
||||
}
|
||||
final content = snapshot.data ?? 'No changelog entries found.';
|
||||
return SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Text(
|
||||
content,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'monospace',
|
||||
fontSize: 13,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -59,6 +59,8 @@ dev_dependencies:
|
||||
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
assets:
|
||||
- assets/
|
||||
|
||||
dependency_overrides:
|
||||
# path_provider_android 2.3+ uses package:jni which crashes on startup
|
||||
|
||||
Reference in New Issue
Block a user