mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-08 16:07:52 -06:00
Bugfixes, some visual updates
This commit is contained in:
@@ -24,7 +24,7 @@ Future<T> getSingleResult<T>(
|
|||||||
jsonDecode(utf8.decode(response.bodyBytes)) as JSON,
|
jsonDecode(utf8.decode(response.bodyBytes)) as JSON,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Future.error(errorCode);
|
throw ErrorMessage(errorCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<T>> getCollection<T>(
|
Future<List<T>> getCollection<T>(
|
||||||
@@ -52,7 +52,7 @@ Future<List<T>> getCollection<T>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Future.error(errorCode);
|
throw ErrorMessage(errorCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<T> _collectionFromJson<T>(
|
List<T> _collectionFromJson<T>(
|
||||||
|
|||||||
@@ -130,8 +130,7 @@ class _DocumentsPageState extends State<DocumentsPage> {
|
|||||||
controller: _panelController,
|
controller: _panelController,
|
||||||
defaultPanelState: PanelState.CLOSED,
|
defaultPanelState: PanelState.CLOSED,
|
||||||
minHeight: 48,
|
minHeight: 48,
|
||||||
maxHeight: MediaQuery.of(context).size.height -
|
maxHeight: (MediaQuery.of(context).size.height * 3) / 4,
|
||||||
kBottomNavigationBarHeight,
|
|
||||||
borderRadius: const BorderRadius.only(
|
borderRadius: const BorderRadius.only(
|
||||||
topLeft: Radius.circular(16),
|
topLeft: Radius.circular(16),
|
||||||
topRight: Radius.circular(16),
|
topRight: Radius.circular(16),
|
||||||
@@ -193,7 +192,7 @@ class _DocumentsPageState extends State<DocumentsPage> {
|
|||||||
onRefresh: _onRefresh,
|
onRefresh: _onRefresh,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
bottom: 142,
|
bottom: 48 + kBottomNavigationBarHeight + 48,
|
||||||
), // Prevents panel from hiding scrollable content
|
), // Prevents panel from hiding scrollable content
|
||||||
child: CustomScrollView(
|
child: CustomScrollView(
|
||||||
slivers: [
|
slivers: [
|
||||||
@@ -211,7 +210,12 @@ class _DocumentsPageState extends State<DocumentsPage> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
child
|
child,
|
||||||
|
// SliverToBoxAdapter(
|
||||||
|
// child: SizedBox(
|
||||||
|
// height: MediaQuery.of(context).size.height / 3,
|
||||||
|
// ),
|
||||||
|
// )
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
||||||
import 'package:paperless_mobile/core/logic/error_code_localization_mapper.dart';
|
|
||||||
import 'package:paperless_mobile/core/model/error_message.dart';
|
import 'package:paperless_mobile/core/model/error_message.dart';
|
||||||
import 'package:paperless_mobile/extensions/flutter_extensions.dart';
|
import 'package:paperless_mobile/extensions/flutter_extensions.dart';
|
||||||
import 'package:paperless_mobile/features/documents/bloc/documents_cubit.dart';
|
import 'package:paperless_mobile/features/documents/bloc/documents_cubit.dart';
|
||||||
@@ -138,12 +137,12 @@ class _DocumentFilterPanelState extends State<DocumentFilterPanel> {
|
|||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 16.0,
|
height: 16.0,
|
||||||
),
|
),
|
||||||
|
_buildSortByChipsList(context, state),
|
||||||
Align(
|
Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Text(S.of(context).documentsFilterPageSearchLabel),
|
child: Text(S.of(context).documentsFilterPageSearchLabel),
|
||||||
).padded(const EdgeInsets.only(left: 8.0)),
|
).padded(const EdgeInsets.only(left: 8.0)),
|
||||||
_buildQueryFormField(state),
|
_buildQueryFormField(state),
|
||||||
_buildSortByChipsList(context, state),
|
|
||||||
Align(
|
Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Text(S.of(context).documentsFilterPageAdvancedLabel),
|
child: Text(S.of(context).documentsFilterPageAdvancedLabel),
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import 'package:paperless_mobile/features/documents/bloc/documents_cubit.dart';
|
|||||||
import 'package:paperless_mobile/features/documents/bloc/documents_state.dart';
|
import 'package:paperless_mobile/features/documents/bloc/documents_state.dart';
|
||||||
import 'package:paperless_mobile/features/documents/view/widgets/selection/bulk_delete_confirmation_dialog.dart';
|
import 'package:paperless_mobile/features/documents/view/widgets/selection/bulk_delete_confirmation_dialog.dart';
|
||||||
import 'package:paperless_mobile/features/documents/view/widgets/selection/saved_view_selection_widget.dart';
|
import 'package:paperless_mobile/features/documents/view/widgets/selection/saved_view_selection_widget.dart';
|
||||||
|
import 'package:paperless_mobile/features/documents/view/widgets/sort_documents_button.dart';
|
||||||
import 'package:paperless_mobile/generated/l10n.dart';
|
import 'package:paperless_mobile/generated/l10n.dart';
|
||||||
import 'package:paperless_mobile/util.dart';
|
import 'package:paperless_mobile/util.dart';
|
||||||
|
|
||||||
@@ -28,12 +29,14 @@ class _DocumentsPageAppBarState extends State<DocumentsPageAppBar> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return BlocBuilder<DocumentsCubit, DocumentsState>(
|
return BlocBuilder<DocumentsCubit, DocumentsState>(
|
||||||
builder: (context, documentsState) {
|
builder: (context, documentsState) {
|
||||||
if (documentsState.selection.isNotEmpty) {
|
final hasSelection = documentsState.selection.isNotEmpty;
|
||||||
|
if (hasSelection) {
|
||||||
return SliverAppBar(
|
return SliverAppBar(
|
||||||
|
expandedHeight: kToolbarHeight + _flexibleAreaHeight,
|
||||||
snap: true,
|
snap: true,
|
||||||
floating: true,
|
floating: true,
|
||||||
pinned: true,
|
pinned: true,
|
||||||
expandedHeight: kToolbarHeight,
|
flexibleSpace: _buildFlexibleArea(false),
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: const Icon(Icons.close),
|
icon: const Icon(Icons.close),
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
@@ -51,13 +54,10 @@ class _DocumentsPageAppBarState extends State<DocumentsPageAppBar> {
|
|||||||
} else {
|
} else {
|
||||||
return SliverAppBar(
|
return SliverAppBar(
|
||||||
expandedHeight: kToolbarHeight + _flexibleAreaHeight,
|
expandedHeight: kToolbarHeight + _flexibleAreaHeight,
|
||||||
|
snap: true,
|
||||||
|
floating: true,
|
||||||
pinned: true,
|
pinned: true,
|
||||||
flexibleSpace: const FlexibleSpaceBar(
|
flexibleSpace: _buildFlexibleArea(true),
|
||||||
background: Padding(
|
|
||||||
padding: EdgeInsets.all(8.0),
|
|
||||||
child: SavedViewSelectionWidget(height: _flexibleAreaHeight),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
title: BlocBuilder<DocumentsCubit, DocumentsState>(
|
title: BlocBuilder<DocumentsCubit, DocumentsState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
return Text(
|
return Text(
|
||||||
@@ -65,13 +65,30 @@ class _DocumentsPageAppBarState extends State<DocumentsPageAppBar> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
actions: widget.actions,
|
actions: [
|
||||||
|
...widget.actions,
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _buildFlexibleArea(bool enabled) {
|
||||||
|
return FlexibleSpaceBar(
|
||||||
|
background: Padding(
|
||||||
|
padding: EdgeInsets.all(8.0),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
//TODO: replace with sorting stuff...
|
||||||
|
SavedViewSelectionWidget(height: 48, enabled: enabled),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
void _onDelete(BuildContext context, DocumentsState documentsState) async {
|
void _onDelete(BuildContext context, DocumentsState documentsState) async {
|
||||||
final shouldDelete = await showDialog<bool>(
|
final shouldDelete = await showDialog<bool>(
|
||||||
context: context,
|
context: context,
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import 'dart:developer';
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:paperless_mobile/core/model/error_message.dart';
|
import 'package:paperless_mobile/core/model/error_message.dart';
|
||||||
@@ -17,9 +15,11 @@ class SavedViewSelectionWidget extends StatelessWidget {
|
|||||||
const SavedViewSelectionWidget({
|
const SavedViewSelectionWidget({
|
||||||
Key? key,
|
Key? key,
|
||||||
required this.height,
|
required this.height,
|
||||||
|
required this.enabled,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
final double height;
|
final double height;
|
||||||
|
final bool enabled;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -33,7 +33,7 @@ class SavedViewSelectionWidget extends StatelessWidget {
|
|||||||
return Text(S.of(context).savedViewsEmptyStateText);
|
return Text(S.of(context).savedViewsEmptyStateText);
|
||||||
}
|
}
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: 48.0,
|
height: height,
|
||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
itemCount: state.value.length,
|
itemCount: state.value.length,
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
@@ -44,8 +44,10 @@ class SavedViewSelectionWidget extends StatelessWidget {
|
|||||||
child: FilterChip(
|
child: FilterChip(
|
||||||
label: Text(state.value.values.toList()[index].name),
|
label: Text(state.value.values.toList()[index].name),
|
||||||
selected: view.id == state.selectedSavedViewId,
|
selected: view.id == state.selectedSavedViewId,
|
||||||
onSelected: (isSelected) =>
|
onSelected: enabled
|
||||||
_onSelected(isSelected, context, view),
|
? (isSelected) =>
|
||||||
|
_onSelected(isSelected, context, view)
|
||||||
|
: null,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -65,7 +67,7 @@ class SavedViewSelectionWidget extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
TextButton.icon(
|
TextButton.icon(
|
||||||
icon: const Icon(Icons.add),
|
icon: const Icon(Icons.add),
|
||||||
onPressed: () => _onCreatePressed(context),
|
onPressed: enabled ? () => _onCreatePressed(context) : null,
|
||||||
label: Text(S.of(context).savedViewCreateNewLabel),
|
label: Text(S.of(context).savedViewCreateNewLabel),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class BottomNavBar extends StatelessWidget {
|
|||||||
selectedIndex: selectedIndex,
|
selectedIndex: selectedIndex,
|
||||||
destinations: [
|
destinations: [
|
||||||
NavigationDestination(
|
NavigationDestination(
|
||||||
icon: const Icon(Icons.description_outlined),
|
icon: const Icon(Icons.description),
|
||||||
selectedIcon: Icon(
|
selectedIcon: Icon(
|
||||||
Icons.description,
|
Icons.description,
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color: Theme.of(context).colorScheme.primary,
|
||||||
|
|||||||
@@ -26,6 +26,12 @@ class InfoDrawer extends StatelessWidget {
|
|||||||
child: ListView(
|
child: ListView(
|
||||||
children: [
|
children: [
|
||||||
DrawerHeader(
|
DrawerHeader(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 8,
|
||||||
|
left: 8,
|
||||||
|
bottom: 0,
|
||||||
|
right: 8,
|
||||||
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@@ -60,25 +66,45 @@ class InfoDrawer extends StatelessWidget {
|
|||||||
contentPadding: EdgeInsets.zero,
|
contentPadding: EdgeInsets.zero,
|
||||||
dense: true,
|
dense: true,
|
||||||
title: Text(
|
title: Text(
|
||||||
state.host ?? '',
|
S.of(context).appDrawerHeaderLoggedInAsText +
|
||||||
|
(state.username ?? '?'),
|
||||||
|
style: Theme.of(context).textTheme.bodyText2,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
isThreeLine: true,
|
|
||||||
subtitle: Column(
|
subtitle: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
state.username ?? '',
|
state.host ?? '',
|
||||||
|
style: Theme.of(context).textTheme.bodyText2,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'${S.of(context).serverInformationPaperlessVersionText} ${state.version} (API v${state.apiVersion})',
|
'${S.of(context).serverInformationPaperlessVersionText} ${state.version} (API v${state.apiVersion})',
|
||||||
style: Theme.of(context).textTheme.caption,
|
style: Theme.of(context).textTheme.caption,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
textAlign: TextAlign.end,
|
||||||
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
// title: RichText(
|
||||||
|
|
||||||
|
// text: TextSpan(
|
||||||
|
// children: [
|
||||||
|
// TextSpan(
|
||||||
|
// text:
|
||||||
|
// style:
|
||||||
|
// Theme.of(context).textTheme.bodyText2,
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
isThreeLine: true,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -33,43 +33,13 @@ class ScannerPage extends StatefulWidget {
|
|||||||
|
|
||||||
class _ScannerPageState extends State<ScannerPage>
|
class _ScannerPageState extends State<ScannerPage>
|
||||||
with SingleTickerProviderStateMixin {
|
with SingleTickerProviderStateMixin {
|
||||||
late final AnimationController _fabPulsingController;
|
|
||||||
late final Animation _animation;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
_fabPulsingController =
|
|
||||||
AnimationController(vsync: this, duration: const Duration(seconds: 1))
|
|
||||||
..repeat(reverse: true);
|
|
||||||
_animation = Tween(begin: 1.0, end: 1.2).animate(_fabPulsingController)
|
|
||||||
..addListener(() => setState((() {})));
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
_fabPulsingController.dispose();
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
drawer: const InfoDrawer(),
|
drawer: const InfoDrawer(),
|
||||||
floatingActionButton: BlocBuilder<DocumentScannerCubit, List<File>>(
|
floatingActionButton: FloatingActionButton(
|
||||||
builder: (context, state) {
|
|
||||||
final fab = FloatingActionButton(
|
|
||||||
onPressed: () => _openDocumentScanner(context),
|
onPressed: () => _openDocumentScanner(context),
|
||||||
child: const Icon(Icons.add_a_photo_outlined),
|
child: const Icon(Icons.add_a_photo_outlined),
|
||||||
);
|
|
||||||
if (state.isEmpty) {
|
|
||||||
return Transform.scale(
|
|
||||||
child: fab,
|
|
||||||
scale: _animation.value,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return fab;
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
appBar: _buildAppBar(context),
|
appBar: _buildAppBar(context),
|
||||||
body: Padding(
|
body: Padding(
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
"genericActionUploadLabel": "Hochladen",
|
"genericActionUploadLabel": "Hochladen",
|
||||||
"genericActionUpdateLabel": "Aktualisieren",
|
"genericActionUpdateLabel": "Aktualisieren",
|
||||||
"appDrawerSettingsLabel": "Einstellungen",
|
"appDrawerSettingsLabel": "Einstellungen",
|
||||||
"appDrawerAboutLabel": "Über",
|
"appDrawerAboutLabel": "Über diese App",
|
||||||
"appDrawerAboutInfoLoadingText": "Lade Anwendungsinformationen...",
|
"appDrawerAboutInfoLoadingText": "Lade Anwendungsinformationen...",
|
||||||
"appDrawerReportBugLabel": "Einen Fehler melden",
|
"appDrawerReportBugLabel": "Einen Fehler melden",
|
||||||
"appDrawerLogoutLabel": "Verbindung trennen",
|
"appDrawerLogoutLabel": "Verbindung trennen",
|
||||||
@@ -186,9 +186,11 @@
|
|||||||
"referencedDocumentsReadOnlyHintText": "Dies ist eine schreibgeschützte Ansicht! Dokumente können nicht bearbeitet oder entfernt werden.",
|
"referencedDocumentsReadOnlyHintText": "Dies ist eine schreibgeschützte Ansicht! Dokumente können nicht bearbeitet oder entfernt werden.",
|
||||||
"editLabelPageConfirmDeletionDialogTitle": "Löschen bestätigen",
|
"editLabelPageConfirmDeletionDialogTitle": "Löschen bestätigen",
|
||||||
"editLabelPageDeletionDialogText": "Dieser Kennzeichner wird von Dokumenten referenziert. Durch das Löschen dieses Kennzeichners werden alle Referenzen entfernt. Fortfahren?",
|
"editLabelPageDeletionDialogText": "Dieser Kennzeichner wird von Dokumenten referenziert. Durch das Löschen dieses Kennzeichners werden alle Referenzen entfernt. Fortfahren?",
|
||||||
"settingsPageStorageSettingsLabel": "Storage",
|
"settingsPageStorageSettingsLabel": "Speicher",
|
||||||
"settingsPageStorageSettingsDescriptionText": "Manage files and storage space",
|
"settingsPageStorageSettingsDescriptionText": "Dateien und Speicherplatz verwalten",
|
||||||
"documentUpdateErrorMessage": "Document successfully updated.",
|
"documentUpdateErrorMessage": "Dokument erfolgreich aktualisiert.",
|
||||||
"errorMessageMissingClientCertificate": "Ein Client Zerfitikat wurde erwartet, aber nicht gesendet. Bitte konfiguriere ein gültiges Zertifikat.",
|
"errorMessageMissingClientCertificate": "Ein Client Zerfitikat wurde erwartet, aber nicht gesendet. Bitte konfiguriere ein gültiges Zertifikat.",
|
||||||
"serverInformationPaperlessVersionText": "Paperless Server-Version"
|
"serverInformationPaperlessVersionText": "Paperless Server-Version",
|
||||||
|
"errorReportLabel": "MELDEN",
|
||||||
|
"appDrawerHeaderLoggedInAsText": "Eingeloggt als "
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
"genericActionUploadLabel": "Upload",
|
"genericActionUploadLabel": "Upload",
|
||||||
"genericActionUpdateLabel": "Update",
|
"genericActionUpdateLabel": "Update",
|
||||||
"appDrawerSettingsLabel": "Settings",
|
"appDrawerSettingsLabel": "Settings",
|
||||||
"appDrawerAboutLabel": "About",
|
"appDrawerAboutLabel": "About this app",
|
||||||
"appDrawerAboutInfoLoadingText": "Retrieving application information...",
|
"appDrawerAboutInfoLoadingText": "Retrieving application information...",
|
||||||
"appDrawerReportBugLabel": "Report a Bug",
|
"appDrawerReportBugLabel": "Report a Bug",
|
||||||
"appDrawerLogoutLabel": "Disconnect",
|
"appDrawerLogoutLabel": "Disconnect",
|
||||||
@@ -191,5 +191,7 @@
|
|||||||
"settingsPageStorageSettingsDescriptionText": "Manage files and storage space",
|
"settingsPageStorageSettingsDescriptionText": "Manage files and storage space",
|
||||||
"documentUpdateErrorMessage": "Document successfully updated.",
|
"documentUpdateErrorMessage": "Document successfully updated.",
|
||||||
"errorMessageMissingClientCertificate": "A client certificate was expected but not sent. Please provide a valid client certificate.",
|
"errorMessageMissingClientCertificate": "A client certificate was expected but not sent. Please provide a valid client certificate.",
|
||||||
"serverInformationPaperlessVersionText": "Paperless server version"
|
"serverInformationPaperlessVersionText": "Paperless server version",
|
||||||
|
"errorReportLabel": "REPORT",
|
||||||
|
"appDrawerHeaderLoggedInAsText": "Logged in as "
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
import 'dart:developer';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
|
|
||||||
@@ -9,6 +10,7 @@ import 'package:intl/intl.dart';
|
|||||||
import 'package:package_info_plus/package_info_plus.dart';
|
import 'package:package_info_plus/package_info_plus.dart';
|
||||||
import 'package:paperless_mobile/core/service/github_issue_service.dart';
|
import 'package:paperless_mobile/core/service/github_issue_service.dart';
|
||||||
import 'package:paperless_mobile/generated/intl/messages_de.dart';
|
import 'package:paperless_mobile/generated/intl/messages_de.dart';
|
||||||
|
import 'package:paperless_mobile/generated/l10n.dart';
|
||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
|
|
||||||
final dateFormat = DateFormat("yyyy-MM-dd");
|
final dateFormat = DateFormat("yyyy-MM-dd");
|
||||||
@@ -42,7 +44,7 @@ void showError(
|
|||||||
translateError(context, error.code),
|
translateError(context, error.code),
|
||||||
details: error.details,
|
details: error.details,
|
||||||
action: SnackBarAction(
|
action: SnackBarAction(
|
||||||
label: "REPORT",
|
label: S.of(context).errorReportLabel,
|
||||||
textColor: Colors.amber,
|
textColor: Colors.amber,
|
||||||
onPressed: () => GithubIssueService.createIssueFromError(
|
onPressed: () => GithubIssueService.createIssueFromError(
|
||||||
context,
|
context,
|
||||||
@@ -50,6 +52,12 @@ void showError(
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
log(
|
||||||
|
"An error has occurred.",
|
||||||
|
error: error,
|
||||||
|
stackTrace: stackTrace,
|
||||||
|
time: DateTime.now(),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isNotNull(dynamic value) {
|
bool isNotNull(dynamic value) {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
|||||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||||
# Read more about iOS versioning at
|
# Read more about iOS versioning at
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
version: 1.0.4+2
|
version: 1.0.5+3
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.17.0 <3.0.0"
|
sdk: ">=2.17.0 <3.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user