Skip to content

Commit

Permalink
Merge branch 'rc-1.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
jenspfahl committed Jun 8, 2023
2 parents ce6bbeb + 865058a commit 8d300fd
Show file tree
Hide file tree
Showing 33 changed files with 30,184 additions and 196 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,9 @@ To re-generate floor files execute:

flutter packages pub run build_runner build

To build the release with custom icon data:

flutter build apk --release --no-tree-shake-icons

## Contribute
You are welcome to translate the app. See [TRANSLATE.md](TRANSLATE.md).
54 changes: 49 additions & 5 deletions assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"activate_schedule": "Aktiviere den Zeitplan",
"scheduled_from_hint": "Geplant ab",
"scheduled_from_emphasis": "Wähle ab wann der Zeitplan gilt",
"activate_reminders": "Aktiviere Erinnerungen",
"activate_reminders": "Aktiviere Erinnerung",
"remind_again_delay_description": "Wähle wann erneut erinnert werden soll.",
"remind_after": "Erneut nach {when}",
"repetition_mode": "Dynamische Wiederholung",
Expand All @@ -92,6 +92,21 @@
"message_task": "Soll die vordefinierte Aufgabe '{title}' wiederhergestellt werden?",
"message_variant": "Soll die vordefinierte Variante '{title}' wiederhergestellt werden?"
}
},
"task_group": {
"title_hint": "Kurzer Name der Kategorie",
"reset": {
"title": "Kategorie wiederherstellen",
"message": "Soll die vordefinierte Kategorie '{name}' wiederhergestellt werden?"
},
"change_icon": {
"title": "Symbol ändern",
"message": "Wähle ein Symbol"
},
"change_color": {
"title": "Farbe ändern",
"message": "Wähle eine Farbe"
}
}
},
"pages": {
Expand Down Expand Up @@ -174,7 +189,8 @@
"by_progress": "Nach Fortschritt sortieren",
"by_remaining_time": "Nach verbleibender Zeit sortieren",
"by_category": "Nach Kategorien sortieren",
"by_title": "Nach Titel sortieren"
"by_title": "Nach Titel sortieren",
"hide_non_active": "Nicht aktive verbergen"
},
"notifications": {
"enabled": "Fälligkeitsbenachrichtigung aktiviert",
Expand All @@ -194,7 +210,11 @@
"due_tomorrow": "Morgen fällig",
"due_after_tomorrow": "Übermorgen fällig",
"paused_schedules": "Pausierte Zeitpläne",
"inactive_schedules": "Inaktive Zeitpläne"
"inactive_schedules": "Inaktive Zeitpläne",
"reminder_activated" : "Erinnerung aktiviert",
"reminder_passed" : "Erinnerung abgelaufen",
"remind_again" : "Nochmal erinnern",
"remind_again_successful" : "Erinnerung erneut eingestellt in {when}"
},
"notification": {
"title_normal_task": "Fällige geplante Aufgabe",
Expand All @@ -210,7 +230,9 @@
"title": "Fortschritt zurücksetzen",
"message_then": "Soll der Fortschritt des Zeitplans '{title}' wirklich zurückgesetzt werden ? Die nächste Fälligkeit ist dann {nextDueDate} um {newNextDueDate}.",
"message_still": "Soll der Fortschritt des Zeitplans '{title}' wirklich zurückgesetzt werden ? Die nächste Fälligkeit ist immernoch {nextDueDate} um {newNextDueDate}.",
"success": "Fortschritt für '{title}' wurde zurückgesetzt"
"success": "Fortschritt für '{title}' wurde zurückgesetzt",
"title_custom": "Nächste Fälligkeit für '{title}' ist ...",
"success_custom": "Die nächste Fälligkeit für '{title}' wurde angepasst"
},
"pause_resume": {
"paused": "Zeitplan '{title}' pausiert",
Expand Down Expand Up @@ -239,14 +261,16 @@
"restore_a_task": {
"title": "Aufgabe wiederherstellen",
"description": "Wähle eine vordefinierte Aufgabe oder Variante zum wiederherstellen.",
"success_group": "Kategorie '{name}' wiederhergestellt.",
"success_task": "Aufgabe '{title}' wiederhergestellt.",
"success_variant": "Variante '{title}' wiederhergestellt.",
"success_variant_parent_task": "Variante '{title}' mit zugehöriger Aufgabe wiederhergestellt."
}
},
"action": {
"error_nothing_selected": "Bitte erst ein Element auswählen!",
"description_group": "Neue Aufgabe unter '{groupName}' hinzufügen",
"description_nothing_selected": "Lege eine neue Kategorie an. Um eine bestehende Kategorie zu ändern, wähle dieser erst aus.",
"description_group": "Füge eine neue Aufgabe unter '{groupName}' hinzu oder ändere oder lösche die gewählte Kategorie.",
"description_task": "Ändere oder entferne die ausgewählte Aufgabe '{title}' oder füge eine neue Variante davon hinzu.",
"description_variant": "Ändere oder entferne die ausgewählte Variante '{title}' oder klone sie als Vorlage für eine neue Variante.",
"add_task": {
Expand Down Expand Up @@ -283,6 +307,22 @@
"message_custom": "Die Variante '{title} soll entfernt werden'. Dies kann nicht rückgängig gemacht werden!",
"message_predefined": "Die Variante '{title}' wird entfernt indem sie versteckt wird. Du kannst sie wiederherstellen, indem du auf das Wiederherstellungs-Symbol klickst.",
"success": "Die Variante '{title}' wurde entfernt"
},
"create_task_group": {
"title": "Kategorie anlegen",
"success": "Kategorie '{name}' angelegt"
},
"change_task_group": {
"title": "Kategorie ändern",
"success": "Kategorie '{name}' geändert"
},
"remove_task_group": {
"error_has_children": "Bitte erst zugehörige Aufgaben entfernen!",
"error_has_schedules": "Bitte erst zugehörige Zeitpläne entfernen!",
"title": "Entferne Kategorie",
"message_custom": "Die Kategorie '{name}' soll entfernt werden. Dies kann nicht rückgängig gemacht werden!",
"message_predefined": "Die Kategorie '{name}' wird entfernt indem sie versteckt wird. Du kannst sie wiederherstellen, indem du auf das Wiederherstellungs-Symbol klickst.",
"success": "Die Kategorie '{name}' wurde entfernt"
}
}
},
Expand Down Expand Up @@ -908,6 +948,10 @@

