|
|
@ -11,6 +11,7 @@ class AccountSpecificSettingsPage extends StatelessWidget { |
|
|
|
final Account account; |
|
|
|
final Account account; |
|
|
|
|
|
|
|
|
|
|
|
late final _options = bloc.getOptions(account)!; |
|
|
|
late final _options = bloc.getOptions(account)!; |
|
|
|
|
|
|
|
late final _userDetailsBloc = bloc.getUserDetailsBloc(account); |
|
|
|
late final _name = account.client.humanReadableID; |
|
|
|
late final _name = account.client.humanReadableID; |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
@ -44,17 +45,59 @@ class AccountSpecificSettingsPage extends StatelessWidget { |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
body: SettingsList( |
|
|
|
body: StandardRxResultBuilder<UserDetailsBloc, ProvisioningApiUserDetails>( |
|
|
|
categories: [ |
|
|
|
bloc: _userDetailsBloc, |
|
|
|
SettingsCategory( |
|
|
|
state: (final bloc) => bloc.userDetails, |
|
|
|
title: Text(AppLocalizations.of(context).optionsCategoryGeneral), |
|
|
|
builder: (final context, final userDetailsData, final userDetailsError, final userDetailsLoading, final _) => |
|
|
|
tiles: [ |
|
|
|
SettingsList( |
|
|
|
DropdownButtonSettingsTile( |
|
|
|
categories: [ |
|
|
|
option: _options.initialApp, |
|
|
|
SettingsCategory( |
|
|
|
), |
|
|
|
title: Text(AppLocalizations.of(context).accountOptionsCategoryStorageInfo), |
|
|
|
], |
|
|
|
tiles: [ |
|
|
|
), |
|
|
|
CustomSettingsTile( |
|
|
|
], |
|
|
|
title: Column( |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
if (userDetailsData != null) ...[ |
|
|
|
|
|
|
|
LinearProgressIndicator( |
|
|
|
|
|
|
|
value: userDetailsData.quota!.relative! / 100, |
|
|
|
|
|
|
|
backgroundColor: Theme.of(context).colorScheme.primary.withOpacity(0.3), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
const SizedBox( |
|
|
|
|
|
|
|
height: 10, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Text( |
|
|
|
|
|
|
|
AppLocalizations.of(context).accountOptionsQuotaUsedOf( |
|
|
|
|
|
|
|
filesize(userDetailsData.quota!.used!, 1), |
|
|
|
|
|
|
|
filesize(userDetailsData.quota!.total!, 1), |
|
|
|
|
|
|
|
userDetailsData.quota!.relative!.toString(), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
ExceptionWidget( |
|
|
|
|
|
|
|
userDetailsError, |
|
|
|
|
|
|
|
onRetry: () { |
|
|
|
|
|
|
|
_userDetailsBloc.refresh(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
CustomLinearProgressIndicator( |
|
|
|
|
|
|
|
visible: userDetailsLoading, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
SettingsCategory( |
|
|
|
|
|
|
|
title: Text(AppLocalizations.of(context).optionsCategoryGeneral), |
|
|
|
|
|
|
|
tiles: [ |
|
|
|
|
|
|
|
DropdownButtonSettingsTile( |
|
|
|
|
|
|
|
option: _options.initialApp, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|