Super editor

This commit is contained in:
Hillel Coren 2022-03-23 16:22:00 +02:00
parent b793083d1e
commit add5e2431e
2 changed files with 26 additions and 1 deletions

View File

@ -372,10 +372,20 @@ class _AccountOverview extends StatelessWidget {
viewModel.onCompanyChanged(
company.rebuild((b) => b..markdownEnabled = value));
},
title: Text(localization.enableMarkdown),
title: Text(localization.enablePdfMarkdown),
subtitle: Text(localization.enableMarkdownHelp),
activeColor: Theme.of(context).colorScheme.secondary,
),
SwitchListTile(
value: company.markdownEmailEnabled,
onChanged: (value) {
viewModel.onCompanyChanged(
company.rebuild((b) => b..markdownEmailEnabled = value));
},
title: Text(localization.enableEmailMarkdown),
subtitle: Text(localization.enableEmailMarkdownHelp),
activeColor: Theme.of(context).colorScheme.secondary,
),
SwitchListTile(
value: company.reportIncludeDrafts,
onChanged: (value) {

View File

@ -16,6 +16,9 @@ mixin LocalizationsProvider on LocaleCodeAware {
static final Map<String, Map<String, String>> _localizedValues = {
'en': {
// STARTER: lang key - do not remove comment
'enable_email_markdown': 'Enable Email Markdown',
'enable_email_markdown_help': 'Use visual markdown editor for emails',
'enable_pdf_markdown': 'Enable PDF Markdown',
'json_help': 'Note: JSON files generated by the v4 app are not supported',
'release_notes': 'Release Notes',
'upgrade_to_view_reports': 'Upgrade your plan to view reports',
@ -74175,6 +74178,18 @@ mixin LocalizationsProvider on LocaleCodeAware {
_localizedValues[localeCode]['json_help'] ??
_localizedValues['en']['json_help'];
String get enableEmailMarkdown =>
_localizedValues[localeCode]['enable_email_markdown'] ??
_localizedValues['en']['enable_email_markdown'];
String get enableEmailMarkdownHelp =>
_localizedValues[localeCode]['enable_email_markdown_help'] ??
_localizedValues['en']['enable_email_markdown_help'];
String get enablePdfMarkdown =>
_localizedValues[localeCode]['enable_pdf_markdown'] ??
_localizedValues['en']['enable_pdf_markdown'];
// STARTER: lang field - do not remove comment
String lookup(String key) {