"others": {
"name": "Anderes"
},

"deleted": {
"name": ""
}
}
}
59 changes: 51 additions & 8 deletions assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"activate_schedule": "Activate schedule",
"scheduled_from_hint": "Scheduled from",
"scheduled_from_emphasis": "Select when the schedule starts",
"activate_reminders": "Activate reminders",
"activate_reminders": "Activate reminder",
"remind_again_delay_description": "Choose a delay when to remind again.",
"remind_after": "Again after {when}",
"repetition_mode": "Dynamic repetition mode",
Expand All @@ -92,6 +92,21 @@
"message_task": "This will restore the current task '{title}' to the predefined default.",
"message_variant": "This will restore the current variant '{title}' to the predefined default."
}
},
"task_group": {
"title_hint": "Name of the category",
"reset": {
"title": "Restore default",
"message": "This will restore the current category '{name}' to the predefined default"
},
"change_icon": {
"title": "Change icon",
"message": "Select an icon"
},
"change_color": {
"title": "Change color",
"message": "Pick a color"
}
}
},
"pages": {
Expand Down Expand Up @@ -174,11 +189,12 @@
"by_progress": "Sort by progress",
"by_remaining_time": "Sort by remaining time",
"by_category": "Sort by category",
"by_title": "Sort by title"
"by_title": "Sort by title",
"hide_non_active": "Hide inactive"
},
"notifications": {
"enabled": "Due notifications enabled",
"disabled": "Due notifications disabled"
"enabled": "All reminders and notifications enabled",
"disabled": "All reminders and notifications disabled"
}
},
"overview": {
Expand All @@ -194,7 +210,11 @@
"due_tomorrow": "Due tomorrow",
"due_after_tomorrow": "Due after tomorrow",
"paused_schedules": "Paused schedules",
"inactive_schedules": "Inactive schedules"
"inactive_schedules": "Inactive schedules",
"reminder_activated" : "Reminder activated",
"reminder_passed" : "Reminder passed",
"remind_again" : "Remind again",
"remind_again_successful" : "Reminder will appear again in {when}"
},
"notification": {
"title_normal_task": "Due scheduled task",
Expand All @@ -210,7 +230,9 @@
"title": "Reset progress",
"message_then": "Are you sure to reset the progress of '{title}' ? The schedule is then due {nextDueDate} at {newNextDueDate}.",
"message_still": "Are you sure to reset the progress of '{title}' ? The schedule is still due {nextDueDate} at {newNextDueDate}.",
"success": "Progress for '{title}' reset to now"
"success": "Progress for '{title}' reset to now",
"title_custom": "Next due date for '{title}' is ...",
"success_custom": "Next due date for '{title}' updated"
},
"pause_resume": {
"paused": "Schedule '{title}' paused",
Expand Down Expand Up @@ -239,14 +261,16 @@
"restore_a_task": {
"title": "Restore a task",
"description": "Select a previously removed predefined task or variant to be restored.",
"success_group": "Category '{name}' restored.",
"success_task": "Task '{title}' restored.",
"success_variant": "Variant '{title}' restored.",
"success_variant_parent_task": "Variant '{title}' and parent task restored."
}
},
"action": {
"error_nothing_selected": "Please select an item first!",
"description_group": "Add a new task underneath '{groupName}'.",
"description_nothing_selected": "Create a new category. To change an existing category, select it first.",
"description_group": "Add a new task underneath '{groupName}' or change or delete the current selected category.",
"description_task": "Change or remove the selected task '{title}' or add a new variant underneath it.",
"description_variant": "Change or remove the selected variant '{title}' or clone it as a new one.",
"add_task": {
Expand Down Expand Up @@ -282,7 +306,23 @@
"title": "Remove variant",
"message_custom": "This will remove the current variant '{title}'. This cannot be underdone!",
"message_predefined": "This will remove the current variant '{title}' by hiding it. You can restore it by clicking on the restore action icon.",
"success": "The {variant '{title}' has been removed"
"success": "The variant '{title}' has been removed"
},
"create_task_group": {
"title": "Create category",
"success": "Category '{name}' created"
},
"change_task_group": {
"title": "Change category",
"success": "Category '{name}' changed"
},
"remove_task_group": {
"error_has_children": "Remove underneath tasks first!",
"error_has_schedules": "Remove associated schedules first!",
"title": "Remove category",
"message_custom": "This will remove the current category '{name}'. This cannot be underdone!",
"message_predefined": "This will remove the current category '{name}' by hiding it. You can restore it by clicking on the restore action icon.",
"success": "The category '{name}' has been removed"
}
}
},
Expand Down Expand Up @@ -854,6 +894,9 @@

