Added open in system viewer, updated translations.

This commit is contained in:
Anton Stubenbord
2023-01-21 01:20:33 +01:00
parent 2e0730ce2f
commit 78aefb05eb
18 changed files with 201 additions and 89 deletions

View File

@@ -1,23 +1,35 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
///
/// Workaround class to change background color of chips without losing ripple effect.
/// Currently broken in flutter m3.
/// Applies only to light theme if [applyToDarkTheme] is not explicitly set to true.
///
class ColoredChipWrapper extends StatelessWidget { class ColoredChipWrapper extends StatelessWidget {
////
final Color? backgroundColor; final Color? backgroundColor;
final Widget child; final Widget child;
final bool applyToDarkTheme;
const ColoredChipWrapper({ const ColoredChipWrapper({
super.key, super.key,
this.backgroundColor, this.backgroundColor,
required this.child, required this.child,
this.applyToDarkTheme = false,
}); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
Color color = backgroundColor ?? Colors.lightGreen[50]!; final brightness = Theme.of(context).brightness;
if ((brightness == Brightness.dark && applyToDarkTheme) ||
brightness == Brightness.light) {
return Theme( return Theme(
data: Theme.of(context).copyWith( data: Theme.of(context).copyWith(
canvasColor: color, canvasColor: backgroundColor ?? Colors.lightGreen[50]!,
), ),
child: child, child: child,
); );
} }
return child;
}
} }

View File

