Skip to content

Commit

Permalink
Merge pull request #44 from flow-mn/support-page
Browse files Browse the repository at this point in the history
Support page
  • Loading branch information
sadespresso authored Feb 14, 2024
2 parents 7d68725 + a06e320 commit ca44a8b
Show file tree
Hide file tree
Showing 5 changed files with 163 additions and 8 deletions.
15 changes: 13 additions & 2 deletions assets/l10n/en_US.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"appName": "Flow",
"appShortDesc": "Your personal finance tracker",

"visitGitHubRepo": "Visit repo on GitHub",

"general.back": "Back",
"general.delete": "Delete",
"general.delete.permanentWarning": "This action is irreversible",
Expand Down Expand Up @@ -112,13 +115,21 @@
"tabs.profile": "Profile",
"tabs.profile.preferences": "Preferences",
"tabs.profile.community": "Community",
"tabs.profile.supportOnKofi": "Buy sadespresso a ko-fi",
"tabs.profile.viewProjectOnGitHub": "View project on GitHub",
"tabs.profile.support": "Support Flow",
"tabs.profile.joinDiscord": "Join Flow Discord",
"tabs.profile.backup": "Backup",
"tabs.profile.import": "Import",
"tabs.profile.withLoveFromTheCreator": "with 🤍 from sadespresso",

"support": "Support",
"support.description": "Flow is a labor of love, built free, and open for all. If you find Flow valuable, consider helping the project grow! Here are some ways to do so:",
"support.requestFeatures": "Give us ideas",
"support.requestFeatures.description": "You can also support us by giving feedback, and suggestion ideas to make Flow better.",
"support.contribute": "Contribute code",
"support.contribute.description": "If you're a developer, you can get involved in the development of Flow. The contributors list awaits your name to be added.",
"support.donateDeveloper": "Tip the creator",
"support.donateDeveloper.description": "All of Flow's functionality is offered free, and tipping the developer will not unlock any additional features",

"flowIcon.change": "Change icon",
"flowIcon.type.icon": "Icon",
"flowIcon.type.image": "Image",
Expand Down
15 changes: 13 additions & 2 deletions assets/l10n/mn_MN.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"appName": "Flow",
"appShortDesc": "Таны хувийн санхүүч",

"visitGitHubRepo": "GitHub repo-р зочлох",

"general.back": "Буцах",
"general.delete": "Устгах",
"general.delete.permanentWarning": "Энэ үйлдлийг буцаах боломжгүй",
Expand Down Expand Up @@ -112,13 +115,21 @@
"tabs.profile": "Бүртгэл",
"tabs.profile.preferences": "Тохиргоо",
"tabs.profile.community": "Холбоо",
"tabs.profile.supportOnKofi": "sadespresso-д кофе авч өгөх",
"tabs.profile.viewProjectOnGitHub": "GitHub-аар зочлох",
"tabs.profile.support": "Flow-г дэмжих",
"tabs.profile.joinDiscord": "Discord-д нэгдэх",
"tabs.profile.backup": "Нөөцлөх",
"tabs.profile.import": "Сэргээх",
"tabs.profile.withLoveFromTheCreator": "sadespresso хайр шингээж бүтээв 🤍",

"support": "Дэмжих",
"support.description": "Flow бол үнэгүй, хүн бүрд нээлттэй, хайр шингээж бүтээсэн төсөл юм. Хэрэв Flow танд тус болж байвал та төсөлд өөрийн хувь нэмрээ оруулах боломжтой шүү. Жишээлбэл:",
"support.requestFeatures": "Санаагаа хуваалц",
"support.requestFeatures.description": "Та өөрийн санал хүсэлтээ бидэнд хэлснээр Flow-г сайжруулахад туслах боломжтой.",
"support.contribute": "Хөгжүүлэлтэд оролцох",
"support.contribute.description": "Хэрэв та хөгжүүлэгч бол Flow-н хөгжүүлэлтэд оролцож, contributors-н жагсаалтад нэрээ нэмээрэй",
"support.donateDeveloper": "Хөгжүүлэгчид хандив өгөх",
"support.donateDeveloper.description": "Flow-н бүх үйлдлүүдийг үнэгүй ашиглах боломжтой бөгөөд хөгжүүлэгчид хандив өгснөөр аливаа шинэ боломж нээгдэхгүй болно",