"others": {
"name": "Others"
},
"deleted": {
"name": ""
}

}
Expand Down
3 changes: 3 additions & 0 deletions lib/db/dao/ScheduledTaskDao.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ abstract class ScheduledTaskDao {
'ORDER BY createdAt DESC, id DESC')
Future<List<ScheduledTaskEntity>> findByTaskTemplateVariantId(int taskTemplateVariantId);

@Query('SELECT count(*) FROM ScheduledTaskEntity WHERE taskGroupId = :taskGroupId ')
Stream<int?> countByTaskGroupId(int taskGroupId);

@Query('SELECT * FROM ScheduledTaskEntity WHERE id = :id')
Stream<ScheduledTaskEntity?> findById(int id);

Expand Down
24 changes: 24 additions & 0 deletions lib/db/dao/TaskGroupDao.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import 'package:floor/floor.dart';
import 'package:personaltasklogger/db/entity/TaskTemplateEntity.dart';

import '../entity/TaskGroupEntity.dart';

@dao
abstract class TaskGroupDao {

@Query('SELECT * FROM TaskGroupEntity ORDER BY id DESC')
Future<List<TaskGroupEntity>> findAll();

@Query('SELECT * FROM TaskGroupEntity WHERE id = :id')
Stream<TaskGroupEntity?> findById(int id);

@insert
Future<int> insertTaskGroup(TaskGroupEntity taskGroup);

@update
Future<int> updateTaskGroup(TaskGroupEntity taskGroup);

@delete
Future<int> deleteTaskGroup(TaskGroupEntity taskGroup);
}