@@ -7,6 +7,7 @@ import 'package:paperless_api/paperless_api.dart';
import 'package:paperless_mobile/core/service/file_service.dart'; import 'package:paperless_mobile/core/service/file_service.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import 'package:url_launcher/url_launcher_string.dart'; import 'package:url_launcher/url_launcher_string.dart';
import 'package:open_filex/open_filex.dart';
part 'document_details_state.dart'; part 'document_details_state.dart';
@@ -47,21 +48,14 @@ class DocumentDetailsCubit extends Cubit<DocumentDetailsState> {
} }
} }
Future<bool> openDocumentInSystemViewer() async { Future<ResultType> openDocumentInSystemViewer() async {
final downloadDir = await FileService.temporaryDirectory; final downloadDir = await FileService.temporaryDirectory;
final metaData = await _api.getMetaData(state.document); final metaData = await _api.getMetaData(state.document);
final docBytes = await _api.download(state.document); final docBytes = await _api.download(state.document);
File f = File('${downloadDir.path}/${metaData.mediaFilename}'); File f = File('${downloadDir.path}/${metaData.mediaFilename}');
f.writeAsBytes(docBytes); f.writeAsBytes(docBytes);
final url = Uri( return OpenFilex.open(f.path, type: "application/pdf")
scheme: "file", .then((value) => value.type);
path: f.path,
);
log(url.toString());
if (await canLaunchUrl(url)) {
return launchUrl(url);
}
return false;
} }
void replaceDocument(DocumentModel document) { void replaceDocument(DocumentModel document) {

View File

@@ -5,12 +5,12 @@ import 'package:flutter/foundation.dart';
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:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:open_filex/open_filex.dart';
import 'package:paperless_api/paperless_api.dart'; import 'package:paperless_api/paperless_api.dart';
import 'package:paperless_mobile/core/bloc/connectivity_cubit.dart'; import 'package:paperless_mobile/core/bloc/connectivity_cubit.dart';
import 'package:paperless_mobile/core/repository/state/impl/correspondent_repository_state.dart'; import 'package:paperless_mobile/core/repository/state/impl/correspondent_repository_state.dart';
import 'package:paperless_mobile/core/service/file_service.dart'; import 'package:paperless_mobile/core/translation/error_code_localization_mapper.dart';
import 'package:paperless_mobile/core/widgets/highlighted_text.dart'; import 'package:paperless_mobile/core/widgets/highlighted_text.dart';
import 'package:paperless_mobile/core/widgets/hint_card.dart';
import 'package:paperless_mobile/core/widgets/offline_widget.dart'; import 'package:paperless_mobile/core/widgets/offline_widget.dart';
import 'package:paperless_mobile/extensions/flutter_extensions.dart'; import 'package:paperless_mobile/extensions/flutter_extensions.dart';
import 'package:paperless_mobile/features/document_details/bloc/document_details_cubit.dart'; import 'package:paperless_mobile/features/document_details/bloc/document_details_cubit.dart';
@@ -20,8 +20,6 @@ import 'package:paperless_mobile/features/documents/view/pages/document_view.dar
import 'package:paperless_mobile/features/documents/view/widgets/delete_document_confirmation_dialog.dart'; import 'package:paperless_mobile/features/documents/view/widgets/delete_document_confirmation_dialog.dart';
import 'package:paperless_mobile/features/documents/view/widgets/document_preview.dart'; import 'package:paperless_mobile/features/documents/view/widgets/document_preview.dart';
import 'package:paperless_mobile/features/edit_document/cubit/edit_document_cubit.dart'; import 'package:paperless_mobile/features/edit_document/cubit/edit_document_cubit.dart';
import 'package:paperless_mobile/features/labels/correspondent/view/widgets/correspondent_widget.dart';
import 'package:paperless_mobile/features/labels/document_type/view/widgets/document_type_widget.dart';
import 'package:paperless_mobile/features/labels/storage_path/view/widgets/storage_path_widget.dart'; import 'package:paperless_mobile/features/labels/storage_path/view/widgets/storage_path_widget.dart';
import 'package:paperless_mobile/features/labels/tags/view/widgets/tags_widget.dart'; import 'package:paperless_mobile/features/labels/tags/view/widgets/tags_widget.dart';
import 'package:paperless_mobile/features/labels/view/widgets/label_text.dart'; import 'package:paperless_mobile/features/labels/view/widgets/label_text.dart';
@@ -75,10 +73,16 @@ class _DocumentDetailsPageState extends State<DocumentDetailsPage> {
return b.Badge( return b.Badge(
position: b.BadgePosition.topEnd(top: -12, end: -6), position: b.BadgePosition.topEnd(top: -12, end: -6),
showBadge: _filteredSuggestions.hasSuggestions, showBadge: _filteredSuggestions.hasSuggestions,
child: Tooltip(
message:
S.of(context).documentDetailsPageEditTooltip,
preferBelow: false,
verticalOffset: 40,
child: FloatingActionButton( child: FloatingActionButton(
child: const Icon(Icons.edit), child: const Icon(Icons.edit),
onPressed: () => _onEdit(state.document), onPressed: () => _onEdit(state.document),
), ),
),
badgeContent: Text( badgeContent: Text(
'${_filteredSuggestions.suggestionsCount}', '${_filteredSuggestions.suggestionsCount}',
style: const TextStyle( style: const TextStyle(
@@ -86,7 +90,6 @@ class _DocumentDetailsPageState extends State<DocumentDetailsPage> {
), ),
), ),
badgeColor: Colors.red, badgeColor: Colors.red,
//TODO: Wait for stable version of m3, then use AlignmentDirectional.topEnd
); );
}, },
); );
@@ -104,33 +107,40 @@ class _DocumentDetailsPageState extends State<DocumentDetailsPage> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
IconButton( IconButton(
tooltip:
S.of(context).documentDetailsPageDeleteTooltip,
icon: const Icon(Icons.delete), icon: const Icon(Icons.delete),
onPressed: widget.allowEdit && isConnected onPressed: widget.allowEdit && isConnected
? () => _onDelete(state.document) ? () => _onDelete(state.document)
: null, : null,
).paddedSymmetrically(horizontal: 4), ).paddedSymmetrically(horizontal: 4),
Tooltip( Tooltip(
message: "Download", message:
S.of(context).documentDetailsPageDownloadTooltip,
child: DocumentDownloadButton( child: DocumentDownloadButton(
document: state.document, document: state.document,
enabled: isConnected, enabled: isConnected,
), ),
), ),
IconButton( IconButton(
tooltip:
S.of(context).documentDetailsPagePreviewTooltip,
icon: const Icon(Icons.visibility), icon: const Icon(Icons.visibility),
onPressed: isConnected onPressed: isConnected
? () => _onOpen(state.document) ? () => _onOpen(state.document)
: null, : null,
).paddedOnly(right: 4.0), ).paddedOnly(right: 4.0),
// IconButton(
// icon: const Icon(Icons.open_in_new),
// onPressed: isConnected
// ? context
// .read<DocumentDetailsCubit>()
// .openDocumentInSystemViewer
// : null,
// ).paddedOnly(right: 4.0),
IconButton( IconButton(
tooltip: S
.of(context)
.documentDetailsPageOpenInSystemViewerTooltip,
icon: const Icon(Icons.open_in_new),
onPressed:
isConnected ? _onOpenFileInSystemViewer : null,
).paddedOnly(right: 4.0),
IconButton(
tooltip:
S.of(context).documentDetailsPageShareTooltip,
icon: const Icon(Icons.share), icon: const Icon(Icons.share),
onPressed: isConnected onPressed: isConnected
? () => _onShare(state.document) ? () => _onShare(state.document)
@@ -270,6 +280,23 @@ class _DocumentDetailsPageState extends State<DocumentDetailsPage> {
} }
} }
void _onOpenFileInSystemViewer() async {
final status =
await context.read<DocumentDetailsCubit>().openDocumentInSystemViewer();
if (status == ResultType.done) return;
if (status == ResultType.noAppToOpen) {
showGenericError(context,
S.of(context).documentDetailsPageNoPdfViewerFoundErrorMessage);
}
if (status == ResultType.fileNotFound) {
showGenericError(context, translateError(context, ErrorCode.unknown));
}
if (status == ResultType.permissionDenied) {
showGenericError(context,
S.of(context).documentDetailsPageOpenPdfPermissionDeniedErrorMessage);
}
}
Widget _buildDocumentMetaDataView(DocumentModel document) { Widget _buildDocumentMetaDataView(DocumentModel document) {
return BlocBuilder<ConnectivityCubit, ConnectivityState>( return BlocBuilder<ConnectivityCubit, ConnectivityState>(
builder: (context, state) { builder: (context, state) {

View File

@@ -84,8 +84,8 @@ class AdaptiveDocumentsView extends StatelessWidget {
Widget _buildGridView() { Widget _buildGridView() {
return SliverGrid.builder( return SliverGrid.builder(
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent( gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
maxCrossAxisExtent: 178, crossAxisCount: 2,
mainAxisSpacing: 4, mainAxisSpacing: 4,
crossAxisSpacing: 4, crossAxisSpacing: 4,
childAspectRatio: 1 / 2, childAspectRatio: 1 / 2,

View File

@@ -102,7 +102,7 @@ class _HomePageState extends State<HomePage> {
final filename = extractFilenameFromPath(mediaFile.path); final filename = extractFilenameFromPath(mediaFile.path);
final extension = p.extension(mediaFile.path); final extension = p.extension(mediaFile.path);
try { try {
if (File(mediaFile.path).existsSync()) { if (await File(mediaFile.path).exists()) {
final bytes = File(mediaFile.path).readAsBytesSync(); final bytes = File(mediaFile.path).readAsBytesSync();
final success = await Navigator.push<bool>( final success = await Navigator.push<bool>(
context, context,

View File

@@ -1,5 +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:hydrated_bloc/hydrated_bloc.dart';
import 'package:package_info_plus/package_info_plus.dart'; import 'package:package_info_plus/package_info_plus.dart';
import 'package:paperless_api/paperless_api.dart'; import 'package:paperless_api/paperless_api.dart';
import 'package:paperless_mobile/core/bloc/paperless_server_information_cubit.dart'; import 'package:paperless_mobile/core/bloc/paperless_server_information_cubit.dart';
@@ -280,22 +281,23 @@ class _AppDrawerState extends State<AppDrawer> {
); );
} }
void _onLogout() { void _onLogout() async {
try { try {
context.read<AuthenticationCubit>().logout(); await context.read<AuthenticationCubit>().logout();
context.read<LocalVault>().clear(); await context.read<LocalVault>().clear();
context.read<ApplicationSettingsCubit>().clear(); await context.read<ApplicationSettingsCubit>().clear();
context.read<LabelRepository<Tag, TagRepositoryState>>().clear(); await context.read<LabelRepository<Tag, TagRepositoryState>>().clear();
context await context
.read<LabelRepository<Correspondent, CorrespondentRepositoryState>>() .read<LabelRepository<Correspondent, CorrespondentRepositoryState>>()
.clear(); .clear();
context await context
.read<LabelRepository<DocumentType, DocumentTypeRepositoryState>>() .read<LabelRepository<DocumentType, DocumentTypeRepositoryState>>()
.clear(); .clear();
context await context
.read<LabelRepository<StoragePath, StoragePathRepositoryState>>() .read<LabelRepository<StoragePath, StoragePathRepositoryState>>()
.clear(); .clear();
context.read<SavedViewRepository>().clear(); await context.read<SavedViewRepository>().clear();
await HydratedBloc.storage.clear();
} on PaperlessServerException catch (error, stackTrace) { } on PaperlessServerException catch (error, stackTrace) {
showErrorMessage(context, error, stackTrace); showErrorMessage(context, error, stackTrace);
} }

View File

@@ -15,7 +15,7 @@ class TagWidget extends StatelessWidget {
this.isClickable = true, this.isClickable = true,
required this.onSelected, required this.onSelected,
this.showShortName = false, this.showShortName = false,
this.dense = false, this.dense = true,
}); });
@override @override

View File

@@ -45,7 +45,7 @@ class TagsWidget extends StatelessWidget {
return Wrap( return Wrap(
runAlignment: WrapAlignment.start, runAlignment: WrapAlignment.start,
children: children, children: children,
runSpacing: 8, runSpacing: 4,
spacing: 4, spacing: 4,
); );
} else { } else {

View File

@@ -82,7 +82,7 @@ class _ScannerPageState extends State<ScannerPage>
), ),
) )
: null, : null,
icon: const Icon(Icons.preview), icon: const Icon(Icons.visibility),
tooltip: S.of(context).documentScannerPageResetButtonTooltipText, tooltip: S.of(context).documentScannerPageResetButtonTooltipText,
); );
}, },

View File

@@ -1,4 +1,5 @@
import 'dart:collection'; import 'dart:collection';
import 'dart:developer';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:receive_sharing_intent/receive_sharing_intent.dart'; import 'package:receive_sharing_intent/receive_sharing_intent.dart';
@@ -11,11 +12,14 @@ class ShareIntentQueue extends ChangeNotifier {
static final instance = ShareIntentQueue._(); static final instance = ShareIntentQueue._();
void add(SharedMediaFile file) { void add(SharedMediaFile file) {
debugPrint("Adding received file to queue: ${file.path}");
_queue.add(file); _queue.add(file);
notifyListeners(); notifyListeners();
} }
void addAll(Iterable<SharedMediaFile> files) { void addAll(Iterable<SharedMediaFile> files) {
debugPrint(
"Adding received files to queue: ${files.map((e) => e.path).join(",")}");
_queue.addAll(files); _queue.addAll(files);
notifyListeners(); notifyListeners();
} }

View File

@@ -64,8 +64,24 @@
"@documentDeleteSuccessMessage": {}, "@documentDeleteSuccessMessage": {},
"documentDetailsPageAssignAsnButtonLabel": "Přiřadit", "documentDetailsPageAssignAsnButtonLabel": "Přiřadit",
"@documentDetailsPageAssignAsnButtonLabel": {}, "@documentDetailsPageAssignAsnButtonLabel": {},
"documentDetailsPageLoadFullContentLabel": "", "documentDetailsPageDeleteTooltip": "",
"@documentDetailsPageDeleteTooltip": {},
"documentDetailsPageDownloadTooltip": "",
"@documentDetailsPageDownloadTooltip": {},
"documentDetailsPageEditTooltip": "",
"@documentDetailsPageEditTooltip": {},
"documentDetailsPageLoadFullContentLabel": "Načíst celý obsah",
"@documentDetailsPageLoadFullContentLabel": {}, "@documentDetailsPageLoadFullContentLabel": {},
"documentDetailsPageNoPdfViewerFoundErrorMessage": "",
"@documentDetailsPageNoPdfViewerFoundErrorMessage": {},
"documentDetailsPageOpenInSystemViewerTooltip": "",
"@documentDetailsPageOpenInSystemViewerTooltip": {},
"documentDetailsPageOpenPdfPermissionDeniedErrorMessage": "",
"@documentDetailsPageOpenPdfPermissionDeniedErrorMessage": {},
"documentDetailsPagePreviewTooltip": "",
"@documentDetailsPagePreviewTooltip": {},
"documentDetailsPageShareTooltip": "",
"@documentDetailsPageShareTooltip": {},
"documentDetailsPageSimilarDocumentsLabel": "Podobné dokumenty", "documentDetailsPageSimilarDocumentsLabel": "Podobné dokumenty",
"@documentDetailsPageSimilarDocumentsLabel": {}, "@documentDetailsPageSimilarDocumentsLabel": {},
"documentDetailsPageTabContentLabel": "Obsah", "documentDetailsPageTabContentLabel": "Obsah",
@@ -78,7 +94,7 @@
"@documentDocumentTypePropertyLabel": {}, "@documentDocumentTypePropertyLabel": {},
"documentDownloadSuccessMessage": "Dokument úspěšně stažen.", "documentDownloadSuccessMessage": "Dokument úspěšně stažen.",
"@documentDownloadSuccessMessage": {}, "@documentDownloadSuccessMessage": {},
"documentEditPageSuggestionsLabel": "", "documentEditPageSuggestionsLabel": "Návrhy:",
"@documentEditPageSuggestionsLabel": {}, "@documentEditPageSuggestionsLabel": {},
"documentEditPageTitle": "Upravit dokument", "documentEditPageTitle": "Upravit dokument",
"@documentEditPageTitle": {}, "@documentEditPageTitle": {},
@@ -158,7 +174,7 @@
"@documentsPageEmptyStateNothingHereText": {}, "@documentsPageEmptyStateNothingHereText": {},
"documentsPageEmptyStateOopsText": "Ajaj.", "documentsPageEmptyStateOopsText": "Ajaj.",
"@documentsPageEmptyStateOopsText": {}, "@documentsPageEmptyStateOopsText": {},
"documentsPageNewDocumentAvailableText": "", "documentsPageNewDocumentAvailableText": "Dostupný nový dokument!",
"@documentsPageNewDocumentAvailableText": {}, "@documentsPageNewDocumentAvailableText": {},
"documentsPageOrderByLabel": "Řadit dle", "documentsPageOrderByLabel": "Řadit dle",
"@documentsPageOrderByLabel": {}, "@documentsPageOrderByLabel": {},
@@ -258,7 +274,7 @@
"@errorMessageStoragePathCreateFailed": {}, "@errorMessageStoragePathCreateFailed": {},
"errorMessageStoragePathLoadFailed": "Nelze načíst cestu k úložišti.", "errorMessageStoragePathLoadFailed": "Nelze načíst cestu k úložišti.",
"@errorMessageStoragePathLoadFailed": {}, "@errorMessageStoragePathLoadFailed": {},
"errorMessageSuggestionsQueryError": "", "errorMessageSuggestionsQueryError": "Návrhy se nepodařilo načíst.",
"@errorMessageSuggestionsQueryError": {}, "@errorMessageSuggestionsQueryError": {},
"errorMessageTagCreateFailed": "Nelze vytvořit tag, zkuste to znovu.", "errorMessageTagCreateFailed": "Nelze vytvořit tag, zkuste to znovu.",
"@errorMessageTagCreateFailed": {}, "@errorMessageTagCreateFailed": {},
@@ -270,25 +286,25 @@
"@errorMessageUnsupportedFileFormat": {}, "@errorMessageUnsupportedFileFormat": {},
"errorReportLabel": "NAHLÁSIT", "errorReportLabel": "NAHLÁSIT",
"@errorReportLabel": {}, "@errorReportLabel": {},
"extendedDateRangeDialogAbsoluteLabel": "", "extendedDateRangeDialogAbsoluteLabel": "Absolutní",
"@extendedDateRangeDialogAbsoluteLabel": {}, "@extendedDateRangeDialogAbsoluteLabel": {},
"extendedDateRangeDialogHintText": "", "extendedDateRangeDialogHintText": "Tip: Kromě konkrétního data lze také specifikovat relativní časovou odchylku k aktuálnímu datu.",
"@extendedDateRangeDialogHintText": {}, "@extendedDateRangeDialogHintText": {},
"extendedDateRangeDialogRelativeAmountLabel": "", "extendedDateRangeDialogRelativeAmountLabel": "Počet",
"@extendedDateRangeDialogRelativeAmountLabel": {}, "@extendedDateRangeDialogRelativeAmountLabel": {},
"extendedDateRangeDialogRelativeLabel": "", "extendedDateRangeDialogRelativeLabel": "Relativní",
"@extendedDateRangeDialogRelativeLabel": {}, "@extendedDateRangeDialogRelativeLabel": {},
"extendedDateRangeDialogRelativeLastLabel": "", "extendedDateRangeDialogRelativeLastLabel": "Poslední",
"@extendedDateRangeDialogRelativeLastLabel": {}, "@extendedDateRangeDialogRelativeLastLabel": {},
"extendedDateRangeDialogRelativeTimeUnitLabel": "", "extendedDateRangeDialogRelativeTimeUnitLabel": "Časové jednotky",
"@extendedDateRangeDialogRelativeTimeUnitLabel": {}, "@extendedDateRangeDialogRelativeTimeUnitLabel": {},
"extendedDateRangeDialogTitle": "", "extendedDateRangeDialogTitle": "Vybrat časové rozmezí",
"@extendedDateRangeDialogTitle": {}, "@extendedDateRangeDialogTitle": {},
"extendedDateRangePickerAfterLabel": "", "extendedDateRangePickerAfterLabel": "Po",
"@extendedDateRangePickerAfterLabel": {}, "@extendedDateRangePickerAfterLabel": {},
"extendedDateRangePickerBeforeLabel": "", "extendedDateRangePickerBeforeLabel": "Před",
"@extendedDateRangePickerBeforeLabel": {}, "@extendedDateRangePickerBeforeLabel": {},
"extendedDateRangePickerDayText": "{count, plural, other{}}", "extendedDateRangePickerDayText": "{count, plural, zero{} one{den} few{dny} many{dnů} other{}}",
"@extendedDateRangePickerDayText": { "@extendedDateRangePickerDayText": {
"placeholders": { "placeholders": {
"count": {} "count": {}
@@ -306,9 +322,9 @@
"count": {} "count": {}
} }
}, },
"extendedDateRangePickerLastText": "", "extendedDateRangePickerLastText": "Poslední",
"@extendedDateRangePickerLastText": {}, "@extendedDateRangePickerLastText": {},
"extendedDateRangePickerLastWeeksLabel": "{count, plural, other{}}", "extendedDateRangePickerLastWeeksLabel": "{count, plural, zero{} one{minulý týden} few{poslední {count} týdny} many{posledních {count} týdnů} other{}}",
"@extendedDateRangePickerLastWeeksLabel": { "@extendedDateRangePickerLastWeeksLabel": {
"placeholders": { "placeholders": {
"count": {} "count": {}
@@ -320,25 +336,25 @@
"count": {} "count": {}
} }
}, },
"extendedDateRangePickerMonthText": "{count, plural, other{}}", "extendedDateRangePickerMonthText": "{count, plural, zero{} one{měsíc} few{mesíce} many{měsíců} other{}}",
"@extendedDateRangePickerMonthText": { "@extendedDateRangePickerMonthText": {
"placeholders": { "placeholders": {
"count": {} "count": {}
} }
}, },
"extendedDateRangePickerWeekText": "{count, plural, other{}}", "extendedDateRangePickerWeekText": "{count, plural, zero{} one{týden} few{týdny} many{týdnů} other{}}",
"@extendedDateRangePickerWeekText": { "@extendedDateRangePickerWeekText": {
"placeholders": { "placeholders": {
"count": {} "count": {}
} }
}, },
"extendedDateRangePickerYearText": "{count, plural, other{}}", "extendedDateRangePickerYearText": "{count, plural, zero{} one{rok} few{roky} many{let} other{}}",
"@extendedDateRangePickerYearText": { "@extendedDateRangePickerYearText": {
"placeholders": { "placeholders": {
"count": {} "count": {}
} }
}, },
"genericAcknowledgeLabel": "", "genericAcknowledgeLabel": "Rozumím!",
"@genericAcknowledgeLabel": {}, "@genericAcknowledgeLabel": {},
"genericActionCancelLabel": "Zrušit", "genericActionCancelLabel": "Zrušit",
"@genericActionCancelLabel": {}, "@genericActionCancelLabel": {},
@@ -442,7 +458,7 @@
"@loginPageClientCertificateSettingLabel": {}, "@loginPageClientCertificateSettingLabel": {},
"loginPageClientCertificateSettingSelectFileText": "Vybrat soubor...", "loginPageClientCertificateSettingSelectFileText": "Vybrat soubor...",
"@loginPageClientCertificateSettingSelectFileText": {}, "@loginPageClientCertificateSettingSelectFileText": {},
"loginPageContinueLabel": "", "loginPageContinueLabel": "Pokračovat",
"@loginPageContinueLabel": {}, "@loginPageContinueLabel": {},
"loginPageIncorrectOrMissingCertificatePassphraseErrorMessageText": "Chybná nebo chybějící heslová fráze certifikátu.", "loginPageIncorrectOrMissingCertificatePassphraseErrorMessageText": "Chybná nebo chybějící heslová fráze certifikátu.",
"@loginPageIncorrectOrMissingCertificatePassphraseErrorMessageText": {}, "@loginPageIncorrectOrMissingCertificatePassphraseErrorMessageText": {},
@@ -452,31 +468,31 @@
"@loginPagePasswordFieldLabel": {}, "@loginPagePasswordFieldLabel": {},
"loginPagePasswordValidatorMessageText": "Heslo nesmí být prázdné.", "loginPagePasswordValidatorMessageText": "Heslo nesmí být prázdné.",
"@loginPagePasswordValidatorMessageText": {}, "@loginPagePasswordValidatorMessageText": {},
"loginPageReachabilityConnectionTimeoutText": "", "loginPageReachabilityConnectionTimeoutText": "Čas spojení vypršel.",
"@loginPageReachabilityConnectionTimeoutText": {}, "@loginPageReachabilityConnectionTimeoutText": {},
"loginPageReachabilityInvalidClientCertificateConfigurationText": "", "loginPageReachabilityInvalidClientCertificateConfigurationText": "Špatné nebo chybějící heslo certifikátu.",
"@loginPageReachabilityInvalidClientCertificateConfigurationText": {}, "@loginPageReachabilityInvalidClientCertificateConfigurationText": {},
"loginPageReachabilityMissingClientCertificateText": "", "loginPageReachabilityMissingClientCertificateText": "",
"@loginPageReachabilityMissingClientCertificateText": {}, "@loginPageReachabilityMissingClientCertificateText": {},
"loginPageReachabilityNotReachableText": "", "loginPageReachabilityNotReachableText": "",
"@loginPageReachabilityNotReachableText": {}, "@loginPageReachabilityNotReachableText": {},
"loginPageReachabilitySuccessText": "", "loginPageReachabilitySuccessText": "Připojení úspěšně vytvořeno.",
"@loginPageReachabilitySuccessText": {}, "@loginPageReachabilitySuccessText": {},
"loginPageReachabilityUnresolvedHostText": "", "loginPageReachabilityUnresolvedHostText": "",
"@loginPageReachabilityUnresolvedHostText": {}, "@loginPageReachabilityUnresolvedHostText": {},
"loginPageServerUrlFieldLabel": "'Adresa serveru", "loginPageServerUrlFieldLabel": "'Adresa serveru",
"@loginPageServerUrlFieldLabel": {}, "@loginPageServerUrlFieldLabel": {},
"loginPageServerUrlValidatorMessageInvalidAddressText": "", "loginPageServerUrlValidatorMessageInvalidAddressText": "Neplatná adresa",
"@loginPageServerUrlValidatorMessageInvalidAddressText": {}, "@loginPageServerUrlValidatorMessageInvalidAddressText": {},
"loginPageServerUrlValidatorMessageMissingSchemeText": "", "loginPageServerUrlValidatorMessageMissingSchemeText": "",
"@loginPageServerUrlValidatorMessageMissingSchemeText": {}, "@loginPageServerUrlValidatorMessageMissingSchemeText": {},
"loginPageServerUrlValidatorMessageRequiredText": "Adresa serveru nesmí být prázdná.", "loginPageServerUrlValidatorMessageRequiredText": "Adresa serveru nesmí být prázdná.",
"@loginPageServerUrlValidatorMessageRequiredText": {}, "@loginPageServerUrlValidatorMessageRequiredText": {},
"loginPageSignInButtonLabel": "", "loginPageSignInButtonLabel": "Přihlásit",
"@loginPageSignInButtonLabel": {}, "@loginPageSignInButtonLabel": {},
"loginPageSignInTitle": "", "loginPageSignInTitle": "Přihlásit",
"@loginPageSignInTitle": {}, "@loginPageSignInTitle": {},
"loginPageSignInToPrefixText": "", "loginPageSignInToPrefixText": "Přihlásit k {serverAddress}",
"@loginPageSignInToPrefixText": { "@loginPageSignInToPrefixText": {
"placeholders": { "placeholders": {
"serverAddress": {} "serverAddress": {}
@@ -490,11 +506,11 @@
"@loginPageUsernameValidatorMessageText": {}, "@loginPageUsernameValidatorMessageText": {},
"matchingAlgorithmAllDescription": "", "matchingAlgorithmAllDescription": "",
"@matchingAlgorithmAllDescription": {}, "@matchingAlgorithmAllDescription": {},
"matchingAlgorithmAllName": "", "matchingAlgorithmAllName": "Vše",
"@matchingAlgorithmAllName": {}, "@matchingAlgorithmAllName": {},
"matchingAlgorithmAnyDescription": "", "matchingAlgorithmAnyDescription": "",
"@matchingAlgorithmAnyDescription": {}, "@matchingAlgorithmAnyDescription": {},
"matchingAlgorithmAnyName": "", "matchingAlgorithmAnyName": "Jakékoliv slovo",
"@matchingAlgorithmAnyName": {}, "@matchingAlgorithmAnyName": {},
"matchingAlgorithmAutoDescription": "", "matchingAlgorithmAutoDescription": "",
"@matchingAlgorithmAutoDescription": {}, "@matchingAlgorithmAutoDescription": {},
@@ -518,7 +534,7 @@
"@onboardingDoneButtonLabel": {}, "@onboardingDoneButtonLabel": {},
"onboardingNextButtonLabel": "Další", "onboardingNextButtonLabel": "Další",
"@onboardingNextButtonLabel": {}, "@onboardingNextButtonLabel": {},
"receiveSharedFilePermissionDeniedMessage": "", "receiveSharedFilePermissionDeniedMessage": "Přístup k obdrženému souboru zamítnut. Než budeš sdílet, zkus nejdříve otevřít aplikaci.",
"@receiveSharedFilePermissionDeniedMessage": {}, "@receiveSharedFilePermissionDeniedMessage": {},
"referencedDocumentsReadOnlyHintText": "Tento náhled nelze upravovat! Nelze upravovat nebo odstraňovat dokumenty. Bude načteno maximálně 100 odkazovaných dokumentů.", "referencedDocumentsReadOnlyHintText": "Tento náhled nelze upravovat! Nelze upravovat nebo odstraňovat dokumenty. Bude načteno maximálně 100 odkazovaných dokumentů.",
"@referencedDocumentsReadOnlyHintText": {}, "@referencedDocumentsReadOnlyHintText": {},
@@ -584,10 +600,10 @@
"@uploadPageAutomaticallInferredFieldsHintText": {}, "@uploadPageAutomaticallInferredFieldsHintText": {},
"verifyIdentityPageDescriptionText": "", "verifyIdentityPageDescriptionText": "",
"@verifyIdentityPageDescriptionText": {}, "@verifyIdentityPageDescriptionText": {},
"verifyIdentityPageLogoutButtonLabel": "", "verifyIdentityPageLogoutButtonLabel": "Odpojit",
"@verifyIdentityPageLogoutButtonLabel": {}, "@verifyIdentityPageLogoutButtonLabel": {},
"verifyIdentityPageTitle": "", "verifyIdentityPageTitle": "Ověř svou identitu",
"@verifyIdentityPageTitle": {}, "@verifyIdentityPageTitle": {},
"verifyIdentityPageVerifyIdentityButtonLabel": "", "verifyIdentityPageVerifyIdentityButtonLabel": "Ověřit identitu",
"@verifyIdentityPageVerifyIdentityButtonLabel": {} "@verifyIdentityPageVerifyIdentityButtonLabel": {}
} }

View File

@@ -64,8 +64,24 @@
"@documentDeleteSuccessMessage": {}, "@documentDeleteSuccessMessage": {},
"documentDetailsPageAssignAsnButtonLabel": "Zuweisen", "documentDetailsPageAssignAsnButtonLabel": "Zuweisen",
"@documentDetailsPageAssignAsnButtonLabel": {}, "@documentDetailsPageAssignAsnButtonLabel": {},
"documentDetailsPageDeleteTooltip": "Löschen",
"@documentDetailsPageDeleteTooltip": {},
"documentDetailsPageDownloadTooltip": "Herunterladen",
"@documentDetailsPageDownloadTooltip": {},
"documentDetailsPageEditTooltip": "Bearbeiten",
"@documentDetailsPageEditTooltip": {},
"documentDetailsPageLoadFullContentLabel": "Lade gesamten Inhalt", "documentDetailsPageLoadFullContentLabel": "Lade gesamten Inhalt",
"@documentDetailsPageLoadFullContentLabel": {}, "@documentDetailsPageLoadFullContentLabel": {},
"documentDetailsPageNoPdfViewerFoundErrorMessage": "Es wurde keine App zum Anzeigen von PDF Dateien gefunden!",
"@documentDetailsPageNoPdfViewerFoundErrorMessage": {},
"documentDetailsPageOpenInSystemViewerTooltip": "In System-Viewer öffnen",
"@documentDetailsPageOpenInSystemViewerTooltip": {},
"documentDetailsPageOpenPdfPermissionDeniedErrorMessage": "Datei konnte nicht geöffnet werden: Zugriff verweigert.",
"@documentDetailsPageOpenPdfPermissionDeniedErrorMessage": {},
"documentDetailsPagePreviewTooltip": "Vorschau",
"@documentDetailsPagePreviewTooltip": {},
"documentDetailsPageShareTooltip": "Teilen",
"@documentDetailsPageShareTooltip": {},
"documentDetailsPageSimilarDocumentsLabel": "Similar Documents", "documentDetailsPageSimilarDocumentsLabel": "Similar Documents",
"@documentDetailsPageSimilarDocumentsLabel": {}, "@documentDetailsPageSimilarDocumentsLabel": {},
"documentDetailsPageTabContentLabel": "Inhalt", "documentDetailsPageTabContentLabel": "Inhalt",

View File

@@ -64,8 +64,24 @@
"@documentDeleteSuccessMessage": {}, "@documentDeleteSuccessMessage": {},
"documentDetailsPageAssignAsnButtonLabel": "Assign", "documentDetailsPageAssignAsnButtonLabel": "Assign",
"@documentDetailsPageAssignAsnButtonLabel": {}, "@documentDetailsPageAssignAsnButtonLabel": {},
"documentDetailsPageDeleteTooltip": "Delete",
"@documentDetailsPageDeleteTooltip": {},
"documentDetailsPageDownloadTooltip": "Download",
"@documentDetailsPageDownloadTooltip": {},
"documentDetailsPageEditTooltip": "Edit",
"@documentDetailsPageEditTooltip": {},
"documentDetailsPageLoadFullContentLabel": "Load full content", "documentDetailsPageLoadFullContentLabel": "Load full content",
"@documentDetailsPageLoadFullContentLabel": {}, "@documentDetailsPageLoadFullContentLabel": {},
"documentDetailsPageNoPdfViewerFoundErrorMessage": "No app to display PDF files found!",
"@documentDetailsPageNoPdfViewerFoundErrorMessage": {},
"documentDetailsPageOpenInSystemViewerTooltip": "Open in system viewer",
"@documentDetailsPageOpenInSystemViewerTooltip": {},
"documentDetailsPageOpenPdfPermissionDeniedErrorMessage": "Could not open file: Permission denied.",
"@documentDetailsPageOpenPdfPermissionDeniedErrorMessage": {},
"documentDetailsPagePreviewTooltip": "Preview",
"@documentDetailsPagePreviewTooltip": {},
"documentDetailsPageShareTooltip": "Share",
"@documentDetailsPageShareTooltip": {},
"documentDetailsPageSimilarDocumentsLabel": "Similar Documents", "documentDetailsPageSimilarDocumentsLabel": "Similar Documents",
"@documentDetailsPageSimilarDocumentsLabel": {}, "@documentDetailsPageSimilarDocumentsLabel": {},
"documentDetailsPageTabContentLabel": "Content", "documentDetailsPageTabContentLabel": "Content",
@@ -288,7 +304,7 @@
"@extendedDateRangePickerAfterLabel": {}, "@extendedDateRangePickerAfterLabel": {},
"extendedDateRangePickerBeforeLabel": "Before", "extendedDateRangePickerBeforeLabel": "Before",
"@extendedDateRangePickerBeforeLabel": {}, "@extendedDateRangePickerBeforeLabel": {},
"extendedDateRangePickerDayText": "{count, plural, zero{} one{day} other{days}}", "extendedDateRangePickerDayText": "{count, plural, zero{days} one{day} other{days}}",
"@extendedDateRangePickerDayText": { "@extendedDateRangePickerDayText": {
"placeholders": { "placeholders": {
"count": {} "count": {}

View File

@@ -64,8 +64,24 @@
"@documentDeleteSuccessMessage": {}, "@documentDeleteSuccessMessage": {},
"documentDetailsPageAssignAsnButtonLabel": "Ata", "documentDetailsPageAssignAsnButtonLabel": "Ata",
"@documentDetailsPageAssignAsnButtonLabel": {}, "@documentDetailsPageAssignAsnButtonLabel": {},
"documentDetailsPageDeleteTooltip": "",
"@documentDetailsPageDeleteTooltip": {},
"documentDetailsPageDownloadTooltip": "",
"@documentDetailsPageDownloadTooltip": {},
"documentDetailsPageEditTooltip": "",
"@documentDetailsPageEditTooltip": {},
"documentDetailsPageLoadFullContentLabel": "Tüm içeriği yükle", "documentDetailsPageLoadFullContentLabel": "Tüm içeriği yükle",
"@documentDetailsPageLoadFullContentLabel": {}, "@documentDetailsPageLoadFullContentLabel": {},
"documentDetailsPageNoPdfViewerFoundErrorMessage": "",
"@documentDetailsPageNoPdfViewerFoundErrorMessage": {},
"documentDetailsPageOpenInSystemViewerTooltip": "",
"@documentDetailsPageOpenInSystemViewerTooltip": {},
"documentDetailsPageOpenPdfPermissionDeniedErrorMessage": "",
"@documentDetailsPageOpenPdfPermissionDeniedErrorMessage": {},
"documentDetailsPagePreviewTooltip": "",
"@documentDetailsPagePreviewTooltip": {},
"documentDetailsPageShareTooltip": "",
"@documentDetailsPageShareTooltip": {},
"documentDetailsPageSimilarDocumentsLabel": "Benzer Belgeler", "documentDetailsPageSimilarDocumentsLabel": "Benzer Belgeler",
"@documentDetailsPageSimilarDocumentsLabel": {}, "@documentDetailsPageSimilarDocumentsLabel": {},
"documentDetailsPageTabContentLabel": "İçerik", "documentDetailsPageTabContentLabel": "İçerik",

View File

@@ -1,3 +1,5 @@
import 'dart:developer';
import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:encrypted_shared_preferences/encrypted_shared_preferences.dart'; import 'package:encrypted_shared_preferences/encrypted_shared_preferences.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@@ -132,6 +134,7 @@ void main() async {
//Update language header in interceptor on language change. //Update language header in interceptor on language change.
appSettingsCubit.stream.listen((event) => languageHeaderInterceptor appSettingsCubit.stream.listen((event) => languageHeaderInterceptor
.preferredLocaleSubtag = event.preferredLocaleSubtag); .preferredLocaleSubtag = event.preferredLocaleSubtag);
runApp( runApp(
MultiProvider( MultiProvider(
providers: [ providers: [
@@ -261,9 +264,6 @@ class _PaperlessMobileEntrypointState extends State<PaperlessMobileEntrypoint> {
), ),
), ),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
chipTheme: ChipThemeData(
backgroundColor: Colors.lightGreen[50],
),
listTileTheme: const ListTileThemeData( listTileTheme: const ListTileThemeData(
tileColor: Colors.transparent, tileColor: Colors.transparent,
), ),

View File

@@ -981,6 +981,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.2" version: "1.0.2"
open_filex:
dependency: "direct main"
description:
name: open_filex
sha256: "854aefd72dfd74219dc8c8d1767c34ec1eae64b8399a5be317bddb1ec2108915"
url: "https://pub.dev"
source: hosted
version: "4.3.2"
package_config: package_config:
dependency: transitive dependency: transitive
description: description:

View File

@@ -86,6 +86,7 @@ dependencies:
flutter_local_notifications: ^13.0.0 flutter_local_notifications: ^13.0.0
flutter_staggered_grid_view: ^0.6.2 flutter_staggered_grid_view: ^0.6.2
responsive_builder: ^0.4.3 responsive_builder: ^0.4.3
open_filex: ^4.3.2
dev_dependencies: dev_dependencies:
integration_test: integration_test: