feat: error reporting with logs (#45)

* feat: add ability to get logs file from ui

* test: add unit test for log line parsing in logs_provider

* refactor: update all logs to obfuscate sensitive information

* feat: generate dynamic zip file name for logs export

* feat: enhance logging in audiobook player and provider for better debugging

* refactor: extract user display logic into UserBar widget for offline access of settings and logs

* feat: add About section with app metadata and source code link in YouPage
This commit is contained in:
Dr.Blank 2024-10-03 05:54:29 -04:00 committed by GitHub
parent 7b0c2c4b88
commit 35a2d7cfce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
44 changed files with 861 additions and 176 deletions

View file

@ -4,6 +4,7 @@ import 'package:logging/logging.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
import 'package:vaani/db/available_boxes.dart';
import 'package:vaani/settings/models/api_settings.dart' as model;
import 'package:vaani/shared/extensions/obfuscation.dart';
part 'api_settings_provider.g.dart';
@ -19,6 +20,7 @@ class ApiSettings extends _$ApiSettings {
ref.listenSelf((_, __) {
writeToBox();
});
return state;
}
@ -33,7 +35,7 @@ class ApiSettings extends _$ApiSettings {
activeServer: foundSettings.activeUser?.server,
);
}
_logger.fine('found api settings in box: $foundSettings');
_logger.fine('found api settings in box: ${foundSettings.obfuscate()}');
return foundSettings;
} else {
// create a new settings object
@ -47,7 +49,7 @@ class ApiSettings extends _$ApiSettings {
void writeToBox() {
_box.clear();
_box.add(state);
_logger.fine('wrote api settings to box: $state');
_logger.fine('wrote api settings to box: ${state.obfuscate()}');
}
void updateState(model.ApiSettings newSettings, {bool force = false}) {

View file

@ -6,7 +6,7 @@ part of 'api_settings_provider.dart';
// RiverpodGenerator
// **************************************************************************
String _$apiSettingsHash() => r'26e7e09e7369bac9fbf0589da9fd97d1f15b7926';
String _$apiSettingsHash() => r'5bc1e16e9d72b77fb10637aabadf08e8947da580';
/// See also [ApiSettings].
@ProviderFor(ApiSettings)

View file

@ -10,5 +10,10 @@ class AppMetadata {
// for deeplinking
static const String appScheme = 'vaani';
static const version = '1.0.0';
static const author = 'Dr.Blank';
static Uri githubRepo = Uri.parse('https://github.com/Dr-Blank/Vaani');
static get appNameLowerCase => appName.toLowerCase().replaceAll(' ', '_');
}