Compare commits

..

No commits in common. "6d3367c1cc7d2a51fee27c92ddc2c1be40722a72" and "286f705c4125ddddc3e28ab055010db9a0668285" have entirely different histories.

5 changed files with 160 additions and 373 deletions

View File

@ -21,9 +21,7 @@
}, },
"about": { "about": {
"title": "About", "title": "About",
"source": "Source code", "source": "Source code"
"license": "License",
"close": "Clsoe"
}, },
"tooltips": { "tooltips": {
"addNewItem": "Add new item" "addNewItem": "Add new item"

File diff suppressed because it is too large Load Diff

View File

@ -51,7 +51,7 @@ class CalendarBloc extends Bloc<CalendarEvent, CalendarState> {
airing = false; airing = false;
} }
print('Anime "${anime.title}": airing=$airing'); print('Anime "${anime.title}": airing=${airing}');
if (!airing) { if (!airing) {
al.add( al.add(
AnimeUpdatedEvent( AnimeUpdatedEvent(

View File

@ -2,7 +2,6 @@ import 'package:anitrack/i18n/strings.g.dart';
import 'package:anitrack/licenses.g.dart'; import 'package:anitrack/licenses.g.dart';
import 'package:anitrack/src/ui/constants.dart'; import 'package:anitrack/src/ui/constants.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class AboutPage extends StatelessWidget { class AboutPage extends StatelessWidget {
@ -36,50 +35,15 @@ class AboutPage extends StatelessWidget {
'AniTrack', 'AniTrack',
style: Theme.of(context).textTheme.titleLarge, style: Theme.of(context).textTheme.titleLarge,
), ),
Row( ElevatedButton(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 4),
child: ElevatedButton(
onPressed: () async { onPressed: () async {
await launchUrl( await launchUrl(
Uri.parse( Uri.parse('https://codeberg.org/PapaTutuWawa/anitrack'),
'https://codeberg.org/PapaTutuWawa/anitrack',
),
mode: LaunchMode.externalApplication, mode: LaunchMode.externalApplication,
); );
}, },
child: Text(t.about.source), child: Text(t.about.source),
), ),
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 4),
child: ElevatedButton(
onPressed: () async {
final licenseText = await rootBundle.loadString(
'LICENSE',
);
await showDialog<void>(
context: context,
builder: (context) {
return SimpleDialog(
children: [
Padding(
padding: const EdgeInsets.all(16),
child: Text(licenseText),
),
],
);
},
);
},
child: Text(t.about.license),
),
),
],
),
], ],
), ),
); );
@ -90,34 +54,14 @@ class AboutPage extends StatelessWidget {
return ListTile( return ListTile(
title: Text(dep.name), title: Text(dep.name),
onTap: () { onTap: () async {
showDialog<void>( if (dep.repository == null) return;
context: context,
builder: (context) => AlertDialog(
content: SingleChildScrollView(
child: Text(dep.license ?? ''),
),
actions: [
TextButton(
onPressed: () {
Navigator.of(context).pop();
},
child: Text(t.about.close),
),
if (dep.repository != null)
TextButton(
onPressed: () async {
await launchUrl( await launchUrl(
Uri.parse(dep.repository!), Uri.parse(dep.repository!),
mode: LaunchMode.externalApplication, mode: LaunchMode.externalApplication,
); );
}, },
child: Text(t.about.source),
),
],
),
);
},
); );
}, },
), ),

View File

@ -46,8 +46,6 @@ dev_dependencies:
flutter: flutter:
uses-material-design: true uses-material-design: true
assets:
- LICENSE
flutter_icons: flutter_icons:
android: "launcher_icon" android: "launcher_icon"