Skip to content

Commit

Permalink
Merge branch 'main' into tour
Browse files Browse the repository at this point in the history
  • Loading branch information
BrawlerXull authored Aug 27, 2024
2 parents 26d2b88 + 31e1904 commit 75c7579
Show file tree
Hide file tree
Showing 24 changed files with 1,505 additions and 70 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/flutterci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ jobs:
# Step 5: Analyze the code using flutter analyze
- run: flutter analyze

# Step 6: Format the code using flutter format
# - run: flutter format -n --set-exit-if-changed .
# Step 6: Format the code using flutter format (uncomment if needed)
# - run: flutter format -n --set-exit-if-changed .

# Step 7: Run tests using flutter test
# - run: flutter test

- run: flutter test

# Step 8: Build APK using flutter build apk
- run: flutter build apk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart';
import 'package:taskwarrior/app/utils/constants/utilites.dart';

import 'package:taskwarrior/app/utils/gen/fonts.gen.dart';

import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';
import 'package:taskwarrior/app/utils/language/sentence_manager.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';

import 'package:url_launcher/url_launcher.dart';

import '../controllers/manage_task_server_controller.dart';
Expand All @@ -32,7 +36,9 @@ class ManageTaskServerPageAppBar extends StatelessWidget
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Configure TaskServer",
SentenceManager(currentLanguage: AppSettings.selectedLanguage)
.sentences
.manageTaskServerPageConfigureTaskserver,
style: TextStyle(
fontFamily: FontFamily.poppins,
color: TaskWarriorColors.white,
Expand Down
157 changes: 109 additions & 48 deletions lib/app/modules/manageTaskServer/views/manage_task_server_page_body.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:taskwarrior/app/models/storage/set_config.dart';
import 'package:taskwarrior/app/modules/manageTaskServer/views/pem_widget.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart';
import 'package:taskwarrior/app/utils/language/sentence_manager.dart';

import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

Expand Down Expand Up @@ -36,7 +37,9 @@ class ManageTaskServerPageBody extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Configure TASKRC",
SentenceManager(currentLanguage: AppSettings.selectedLanguage)
.sentences
.manageTaskServerPageConfigureTASKRC,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
Expand Down Expand Up @@ -79,7 +82,11 @@ class ManageTaskServerPageBody extends StatelessWidget {
MainAxisAlignment.start,
children: [
Text(
'Configure TaskRc',
SentenceManager(
currentLanguage: AppSettings
.selectedLanguage)
.sentences
.manageTaskServerPageConfigureTaskRCDialogueBoxTitle,
style: TextStyle(
fontWeight: TaskWarriorFonts.bold,
color: AppSettings.isDarkMode
Expand All @@ -88,7 +95,11 @@ class ManageTaskServerPageBody extends StatelessWidget {
),
),
Text(
'Paste the taskrc content or select taskrc file',
SentenceManager(
currentLanguage: AppSettings
.selectedLanguage)
.sentences
.manageTaskServerPageConfigureTaskRCDialogueBoxSubtitle,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
Expand All @@ -110,44 +121,52 @@ class ManageTaskServerPageBody extends StatelessWidget {
.taskrcContentController,
maxLines: 8,
decoration: InputDecoration(
counterStyle: TextStyle(
color:
AppSettings.isDarkMode
? TaskWarriorColors
.white
: TaskWarriorColors
.black),
suffixIconConstraints:
const BoxConstraints(
maxHeight: 24,
maxWidth: 24,
),
isDense: true,
suffix: IconButton(
onPressed: () async {
controller
.setContent(context);
},
icon: const Icon(
Icons.content_paste),
),
border:
const OutlineInputBorder(),
labelStyle:
GoogleFonts.poppins(
color: AppSettings
.isDarkMode
? TaskWarriorColors
.white
: TaskWarriorColors
.black),
labelText:
'Paste your taskrc contents here'),
counterStyle: TextStyle(
color:
AppSettings.isDarkMode
? TaskWarriorColors
.white
: TaskWarriorColors
.black),
suffixIconConstraints:
const BoxConstraints(
maxHeight: 24,
maxWidth: 24,
),
isDense: true,
suffix: IconButton(
onPressed: () async {
controller
.setContent(context);
},
icon: const Icon(
Icons.content_paste),
),
border:
const OutlineInputBorder(),
labelStyle: GoogleFonts.poppins(
color:
AppSettings.isDarkMode
? TaskWarriorColors
.white
: TaskWarriorColors
.black),
labelText: SentenceManager(
currentLanguage:
AppSettings
.selectedLanguage)
.sentences
.manageTaskServerPageConfigureTaskRCDialogueBoxInputFieldText,
),
),
),
),
Text(
"Or",
SentenceManager(
currentLanguage: AppSettings
.selectedLanguage)
.sentences
.manageTaskServerPageConfigureTaskRCDialogueBoxOr,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
Expand All @@ -173,7 +192,11 @@ class ManageTaskServerPageBody extends StatelessWidget {
Get.back();
},
child: Text(
'Select TASKRC file',
SentenceManager(
currentLanguage: AppSettings
.selectedLanguage)
.sentences
.manageTaskServerPageConfigureTaskRCDialogueBoxSelectTaskRC,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
Expand Down Expand Up @@ -206,8 +229,16 @@ class ManageTaskServerPageBody extends StatelessWidget {
children: [
Text(
controller.taskrcContentController.text.isEmpty
? "Set TaskRc"
: "Taskrc file is verified",
? SentenceManager(
currentLanguage:
AppSettings.selectedLanguage)
.sentences
.manageTaskServerPageSetTaskRC
: SentenceManager(
currentLanguage:
AppSettings.selectedLanguage)
.sentences
.manageTaskServerPageTaskRCFileIsVerified,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
Expand Down Expand Up @@ -448,19 +479,49 @@ class ManageTaskServerPageBody extends StatelessWidget {
storage: controller.storage,
pem: pem,
optionString: pem == "taskd.certificate"
? "Configure your certificate"
? SentenceManager(
currentLanguage: AppSettings.selectedLanguage)
.sentences
.manageTaskServerPageConfigureYourCertificate
: pem == "taskd.key"
? "Configure TaskServer key"
? SentenceManager(
currentLanguage:
AppSettings.selectedLanguage)
.sentences
.manageTaskServerPageConfigureTaskserverKey
: pem == "taskd.ca"
? "Configure Server Certificate"
: "Configure Server Certificate",
? SentenceManager(
currentLanguage:
AppSettings.selectedLanguage)
.sentences
.manageTaskServerPageConfigureServerCertificate
: SentenceManager(
currentLanguage:
AppSettings.selectedLanguage)
.sentences
.manageTaskServerPageConfigureServerCertificate,
listTileTitle: pem == "taskd.certificate"
? "Select Certificate"
? SentenceManager(
currentLanguage: AppSettings.selectedLanguage)
.sentences
.manageTaskServerPageSelectCertificate
: pem == "taskd.key"
? "Select key"
? SentenceManager(
currentLanguage:
AppSettings.selectedLanguage)
.sentences
.manageTaskServerPageSelectKey
: pem == "taskd.ca"
? "Select Certificate"
: "Select Certificate",
? SentenceManager(
currentLanguage:
AppSettings.selectedLanguage)
.sentences
.manageTaskServerPageSelectCertificate
: SentenceManager(
currentLanguage:
AppSettings.selectedLanguage)
.sentences
.manageTaskServerPageSelectCertificate,
onTapCallBack: controller.onTapPEMWidget,
onLongPressCallBack: controller.onLongPressPEMWidget,
globalKey: controller.getGlobalKey(pem),
Expand Down
7 changes: 6 additions & 1 deletion lib/app/modules/profile/views/deleteprofiledialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import 'package:taskwarrior/app/modules/splash/controllers/splash_controller.dar
import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
import 'package:taskwarrior/app/utils/constants/utilites.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';
import 'package:taskwarrior/app/utils/language/sentence_manager.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';

class DeleteProfileDialog extends StatelessWidget {
const DeleteProfileDialog({
Expand All @@ -23,7 +25,10 @@ class DeleteProfileDialog extends StatelessWidget {
child: Utils.showAlertDialog(
scrollable: true,
title: Text(
'Delete Profile?',
SentenceManager(
currentLanguage: AppSettings.selectedLanguage)
.sentences
.profilePageDeleteProfile,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
Expand Down
47 changes: 41 additions & 6 deletions lib/app/modules/profile/views/manageprofile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart';

import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';
import 'package:taskwarrior/app/utils/language/sentence_manager.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';

import 'package:tuple/tuple.dart';

Expand All @@ -27,11 +30,41 @@ class ManageProfile extends StatelessWidget {
@override
Widget build(BuildContext context) {
var triples = [
Tuple3(Icons.edit, 'Rename Alias', rename),
Tuple3(Icons.link, 'Configure Taskserver', configure),
Tuple3(Icons.upload, 'Export tasks', export),
Tuple3(Icons.copy, 'Copy config to new profile', copy),
Tuple3(Icons.delete, 'Delete profile', delete),
Tuple3(
Icons.edit,
SentenceManager(currentLanguage: AppSettings.selectedLanguage)
.sentences
.profilePageRenameAlias,
rename,
),
Tuple3(
Icons.link,
SentenceManager(currentLanguage: AppSettings.selectedLanguage)
.sentences
.profilePageConfigureTaskserver,
configure,
),
Tuple3(
Icons.upload,
SentenceManager(currentLanguage: AppSettings.selectedLanguage)
.sentences
.profilePageExportTasks,
export,
),
Tuple3(
Icons.copy,
SentenceManager(currentLanguage: AppSettings.selectedLanguage)
.sentences
.profilePageCopyConfigToNewProfile,
copy,
),
Tuple3(
Icons.delete,
SentenceManager(currentLanguage: AppSettings.selectedLanguage)
.sentences
.profilePageDeleteProfile,
delete,
),
];

return ExpansionTile(
Expand All @@ -52,7 +85,9 @@ class ManageProfile extends StatelessWidget {
? TaskWarriorColors.white
: TaskWarriorColors.black,
title: Text(
'Manage selected profile',
SentenceManager(currentLanguage: AppSettings.selectedLanguage)
.sentences
.profilePageManageSelectedProfile,
style: GoogleFonts.poppins(
fontWeight: TaskWarriorFonts.bold,
fontSize: TaskWarriorFonts.fontSizeMedium,
Expand Down
Loading

0 comments on commit 75c7579

Please sign in to comment.