diff --git a/lib/ui/webhook/view/webhook_view.dart b/lib/ui/webhook/view/webhook_view.dart index e82594e13..28c25e739 100644 --- a/lib/ui/webhook/view/webhook_view.dart +++ b/lib/ui/webhook/view/webhook_view.dart @@ -1,10 +1,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:invoiceninja_flutter/ui/app/buttons/edit_icon_button.dart'; -import 'package:invoiceninja_flutter/ui/app/actions_menu_button.dart'; +import 'package:invoiceninja_flutter/ui/app/view_scaffold.dart'; import 'package:invoiceninja_flutter/ui/webhook/view/webhook_view_vm.dart'; -import 'package:invoiceninja_flutter/ui/app/form_card.dart'; -import 'package:invoiceninja_flutter/ui/app/entities/entity_state_title.dart'; class WebhookView extends StatefulWidget { const WebhookView({ diff --git a/lib/ui/webhook/view/webhook_view_vm.dart b/lib/ui/webhook/view/webhook_view_vm.dart index 0dc4a3a0b..2743d3d7d 100644 --- a/lib/ui/webhook/view/webhook_view_vm.dart +++ b/lib/ui/webhook/view/webhook_view_vm.dart @@ -1,10 +1,8 @@ import 'dart:async'; -import 'package:invoiceninja_flutter/ui/app/snackbar_row.dart'; +import 'package:invoiceninja_flutter/redux/app/app_actions.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:invoiceninja_flutter/redux/ui/ui_actions.dart'; import 'package:invoiceninja_flutter/utils/completers.dart'; -import 'package:invoiceninja_flutter/ui/webhook/webhook_screen.dart'; import 'package:invoiceninja_flutter/utils/localization.dart'; import 'package:redux/redux.dart'; import 'package:flutter_redux/flutter_redux.dart'; diff --git a/lib/ui/webhook/webhook_list_vm.dart b/lib/ui/webhook/webhook_list_vm.dart index 1aaf37201..c8f3cb495 100644 --- a/lib/ui/webhook/webhook_list_vm.dart +++ b/lib/ui/webhook/webhook_list_vm.dart @@ -1,6 +1,8 @@ import 'dart:async'; import 'package:invoiceninja_flutter/data/models/webhook_model.dart'; +import 'package:invoiceninja_flutter/ui/app/entities/entity_actions_dialog.dart'; import 'package:invoiceninja_flutter/ui/app/tables/entity_list.dart'; +import 'package:invoiceninja_flutter/ui/webhook/webhook_list_item.dart'; import 'package:invoiceninja_flutter/ui/webhook/webhook_presenter.dart'; import 'package:redux/redux.dart'; import 'package:invoiceninja_flutter/redux/app/app_actions.dart'; diff --git a/lib/ui/webhook/webhook_screen.dart b/lib/ui/webhook/webhook_screen.dart index a164baf1e..48fccb554 100644 --- a/lib/ui/webhook/webhook_screen.dart +++ b/lib/ui/webhook/webhook_screen.dart @@ -52,7 +52,7 @@ class WebhookScreen extends StatelessWidget { handleWebhookAction(context, webhooks, EntityAction.toggleMultiselect); }, appBarTitle: ListFilter( - title: localization.webhooks, + placeholder: localization.searchWebhooks, filter: state.webhookListState.filter, onFilterChanged: (value) { store.dispatch(FilterWebhooks(value)); diff --git a/lib/utils/i18n.dart b/lib/utils/i18n.dart index 5798cdd5f..fc272dfda 100644 --- a/lib/utils/i18n.dart +++ b/lib/utils/i18n.dart @@ -15,6 +15,7 @@ mixin LocalizationsProvider on LocaleCodeAware { static final Map> _localizedValues = { 'en': { // STARTER: lang key - do not remove comment + 'search_webhooks': 'Search Webhooks', 'webhook': 'Webhook', 'webhooks': 'Webhooks', 'new_webhook': 'New Webhook', @@ -38215,57 +38216,74 @@ mixin LocalizationsProvider on LocaleCodeAware { String get appUpdated => _localizedValues[localeCode]['app_updated'] ?? ''; // STARTER: lang field - do not remove comment - String get webhook => _localizedValues[localeCode]['webhook']; - String get webhooks => _localizedValues[localeCode]['webhooks']; - String get newWebhook => _localizedValues[localeCode]['new_webhook']; - String get createdWebhook => _localizedValues[localeCode]['created_webhook']; - String get updatedWebhook => _localizedValues[localeCode]['updated_webhook']; + String get webhook => _localizedValues[localeCode]['webhook'] ?? ''; + + String get webhooks => _localizedValues[localeCode]['webhooks'] ?? ''; + + String get newWebhook => _localizedValues[localeCode]['new_webhook'] ?? ''; + + String get createdWebhook => + _localizedValues[localeCode]['created_webhook'] ?? ''; + + String get updatedWebhook => + _localizedValues[localeCode]['updated_webhook'] ?? ''; + String get archivedWebhook => - _localizedValues[localeCode]['archived_webhook']; - String get deletedWebhook => _localizedValues[localeCode]['deleted_webhook']; + _localizedValues[localeCode]['archived_webhook'] ?? ''; + + String get deletedWebhook => + _localizedValues[localeCode]['deleted_webhook'] ?? ''; + String get restoredWebhook => - _localizedValues[localeCode]['restored_webhook']; - String get editWebhook => _localizedValues[localeCode]['edit_webhook']; + _localizedValues[localeCode]['restored_webhook'] ?? ''; - String get token => _localizedValues[localeCode]['token']; + String get editWebhook => _localizedValues[localeCode]['edit_webhook'] ?? ''; - String get tokens => _localizedValues[localeCode]['tokens']; + String get token => _localizedValues[localeCode]['token'] ?? ''; - String get newToken => _localizedValues[localeCode]['new_token']; + String get tokens => _localizedValues[localeCode]['tokens'] ?? ''; - String get createdToken => _localizedValues[localeCode]['created_token']; + String get newToken => _localizedValues[localeCode]['new_token'] ?? ''; - String get updatedToken => _localizedValues[localeCode]['updated_token']; + String get createdToken => + _localizedValues[localeCode]['created_token'] ?? ''; - String get archivedToken => _localizedValues[localeCode]['archived_token']; + String get updatedToken => + _localizedValues[localeCode]['updated_token'] ?? ''; - String get deletedToken => _localizedValues[localeCode]['deleted_token']; + String get archivedToken => + _localizedValues[localeCode]['archived_token'] ?? ''; - String get restoredToken => _localizedValues[localeCode]['restored_token']; + String get deletedToken => + _localizedValues[localeCode]['deleted_token'] ?? ''; - String get editToken => _localizedValues[localeCode]['edit_token']; + String get restoredToken => + _localizedValues[localeCode]['restored_token'] ?? ''; - String get paymentTerm => _localizedValues[localeCode]['payment_term']; + String get editToken => _localizedValues[localeCode]['edit_token'] ?? ''; - String get newPaymentTerm => _localizedValues[localeCode]['new_payment_term']; + String get paymentTerm => _localizedValues[localeCode]['payment_term'] ?? ''; + + String get newPaymentTerm => + _localizedValues[localeCode]['new_payment_term'] ?? ''; String get createdPaymentTerm => - _localizedValues[localeCode]['created_payment_term']; + _localizedValues[localeCode]['created_payment_term'] ?? ''; String get updatedPaymentTerm => - _localizedValues[localeCode]['updated_payment_term']; + _localizedValues[localeCode]['updated_payment_term'] ?? ''; String get archivedPaymentTerm => - _localizedValues[localeCode]['archived_payment_term']; + _localizedValues[localeCode]['archived_payment_term'] ?? ''; String get deletedPaymentTerm => - _localizedValues[localeCode]['deleted_payment_term']; + _localizedValues[localeCode]['deleted_payment_term'] ?? ''; String get restoredPaymentTerm => - _localizedValues[localeCode]['restored_payment_term']; + _localizedValues[localeCode]['restored_payment_term'] ?? ''; String get editPaymentTerm => - _localizedValues[localeCode]['edit_payment_term']; + _localizedValues[localeCode]['edit_payment_term'] ?? ''; String get designs => _localizedValues[localeCode]['designs'] ?? ''; @@ -38726,6 +38744,9 @@ mixin LocalizationsProvider on LocaleCodeAware { String get searchTokens => _localizedValues[localeCode]['search_tokens'] ?? ''; + String get searchWebhooks => + _localizedValues[localeCode]['search_webhooks'] ?? ''; + String get manageTokens => _localizedValues[localeCode]['manage_tokens'] ?? ''; diff --git a/starter.sh b/starter.sh index 788687616..5a89d0434 100644 --- a/starter.sh +++ b/starter.sh @@ -440,11 +440,11 @@ else sed -i -e "s/$comment/$comment${lineBreak}$code/g" ./lib/redux/app/app_actions.dart comment="STARTER: lang key - do not remove comment" - code="'${module_snake}': '${Module}', '${module_snake}s': '${Module}s', 'new_${module_snake}': 'New ${Module}', 'edit_${module_snake}': 'Edit ${Module}', 'created_${module_snake}': 'Successfully created ${module_snake}', 'updated_${module_snake}': 'Successfully updated ${module_snake}', 'archived_${module_snake}': 'Successfully archived ${module_snake}', 'deleted_${module_snake}': 'Successfully deleted ${module_snake}', 'removed_${module_snake}': 'Successfully removed ${module_snake}', 'restored_${module_snake}': 'Successfully restored ${module_snake}',${lineBreak}" + code="'${module_snake}': '${Module}', '${module_snake}s': '${Module}s', 'new_${module_snake}': 'New ${Module}', 'edit_${module_snake}': 'Edit ${Module}', 'created_${module_snake}': 'Successfully created ${module_snake}', 'updated_${module_snake}': 'Successfully updated ${module_snake}', 'archived_${module_snake}': 'Successfully archived ${module_snake}', 'deleted_${module_snake}': 'Successfully deleted ${module_snake}', 'removed_${module_snake}': 'Successfully removed ${module_snake}', 'restored_${module_snake}': 'Successfully restored ${module_snake}',${lineBreak}, 'search_${module_snake}': 'Search ${Module}'" sed -i -e "s/$comment/$comment${lineBreak}$code/g" ./lib/utils/i18n.dart comment="STARTER: lang field - do not remove comment" - code="String get ${module_camel} => _localizedValues[localeCode]['${module_snake}']; String get ${module_camel}s => _localizedValues[localeCode]['${module_snake}s']; String get new${Module} => _localizedValues[localeCode]['new_${module_snake}']; String get created${Module} => _localizedValues[localeCode]['created_${module_snake}']; String get updated${Module} => _localizedValues[localeCode]['updated_${module_snake}']; String get archived${Module} => _localizedValues[localeCode]['archived_${module_snake}']; String get deleted${Module} => _localizedValues[localeCode]['deleted_${module_snake}']; String get restored${Module} => _localizedValues[localeCode]['restored_${module_snake}']; String get edit${Module} => _localizedValues[localeCode]['edit_${module_snake}'];${lineBreak}" + code="String get ${module_camel} => _localizedValues[localeCode]['${module_snake}']; String get ${module_camel}s => _localizedValues[localeCode]['${module_snake}s']; String get new${Module} => _localizedValues[localeCode]['new_${module_snake}']; String get created${Module} => _localizedValues[localeCode]['created_${module_snake}']; String get updated${Module} => _localizedValues[localeCode]['updated_${module_snake}']; String get archived${Module} => _localizedValues[localeCode]['archived_${module_snake}']; String get deleted${Module} => _localizedValues[localeCode]['deleted_${module_snake}']; String get restored${Module} => _localizedValues[localeCode]['restored_${module_snake}']; String get edit${Module} => _localizedValues[localeCode]['edit_${module_snake}'];${lineBreak} String get search${Module} => _localizedValues[localeCode]['search_${module_snake}'];${lineBreak}" sed -i -e "s/$comment/$comment${lineBreak}$code/g" ./lib/utils/i18n.dart comment="STARTER: entity type - do not remove comment" diff --git a/stubs/ui/stub/stub_list_vm b/stubs/ui/stub/stub_list_vm index 5faec6905..48dfb8bcc 100644 --- a/stubs/ui/stub/stub_list_vm +++ b/stubs/ui/stub/stub_list_vm @@ -1,6 +1,8 @@ import 'dart:async'; import 'package:invoiceninja_flutter/data/models/stub_model.dart'; +import 'package:invoiceninja_flutter/ui/app/entities/entity_actions_dialog.dart'; import 'package:invoiceninja_flutter/ui/app/tables/entity_list.dart'; +import 'package:invoiceninja_flutter/ui/webhook/stub_list_item.dart'; import 'package:invoiceninja_flutter/ui/stub/stub_presenter.dart'; import 'package:redux/redux.dart'; import 'package:invoiceninja_flutter/redux/app/app_actions.dart'; diff --git a/stubs/ui/stub/stub_screen b/stubs/ui/stub/stub_screen index 0a2203b75..eae761ee6 100644 --- a/stubs/ui/stub/stub_screen +++ b/stubs/ui/stub/stub_screen @@ -52,7 +52,7 @@ class StubScreen extends StatelessWidget { handleStubAction(context, stubs, EntityAction.toggleMultiselect); }, appBarTitle: ListFilter( - title: localization.stubs, + placeholder: localization.searchStubs, filter: state.stubListState.filter, onFilterChanged: (value) { store.dispatch(FilterStubs(value)); diff --git a/stubs/ui/stub/view/stub_view b/stubs/ui/stub/view/stub_view index ff569fbb5..cbc446f9b 100644 --- a/stubs/ui/stub/view/stub_view +++ b/stubs/ui/stub/view/stub_view @@ -1,10 +1,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:invoiceninja_flutter/ui/app/buttons/edit_icon_button.dart'; -import 'package:invoiceninja_flutter/ui/app/actions_menu_button.dart'; import 'package:invoiceninja_flutter/ui/stub/view/stub_view_vm.dart'; import 'package:invoiceninja_flutter/ui/app/form_card.dart'; -import 'package:invoiceninja_flutter/ui/app/entities/entity_state_title.dart'; class StubView extends StatefulWidget { diff --git a/stubs/ui/stub/view/stub_view_vm b/stubs/ui/stub/view/stub_view_vm index da7870778..be7e64b81 100644 --- a/stubs/ui/stub/view/stub_view_vm +++ b/stubs/ui/stub/view/stub_view_vm @@ -1,10 +1,8 @@ import 'dart:async'; -import 'package:invoiceninja_flutter/ui/app/snackbar_row.dart'; +import 'package:invoiceninja_flutter/redux/app/app_actions.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:invoiceninja_flutter/redux/ui/ui_actions.dart'; import 'package:invoiceninja_flutter/utils/completers.dart'; -import 'package:invoiceninja_flutter/ui/stub/stub_screen.dart'; import 'package:invoiceninja_flutter/utils/localization.dart'; import 'package:redux/redux.dart'; import 'package:flutter_redux/flutter_redux.dart';