15 changes: 12 additions & 3 deletions lib/db/database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,25 @@ import 'package:personaltasklogger/db/dao/SequencesDao.dart';
import 'package:personaltasklogger/db/dao/TaskEventDao.dart';
import 'package:personaltasklogger/db/entity/SequencesEntity.dart';
import 'package:personaltasklogger/db/entity/TaskEventEntity.dart';
import 'package:personaltasklogger/db/entity/TaskGroupEntity.dart';
import 'package:personaltasklogger/db/entity/TaskTemplateEntity.dart';
import 'package:personaltasklogger/db/entity/TaskTemplateVariantEntity.dart';
import 'package:sqflite/sqflite.dart' as sqflite;

import 'dao/ScheduledTaskDao.dart';
import 'dao/ScheduledTaskEventDao.dart';
import 'dao/TaskGroupDao.dart';
import 'dao/TaskTemplateDao.dart';
import 'dao/TaskTemplateVariantDao.dart';
import 'entity/ScheduledTaskEntity.dart';
import 'entity/ScheduledTaskEventEntity.dart';

part 'database.g.dart'; // the generated code will be there

@Database(version: 11, entities: [
TaskEventEntity, TaskTemplateEntity, TaskTemplateVariantEntity, ScheduledTaskEntity, ScheduledTaskEventEntity, SequencesEntity])
@Database(version: 12, entities: [
TaskGroupEntity, TaskEventEntity, TaskTemplateEntity, TaskTemplateVariantEntity, ScheduledTaskEntity, ScheduledTaskEventEntity, SequencesEntity])
abstract class AppDatabase extends FloorDatabase {
TaskGroupDao get taskGroupDao;
TaskEventDao get taskEventDao;
TaskTemplateDao get taskTemplateDao;
TaskTemplateVariantDao get taskTemplateVariantDao;
Expand Down Expand Up @@ -87,9 +90,15 @@ final migration10To11 = new Migration(10, 11,
await database.execute("ALTER TABLE ScheduledTaskEntity ADD COLUMN `reminderNotificationUnit` INTEGER");
});

final migration11To12 = new Migration(11, 12,
(sqflite.Database database) async {
await database.execute('CREATE TABLE `TaskGroupEntity` (`id` INTEGER, `name` TEXT NOT NULL, `colorRGB` INTEGER, `iconCodePoint` INTEGER, `iconFontFamily` TEXT, `iconFontPackage` TEXT, `hidden` INTEGER, PRIMARY KEY (`id`))');
await database.execute("INSERT INTO `SequencesEntity` (`table`, `lastId`) VALUES ('TaskGroupEntity', 1000)");
});


Future<AppDatabase> getDb([String? name]) async => $FloorAppDatabase
.databaseBuilder(name??'app_database.db')
.addMigrations([migration2To3, migration3To4, migration4To5, migration5To6, migration6To7, migration7To8,
migration8To9, migration9To10, migration10To11])
migration8To9, migration9To10, migration10To11, migration11To12])
.build();
Loading

0 comments on commit 8d300fd

Please sign in to comment.