Wide task editor
This commit is contained in:
parent
54bc0b0dc3
commit
bb1b50cd92
|
|
@ -85,7 +85,10 @@ class MainScreen extends StatelessWidget {
|
||||||
} else if (isEdit) {
|
} else if (isEdit) {
|
||||||
isFullScreen = prefState.isEditorFullScreen(EntityType.invoice);
|
isFullScreen = prefState.isEditorFullScreen(EntityType.invoice);
|
||||||
}
|
}
|
||||||
|
} else if (mainRoute == TaskScreen.route) {
|
||||||
|
isFullScreen = prefState.isEditorFullScreen(EntityType.task);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DesignEditScreen.route == uiState.currentRoute) {
|
if (DesignEditScreen.route == uiState.currentRoute) {
|
||||||
isFullScreen = true;
|
isFullScreen = true;
|
||||||
}
|
}
|
||||||
|
|
@ -104,6 +107,9 @@ class MainScreen extends StatelessWidget {
|
||||||
case RecurringInvoiceScreen.route:
|
case RecurringInvoiceScreen.route:
|
||||||
screen = RecurringInvoiceEditScreen();
|
screen = RecurringInvoiceEditScreen();
|
||||||
break;
|
break;
|
||||||
|
case TaskScreen.route:
|
||||||
|
screen = TaskEditScreen();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
switch (uiState.currentRoute) {
|
switch (uiState.currentRoute) {
|
||||||
case DesignEditScreen.route:
|
case DesignEditScreen.route:
|
||||||
|
|
|
||||||
|
|
@ -79,8 +79,10 @@ class _TaskEditState extends State<TaskEdit>
|
||||||
final useSidebarEditor =
|
final useSidebarEditor =
|
||||||
state.prefState.useSidebarEditor[EntityType.task] ?? false;
|
state.prefState.useSidebarEditor[EntityType.task] ?? false;
|
||||||
final store = StoreProvider.of<AppState>(context);
|
final store = StoreProvider.of<AppState>(context);
|
||||||
|
final isFullscreen = state.prefState.isEditorFullScreen(EntityType.task);
|
||||||
|
|
||||||
return EditScaffold(
|
return EditScaffold(
|
||||||
|
isFullscreen: isFullscreen,
|
||||||
entity: task,
|
entity: task,
|
||||||
title: task.isNew ? localization.newTask : localization.editTask,
|
title: task.isNew ? localization.newTask : localization.editTask,
|
||||||
onCancelPressed: (context) => viewModel.onCancelPressed(context),
|
onCancelPressed: (context) => viewModel.onCancelPressed(context),
|
||||||
|
|
@ -99,18 +101,20 @@ class _TaskEditState extends State<TaskEdit>
|
||||||
|
|
||||||
viewModel.onSavePressed(context);
|
viewModel.onSavePressed(context);
|
||||||
},
|
},
|
||||||
appBarBottom: TabBar(
|
appBarBottom: isFullscreen
|
||||||
controller: _controller,
|
? null
|
||||||
//isScrollable: true,
|
: TabBar(
|
||||||
tabs: [
|
controller: _controller,
|
||||||
Tab(
|
//isScrollable: true,
|
||||||
text: localization.details,
|
tabs: [
|
||||||
),
|
Tab(
|
||||||
Tab(
|
text: localization.details,
|
||||||
text: localization.times,
|
),
|
||||||
),
|
Tab(
|
||||||
],
|
text: localization.times,
|
||||||
),
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
body: Form(
|
body: Form(
|
||||||
key: _formKey,
|
key: _formKey,
|
||||||
child: TabBarView(
|
child: TabBarView(
|
||||||
|
|
@ -136,7 +140,7 @@ class _TaskEditState extends State<TaskEdit>
|
||||||
if (isDesktop(context))
|
if (isDesktop(context))
|
||||||
Tooltip(
|
Tooltip(
|
||||||
message: useSidebarEditor
|
message: useSidebarEditor
|
||||||
? localization.wideEditor
|
? localization.fullscreenEditor
|
||||||
: localization.sidebarEditor,
|
: localization.sidebarEditor,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () =>
|
onTap: () =>
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
||||||
'view_licenses': 'View Licenses',
|
'view_licenses': 'View Licenses',
|
||||||
'webhook_url': 'Webhook URL',
|
'webhook_url': 'Webhook URL',
|
||||||
'fullscreen_editor': 'Fullscreen Editor',
|
'fullscreen_editor': 'Fullscreen Editor',
|
||||||
'wide_editor': 'Wide Editor',
|
|
||||||
'sidebar_editor': 'Sidebar Editor',
|
'sidebar_editor': 'Sidebar Editor',
|
||||||
'please_type_to_confirm': 'Please type \':value\' to confirm',
|
'please_type_to_confirm': 'Please type \':value\' to confirm',
|
||||||
'purge': 'Purge',
|
'purge': 'Purge',
|
||||||
|
|
@ -5281,9 +5280,6 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
||||||
String get fullscreenEditor =>
|
String get fullscreenEditor =>
|
||||||
_localizedValues[localeCode]['fullscreen_editor'] ?? '';
|
_localizedValues[localeCode]['fullscreen_editor'] ?? '';
|
||||||
|
|
||||||
String get wideEditor =>
|
|
||||||
_localizedValues[localeCode]['wide_editor'] ?? '';
|
|
||||||
|
|
||||||
String get sidebarEditor =>
|
String get sidebarEditor =>
|
||||||
_localizedValues[localeCode]['sidebar_editor'] ?? '';
|
_localizedValues[localeCode]['sidebar_editor'] ?? '';
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue