feat: reload UI (#2999)

* chore: reload folder

* chore: reload folder

* chore: init sync

* chore: update tables

* chore: update database

* chore: load row

* chore: update

* chore: reload row

* test: fit test

* chore: retry

* chore: support batch fetch

* chore: enable sync

* chore: sync switch

* chore: sync switch

* chore: migration user data

* chore: migrate data

* chore: migrate folder

* chore: save user email

* chore: refresh user profile

* chore: fix test

* chore: delete translation files

* test: clippy format
This commit is contained in:
Nathan.fooo
2023-07-14 13:37:13 +08:00
committed by GitHub
parent 5085ea115f
commit f9e7b5ffa4
170 changed files with 3380 additions and 1482 deletions

View File

@ -1,6 +1,8 @@
import 'package:json_annotation/json_annotation.dart';
// Run `dart run build_runner build` to generate the json serialization
// Run `dart run build_runner build` to generate the json serialization If the
// file `env_serde.i.dart` is existed, delete it first.
//
// the file `env_serde.g.dart` will be generated in the same directory. Rename
// the file to `env_serde.i.dart` because the file is ignored by default.
part 'env_serde.i.dart';
@ -9,7 +11,9 @@ part 'env_serde.i.dart';
class AppFlowyEnv {
final SupabaseConfiguration supabase_config;
AppFlowyEnv({required this.supabase_config});
AppFlowyEnv({
required this.supabase_config,
});
factory AppFlowyEnv.fromJson(Map<String, dynamic> json) =>
_$AppFlowyEnvFromJson(json);
@ -19,12 +23,15 @@ class AppFlowyEnv {
@JsonSerializable()
class SupabaseConfiguration {
/// Indicates whether the sync feature is enabled.
final bool enable_sync;
final String url;
final String key;
final String jwt_secret;
final PostgresConfiguration postgres_config;
SupabaseConfiguration({
this.enable_sync = true,
required this.url,
required this.key,
required this.jwt_secret,

View File

@ -19,6 +19,7 @@ Map<String, dynamic> _$AppFlowyEnvToJson(AppFlowyEnv instance) =>
SupabaseConfiguration _$SupabaseConfigurationFromJson(
Map<String, dynamic> json) =>
SupabaseConfiguration(
enable_sync: json['enable_sync'] as bool? ?? true,
url: json['url'] as String,
key: json['key'] as String,
jwt_secret: json['jwt_secret'] as String,
@ -29,6 +30,7 @@ SupabaseConfiguration _$SupabaseConfigurationFromJson(
Map<String, dynamic> _$SupabaseConfigurationToJson(
SupabaseConfiguration instance) =>
<String, dynamic>{
'enable_sync': instance.enable_sync,
'url': instance.url,
'key': instance.key,
'jwt_secret': instance.jwt_secret,