Skip to content

Commit 0f136b4

Browse files
committed
Merge branch 'develop'
2 parents 597d971 + c2376fb commit 0f136b4

File tree

13 files changed

+168
-163
lines changed

13 files changed

+168
-163
lines changed

ios/Runner.xcodeproj/project.pbxproj

+6-6
Original file line numberDiff line numberDiff line change
@@ -380,15 +380,15 @@
380380
CLANG_ENABLE_MODULES = YES;
381381
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
382382
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
383-
CURRENT_PROJECT_VERSION = 102;
383+
CURRENT_PROJECT_VERSION = 103;
384384
DEVELOPMENT_TEAM = NPC44Y2C98;
385385
ENABLE_BITCODE = NO;
386386
INFOPLIST_FILE = Runner/Info.plist;
387387
LD_RUNPATH_SEARCH_PATHS = (
388388
"$(inherited)",
389389
"@executable_path/Frameworks",
390390
);
391-
MARKETING_VERSION = 5.0.102;
391+
MARKETING_VERSION = 5.0.103;
392392
PRODUCT_BUNDLE_IDENTIFIER = com.invoiceninja.app;
393393
PRODUCT_NAME = "$(TARGET_NAME)";
394394
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -512,15 +512,15 @@
512512
CLANG_ENABLE_MODULES = YES;
513513
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
514514
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
515-
CURRENT_PROJECT_VERSION = 102;
515+
CURRENT_PROJECT_VERSION = 103;
516516
DEVELOPMENT_TEAM = NPC44Y2C98;
517517
ENABLE_BITCODE = NO;
518518
INFOPLIST_FILE = Runner/Info.plist;
519519
LD_RUNPATH_SEARCH_PATHS = (
520520
"$(inherited)",
521521
"@executable_path/Frameworks",
522522
);
523-
MARKETING_VERSION = 5.0.102;
523+
MARKETING_VERSION = 5.0.103;
524524
PRODUCT_BUNDLE_IDENTIFIER = com.invoiceninja.app;
525525
PRODUCT_NAME = "$(TARGET_NAME)";
526526
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -538,15 +538,15 @@
538538
CLANG_ENABLE_MODULES = YES;
539539
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
540540
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
541-
CURRENT_PROJECT_VERSION = 102;
541+
CURRENT_PROJECT_VERSION = 103;
542542
DEVELOPMENT_TEAM = NPC44Y2C98;
543543
ENABLE_BITCODE = NO;
544544
INFOPLIST_FILE = Runner/Info.plist;
545545
LD_RUNPATH_SEARCH_PATHS = (
546546
"$(inherited)",
547547
"@executable_path/Frameworks",
548548
);
549-
MARKETING_VERSION = 5.0.102;
549+
MARKETING_VERSION = 5.0.103;
550550
PRODUCT_BUNDLE_IDENTIFIER = com.invoiceninja.app;
551551
PRODUCT_NAME = "$(TARGET_NAME)";
552552
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";

lib/constants.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class Constants {
44
}
55

66
// TODO remove version once #46609 is fixed
7-
const String kClientVersion = '5.0.102';
7+
const String kClientVersion = '5.0.103';
88
const String kMinServerVersion = '5.0.4';
99

1010
const String kAppName = 'Invoice Ninja';
@@ -304,6 +304,7 @@ const String kGatewayTypeACSS = '19';
304304
const String kGatewayTypeBECS = '20';
305305
const String kGatewayTypeInstantBankPay = '21';
306306
const String kGatewayTypeFPX = '22';
307+
const String kGatewayTypeKlarna = '23';
307308

