feat: bugfixes, finished go_router migration, implemented better visibility of states

This commit is contained in:
Anton Stubenbord
2023-10-06 01:17:08 +02:00
parent ad23df4f89
commit a2c5ced3b7
102 changed files with 1512 additions and 3090 deletions

View File

@@ -146,7 +146,7 @@ class _LandingPageState extends State<LandingPage> {
shape: Theme.of(context).cardTheme.shape,
titleTextStyle: Theme.of(context).textTheme.labelLarge,
title: Text(S.of(context)!.documentsInInbox),
onTap: currentUser.canViewTags && currentUser.canViewDocuments
onTap: currentUser.canViewInbox
? () => InboxRoute().go(context)
: null,
trailing: Text(
@@ -161,9 +161,11 @@ class _LandingPageState extends State<LandingPage> {
shape: Theme.of(context).cardTheme.shape,
titleTextStyle: Theme.of(context).textTheme.labelLarge,
title: Text(S.of(context)!.totalDocuments),
onTap: () {
DocumentsRoute().go(context);
},
onTap: currentUser.canViewDocuments
? () {
DocumentsRoute().go(context);
}
: null,
trailing: Text(
stats.documentsTotal.toString(),
style: Theme.of(context).textTheme.labelLarge,

View File

@@ -1,5 +1,3 @@
import 'dart:math';
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart';
import 'package:paperless_api/paperless_api.dart';