language picker, console_page refactor, app settings controller #482
No reviewers
Labels
No Label
Blocked
Bug
Contributions welcome
Did not do
Errata
Feature request
Fixed
How To
Invalid
Needs design
No resolution
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Providers
Digital Ocean
Providers
Hetzner
Refactor
Severity
High
Severity
Low
Severity
Medium
Source
Community
Source
Core Team
Source
Stakeholders
Translations
Under investigation
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: SelfPrivacy/selfprivacy.org.app#482
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "misterfourtytwo/selfprivacy.org.app:feat_token_management"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Done:
package_info
topackage_info_plus
WIP: feat_token_managementto language picker, console_page refactor, app settings controller@ -28,0 +22,4 @@
// ...jobsState.clientJobList
// .whereType<CreateUserJob>()
// .map((final job) => job.user),
// ];
If we don't need the block of code, why not just delete it though
it's simplified logic for filtering jobs with creation of the same(by name) user, which should be added later, but out of scope of changes now
@ -52,3 +52,3 @@
"connect_to_server_provider_text": "З дапамогай API токена праграма SelfPrivacy зможа ад вашага імя замовіць і наладзіць сервер",
"steps": {
"nixos_installation": "Ўстаноўка NixOS",
"nixos_installation": "Ўсталёўка NixOS",
Translations directly to the JSON files might cause conflicts with Weblate. It is better to use weblate.selfprivacy.org in the future if you want to change a translation.
Changing
en.json
is fine, as this is a source for all translations.I guess it is about already existing keys, like, for when ill want to add translation for a new key, it will be ok?
@ -0,0 +47,4 @@
: ThemeMode.light;
// // Make ThemeMode a private variable so it is not updated directly without
// // also persisting the changes with the repo..
// late ThemeMode _themeMode;
I guess it is no longer needed?
@ -0,0 +55,4 @@
bool get shouldShowOnboarding => _shouldShowOnboarding;
/// Load the user's settings from the SettingsService. It may load from a
/// local database or the internet. The controller only knows it can load the
From the internet?
@ -0,0 +3,4 @@
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:selfprivacy/config/get_it_config.dart';
/// basically, a bus for other blocs to listen to server status updates
Unused as of now, and I'm still not sure if it is a good idea to create dependencies between blocs.
well, i'd prefer an inheritedWidget, which holds this value for dependencies, but also explicitly listens to connectivity and app lifecycle state changes (l mean here when it is suspended, like when app active app changes on android), thus it will hold more meaning and could spare us from some errors.
@ -0,0 +4,4 @@
import 'package:selfprivacy/config/get_it_config.dart';
/// basically, a bus for other blocs to listen to server status updates
class ConnectionStatusBloc extends Bloc<ConnectionStatus, ConnectionStatus> {
Does passing the same enum as both Event and State even work?
why won't it?
you have one place, where events come, and another where state is. also, states are set from inside the bloc only.
@ -0,0 +44,4 @@
void _updateQueue() {
// Make sure we don't have too many
if (logs.length > logBufferLimit) {
logs.removeRange(0, logs.length - logBufferLimit);
Why not using the same optimization as with
_incomingQueue
?my guess was that buffer of 500 messages was a console feature, so I left it as is.
also, jumps between 750 and 500 elements in listing user sees are not perceived as stable behavior from user point of view.
_incomingQueue
is an offscreen buffer, so it doesn't affect what is rendered and we could truncate it lazily, so jumps between 750 and 500 elements should be a ok.@ -93,0 +45,4 @@
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Text(
'application_settings.dangerous_settings'.tr(),
style: Theme.of(context).textTheme.titleLarge!.copyWith(
This should be a
labelLarge
, looks broken as atitleLarge
.@ -0,0 +13,4 @@
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Text(
Localization.getLanguageName(context.locale),
style: Theme.of(context).textTheme.headlineSmall,
This is too big
@ -0,0 +39,4 @@
Widget build(final BuildContext context) => SimpleDialog(
title: Text('application_settings.language'.tr()),
children: [
for (final locale
Probably add a "System default" value to reset our overwrite?
@ -0,0 +46,4 @@
Localization.getLanguageName(locale),
style: TextStyle(
fontWeight: locale == context.locale
? FontWeight.w800
How about using a radio button, not just the bold text?
@ -0,0 +19,4 @@
Text('application_settings.system_theme_mode_description'.tr()),
value: appController.systemThemeModeActive,
onChanged: appController.setSystemThemeModeFlag,
// onChanged: (final newValue) => appController.setThemeMode(
Why is it still there, commented out?
@ -0,0 +10,4 @@
if (log.uri != null) _KeyValueRow('uri', '${log.uri}'),
// headers bloc
if (log.headers?.isNotEmpty ?? false) ...[
Rest API requests dialogs expose the API token, and we don't want that (as this console is usually used to send us screenshots/copies of request data)
so you propose to remove headers section or to hide it?
Not necessary, just censoring the Authorization header should be enough.