-
-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
18 changed files
with
163 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,7 @@ abstract final class GithubIds { | |
'geol', | ||
'Mooling0602', | ||
'IllTamer', | ||
'marlkiller', | ||
}; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
part of 'app.dart'; | ||
|
||
final class _IntroPage extends StatelessWidget { | ||
const _IntroPage(); | ||
|
||
static final _setting = Stores.setting; | ||
static const _kIconSize = 23.0; | ||
static const _introListPad = EdgeInsets.symmetric(horizontal: 17); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return LayoutBuilder( | ||
builder: (context, cons) { | ||
final padTop = cons.maxHeight * .2; | ||
return IntroPage( | ||
pages: [ | ||
_buildAppSettings(context, padTop), | ||
_buildRecommended(context, padTop), | ||
], | ||
onDone: (ctx) { | ||
//Stores.setting.showIntro.put(false); | ||
Navigator.of(ctx).pushReplacement( | ||
MaterialPageRoute(builder: (_) => const HomePage()), | ||
); | ||
}, | ||
); | ||
}, | ||
); | ||
} | ||
|
||
Widget _buildRecommended(BuildContext context, double padTop) { | ||
return ListView( | ||
padding: _introListPad, | ||
children: [ | ||
SizedBox(height: padTop), | ||
const Icon(Bootstrap.stars, size: 35), | ||
SizedBox(height: padTop), | ||
ListTile( | ||
leading: const Icon(MingCute.delete_2_fill), | ||
title: const Text('rm -r'), | ||
subtitle: Text(l10n.sftpRmrDirSummary, style: UIs.textGrey), | ||
trailing: StoreSwitch(prop: _setting.sftpRmrDir), | ||
).cardx, | ||
ListTile( | ||
leading: const Icon(IonIcons.stats_chart, size: _kIconSize), | ||
title: Text(l10n.parseContainerStats), | ||
subtitle: Text(l10n.parseContainerStatsTip, style: UIs.textGrey), | ||
trailing: StoreSwitch(prop: _setting.containerParseStat), | ||
).cardx, | ||
ListTile( | ||
leading: const Icon(OctIcons.cpu), | ||
title: Text('CPU ${l10n.noLineChart}'), | ||
subtitle: Text(l10n.cpuViewAsProgressTip, style: UIs.textGrey), | ||
trailing: StoreSwitch(prop: _setting.cpuViewAsProgress), | ||
).cardx, | ||
], | ||
); | ||
} | ||
|
||
Widget _buildAppSettings(BuildContext ctx, double padTop) { | ||
return ListView( | ||
padding: _introListPad, | ||
children: [ | ||
SizedBox(height: padTop), | ||
_buildTitle(l10n.init, big: true), | ||
SizedBox(height: padTop), | ||
ListTile( | ||
leading: const Icon(IonIcons.language), | ||
title: Text(l10n.language), | ||
onTap: () async { | ||
final selected = await ctx.showPickSingleDialog( | ||
title: l10n.language, | ||
items: AppLocalizations.supportedLocales, | ||
name: (p0) => p0.code, | ||
initial: _setting.locale.fetch().toLocale, | ||
); | ||
if (selected != null) { | ||
_setting.locale.put(selected.code); | ||
RNodes.app.build(); | ||
} | ||
}, | ||
trailing: Text( | ||
l10n.languageName, | ||
style: const TextStyle(fontSize: 15, color: Colors.grey), | ||
), | ||
).cardx, | ||
ListTile( | ||
leading: const Icon(Icons.update), | ||
title: Text(l10n.autoCheckUpdate), | ||
subtitle: Text(l10n.fdroidReleaseTip, style: UIs.textGrey), | ||
trailing: StoreSwitch(prop: _setting.autoCheckAppUpdate), | ||
).cardx, | ||
], | ||
); | ||
} | ||
|
||
Widget _buildTitle(String text, {bool big = false}) { | ||
return Center( | ||
child: Text( | ||
text, | ||
style: big | ||
? const TextStyle(fontSize: 41, fontWeight: FontWeight.w500) | ||
: UIs.textGrey, | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters