Compare commits
	
		
			2 Commits
		
	
	
		
			286f705c41
			...
			6d3367c1cc
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 6d3367c1cc | |||
| 037fab6409 | 
@ -21,7 +21,9 @@
 | 
			
		||||
    },
 | 
			
		||||
    "about": {
 | 
			
		||||
        "title": "About",
 | 
			
		||||
        "source": "Source code"
 | 
			
		||||
        "source": "Source code",
 | 
			
		||||
        "license": "License",
 | 
			
		||||
        "close": "Clsoe"
 | 
			
		||||
    },
 | 
			
		||||
    "tooltips": {
 | 
			
		||||
        "addNewItem": "Add new item"
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -51,7 +51,7 @@ class CalendarBloc extends Bloc<CalendarEvent, CalendarState> {
 | 
			
		||||
        airing = false;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      print('Anime "${anime.title}": airing=${airing}');
 | 
			
		||||
      print('Anime "${anime.title}": airing=$airing');
 | 
			
		||||
      if (!airing) {
 | 
			
		||||
        al.add(
 | 
			
		||||
          AnimeUpdatedEvent(
 | 
			
		||||
 | 
			
		||||
@ -2,6 +2,7 @@ import 'package:anitrack/i18n/strings.g.dart';
 | 
			
		||||
import 'package:anitrack/licenses.g.dart';
 | 
			
		||||
import 'package:anitrack/src/ui/constants.dart';
 | 
			
		||||
import 'package:flutter/material.dart';
 | 
			
		||||
import 'package:flutter/services.dart';
 | 
			
		||||
import 'package:url_launcher/url_launcher.dart';
 | 
			
		||||
 | 
			
		||||
class AboutPage extends StatelessWidget {
 | 
			
		||||
@ -35,15 +36,50 @@ class AboutPage extends StatelessWidget {
 | 
			
		||||
                    'AniTrack',
 | 
			
		||||
                    style: Theme.of(context).textTheme.titleLarge,
 | 
			
		||||
                  ),
 | 
			
		||||
                  ElevatedButton(
 | 
			
		||||
                  Row(
 | 
			
		||||
                    mainAxisSize: MainAxisSize.min,
 | 
			
		||||
                    mainAxisAlignment: MainAxisAlignment.center,
 | 
			
		||||
                    children: [
 | 
			
		||||
                      Padding(
 | 
			
		||||
                        padding: const EdgeInsets.symmetric(horizontal: 4),
 | 
			
		||||
                        child: ElevatedButton(
 | 
			
		||||
                          onPressed: () async {
 | 
			
		||||
                            await launchUrl(
 | 
			
		||||
                        Uri.parse('https://codeberg.org/PapaTutuWawa/anitrack'),
 | 
			
		||||
                              Uri.parse(
 | 
			
		||||
                                'https://codeberg.org/PapaTutuWawa/anitrack',
 | 
			
		||||
                              ),
 | 
			
		||||
                              mode: LaunchMode.externalApplication,
 | 
			
		||||
                            );
 | 
			
		||||
                          },
 | 
			
		||||
                          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),
 | 
			
		||||
                        ),
 | 
			
		||||
                      ),
 | 
			
		||||
                    ],
 | 
			
		||||
                  ),
 | 
			
		||||
                ],
 | 
			
		||||
              ),
 | 
			
		||||
            );
 | 
			
		||||
@ -54,14 +90,34 @@ class AboutPage extends StatelessWidget {
 | 
			
		||||
 | 
			
		||||
          return ListTile(
 | 
			
		||||
            title: Text(dep.name),
 | 
			
		||||
            onTap: () async {
 | 
			
		||||
              if (dep.repository == null) return;
 | 
			
		||||
 | 
			
		||||
            onTap: () {
 | 
			
		||||
              showDialog<void>(
 | 
			
		||||
                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(
 | 
			
		||||
                            Uri.parse(dep.repository!),
 | 
			
		||||
                            mode: LaunchMode.externalApplication,
 | 
			
		||||
                          );
 | 
			
		||||
                        },
 | 
			
		||||
                        child: Text(t.about.source),
 | 
			
		||||
                      ),
 | 
			
		||||
                  ],
 | 
			
		||||
                ),
 | 
			
		||||
              );
 | 
			
		||||
            },
 | 
			
		||||
          );
 | 
			
		||||
        },
 | 
			
		||||
      ),
 | 
			
		||||
 | 
			
		||||
@ -46,6 +46,8 @@ dev_dependencies:
 | 
			
		||||
 | 
			
		||||
flutter:
 | 
			
		||||
  uses-material-design: true
 | 
			
		||||
  assets:
 | 
			
		||||
    - LICENSE
 | 
			
		||||
 | 
			
		||||
flutter_icons:
 | 
			
		||||
  android: "launcher_icon"
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user