Reworked filters

This commit is contained in:
Hillel Coren 2020-07-15 06:21:17 +03:00
parent adae8737a4
commit 38dcc89247
2 changed files with 12 additions and 2 deletions

View File

@ -688,7 +688,7 @@ class _EntityFilter extends StatelessWidget {
)
: AppBar(
leading: IconButton(
tooltip: localization.preview,
tooltip: localization.showSidebar,
icon: Icon(Icons.chrome_reader_mode),
onPressed: () => store.dispatch(
UserPreferencesChanged(fullHeightFilter: true)),
@ -718,7 +718,11 @@ class _EntityFilter extends StatelessWidget {
routeEntityType == filterEntityType
? localization.overview
: '${localization.lookup(routeEntityType.plural)}',
style: TextStyle(fontSize: 17),
style: TextStyle(
fontSize: 17,
color: state.prefState.enableDarkMode
? Colors.white
: Theme.of(context).accentColor),
),
SizedBox(width: 4),
Icon(Icons.arrow_drop_down),

View File

@ -15,6 +15,8 @@ mixin LocalizationsProvider on LocaleCodeAware {
static final Map<String, Map<String, String>> _localizedValues = {
'en': {
// STARTER: lang key - do not remove comment
'show_sidebar': 'Show Sidebar',
'hide_sidebar': 'Hide Sidebar',
'event_type': 'Event Type',
'target_url': 'Target URL',
'copy': 'Copy',
@ -38765,6 +38767,10 @@ mixin LocalizationsProvider on LocaleCodeAware {
String get eventType => _localizedValues[localeCode]['event_type'] ?? '';
String get showSidebar => _localizedValues[localeCode]['show_sidebar'] ?? '';
String get hideSidebar => _localizedValues[localeCode]['hide_sidebar'] ?? '';
String lookup(String key) {
final lookupKey = toSnakeCase(key);
return _localizedValues[localeCode][lookupKey] ??