Skip to content

Commit

Permalink
Merge pull request #230 from flow-mn/develop
Browse files Browse the repository at this point in the history
Release Beta 0.8.1
  • Loading branch information
sadespresso authored Nov 16, 2024
2 parents 7deac63 + 6f4d2a7 commit 3c0aa59
Show file tree
Hide file tree
Showing 61 changed files with 1,566 additions and 515 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## Beta 0.8.1

### New features

* Privacy mode - mask digits with asterisk (*)
* Choose between symbols or currency codes (e.g., `` or `EUR`)
* Enable `Prefer full amounts` to see non-abbreviated amounts in flow/balances

### Changes

* Json exports now use **UTC** timezone
* Future transactions now require user confirmation by default. Closes [#120](https://github.com/flow-mn/flow/issues/120)
* Now it's possible to paste transaction amount in the numpad. Closes [#157](https://github.com/flow-mn/flow/issues/157)
* Map preview is no longer interactable in transaction detail page
* Map preview has been moved below the transaction date

### Small improvemets, fixes

* Fixed iOS launcher icons having 1 pixel gap (Figma export issue *sigh*)
* Now income/expense text on home screen no longer wraps to the next line
* Texts that automatically shrink to fit now synchronizes its size with siblings. If that makes sense...
* Stopped re-setting app icon when it's already the current icon
* Home tab income/expense no longer includes transfers **if exclude transfers from flow** is enabled

## Beta 0.8.0

* Fixed account card "this month" summary
Expand Down
16 changes: 16 additions & 0 deletions assets/l10n/en_IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
"general.select": "Select",
"general.select.all": "Select all",
"general.delete.all": "Delete all",
"general.copy": "Copy",
"general.copy.success": "Copied to clipboard",
"general.copy.clickToCopy": "Click to copy",
"general.paste": "Paste",
"general.timeSelector.select.month": "Select a month",
"general.timeSelector.select.year": "Select a year",
"general.timeSelector.now": "Now",
Expand Down Expand Up @@ -83,6 +85,7 @@
"account.delete.warning": "Deleting this account will also delete {transactionCount} transactions associated. This action is irreversible!",
"account.noAccounts": "You don't have any accounts!",
"account.thisMonth": "This month",
"account.postTransactionBalance": "Balance after this transaction",

"transaction": "Transaction",
"transaction.new": "New transaction",
Expand All @@ -109,6 +112,8 @@
"transaction.location": "Location",
"transaction.location.add": "Add a location",
"transaction.location.edit": "Tap on the map to edit",
"transaction.pending": "Pending",
"transaction.pending.preapproved": "Preapproved",

"transactions.all": "All transactions",
"transactions.upcoming": "Upcoming transactions",
Expand Down Expand Up @@ -183,6 +188,16 @@
"preferences.transactionGeo.auto.enabled": "Auto-attach enabled",
"preferences.transactionGeo.auto.description": "Automatically attach your current location to new transactions. Even if you have this turned off, you can still choose a location on a map to attach it.",
"preferences.transactionGeo.auto.permissionDenied": "Location permission was denied. You can enable it from your settings if you wish.",
"preferences.pendingTransactions": "Pending transactions",
"preferences.pendingTransactions.requireConfirmation": "Require confirmation",
"preferences.pendingTransactions.requireConfirmation.description": "Pending transactions will not be counted towards income, expenses, and account balance",
"preferences.startupPrivacyMode": "Privacy mode",
"preferences.startupPrivacyMode.description": "Enable privacy mode when the app start",
"preferences.moneyFormatting": "Money formatting",
"preferences.moneyFormatting.preferFull": "Prefer full amounts",
"preferences.moneyFormatting.preferFull.description": "Don't abbreviate numbers when possible",
"preferences.moneyFormatting.useCurrencySymbol": "Use currency symbol",
"preferences.moneyFormatting.useCurrencySymbol.description": "e.g., \"₹32\" instead of \"INR 32\"",

"tabs.home": "Home",
"tabs.home.greetings": "Hi, {name}!",
Expand Down Expand Up @@ -348,6 +363,7 @@
"error.input.noImagePicked": "No image was selected",
"error.input.cropFailed": "An error occured during cropping the picture",
"error.input.wrongFileType": "Please choose a {type} file",
"error.input.pasteFormatMismatch": "Unable to parse",
"error.sync.invalidBackupFile": "Invalid backup file",
"error.sync.safetyBackupFailed": "Unable to start import",
"error.sync.exportFailed": "Unable to export, please contact developer.",
Expand Down
16 changes: 16 additions & 0 deletions assets/l10n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
"general.select": "Select",
"general.select.all": "Select all",
"general.delete.all": "Delete all",
"general.copy": "Copy",
"general.copy.success": "Copied to clipboard",
"general.copy.clickToCopy": "Click to copy",
"general.paste": "Paste",
"general.timeSelector.select.month": "Select a month",
"general.timeSelector.select.year": "Select a year",
"general.timeSelector.now": "Now",
Expand Down Expand Up @@ -83,6 +85,7 @@
"account.delete.warning": "Deleting this account will also delete {transactionCount} transactions associated. This action is irreversible!",
"account.noAccounts": "You don't have any accounts!",
"account.thisMonth": "This month",
"account.postTransactionBalance": "Balance after this transaction",

"transaction": "Transaction",
"transaction.new": "New transaction",
Expand All @@ -109,6 +112,8 @@
"transaction.location": "Location",
"transaction.location.add": "Add a location",
"transaction.location.edit": "Tap on the map to edit",
"transaction.pending": "Pending",
"transaction.pending.preapproved": "Preapproved",

"transactions.all": "All transactions",
"transactions.upcoming": "Upcoming transactions",
Expand Down Expand Up @@ -183,6 +188,16 @@
"preferences.transactionGeo.auto.enabled": "Auto-attach enabled",
"preferences.transactionGeo.auto.description": "Automatically attach your current location to new transactions. Even if you have this turned off, you can still choose a location on a map to attach it.",
"preferences.transactionGeo.auto.permissionDenied": "Location permission was denied. You can enable it from your settings if you wish.",
"preferences.pendingTransactions": "Pending transactions",
"preferences.pendingTransactions.requireConfirmation": "Require confirmation",
"preferences.pendingTransactions.requireConfirmation.description": "Pending transactions will not be counted towards income, expenses, and account balance",
"preferences.startupPrivacyMode": "Privacy mode",
"preferences.startupPrivacyMode.description": "Enable privacy mode when the app start",
"preferences.moneyFormatting": "Money formatting",
"preferences.moneyFormatting.preferFull": "Prefer full amounts",
"preferences.moneyFormatting.preferFull.description": "Don't abbreviate numbers when possible",
"preferences.moneyFormatting.useCurrencySymbol": "Use currency symbol",
"preferences.moneyFormatting.useCurrencySymbol.description": "e.g., \"$5\" instead of \"5 USD\"",

"tabs.home": "Home",
"tabs.home.greetings": "Hi, {name}!",
Expand Down Expand Up @@ -349,6 +364,7 @@
"error.input.cropFailed": "An error occured during cropping the picture",
"error.input.wrongFileType": "Please choose a {type} file",
"error.sync.invalidBackupFile": "Invalid backup file",
"error.input.pasteFormatMismatch": "Unable to parse",
"error.sync.safetyBackupFailed": "Unable to start import",
"error.sync.exportFailed": "Unable to export, please contact developer.",
"error.sync.fileDeleteFailed": "An error occured during backup deletion",
Expand Down
16 changes: 16 additions & 0 deletions assets/l10n/it_IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
"general.select": "Seleziona",
"general.select.all": "Seleziona tutto",
"general.delete.all": "Elimina tutto",
"general.copy": "Copia",
"general.copy.success": "Copiato negli appunti",
"general.copy.clickToCopy": "Clicca per copiare",
"general.paste": "Incolla",
"general.timeSelector.select.month": "Seleziona un mese",
"general.timeSelector.select.year": "Seleziona un anno",
"general.timeSelector.now": "Ora",
Expand Down Expand Up @@ -83,6 +85,7 @@
"account.delete.warning": "Eliminando questo conto verranno eliminati anche {transactionCount} transazioni associate. Questa azione è irreversibile!",
"account.noAccounts": "Non hai nessun conto!",
"account.thisMonth": "Questo mese",
"account.postTransactionBalance": "Saldo dopo questa transazione",

"transaction": "Transazione",
"transaction.new": "Nuova transazione",
Expand All @@ -109,6 +112,8 @@
"transaction.location": "Posizione",
"transaction.location.add": "Aggiungi una posizione",
"transaction.location.edit": "Tocca la mappa per modificare",
"transaction.pending": "In attesa",
"transaction.pending.preapproved": "Preapprovata",

"transactions.all": "Tutte le transazioni",
"transactions.upcoming": "Prossime transazioni",
Expand Down Expand Up @@ -183,6 +188,16 @@
"preferences.transactionGeo.auto.enabled": "Auto-attach abilitato",
"preferences.transactionGeo.auto.description": "Allega automaticamente la tua posizione attuale alle nuove transazioni. Anche se hai disattivato questa funzione, puoi comunque scegliere una posizione su una mappa per allegarla.",
"preferences.transactionGeo.auto.permissionDenied": "L'autorizzazione per la posizione è stata negata. Puoi abilitarmi dalle tue impostazioni se lo desideri.",
"preferences.pendingTransactions": "Transazioni in sospeso",
"preferences.pendingTransactions.requireConfirmation": "Richiedi conferma",
"preferences.pendingTransactions.requireConfirmation.description": "Le transazioni in sospeso non verranno conteggiate nel reddito, nelle spese e nel saldo del conto",
"preferences.startupPrivacyMode": "Modalità privacy",
"preferences.startupPrivacyMode.description": "Abilita la modalità privacy all'avvio dell'app",
"preferences.moneyFormatting": "Formato valuta",
"preferences.moneyFormatting.preferFull": "Preferisci importo completo",
"preferences.moneyFormatting.preferFull.description": "Non abbreviare i numeri quando possibile",
"preferences.moneyFormatting.useCurrencySymbol": "Usa simbolo valuta",
"preferences.moneyFormatting.useCurrencySymbol.description": "Ad esempio, \"€5\" invece di \"5 EUR\"",

"tabs.home": "Home",
"tabs.home.greetings": "Ciao, {name}!",
Expand Down Expand Up @@ -348,6 +363,7 @@
"error.input.noImagePicked": "Nessuna immagine selezionata",
"error.input.cropFailed": "Si è verificato un errore durante il ritaglio dell'immagine",
"error.input.wrongFileType": "Si prega di scegliere un file {type}",
"error.input.pasteFormatMismatch": "Impossibile analizzare",
"error.sync.invalidBackupFile": "File di backup non valido",
"error.sync.safetyBackupFailed": "Impossibile avviare l'importazione",
"error.sync.exportFailed": "Impossibile esportare, si prega di contattare lo sviluppatore.",
Expand Down
18 changes: 17 additions & 1 deletion assets/l10n/mn_MN.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
"general.select": "Сонгох",
"general.select.all": "Бүгдийг сонгох",
"general.delete.all": "Бүгдийг устгах",
"general.copy": "Хуулах",
"general.copy.success": "Амжилттай хууллаа",
"general.copy.clickToCopy": "Дарвал бичвэр хуулна",
"general.copy.clickToCopy": "Дарвал бичвэрийг хуулна",
"general.paste": "Буулгах",
"general.timeSelector.select.month": "Сар сонгох",
"general.timeSelector.select.year": "Жил сонгох",
"general.timeSelector.now": "Одоо",
Expand Down Expand Up @@ -83,6 +85,7 @@
"account.delete.warning": "Энэ дансыг устгавал холбоотой {transactionCount} гүйлгээг хамт устгах болно. Энэ үйлдлийг буцаах боломжгүй юм!",
"account.noAccounts": "Танд үүсгэсэн данс алга байна!",
"account.thisMonth": "Энэ сар",
"account.postTransactionBalance": "Гүйлгээний дараах үлдэгдэл",

"transaction": "Гүйлгээ",
"transaction.new": "Гүйлгээ нэмэх",
Expand All @@ -109,6 +112,8 @@
"transaction.location": "Байршил",
"transaction.location.add": "Байршил нэмэх",
"transaction.location.edit": "Газын зурган дээр товшиж байршлыг өөрчлөөрэй",
"transaction.pending": "Хүлээгдэж буй",
"transaction.pending.preapproved": "Урьдчилан баталгаажуулсан",

"transactions.all": "Бүх гүйлгээнүүд",
"transactions.upcoming": "Төлөвлөсөн гүйлгээнүүд",
Expand Down Expand Up @@ -183,6 +188,16 @@
"preferences.transactionGeo.auto.enabled": "Автоматаар хавсаргах идэвхжсэн",
"preferences.transactionGeo.auto.description": "Гүйлгээ хийх үед утасны байршлын мэдээллийг автоматаар хавсаргана. Энэ тохиргоог асаагаагүй үед газрын зураг ашиглан өөрөө байршил оруулах боломжтой.",
"preferences.transactionGeo.auto.permissionDenied": "Байршлын эрх авч чадсангүй. Хүсвэл утасны тохиргооноос идэвхжүүлэх боломжтой.",
"preferences.pendingTransactions": "Хүлээгдэж буй гүйлгээнүүд",
"preferences.pendingTransactions.requireConfirmation": "Баталгаажуулалт шаардах",
"preferences.pendingTransactions.requireConfirmation.description": "Баталгаажуулаагүй гүйлгээнүүд орлого, зарлага, дансны үлдэгдэлд тооцогдохгүй",
"preferences.startupPrivacyMode": "Нууцлалын горим",
"preferences.startupPrivacyMode.description": "Апп нээх үед нууцлалын горимыг идэвхжүүлэх",
"preferences.moneyFormatting": "Мөнгөний хэлбэр",
"preferences.moneyFormatting.preferFull": "Бүтэн дүнг харуулах",
"preferences.moneyFormatting.preferFull.description": "Тоог хураахгүй бүтнээр нь харуулах",
"preferences.moneyFormatting.useCurrencySymbol": "Тэмдэгт ашиглах",
"preferences.moneyFormatting.useCurrencySymbol.description": "Жишээлбэл, \"MNT 3,200\" гэхийн оронд \"3,200₮\"",

"tabs.home": "Нүүр",
"tabs.home.greetings": "Сайн уу, {name}?",
Expand Down Expand Up @@ -348,6 +363,7 @@
"error.input.noImagePicked": "Та зураг сонгоогүй байна",
"error.input.cropFailed": "Зураг хайчлах үед алдаа гарлаа",
"error.input.wrongFileType": "Зөвхөн {} төрлийн файл сонгох боломжтой",
"error.input.pasteFormatMismatch": "Өгөгдлийг таньж чадсангүй",
"error.sync.invalidBackupFile": "Нөөц файл алдаатай байна",
"error.sync.safetyBackupFailed": "Сэргээх үйлдэл эхлэх боломжгүй",
"error.sync.exportFailed": "Нөөцлөх явцад алдаа гарлаа, хөгжүүлэгчид хандана уу.",
Expand Down
24 changes: 19 additions & 5 deletions lib/entity/account.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import "package:flow/data/flow_icon.dart";
import "package:flow/data/money.dart";
import "package:flow/entity/_base.dart";
import "package:flow/entity/transaction.dart";
import "package:flow/utils/utc_datetime_converter.dart";
import "package:json_annotation/json_annotation.dart";
import "package:material_symbols_icons/symbols.dart";
import "package:moment_dart/moment_dart.dart";
Expand All @@ -11,7 +12,10 @@ import "package:uuid/uuid.dart";
part "account.g.dart";

@Entity()
@JsonSerializable()
@JsonSerializable(
explicitToJson: true,
converters: [UTCDateTimeConverter()],
)
class Account implements EntityBase {
@JsonKey(includeFromJson: false, includeToJson: false)
int id;
Expand Down Expand Up @@ -51,14 +55,24 @@ class Account implements EntityBase {
}
}

/// Returns current balance. This is calculated by summing up every single transaction
///
/// TODO should this be cached?
@Transient()
@JsonKey(includeFromJson: false, includeToJson: false)
Money get balance => Money(
transactions
.where((element) => element.transactionDate.isPast)
.where((element) =>
element.transactionDate.isPast && element.isPending != true)
.fold<double>(
0,
(previousValue, element) => previousValue + element.amount,
),
currency,
);

Money balanceAt(DateTime anchor) => Money(
transactions
.where((element) =>
element.transactionDate.isPastAnchored(anchor) &&
element.isPending != true)
.fold<double>(
0,
(previousValue, element) => previousValue + element.amount,
Expand Down
13 changes: 9 additions & 4 deletions lib/entity/account.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion lib/entity/category.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "package:flow/data/flow_icon.dart";
import "package:flow/entity/_base.dart";
import "package:flow/entity/transaction.dart";
import "package:flow/utils/utc_datetime_converter.dart";
import "package:json_annotation/json_annotation.dart";
import "package:material_symbols_icons/symbols.dart";
import "package:objectbox/objectbox.dart";
Expand All @@ -9,7 +10,10 @@ import "package:uuid/uuid.dart";
part "category.g.dart";

@Entity()
@JsonSerializable()
@JsonSerializable(
explicitToJson: true,
converters: [UTCDateTimeConverter()],
)
class Category implements EntityBase {
@JsonKey(includeFromJson: false, includeToJson: false)
int id;
Expand Down
13 changes: 9 additions & 4 deletions lib/entity/category.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion lib/entity/profile.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import "package:flow/entity/_base.dart";
import "package:flow/objectbox.dart";
import "package:flow/utils/utc_datetime_converter.dart";
import "package:json_annotation/json_annotation.dart";
import "package:objectbox/objectbox.dart";
import "package:uuid/uuid.dart";

part "profile.g.dart";

@Entity()
@JsonSerializable()
@JsonSerializable(
explicitToJson: true,
converters: [UTCDateTimeConverter()],
)
class Profile implements EntityBase {
@JsonKey(includeFromJson: false, includeToJson: false)
int id;
Expand Down
Loading

0 comments on commit 3c0aa59

Please sign in to comment.