mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-09 08:08:14 -06:00
feat: Update translations, add pdf view to document edit page
This commit is contained in:
@@ -38,6 +38,8 @@ class DioHttpErrorInterceptor extends Interceptor {
|
||||
const PaperlessApiException(ErrorCode.missingClientCertificate),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
handler.reject(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,14 +27,15 @@ class DocumentChangedNotifier {
|
||||
Object subscriber, {
|
||||
DocumentChangedCallback? onUpdated,
|
||||
DocumentChangedCallback? onDeleted,
|
||||
Iterable<int>? ids,
|
||||
}) {
|
||||
_subscribers.putIfAbsent(
|
||||
subscriber,
|
||||
() => [
|
||||
_updated.listen((value) {
|
||||
_updated.where((doc) => ids?.contains(doc.id) ?? true).listen((value) {
|
||||
onUpdated?.call(value);
|
||||
}),
|
||||
_deleted.listen((value) {
|
||||
_deleted.where((doc) => ids?.contains(doc.id) ?? true).listen((value) {
|
||||
onDeleted?.call(value);
|
||||
}),
|
||||
],
|
||||
|
||||
@@ -53,6 +53,7 @@ class FormBuilderLocalizedDatePicker extends StatefulWidget {
|
||||
final DateTime? initialValue;
|
||||
final DateTime firstDate;
|
||||
final DateTime lastDate;
|
||||
final FocusNode? focusNode;
|
||||
|
||||
/// If set to true, the field will not throw any validation errors when empty.
|
||||
final bool allowUnset;
|
||||
@@ -67,6 +68,7 @@ class FormBuilderLocalizedDatePicker extends StatefulWidget {
|
||||
required this.labelText,
|
||||
this.prefixIcon,
|
||||
this.allowUnset = false,
|
||||
this.focusNode,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -100,8 +102,11 @@ class _FormBuilderLocalizedDatePickerState
|
||||
final initialText = widget.initialValue != null
|
||||
? DateFormat(formatString).format(widget.initialValue!)
|
||||
: null;
|
||||
final defaultFocusNode = FocusNode(debugLabel: formatString);
|
||||
final focusNode =
|
||||
i == 0 ? (widget.focusNode ?? defaultFocusNode) : defaultFocusNode;
|
||||
final controls = _NeighbourAwareDateInputSegmentControls(
|
||||
node: FocusNode(debugLabel: formatString),
|
||||
node: focusNode,
|
||||
controller: TextEditingController(text: initialText),
|
||||
format: formatString,
|
||||
position: i,
|
||||
|
||||
Reference in New Issue
Block a user