feat(about): add Comunes Association copyleft notice à la Ğ1nkgo
This commit is contained in:
parent
913e058122
commit
33e0cffd30
8 changed files with 41 additions and 5 deletions
|
|
@ -8,6 +8,19 @@ import 'theme.dart';
|
|||
/// The app's public website. Shown as a tappable row in [AboutScreen].
|
||||
const String _websiteUrl = 'https://tanemaki.app';
|
||||
|
||||
/// The year Tanemaki's copyright starts. Ğ1nkgo uses its own first year (2023);
|
||||
/// Tanemaki's is 2026.
|
||||
const int _copyrightStartYear = 2026;
|
||||
|
||||
/// A single year (`2026`) until the calendar rolls over, then a range
|
||||
/// (`2026-2027`), mirroring Ğ1nkgo's legalese line.
|
||||
String _copyrightYears() {
|
||||
final int now = DateTime.now().year;
|
||||
return now <= _copyrightStartYear
|
||||
? '$_copyrightStartYear'
|
||||
: '$_copyrightStartYear-$now';
|
||||
}
|
||||
|
||||
/// An "about" screen à la Ğ1nkgo: brand header, the human explanation of what
|
||||
/// Tanemaki is and where its name comes from, the app version, license, the
|
||||
/// website, and the bundled open-source licenses page.
|
||||
|
|
@ -62,12 +75,24 @@ class AboutScreen extends StatelessWidget {
|
|||
onTap: () => showLicensePage(
|
||||
context: context,
|
||||
applicationName: t.app.title,
|
||||
applicationLegalese: t.about.copyright(years: _copyrightYears()),
|
||||
applicationIcon: Padding(
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: Image.asset('assets/logo.png', width: 48),
|
||||
),
|
||||
),
|
||||
),
|
||||
const Divider(height: 32),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Text(
|
||||
t.about.copyright(years: _copyrightYears()),
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
||||
color: seedOnSurface.withValues(alpha: 0.7),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue