mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-15 00:12:22 -06:00
Updated onboarding, reformatted files, improved referenced documents view, updated error handling
This commit is contained in:
@@ -16,14 +16,20 @@ class BiometricAuthenticationSetting extends StatelessWidget {
|
||||
return SwitchListTile(
|
||||
value: settings.isLocalAuthenticationEnabled,
|
||||
title: Text(S.of(context).appSettingsBiometricAuthenticationLabel),
|
||||
subtitle: Text(S.of(context).appSettingsBiometricAuthenticationDescriptionText),
|
||||
subtitle: Text(
|
||||
S.of(context).appSettingsBiometricAuthenticationDescriptionText),
|
||||
onChanged: (val) async {
|
||||
final settingsBloc = BlocProvider.of<ApplicationSettingsCubit>(context);
|
||||
final settingsBloc =
|
||||
BlocProvider.of<ApplicationSettingsCubit>(context);
|
||||
final String localizedReason = val
|
||||
? S.of(context).appSettingsEnableBiometricAuthenticationReasonText
|
||||
: S.of(context).appSettingsDisableBiometricAuthenticationReasonText;
|
||||
final changeValue =
|
||||
await getIt<AuthenticationService>().authenticateLocalUser(localizedReason);
|
||||
? S
|
||||
.of(context)
|
||||
.appSettingsEnableBiometricAuthenticationReasonText
|
||||
: S
|
||||
.of(context)
|
||||
.appSettingsDisableBiometricAuthenticationReasonText;
|
||||
final changeValue = await getIt<AuthenticationService>()
|
||||
.authenticateLocalUser(localizedReason);
|
||||
if (changeValue) {
|
||||
settingsBloc.setIsBiometricAuthenticationEnabled(val);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,8 @@ class LanguageSelectionSetting extends StatefulWidget {
|
||||
const LanguageSelectionSetting({super.key});
|
||||
|
||||
@override
|
||||
State<LanguageSelectionSetting> createState() => _LanguageSelectionSettingState();
|
||||
State<LanguageSelectionSetting> createState() =>
|
||||
_LanguageSelectionSettingState();
|
||||
}
|
||||
|
||||
class _LanguageSelectionSettingState extends State<LanguageSelectionSetting> {
|
||||
@@ -34,10 +35,12 @@ class _LanguageSelectionSettingState extends State<LanguageSelectionSetting> {
|
||||
label: _mapSubtagToLanguage('de'),
|
||||
),
|
||||
],
|
||||
initialValue:
|
||||
BlocProvider.of<ApplicationSettingsCubit>(context).state.preferredLocaleSubtag,
|
||||
initialValue: BlocProvider.of<ApplicationSettingsCubit>(context)
|
||||
.state
|
||||
.preferredLocaleSubtag,
|
||||
),
|
||||
).then((value) => BlocProvider.of<ApplicationSettingsCubit>(context).setLocale(value)),
|
||||
).then((value) => BlocProvider.of<ApplicationSettingsCubit>(context)
|
||||
.setLocale(value)),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -14,30 +14,38 @@ class ThemeModeSetting extends StatelessWidget {
|
||||
builder: (context, settings) {
|
||||
return ListTile(
|
||||
title: Text(S.of(context).settingsPageAppearanceSettingTitle),
|
||||
subtitle: Text(_mapThemeModeToLocalizedString(settings.preferredThemeMode, context)),
|
||||
subtitle: Text(_mapThemeModeToLocalizedString(
|
||||
settings.preferredThemeMode, context)),
|
||||
onTap: () => showDialog<ThemeMode>(
|
||||
context: context,
|
||||
builder: (_) => RadioSettingsDialog<ThemeMode>(
|
||||
options: [
|
||||
RadioOption(
|
||||
value: ThemeMode.system,
|
||||
label: S.of(context).settingsPageAppearanceSettingSystemThemeLabel,
|
||||
label: S
|
||||
.of(context)
|
||||
.settingsPageAppearanceSettingSystemThemeLabel,
|
||||
),
|
||||
RadioOption(
|
||||
value: ThemeMode.light,
|
||||
label: S.of(context).settingsPageAppearanceSettingLightThemeLabel,
|
||||
label: S
|
||||
.of(context)
|
||||
.settingsPageAppearanceSettingLightThemeLabel,
|
||||
),
|
||||
RadioOption(
|
||||
value: ThemeMode.dark,
|
||||
label: S.of(context).settingsPageAppearanceSettingDarkThemeLabel,
|
||||
label:
|
||||
S.of(context).settingsPageAppearanceSettingDarkThemeLabel,
|
||||
)
|
||||
],
|
||||
initialValue:
|
||||
BlocProvider.of<ApplicationSettingsCubit>(context).state.preferredThemeMode,
|
||||
initialValue: BlocProvider.of<ApplicationSettingsCubit>(context)
|
||||
.state
|
||||
.preferredThemeMode,
|
||||
title: Text(S.of(context).settingsPageAppearanceSettingTitle),
|
||||
),
|
||||
).then((value) {
|
||||
return BlocProvider.of<ApplicationSettingsCubit>(context).setThemeMode(value);
|
||||
return BlocProvider.of<ApplicationSettingsCubit>(context)
|
||||
.setThemeMode(value);
|
||||
}),
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user