308309
const kGatewayTypes = {
309310
kGatewayTypeCreditCard: 'credit_card',
@@ -328,6 +329,7 @@ const kGatewayTypes = {
328329
kGatewayTypeBECS: 'becs',
329330
kGatewayTypeInstantBankPay: 'instant_bank_pay',
330331
kGatewayTypeFPX: 'fpx',
332+
kGatewayTypeKlarna: 'klarna',
331333
};
332334

333335
const String kNotificationChannelEmail = 'email';

lib/ui/app/copy_to_clipboard.dart

+7-1
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,16 @@ class CopyToClipboard extends StatelessWidget {
3535
final localization = AppLocalization.of(context);
3636
final onTap = () {
3737
Clipboard.setData(ClipboardData(text: value));
38+
39+
var valueStr = value.replaceAll('\n', ' ');
40+
if (value.length > 20) {
41+
valueStr = value.substring(0, 20) + '...';
42+
}
43+
3844
showToast(
3945
localization.copiedToClipboard.replaceFirst(
4046
':value',
41-
value.replaceAll('\n', ' '),
47+
'"$valueStr"',
4248
),
4349
);
4450
};

lib/ui/app/icon_message.dart

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Flutter imports:
22
import 'package:flutter/material.dart';
3+
import 'package:invoiceninja_flutter/ui/app/copy_to_clipboard.dart';
34

45
class IconMessage extends StatelessWidget {
56
const IconMessage(
@@ -29,11 +30,14 @@ class IconMessage extends StatelessWidget {
2930
),
3031
SizedBox(width: 16),
3132
Expanded(
32-
child: Text(
33-
text,
34-
maxLines: null,
35-
style: TextStyle(
36-
color: Colors.white,
33+
child: CopyToClipboard(
34+
value: text,
35+
child: Text(
36+
text,
37+
maxLines: null,
38+
style: TextStyle(
39+
color: Colors.white,
40+
),
3741
),
3842
),
3943
),

lib/ui/transaction/view/transaction_view.dart

+90-98
Original file line numberDiff line numberDiff line change
@@ -1123,110 +1123,102 @@ class _MatchWithdrawalsState extends State<_MatchWithdrawals> {
11231123
),
11241124
),
11251125
ListDivider(),
1126-
Expanded(
1127-
child: Column(
1128-
children: [
1129-
Row(
1130-
children: [
1131-
Expanded(
1132-
child: Padding(
1133-
padding: const EdgeInsets.only(
1134-
left: 22, top: 12, right: 10, bottom: 12),
1135-
child: SearchText(
1136-
filterController: _categoryFilterController,
1137-
focusNode: _categoryFocusNode,
1138-
onChanged: (value) {
1139-
setState(() {
1140-
updateCategoryList();
1141-
});
1142-
},
1143-
onCleared: () {
1144-
setState(() {
1145-
_categoryFilterController.text = '';
1146-
updateCategoryList();
1147-
});
1148-
},
1149-
placeholder: localization.searchCategories
1150-
.replaceFirst(':count ', '')),
1151-
),
1152-
),
1153-
IconButton(
1154-
onPressed: () {
1155-
final completer =
1156-
snackBarCompleter<ExpenseCategoryEntity>(
1157-
context,
1158-
localization.createdExpenseCategory);
1159-
createEntity(
1160-
context: context,
1161-
entity: ExpenseCategoryEntity(
1162-
state: viewModel.state),
1163-
force: true,
1164-
completer: completer,
1165-
cancelCompleter: Completer<Null>()
1166-
..future.then((_) {
1167-
store.dispatch(UpdateCurrentRoute(
1168-
TransactionScreen.route));
1169-
}));
1170-
completer.future
1171-
.then((SelectableEntity category) {
1172-
store.dispatch(SaveTransactionSuccess(
1173-
transaction.rebuild((b) =>
1174-
b..pendingCategoryId = category.id)));
1175-
store.dispatch(UpdateCurrentRoute(
1176-
TransactionScreen.route));
1126+
Row(
1127+
children: [
1128+
Expanded(
1129+
child: Padding(
1130+
padding: const EdgeInsets.only(
1131+
left: 22, top: 12, right: 10, bottom: 12),
1132+
child: SearchText(
1133+
filterController: _categoryFilterController,
1134+
focusNode: _categoryFocusNode,
1135+
onChanged: (value) {
1136+
setState(() {
1137+
updateCategoryList();
11771138
});
11781139
},
1179-
icon: Icon(Icons.add),
1180-
),
1181-
SizedBox(width: 8),
1182-
],
1183-
),
1184-
ListDivider(),
1185-
Expanded(
1186-
child: Scrollbar(
1187-
thumbVisibility: true,
1188-
controller: _categoryScrollController,
1189-
child: ListView.separated(
1190-
controller: _categoryScrollController,
1191-
separatorBuilder: (context, index) => ListDivider(),
1192-
itemCount: _categories.length,
1193-
itemBuilder: (BuildContext context, int index) {
1194-
final category = _categories[index];
1195-
return ExpenseCategoryListItem(
1196-
expenseCategory: category,
1197-
showCheck: true,
1198-
isChecked: _selectedCategory?.id == category.id,
1199-
onTap: () => setState(() {
1200-
if (_selectedCategory?.id == category.id) {
1201-
_selectedCategory = null;
1202-
} else {
1203-
_selectedCategory = category;
1204-
}
1205-
updateCategoryList();
1206-
store.dispatch(SaveTransactionSuccess(
1207-
transaction.rebuild((b) => b
1208-
..pendingCategoryId =
1209-
_selectedCategory?.id)));
1210-
}),
1211-
);
1140+
onCleared: () {
1141+
setState(() {
1142+
_categoryFilterController.text = '';
1143+
updateCategoryList();
1144+
});
12121145
},
1213-
),
1214-
),
1146+
placeholder: localization.searchCategories
1147+
.replaceFirst(':count ', '')),
12151148
),
1216-
if (transaction.category.isNotEmpty &&
1217-
_selectedCategory == null)
1218-
Padding(
1219-
padding: const EdgeInsets.symmetric(
1220-
horizontal: 16, vertical: 12),
1221-
child: Text(
1222-
'${localization.defaultCategory}: ${transaction.category}',
1223-
textAlign: TextAlign.center,
1224-
style: TextStyle(color: Colors.grey),
1225-
),
1226-
),
1227-
],
1149+
),
1150+
IconButton(
1151+
onPressed: () {
1152+
final completer =
1153+
snackBarCompleter<ExpenseCategoryEntity>(
1154+
context, localization.createdExpenseCategory);
1155+
createEntity(
1156+
context: context,
1157+
entity:
1158+
ExpenseCategoryEntity(state: viewModel.state),
1159+
force: true,
1160+
completer: completer,
1161+
cancelCompleter: Completer<Null>()
1162+
..future.then((_) {
1163+
store.dispatch(UpdateCurrentRoute(
1164+
TransactionScreen.route));
1165+
}));
1166+
completer.future.then((SelectableEntity category) {
1167+
store.dispatch(SaveTransactionSuccess(
1168+
transaction.rebuild(
1169+
(b) => b..pendingCategoryId = category.id)));
1170+
store.dispatch(
1171+
UpdateCurrentRoute(TransactionScreen.route));
1172+
});
1173+
},
1174+
icon: Icon(Icons.add),
1175+
),
1176+
SizedBox(width: 8),
1177+
],
1178+
),
1179+
ListDivider(),
1180+
Expanded(
1181+
child: Scrollbar(
1182+
thumbVisibility: true,
1183+
controller: _categoryScrollController,
1184+
child: ListView.separated(
1185+
controller: _categoryScrollController,
1186+
separatorBuilder: (context, index) => ListDivider(),
1187+
itemCount: _categories.length,
1188+
itemBuilder: (BuildContext context, int index) {
1189+
final category = _categories[index];
1190+
return ExpenseCategoryListItem(
1191+
expenseCategory: category,
1192+
showCheck: true,
1193+
isChecked: _selectedCategory?.id == category.id,
1194+
onTap: () => setState(() {
1195+
if (_selectedCategory?.id == category.id) {
1196+
_selectedCategory = null;
1197+
} else {
1198+
_selectedCategory = category;
1199+
}
1200+
updateCategoryList();
1201+
store.dispatch(SaveTransactionSuccess(
1202+
transaction.rebuild((b) => b
1203+
..pendingCategoryId =
1204+
_selectedCategory?.id)));
1205+
}),
1206+
);
1207+
},
1208+
),
12281209
),
12291210
),
1211+
if (transaction.category.isNotEmpty &&
1212+
_selectedCategory == null)
1213+
Padding(
1214+
padding: const EdgeInsets.symmetric(
1215+
horizontal: 16, vertical: 12),
1216+
child: Text(
1217+
'${localization.defaultCategory}: ${transaction.category}',
1218+
textAlign: TextAlign.center,
1219+
style: TextStyle(color: Colors.grey),
1220+
),
1221+
),
12301222
],
12311223
),
12321224
),

0 commit comments

Comments
 (0)