"flowIcon.change": "Дүрс солих",
"flowIcon.type.icon": "Дүрс",
"flowIcon.type.image": "Зураг",
Expand Down
5 changes: 5 additions & 0 deletions lib/routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import 'package:flow/routes/setup/setup_currency_page.dart';
import 'package:flow/routes/setup/setup_profile_page.dart';
import 'package:flow/routes/setup/setup_profile_picture_page.dart';
import 'package:flow/routes/setup_page.dart';
import 'package:flow/routes/support_page.dart';
import 'package:flow/routes/transaction_page.dart';
import 'package:flow/routes/preferences_page.dart';
import 'package:flow/routes/transactions_page.dart';
Expand Down Expand Up @@ -170,5 +171,9 @@ final router = GoRouter(
),
],
),
GoRoute(
path: '/support',
builder: (context, state) => const SupportPage(),
),
],
);
8 changes: 4 additions & 4 deletions lib/routes/home/profile_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ class _ProfileTabState extends State<ProfileTab> {
onTap: () => openUrl(discordInviteLink),
),
ListTile(
title: Text("tabs.profile.supportOnKofi".t(context)),
leading: const Icon(SimpleIcons.kofi),
onTap: () => openUrl(maintainerKoFiLink),
title: Text("tabs.profile.support".t(context)),
leading: const Icon(Symbols.favorite_rounded),
onTap: () => context.push("/support"),
),
ListTile(
title: Text("tabs.profile.viewProjectOnGitHub".t(context)),
title: Text("visitGitHubRepo".t(context)),
leading: const Icon(SimpleIcons.github),
onTap: () => openUrl(flowGitHubRepoLink),
),
Expand Down
128 changes: 128 additions & 0 deletions lib/routes/support_page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
import 'package:flow/data/flow_icon.dart';
import 'package:flow/l10n/extensions.dart';
import 'package:flow/theme/theme.dart';
import 'package:flow/utils/utils.dart';
import 'package:flow/widgets/action_card.dart';
import 'package:flow/widgets/general/flow_icon.dart';
import 'package:flutter/material.dart';
import 'package:material_symbols_icons/symbols.dart';

class SupportPage extends StatelessWidget {
const SupportPage({super.key});

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("support".t(context)),
),
body: SafeArea(
child: SingleChildScrollView(
padding: const EdgeInsets.all(16.0),
child: Column(
children: [
Text("support.description".t(context)),
const SizedBox(height: 16.0),
ActionCard(
onTap: () => openUrl(
Uri.parse("https://github.com/flow-mn/flow/issues")),
builder: (context) => Padding(
padding: const EdgeInsets.symmetric(
horizontal: 24.0,
vertical: 16.0,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
FlowIcon(
FlowIconData.icon(Symbols.rate_review_rounded),
size: 80.0,
plated: true,
),
const SizedBox(height: 8.0),
Text(
"support.requestFeatures".t(context),
style: context.textTheme.headlineSmall,
),
const SizedBox(height: 8.0),
Text(
"support.requestFeatures.description".t(context),
style: context.textTheme.bodySmall,
),
],
),
),
),
const SizedBox(height: 16.0),
ActionCard(
onTap: () =>
openUrl(Uri.parse("https://github.com/flow-mn/flow")),
builder: (context) => Padding(
padding: const EdgeInsets.symmetric(
horizontal: 24.0,
vertical: 16.0,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
FlowIcon(
FlowIconData.icon(Symbols.code_rounded),
size: 80.0,
plated: true,
),
const SizedBox(height: 8.0),
Text(
"support.contribute".t(context),
style: context.textTheme.headlineSmall,
),
const SizedBox(height: 8.0),
Text(
"support.contribute.description".t(context),
style: context.textTheme.bodySmall,
),
],
),
),
),
const SizedBox(height: 16.0),
ActionCard(
onTap: () =>
openUrl(Uri.parse("https://ko-fi.com/sadespresso")),
builder: (context) => Padding(
padding: const EdgeInsets.symmetric(
horizontal: 24.0,
vertical: 16.0,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
FlowIcon(
FlowIconData.icon(Symbols.favorite_rounded),
size: 80.0,
plated: true,
),
const SizedBox(height: 8.0),
Text(
"support.donateDeveloper".t(context),
style: context.textTheme.headlineSmall,
),
const SizedBox(height: 8.0),
Text(
"support.donateDeveloper.description".t(context),
style: context.textTheme.bodySmall,
),
],
),
),
),
const SizedBox(height: 16.0),
],
),
),
),
);
}
}

0 comments on commit ca44a8b

Please sign in to comment.