mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
config hover background & fix bugs
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
|
||||||
|
|
||||||
part of 'sign_in_bloc.dart';
|
part of 'sign_in_bloc.dart';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
|
||||||
|
|
||||||
part of 'welcome_bloc.dart';
|
part of 'welcome_bloc.dart';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
|
||||||
|
|
||||||
part of 'auth_state.dart';
|
part of 'auth_state.dart';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
|
||||||
|
|
||||||
part of 'app_bloc.dart';
|
part of 'app_bloc.dart';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
|
||||||
|
|
||||||
part of 'app_watch_bloc.dart';
|
part of 'app_watch_bloc.dart';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
|
||||||
|
|
||||||
part of 'doc_bloc.dart';
|
part of 'doc_bloc.dart';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
|
||||||
|
|
||||||
part of 'edit_pannel_bloc.dart';
|
part of 'edit_pannel_bloc.dart';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
|
||||||
|
|
||||||
part of 'home_bloc.dart';
|
part of 'home_bloc.dart';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
|
||||||
|
|
||||||
part of 'home_watcher_bloc.dart';
|
part of 'home_watcher_bloc.dart';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
|
||||||
|
|
||||||
part of 'menu_bloc.dart';
|
part of 'menu_bloc.dart';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
|
||||||
|
|
||||||
part of 'menu_user_bloc.dart';
|
part of 'menu_user_bloc.dart';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
|
||||||
|
|
||||||
part of 'menu_watch.dart';
|
part of 'menu_watch.dart';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
|
||||||
|
|
||||||
part of 'doc_watch_bloc.dart';
|
part of 'doc_watch_bloc.dart';
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart';
|
|||||||
import 'package:flowy_sdk/protobuf/flowy-workspace/view_create.pb.dart';
|
import 'package:flowy_sdk/protobuf/flowy-workspace/view_create.pb.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
|
|
||||||
import 'package:app_flowy/workspace/domain/i_view.dart';
|
import 'package:app_flowy/workspace/domain/i_view.dart';
|
||||||
|
|
||||||
part 'view_bloc.freezed.dart';
|
part 'view_bloc.freezed.dart';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
|
||||||
|
|
||||||
part of 'view_bloc.dart';
|
part of 'view_bloc.dart';
|
||||||
|
|
||||||
|
44
app_flowy/lib/workspace/application/view/view_list_bloc.dart
Normal file
44
app_flowy/lib/workspace/application/view/view_list_bloc.dart
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import 'package:flowy_sdk/protobuf/flowy-workspace/view_create.pb.dart';
|
||||||
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
|
import 'package:dartz/dartz.dart';
|
||||||
|
|
||||||
|
part 'view_list_bloc.freezed.dart';
|
||||||
|
|
||||||
|
class ViewListBloc extends Bloc<ViewListEvent, ViewListState> {
|
||||||
|
final List<View> views;
|
||||||
|
ViewListBloc({required this.views}) : super(ViewListState.initial(views));
|
||||||
|
|
||||||
|
@override
|
||||||
|
Stream<ViewListState> mapEventToState(ViewListEvent event) async* {
|
||||||
|
yield* event.map(
|
||||||
|
initial: (s) async* {
|
||||||
|
yield ViewListState.initial(s.views);
|
||||||
|
},
|
||||||
|
openView: (s) async* {
|
||||||
|
yield state.copyWith(selectedView: some(s.view.id));
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
class ViewListEvent with _$ViewListEvent {
|
||||||
|
const factory ViewListEvent.initial(List<View> views) = Initial;
|
||||||
|
const factory ViewListEvent.openView(View view) = OpenView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
abstract class ViewListState implements _$ViewListState {
|
||||||
|
const factory ViewListState({
|
||||||
|
required bool isLoading,
|
||||||
|
required Option<String> selectedView,
|
||||||
|
required Option<List<View>> views,
|
||||||
|
}) = _ViewListState;
|
||||||
|
|
||||||
|
factory ViewListState.initial(List<View> views) => ViewListState(
|
||||||
|
isLoading: false,
|
||||||
|
selectedView: none(),
|
||||||
|
views: some(views),
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,486 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
|
||||||
|
|
||||||
|
part of 'view_list_bloc.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// FreezedGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
T _$identity<T>(T value) => value;
|
||||||
|
|
||||||
|
final _privateConstructorUsedError = UnsupportedError(
|
||||||
|
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
class _$ViewListEventTearOff {
|
||||||
|
const _$ViewListEventTearOff();
|
||||||
|
|
||||||
|
Initial initial(List<View> views) {
|
||||||
|
return Initial(
|
||||||
|
views,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
OpenView openView(View view) {
|
||||||
|
return OpenView(
|
||||||
|
view,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
const $ViewListEvent = _$ViewListEventTearOff();
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$ViewListEvent {
|
||||||
|
@optionalTypeArgs
|
||||||
|
TResult when<TResult extends Object?>({
|
||||||
|
required TResult Function(List<View> views) initial,
|
||||||
|
required TResult Function(View view) openView,
|
||||||
|
}) =>
|
||||||
|
throw _privateConstructorUsedError;
|
||||||
|
@optionalTypeArgs
|
||||||
|
TResult maybeWhen<TResult extends Object?>({
|
||||||
|
TResult Function(List<View> views)? initial,
|
||||||
|
TResult Function(View view)? openView,
|
||||||
|
required TResult orElse(),
|
||||||
|
}) =>
|
||||||
|
throw _privateConstructorUsedError;
|
||||||
|
@optionalTypeArgs
|
||||||
|
TResult map<TResult extends Object?>({
|
||||||
|
required TResult Function(Initial value) initial,
|
||||||
|
required TResult Function(OpenView value) openView,
|
||||||
|
}) =>
|
||||||
|
throw _privateConstructorUsedError;
|
||||||
|
@optionalTypeArgs
|
||||||
|
TResult maybeMap<TResult extends Object?>({
|
||||||
|
TResult Function(Initial value)? initial,
|
||||||
|
TResult Function(OpenView value)? openView,
|
||||||
|
required TResult orElse(),
|
||||||
|
}) =>
|
||||||
|
throw _privateConstructorUsedError;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract class $ViewListEventCopyWith<$Res> {
|
||||||
|
factory $ViewListEventCopyWith(
|
||||||
|
ViewListEvent value, $Res Function(ViewListEvent) then) =
|
||||||
|
_$ViewListEventCopyWithImpl<$Res>;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
class _$ViewListEventCopyWithImpl<$Res>
|
||||||
|
implements $ViewListEventCopyWith<$Res> {
|
||||||
|
_$ViewListEventCopyWithImpl(this._value, this._then);
|
||||||
|
|
||||||
|
final ViewListEvent _value;
|
||||||
|
// ignore: unused_field
|
||||||
|
final $Res Function(ViewListEvent) _then;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract class $InitialCopyWith<$Res> {
|
||||||
|
factory $InitialCopyWith(Initial value, $Res Function(Initial) then) =
|
||||||
|
_$InitialCopyWithImpl<$Res>;
|
||||||
|
$Res call({List<View> views});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
class _$InitialCopyWithImpl<$Res> extends _$ViewListEventCopyWithImpl<$Res>
|
||||||
|
implements $InitialCopyWith<$Res> {
|
||||||
|
_$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then)
|
||||||
|
: super(_value, (v) => _then(v as Initial));
|
||||||
|
|
||||||
|
@override
|
||||||
|
Initial get _value => super._value as Initial;
|
||||||
|
|
||||||
|
@override
|
||||||
|
$Res call({
|
||||||
|
Object? views = freezed,
|
||||||
|
}) {
|
||||||
|
return _then(Initial(
|
||||||
|
views == freezed
|
||||||
|
? _value.views
|
||||||
|
: views // ignore: cast_nullable_to_non_nullable
|
||||||
|
as List<View>,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
class _$Initial implements Initial {
|
||||||
|
const _$Initial(this.views);
|
||||||
|
|
||||||
|
@override
|
||||||
|
final List<View> views;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ViewListEvent.initial(views: $views)';
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(dynamic other) {
|
||||||
|
return identical(this, other) ||
|
||||||
|
(other is Initial &&
|
||||||
|
(identical(other.views, views) ||
|
||||||
|
const DeepCollectionEquality().equals(other.views, views)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
runtimeType.hashCode ^ const DeepCollectionEquality().hash(views);
|
||||||
|
|
||||||
|
@JsonKey(ignore: true)
|
||||||
|
@override
|
||||||
|
$InitialCopyWith<Initial> get copyWith =>
|
||||||
|
_$InitialCopyWithImpl<Initial>(this, _$identity);
|
||||||
|
|
||||||
|
@override
|
||||||
|
@optionalTypeArgs
|
||||||
|
TResult when<TResult extends Object?>({
|
||||||
|
required TResult Function(List<View> views) initial,
|
||||||
|
required TResult Function(View view) openView,
|
||||||
|
}) {
|
||||||
|
return initial(views);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
@optionalTypeArgs
|
||||||
|
TResult maybeWhen<TResult extends Object?>({
|
||||||
|
TResult Function(List<View> views)? initial,
|
||||||
|
TResult Function(View view)? openView,
|
||||||
|
required TResult orElse(),
|
||||||
|
}) {
|
||||||
|
if (initial != null) {
|
||||||
|
return initial(views);
|
||||||
|
}
|
||||||
|
return orElse();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
@optionalTypeArgs
|
||||||
|
TResult map<TResult extends Object?>({
|
||||||
|
required TResult Function(Initial value) initial,
|
||||||
|
required TResult Function(OpenView value) openView,
|
||||||
|
}) {
|
||||||
|
return initial(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
@optionalTypeArgs
|
||||||
|
TResult maybeMap<TResult extends Object?>({
|
||||||
|
TResult Function(Initial value)? initial,
|
||||||
|
TResult Function(OpenView value)? openView,
|
||||||
|
required TResult orElse(),
|
||||||
|
}) {
|
||||||
|
if (initial != null) {
|
||||||
|
return initial(this);
|
||||||
|
}
|
||||||
|
return orElse();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class Initial implements ViewListEvent {
|
||||||
|
const factory Initial(List<View> views) = _$Initial;
|
||||||
|
|
||||||
|
List<View> get views => throw _privateConstructorUsedError;
|
||||||
|
@JsonKey(ignore: true)
|
||||||
|
$InitialCopyWith<Initial> get copyWith => throw _privateConstructorUsedError;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract class $OpenViewCopyWith<$Res> {
|
||||||
|
factory $OpenViewCopyWith(OpenView value, $Res Function(OpenView) then) =
|
||||||
|
_$OpenViewCopyWithImpl<$Res>;
|
||||||
|
$Res call({View view});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
class _$OpenViewCopyWithImpl<$Res> extends _$ViewListEventCopyWithImpl<$Res>
|
||||||
|
implements $OpenViewCopyWith<$Res> {
|
||||||
|
_$OpenViewCopyWithImpl(OpenView _value, $Res Function(OpenView) _then)
|
||||||
|
: super(_value, (v) => _then(v as OpenView));
|
||||||
|
|
||||||
|
@override
|
||||||
|
OpenView get _value => super._value as OpenView;
|
||||||
|
|
||||||
|
@override
|
||||||
|
$Res call({
|
||||||
|
Object? view = freezed,
|
||||||
|
}) {
|
||||||
|
return _then(OpenView(
|
||||||
|
view == freezed
|
||||||
|
? _value.view
|
||||||
|
: view // ignore: cast_nullable_to_non_nullable
|
||||||
|
as View,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
class _$OpenView implements OpenView {
|
||||||
|
const _$OpenView(this.view);
|
||||||
|
|
||||||
|
@override
|
||||||
|
final View view;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ViewListEvent.openView(view: $view)';
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(dynamic other) {
|
||||||
|
return identical(this, other) ||
|
||||||
|
(other is OpenView &&
|
||||||
|
(identical(other.view, view) ||
|
||||||
|
const DeepCollectionEquality().equals(other.view, view)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
runtimeType.hashCode ^ const DeepCollectionEquality().hash(view);
|
||||||
|
|
||||||
|
@JsonKey(ignore: true)
|
||||||
|
@override
|
||||||
|
$OpenViewCopyWith<OpenView> get copyWith =>
|
||||||
|
_$OpenViewCopyWithImpl<OpenView>(this, _$identity);
|
||||||
|
|
||||||
|
@override
|
||||||
|
@optionalTypeArgs
|
||||||
|
TResult when<TResult extends Object?>({
|
||||||
|
required TResult Function(List<View> views) initial,
|
||||||
|
required TResult Function(View view) openView,
|
||||||
|
}) {
|
||||||
|
return openView(view);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
@optionalTypeArgs
|
||||||
|
TResult maybeWhen<TResult extends Object?>({
|
||||||
|
TResult Function(List<View> views)? initial,
|
||||||
|
TResult Function(View view)? openView,
|
||||||
|
required TResult orElse(),
|
||||||
|
}) {
|
||||||
|
if (openView != null) {
|
||||||
|
return openView(view);
|
||||||
|
}
|
||||||
|
return orElse();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
@optionalTypeArgs
|
||||||
|
TResult map<TResult extends Object?>({
|
||||||
|
required TResult Function(Initial value) initial,
|
||||||
|
required TResult Function(OpenView value) openView,
|
||||||
|
}) {
|
||||||
|
return openView(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
@optionalTypeArgs
|
||||||
|
TResult maybeMap<TResult extends Object?>({
|
||||||
|
TResult Function(Initial value)? initial,
|
||||||
|
TResult Function(OpenView value)? openView,
|
||||||
|
required TResult orElse(),
|
||||||
|
}) {
|
||||||
|
if (openView != null) {
|
||||||
|
return openView(this);
|
||||||
|
}
|
||||||
|
return orElse();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class OpenView implements ViewListEvent {
|
||||||
|
const factory OpenView(View view) = _$OpenView;
|
||||||
|
|
||||||
|
View get view => throw _privateConstructorUsedError;
|
||||||
|
@JsonKey(ignore: true)
|
||||||
|
$OpenViewCopyWith<OpenView> get copyWith =>
|
||||||
|
throw _privateConstructorUsedError;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
class _$ViewListStateTearOff {
|
||||||
|
const _$ViewListStateTearOff();
|
||||||
|
|
||||||
|
_ViewListState call(
|
||||||
|
{required bool isLoading,
|
||||||
|
required Option<String> selectedView,
|
||||||
|
required Option<List<View>> views}) {
|
||||||
|
return _ViewListState(
|
||||||
|
isLoading: isLoading,
|
||||||
|
selectedView: selectedView,
|
||||||
|
views: views,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
const $ViewListState = _$ViewListStateTearOff();
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$ViewListState {
|
||||||
|
bool get isLoading => throw _privateConstructorUsedError;
|
||||||
|
Option<String> get selectedView => throw _privateConstructorUsedError;
|
||||||
|
Option<List<View>> get views => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
@JsonKey(ignore: true)
|
||||||
|
$ViewListStateCopyWith<ViewListState> get copyWith =>
|
||||||
|
throw _privateConstructorUsedError;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract class $ViewListStateCopyWith<$Res> {
|
||||||
|
factory $ViewListStateCopyWith(
|
||||||
|
ViewListState value, $Res Function(ViewListState) then) =
|
||||||
|
_$ViewListStateCopyWithImpl<$Res>;
|
||||||
|
$Res call(
|
||||||
|
{bool isLoading, Option<String> selectedView, Option<List<View>> views});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
class _$ViewListStateCopyWithImpl<$Res>
|
||||||
|
implements $ViewListStateCopyWith<$Res> {
|
||||||
|
_$ViewListStateCopyWithImpl(this._value, this._then);
|
||||||
|
|
||||||
|
final ViewListState _value;
|
||||||
|
// ignore: unused_field
|
||||||
|
final $Res Function(ViewListState) _then;
|
||||||
|
|
||||||
|
@override
|
||||||
|
$Res call({
|
||||||
|
Object? isLoading = freezed,
|
||||||
|
Object? selectedView = freezed,
|
||||||
|
Object? views = freezed,
|
||||||
|
}) {
|
||||||
|
return _then(_value.copyWith(
|
||||||
|
isLoading: isLoading == freezed
|
||||||
|
? _value.isLoading
|
||||||
|
: isLoading // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,
|
||||||
|
selectedView: selectedView == freezed
|
||||||
|
? _value.selectedView
|
||||||
|
: selectedView // ignore: cast_nullable_to_non_nullable
|
||||||
|
as Option<String>,
|
||||||
|
views: views == freezed
|
||||||
|
? _value.views
|
||||||
|
: views // ignore: cast_nullable_to_non_nullable
|
||||||
|
as Option<List<View>>,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract class _$ViewListStateCopyWith<$Res>
|
||||||
|
implements $ViewListStateCopyWith<$Res> {
|
||||||
|
factory _$ViewListStateCopyWith(
|
||||||
|
_ViewListState value, $Res Function(_ViewListState) then) =
|
||||||
|
__$ViewListStateCopyWithImpl<$Res>;
|
||||||
|
@override
|
||||||
|
$Res call(
|
||||||
|
{bool isLoading, Option<String> selectedView, Option<List<View>> views});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
class __$ViewListStateCopyWithImpl<$Res>
|
||||||
|
extends _$ViewListStateCopyWithImpl<$Res>
|
||||||
|
implements _$ViewListStateCopyWith<$Res> {
|
||||||
|
__$ViewListStateCopyWithImpl(
|
||||||
|
_ViewListState _value, $Res Function(_ViewListState) _then)
|
||||||
|
: super(_value, (v) => _then(v as _ViewListState));
|
||||||
|
|
||||||
|
@override
|
||||||
|
_ViewListState get _value => super._value as _ViewListState;
|
||||||
|
|
||||||
|
@override
|
||||||
|
$Res call({
|
||||||
|
Object? isLoading = freezed,
|
||||||
|
Object? selectedView = freezed,
|
||||||
|
Object? views = freezed,
|
||||||
|
}) {
|
||||||
|
return _then(_ViewListState(
|
||||||
|
isLoading: isLoading == freezed
|
||||||
|
? _value.isLoading
|
||||||
|
: isLoading // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,
|
||||||
|
selectedView: selectedView == freezed
|
||||||
|
? _value.selectedView
|
||||||
|
: selectedView // ignore: cast_nullable_to_non_nullable
|
||||||
|
as Option<String>,
|
||||||
|
views: views == freezed
|
||||||
|
? _value.views
|
||||||
|
: views // ignore: cast_nullable_to_non_nullable
|
||||||
|
as Option<List<View>>,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
class _$_ViewListState implements _ViewListState {
|
||||||
|
const _$_ViewListState(
|
||||||
|
{required this.isLoading,
|
||||||
|
required this.selectedView,
|
||||||
|
required this.views});
|
||||||
|
|
||||||
|
@override
|
||||||
|
final bool isLoading;
|
||||||
|
@override
|
||||||
|
final Option<String> selectedView;
|
||||||
|
@override
|
||||||
|
final Option<List<View>> views;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ViewListState(isLoading: $isLoading, selectedView: $selectedView, views: $views)';
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(dynamic other) {
|
||||||
|
return identical(this, other) ||
|
||||||
|
(other is _ViewListState &&
|
||||||
|
(identical(other.isLoading, isLoading) ||
|
||||||
|
const DeepCollectionEquality()
|
||||||
|
.equals(other.isLoading, isLoading)) &&
|
||||||
|
(identical(other.selectedView, selectedView) ||
|
||||||
|
const DeepCollectionEquality()
|
||||||
|
.equals(other.selectedView, selectedView)) &&
|
||||||
|
(identical(other.views, views) ||
|
||||||
|
const DeepCollectionEquality().equals(other.views, views)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
runtimeType.hashCode ^
|
||||||
|
const DeepCollectionEquality().hash(isLoading) ^
|
||||||
|
const DeepCollectionEquality().hash(selectedView) ^
|
||||||
|
const DeepCollectionEquality().hash(views);
|
||||||
|
|
||||||
|
@JsonKey(ignore: true)
|
||||||
|
@override
|
||||||
|
_$ViewListStateCopyWith<_ViewListState> get copyWith =>
|
||||||
|
__$ViewListStateCopyWithImpl<_ViewListState>(this, _$identity);
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class _ViewListState implements ViewListState {
|
||||||
|
const factory _ViewListState(
|
||||||
|
{required bool isLoading,
|
||||||
|
required Option<String> selectedView,
|
||||||
|
required Option<List<View>> views}) = _$_ViewListState;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool get isLoading => throw _privateConstructorUsedError;
|
||||||
|
@override
|
||||||
|
Option<String> get selectedView => throw _privateConstructorUsedError;
|
||||||
|
@override
|
||||||
|
Option<List<View>> get views => throw _privateConstructorUsedError;
|
||||||
|
@override
|
||||||
|
@JsonKey(ignore: true)
|
||||||
|
_$ViewListStateCopyWith<_ViewListState> get copyWith =>
|
||||||
|
throw _privateConstructorUsedError;
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
|
||||||
|
|
||||||
part of 'page_stack_bloc.dart';
|
part of 'page_stack_bloc.dart';
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ import 'package:app_flowy/workspace/application/menu/menu_user_bloc.dart';
|
|||||||
import 'package:app_flowy/workspace/application/menu/menu_watch.dart';
|
import 'package:app_flowy/workspace/application/menu/menu_watch.dart';
|
||||||
import 'package:app_flowy/workspace/application/view/doc_watch_bloc.dart';
|
import 'package:app_flowy/workspace/application/view/doc_watch_bloc.dart';
|
||||||
import 'package:app_flowy/workspace/application/view/view_bloc.dart';
|
import 'package:app_flowy/workspace/application/view/view_bloc.dart';
|
||||||
|
import 'package:app_flowy/workspace/application/view/view_list_bloc.dart';
|
||||||
import 'package:app_flowy/workspace/domain/i_doc.dart';
|
import 'package:app_flowy/workspace/domain/i_doc.dart';
|
||||||
import 'package:app_flowy/workspace/domain/i_view.dart';
|
import 'package:app_flowy/workspace/domain/i_view.dart';
|
||||||
import 'package:app_flowy/workspace/domain/page_stack/page_stack.dart';
|
import 'package:app_flowy/workspace/domain/page_stack/page_stack.dart';
|
||||||
@ -18,6 +19,7 @@ import 'package:app_flowy/workspace/infrastructure/repos/view_repo.dart';
|
|||||||
import 'package:app_flowy/workspace/infrastructure/repos/workspace_repo.dart';
|
import 'package:app_flowy/workspace/infrastructure/repos/workspace_repo.dart';
|
||||||
import 'package:flowy_editor/flowy_editor.dart';
|
import 'package:flowy_editor/flowy_editor.dart';
|
||||||
import 'package:flowy_sdk/protobuf/flowy-user/user_detail.pb.dart';
|
import 'package:flowy_sdk/protobuf/flowy-user/user_detail.pb.dart';
|
||||||
|
import 'package:flowy_sdk/protobuf/flowy-workspace/view_create.pb.dart';
|
||||||
import 'package:get_it/get_it.dart';
|
import 'package:get_it/get_it.dart';
|
||||||
|
|
||||||
import 'i_user_impl.dart';
|
import 'i_user_impl.dart';
|
||||||
@ -41,10 +43,10 @@ class HomeDepsResolver {
|
|||||||
(user, _) => IWorkspaceWatchImpl(repo: WorkspaceWatchRepo(user: user)));
|
(user, _) => IWorkspaceWatchImpl(repo: WorkspaceWatchRepo(user: user)));
|
||||||
|
|
||||||
// View
|
// View
|
||||||
getIt.registerFactoryParam<IView, String, void>(
|
getIt.registerFactoryParam<IView, View, void>(
|
||||||
(viewId, _) => IViewImpl(repo: ViewRepository(viewId: viewId)));
|
(view, _) => IViewImpl(repo: ViewRepository(view: view)));
|
||||||
getIt.registerFactoryParam<IViewWatch, String, void>((viewId, _) =>
|
getIt.registerFactoryParam<IViewWatch, View, void>(
|
||||||
IViewWatchImpl(repo: ViewWatchRepository(viewId: viewId)));
|
(view, _) => IViewWatchImpl(repo: ViewWatchRepository(view: view)));
|
||||||
|
|
||||||
// Doc
|
// Doc
|
||||||
getIt.registerFactoryParam<IDoc, String, void>(
|
getIt.registerFactoryParam<IDoc, String, void>(
|
||||||
@ -81,6 +83,10 @@ class HomeDepsResolver {
|
|||||||
// editor
|
// editor
|
||||||
getIt.registerFactoryParam<EditorPersistence, String, void>(
|
getIt.registerFactoryParam<EditorPersistence, String, void>(
|
||||||
(docId, _) => EditorPersistenceImpl(repo: DocRepository(docId: docId)));
|
(docId, _) => EditorPersistenceImpl(repo: DocRepository(docId: docId)));
|
||||||
|
|
||||||
|
getIt.registerFactoryParam<ViewListBloc, List<View>, void>(
|
||||||
|
(views, _) => ViewListBloc(views: views));
|
||||||
|
|
||||||
// getIt.registerFactoryParam<ViewBloc, String, void>(
|
// getIt.registerFactoryParam<ViewBloc, String, void>(
|
||||||
// (viewId, _) => ViewBloc(iViewImpl: getIt<IView>(param1: viewId)));
|
// (viewId, _) => ViewBloc(iViewImpl: getIt<IView>(param1: viewId)));
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ class AppRepository {
|
|||||||
Future<Either<View, WorkspaceError>> createView(
|
Future<Either<View, WorkspaceError>> createView(
|
||||||
String name, String desc, ViewType viewType) {
|
String name, String desc, ViewType viewType) {
|
||||||
final request = CreateViewRequest.create()
|
final request = CreateViewRequest.create()
|
||||||
..appId = appId
|
..belongToId = appId
|
||||||
..name = name
|
..name = name
|
||||||
..desc = desc
|
..desc = desc
|
||||||
..viewType = viewType;
|
..viewType = viewType;
|
||||||
|
@ -13,13 +13,13 @@ import 'package:flowy_sdk/rust_stream.dart';
|
|||||||
import 'package:app_flowy/workspace/domain/i_view.dart';
|
import 'package:app_flowy/workspace/domain/i_view.dart';
|
||||||
|
|
||||||
class ViewRepository {
|
class ViewRepository {
|
||||||
String viewId;
|
View view;
|
||||||
ViewRepository({
|
ViewRepository({
|
||||||
required this.viewId,
|
required this.view,
|
||||||
});
|
});
|
||||||
|
|
||||||
Future<Either<View, WorkspaceError>> readView() {
|
Future<Either<View, WorkspaceError>> readView() {
|
||||||
final request = QueryViewRequest.create()..viewId = viewId;
|
final request = QueryViewRequest.create()..viewId = view.id;
|
||||||
return WorkspaceEventReadView(request).send();
|
return WorkspaceEventReadView(request).send();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -27,12 +27,12 @@ class ViewRepository {
|
|||||||
class ViewWatchRepository {
|
class ViewWatchRepository {
|
||||||
StreamSubscription<ObservableSubject>? _subscription;
|
StreamSubscription<ObservableSubject>? _subscription;
|
||||||
ViewUpdatedCallback? _updatedCallback;
|
ViewUpdatedCallback? _updatedCallback;
|
||||||
String viewId;
|
View view;
|
||||||
late ViewRepository _repo;
|
late ViewRepository _repo;
|
||||||
ViewWatchRepository({
|
ViewWatchRepository({
|
||||||
required this.viewId,
|
required this.view,
|
||||||
}) {
|
}) {
|
||||||
_repo = ViewRepository(viewId: viewId);
|
_repo = ViewRepository(view: view);
|
||||||
}
|
}
|
||||||
|
|
||||||
void startWatching({
|
void startWatching({
|
||||||
@ -40,7 +40,7 @@ class ViewWatchRepository {
|
|||||||
}) {
|
}) {
|
||||||
_updatedCallback = updatedCallback;
|
_updatedCallback = updatedCallback;
|
||||||
_subscription = RustStreamReceiver.listen((observable) {
|
_subscription = RustStreamReceiver.listen((observable) {
|
||||||
if (observable.subjectId != viewId) {
|
if (observable.subjectId != view.id) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,11 +85,15 @@ class AppWidget extends MenuItem {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _renderViewList(Option<List<View>> views) {
|
Widget _renderViewList(Option<List<View>> some) {
|
||||||
return Padding(
|
List<View> views = some.fold(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
() => List.empty(growable: true),
|
||||||
child: ViewList(views),
|
(views) => views,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||||
|
child: ViewList(views, key: UniqueKey()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -135,24 +139,24 @@ class AppHeader extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
StyledIconButton(
|
// StyledIconButton(
|
||||||
icon: const Icon(Icons.add),
|
// icon: const Icon(Icons.add),
|
||||||
onPressed: () {
|
// onPressed: () {
|
||||||
debugPrint('add view');
|
// debugPrint('add view');
|
||||||
},
|
// },
|
||||||
),
|
// ),
|
||||||
|
PopupMenuButton(
|
||||||
|
iconSize: 20,
|
||||||
|
tooltip: 'create new view',
|
||||||
|
icon: const Icon(Icons.add),
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
onSelected: (viewType) =>
|
||||||
|
_createView(viewType as ViewType, context),
|
||||||
|
itemBuilder: (context) => menuItemBuilder())
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// return PopupMenuButton(
|
|
||||||
// iconSize: 20,
|
|
||||||
// tooltip: 'create new view',
|
|
||||||
// icon: const Icon(Icons.add),
|
|
||||||
// padding: EdgeInsets.zero,
|
|
||||||
// onSelected: (viewType) => _createView(viewType as ViewType, context),
|
|
||||||
// itemBuilder: (context) => menuItemBuilder());
|
|
||||||
|
|
||||||
List<PopupMenuEntry> menuItemBuilder() {
|
List<PopupMenuEntry> menuItemBuilder() {
|
||||||
return ViewType.values
|
return ViewType.values
|
||||||
.where((element) => element != ViewType.Blank)
|
.where((element) => element != ViewType.Blank)
|
||||||
|
@ -1,43 +1,62 @@
|
|||||||
|
import 'package:app_flowy/startup/startup.dart';
|
||||||
|
import 'package:app_flowy/workspace/application/view/view_list_bloc.dart';
|
||||||
import 'package:app_flowy/workspace/presentation/view/view_widget.dart';
|
import 'package:app_flowy/workspace/presentation/view/view_widget.dart';
|
||||||
import 'package:flowy_infra/flowy_logger.dart';
|
|
||||||
import 'package:flowy_sdk/protobuf/flowy-workspace/view_create.pb.dart';
|
import 'package:flowy_sdk/protobuf/flowy-workspace/view_create.pb.dart';
|
||||||
|
import 'package:app_flowy/workspace/domain/page_stack/page_stack.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:dartz/dartz.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
|
||||||
class ViewList extends StatelessWidget {
|
class ViewList extends StatelessWidget {
|
||||||
final Option<List<View>> views;
|
final List<View> views;
|
||||||
const ViewList(this.views, {Key? key}) : super(key: key);
|
const ViewList(this.views, {Key? key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
Log.info('ViewList build');
|
return BlocProvider(
|
||||||
return views.fold(
|
create: (context) =>
|
||||||
() => const SizedBox(),
|
getIt<ViewListBloc>(param1: views)..add(ViewListEvent.initial(views)),
|
||||||
(views) {
|
child: BlocBuilder<ViewListBloc, ViewListState>(
|
||||||
return Column(
|
builder: (context, state) {
|
||||||
children: _renderViews(views),
|
return state.views.fold(
|
||||||
);
|
() => const SizedBox(),
|
||||||
},
|
(views) => _renderViews(context, views),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> _renderViews(List<View> views) {
|
Widget _renderViews(BuildContext context, List<View> views) {
|
||||||
var targetViews = views.map((view) {
|
var viewWidgets = views.map((view) {
|
||||||
|
final viewCtx = ViewWidgetContext(view,
|
||||||
|
isSelected: _isViewSelected(context, view.id));
|
||||||
|
|
||||||
|
final viewWidget = ViewWidget(
|
||||||
|
viewCtx: viewCtx,
|
||||||
|
onOpen: (view) {
|
||||||
|
context.read<ViewListBloc>().add(ViewListEvent.openView(view));
|
||||||
|
final stackView = stackViewFromView(viewCtx.view);
|
||||||
|
getIt<HomePageStack>().setStackView(stackView);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 2),
|
padding: const EdgeInsets.symmetric(vertical: 2),
|
||||||
child: ViewWidget(
|
child: viewWidget,
|
||||||
view: view,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}).toList(growable: false);
|
}).toList(growable: false);
|
||||||
return targetViews;
|
|
||||||
|
return Column(
|
||||||
|
children: viewWidgets,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
bool _isViewSelected(BuildContext context, String viewId) {
|
||||||
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
return context
|
||||||
super.debugFillProperties(properties);
|
.read<ViewListBloc>()
|
||||||
views.fold(() => {},
|
.state
|
||||||
(views) => properties.add(IterableProperty<View>('views', views)));
|
.selectedView
|
||||||
|
.fold(() => false, (selectedViewId) => viewId == selectedViewId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,74 +1,90 @@
|
|||||||
import 'package:app_flowy/startup/startup.dart';
|
import 'package:flowy_infra_ui/style_widget/styled_hover.dart';
|
||||||
import 'package:app_flowy/workspace/domain/image.dart';
|
import 'package:flowy_infra_ui/style_widget/styled_icon_button.dart';
|
||||||
import 'package:app_flowy/workspace/domain/page_stack/page_stack.dart';
|
|
||||||
import 'package:app_flowy/workspace/presentation/app/app_widget.dart';
|
|
||||||
import 'package:flowy_infra_ui/widget/spacing.dart';
|
import 'package:flowy_infra_ui/widget/spacing.dart';
|
||||||
import 'package:flowy_sdk/protobuf/flowy-workspace/view_create.pb.dart';
|
import 'package:flowy_sdk/protobuf/flowy-workspace/view_create.pb.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/styled_icon_button.dart';
|
import 'package:app_flowy/workspace/domain/image.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/styled_hover.dart';
|
import 'package:app_flowy/workspace/presentation/app/app_widget.dart';
|
||||||
|
import 'package:styled_widget/styled_widget.dart';
|
||||||
|
|
||||||
|
class ViewWidgetContext {
|
||||||
|
final View view;
|
||||||
|
bool isSelected;
|
||||||
|
|
||||||
|
ViewWidgetContext(
|
||||||
|
this.view, {
|
||||||
|
this.isSelected = false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef OpenViewCallback = void Function(View);
|
||||||
|
|
||||||
class ViewWidget extends StatelessWidget {
|
class ViewWidget extends StatelessWidget {
|
||||||
final View view;
|
final ViewWidgetContext viewCtx;
|
||||||
const ViewWidget({Key? key, required this.view}) : super(key: key);
|
final OpenViewCallback onOpen;
|
||||||
|
const ViewWidget({Key? key, required this.viewCtx, required this.onOpen})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final config = HoverDisplayConfig(hoverColor: Colors.grey.shade200);
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: _openView(context),
|
onTap: _openView(context),
|
||||||
child: StyledHover(
|
child: StyledHover(
|
||||||
color: Colors.grey.shade300,
|
config: config,
|
||||||
borderRadius: BorderRadius.circular(8),
|
builder: (context, onHover) => _render(context, onHover, config),
|
||||||
builder: (context, onHover) => _render(context, onHover),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _render(BuildContext context, bool onHover) {
|
Widget _render(
|
||||||
const double width = 20;
|
BuildContext context, bool onHover, HoverDisplayConfig config) {
|
||||||
|
const double width = 22;
|
||||||
List<Widget> children = [
|
List<Widget> children = [
|
||||||
Image(
|
Image(
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
width: width,
|
width: width,
|
||||||
height: width,
|
height: width,
|
||||||
image: assetImageForViewType(view.viewType)),
|
image: assetImageForViewType(viewCtx.view.viewType)),
|
||||||
const HSpace(6),
|
const HSpace(6),
|
||||||
Text(
|
Text(
|
||||||
view.name,
|
viewCtx.view.name,
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: const TextStyle(fontSize: 15),
|
style: const TextStyle(fontSize: 15),
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (onHover) {
|
if (onHover) {
|
||||||
children.add(const Spacer());
|
_addedHover(children, width);
|
||||||
|
|
||||||
children.add(Align(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: StyledMore(
|
|
||||||
width: width,
|
|
||||||
onPressed: () {},
|
|
||||||
),
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final padding = EdgeInsets.only(
|
Widget widget = Row(children: children).padding(
|
||||||
|
vertical: 5,
|
||||||
left: AppWidgetSize.expandedPadding,
|
left: AppWidgetSize.expandedPadding,
|
||||||
top: 5,
|
|
||||||
bottom: 5,
|
|
||||||
right: 5,
|
right: 5,
|
||||||
);
|
);
|
||||||
|
|
||||||
return Padding(
|
if (viewCtx.isSelected) {
|
||||||
padding: padding,
|
widget = HoverBackground(child: widget, config: config);
|
||||||
child: Row(children: children),
|
}
|
||||||
);
|
|
||||||
|
return widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
Function() _openView(BuildContext context) {
|
Function() _openView(BuildContext context) {
|
||||||
return () {
|
return () => onOpen(viewCtx.view);
|
||||||
final stackView = stackViewFromView(view);
|
}
|
||||||
getIt<HomePageStack>().setStackView(stackView);
|
|
||||||
};
|
void _addedHover(List<Widget> children, double hoverWidth) {
|
||||||
|
children.add(const Spacer());
|
||||||
|
children.add(Align(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: StyledMore(
|
||||||
|
width: hoverWidth,
|
||||||
|
onPressed: () {
|
||||||
|
debugPrint('show view setting');
|
||||||
|
},
|
||||||
|
),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ SPEC CHECKSUMS:
|
|||||||
flowy_infra_ui: 9d5021b1610fe0476eb1191bf7cd41c4a4138d8f
|
flowy_infra_ui: 9d5021b1610fe0476eb1191bf7cd41c4a4138d8f
|
||||||
flowy_sdk: c302ac0a22dea596db0df8073b9637b2bf2ff6fd
|
flowy_sdk: c302ac0a22dea596db0df8073b9637b2bf2ff6fd
|
||||||
FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
|
FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
|
||||||
path_provider_macos: a0a3fd666cb7cd0448e936fb4abad4052961002b
|
path_provider_macos: 160cab0d5461f0c0e02995469a98f24bdb9a3f1f
|
||||||
url_launcher_macos: 45af3d61de06997666568a7149c1be98b41c95d4
|
url_launcher_macos: 45af3d61de06997666568a7149c1be98b41c95d4
|
||||||
window_size: 339dafa0b27a95a62a843042038fa6c3c48de195
|
window_size: 339dafa0b27a95a62a843042038fa6c3c48de195
|
||||||
|
|
||||||
|
@ -5,19 +5,13 @@ import 'package:flowy_infra/time/duration.dart';
|
|||||||
typedef HoverBuilder = Widget Function(BuildContext context, bool onHover);
|
typedef HoverBuilder = Widget Function(BuildContext context, bool onHover);
|
||||||
|
|
||||||
class StyledHover extends StatefulWidget {
|
class StyledHover extends StatefulWidget {
|
||||||
final Color color;
|
final HoverDisplayConfig config;
|
||||||
final Color borderColor;
|
|
||||||
final double borderWidth;
|
|
||||||
final BorderRadius borderRadius;
|
|
||||||
final HoverBuilder builder;
|
final HoverBuilder builder;
|
||||||
|
|
||||||
const StyledHover({
|
const StyledHover({
|
||||||
Key? key,
|
Key? key,
|
||||||
required this.color,
|
|
||||||
this.borderColor = Colors.transparent,
|
|
||||||
this.borderWidth = 0,
|
|
||||||
this.borderRadius = BorderRadius.zero,
|
|
||||||
required this.builder,
|
required this.builder,
|
||||||
|
this.config = const HoverDisplayConfig(),
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -29,29 +23,70 @@ class _StyledHoverState extends State<StyledHover> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final hoverColor =
|
final hoverColor = _onHover
|
||||||
_onHover ? widget.color : Theme.of(context).colorScheme.background;
|
? widget.config.hoverColor
|
||||||
|
: Theme.of(context).colorScheme.background;
|
||||||
final hoverBorder = Border.all(
|
final config = widget.config.copyWith(hoverColor: hoverColor);
|
||||||
color: widget.borderColor,
|
|
||||||
width: widget.borderWidth,
|
|
||||||
);
|
|
||||||
|
|
||||||
return MouseRegion(
|
return MouseRegion(
|
||||||
cursor: SystemMouseCursors.click,
|
cursor: SystemMouseCursors.click,
|
||||||
onEnter: (p) => setOnHover(true),
|
onEnter: (p) => setOnHover(true),
|
||||||
onExit: (p) => setOnHover(false),
|
onExit: (p) => setOnHover(false),
|
||||||
child: Container(
|
child: HoverBackground(
|
||||||
decoration: BoxDecoration(
|
config: config, child: widget.builder(context, _onHover)),
|
||||||
border: hoverBorder,
|
|
||||||
color: hoverColor,
|
|
||||||
borderRadius: widget.borderRadius,
|
|
||||||
),
|
|
||||||
// duration: .1.seconds,
|
|
||||||
child: widget.builder(context, _onHover),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setOnHover(bool value) => setState(() => _onHover = value);
|
void setOnHover(bool value) => setState(() => _onHover = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class HoverDisplayConfig {
|
||||||
|
final Color borderColor;
|
||||||
|
final double borderWidth;
|
||||||
|
final Color? hoverColor;
|
||||||
|
final BorderRadius borderRadius;
|
||||||
|
|
||||||
|
const HoverDisplayConfig(
|
||||||
|
{this.borderColor = Colors.transparent,
|
||||||
|
this.borderWidth = 0,
|
||||||
|
this.borderRadius = const BorderRadius.all(Radius.circular(8)),
|
||||||
|
this.hoverColor});
|
||||||
|
|
||||||
|
HoverDisplayConfig copyWith({Color? hoverColor}) {
|
||||||
|
return HoverDisplayConfig(
|
||||||
|
borderColor: borderColor,
|
||||||
|
borderWidth: borderWidth,
|
||||||
|
borderRadius: borderRadius,
|
||||||
|
hoverColor: hoverColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class HoverBackground extends StatelessWidget {
|
||||||
|
final HoverDisplayConfig config;
|
||||||
|
|
||||||
|
final Widget child;
|
||||||
|
|
||||||
|
const HoverBackground({
|
||||||
|
Key? key,
|
||||||
|
required this.child,
|
||||||
|
this.config = const HoverDisplayConfig(),
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final color = config.hoverColor ?? Theme.of(context).colorScheme.background;
|
||||||
|
final hoverBorder = Border.all(
|
||||||
|
color: config.borderColor,
|
||||||
|
width: config.borderWidth,
|
||||||
|
);
|
||||||
|
|
||||||
|
return Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: hoverBorder,
|
||||||
|
color: color,
|
||||||
|
borderRadius: config.borderRadius,
|
||||||
|
),
|
||||||
|
child: child,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -50,6 +50,7 @@ class StyledMore extends StatelessWidget {
|
|||||||
width: width,
|
width: width,
|
||||||
height: height,
|
height: height,
|
||||||
icon: const Icon(Icons.more_vert),
|
icon: const Icon(Icons.more_vert),
|
||||||
|
onPressed: onPressed,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,15 +35,11 @@ class StyledNavigationList extends StatelessWidget {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
List<NaviItem> newItems = _selectNaviItem(items);
|
List<NaviItem> newItems = _filter(items);
|
||||||
Widget last = NaviItemWidget(newItems.removeLast());
|
Widget last = NaviItemWidget(newItems.removeLast());
|
||||||
|
|
||||||
List<Widget> widgets = newItems
|
List<Widget> widgets = newItems
|
||||||
.map(
|
.map((item) => NaviItemDivider(child: NaviItemWidget(item)))
|
||||||
(item) => NaviItemDivider(
|
|
||||||
child: NaviItemWidget(item),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
widgets.add(last);
|
widgets.add(last);
|
||||||
@ -51,7 +47,7 @@ class StyledNavigationList extends StatelessWidget {
|
|||||||
return widgets;
|
return widgets;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<NaviItem> _selectNaviItem(List<NaviItem> items) {
|
List<NaviItem> _filter(List<NaviItem> items) {
|
||||||
final length = items.length;
|
final length = items.length;
|
||||||
if (length > 4) {
|
if (length > 4) {
|
||||||
final ellipsisItems = items.getRange(1, length - 2).toList();
|
final ellipsisItems = items.getRange(1, length - 2).toList();
|
||||||
|
@ -20,8 +20,9 @@ class StyledTextButton extends StatelessWidget {
|
|||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: onPressed,
|
onTap: onPressed,
|
||||||
child: StyledHover(
|
child: StyledHover(
|
||||||
color: Colors.grey.shade300,
|
config: HoverDisplayConfig(
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
hoverColor: Colors.grey.shade300),
|
||||||
builder: (context, onHover) => _render(),
|
builder: (context, onHover) => _render(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -25,7 +25,7 @@ class CreateViewRequest extends $pb.GeneratedMessage {
|
|||||||
};
|
};
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CreateViewRequest', createEmptyInstance: create)
|
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CreateViewRequest', createEmptyInstance: create)
|
||||||
..oo(0, [4])
|
..oo(0, [4])
|
||||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'appId')
|
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'belongToId')
|
||||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')
|
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')
|
||||||
..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc')
|
..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc')
|
||||||
..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'thumbnail')
|
..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'thumbnail')
|
||||||
@ -35,15 +35,15 @@ class CreateViewRequest extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
CreateViewRequest._() : super();
|
CreateViewRequest._() : super();
|
||||||
factory CreateViewRequest({
|
factory CreateViewRequest({
|
||||||
$core.String? appId,
|
$core.String? belongToId,
|
||||||
$core.String? name,
|
$core.String? name,
|
||||||
$core.String? desc,
|
$core.String? desc,
|
||||||
$core.String? thumbnail,
|
$core.String? thumbnail,
|
||||||
ViewType? viewType,
|
ViewType? viewType,
|
||||||
}) {
|
}) {
|
||||||
final _result = create();
|
final _result = create();
|
||||||
if (appId != null) {
|
if (belongToId != null) {
|
||||||
_result.appId = appId;
|
_result.belongToId = belongToId;
|
||||||
}
|
}
|
||||||
if (name != null) {
|
if (name != null) {
|
||||||
_result.name = name;
|
_result.name = name;
|
||||||
@ -84,13 +84,13 @@ class CreateViewRequest extends $pb.GeneratedMessage {
|
|||||||
void clearOneOfThumbnail() => clearField($_whichOneof(0));
|
void clearOneOfThumbnail() => clearField($_whichOneof(0));
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
$core.String get appId => $_getSZ(0);
|
$core.String get belongToId => $_getSZ(0);
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
set appId($core.String v) { $_setString(0, v); }
|
set belongToId($core.String v) { $_setString(0, v); }
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
$core.bool hasAppId() => $_has(0);
|
$core.bool hasBelongToId() => $_has(0);
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
void clearAppId() => clearField(1);
|
void clearBelongToId() => clearField(1);
|
||||||
|
|
||||||
@$pb.TagNumber(2)
|
@$pb.TagNumber(2)
|
||||||
$core.String get name => $_getSZ(1);
|
$core.String get name => $_getSZ(1);
|
||||||
@ -132,7 +132,7 @@ class CreateViewRequest extends $pb.GeneratedMessage {
|
|||||||
class View extends $pb.GeneratedMessage {
|
class View extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'View', createEmptyInstance: create)
|
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'View', createEmptyInstance: create)
|
||||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id')
|
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id')
|
||||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'appId')
|
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'belongToId')
|
||||||
..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')
|
..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')
|
||||||
..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc')
|
..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc')
|
||||||
..e<ViewType>(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'viewType', $pb.PbFieldType.OE, defaultOrMaker: ViewType.Blank, valueOf: ViewType.valueOf, enumValues: ViewType.values)
|
..e<ViewType>(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'viewType', $pb.PbFieldType.OE, defaultOrMaker: ViewType.Blank, valueOf: ViewType.valueOf, enumValues: ViewType.values)
|
||||||
@ -142,7 +142,7 @@ class View extends $pb.GeneratedMessage {
|
|||||||
View._() : super();
|
View._() : super();
|
||||||
factory View({
|
factory View({
|
||||||
$core.String? id,
|
$core.String? id,
|
||||||
$core.String? appId,
|
$core.String? belongToId,
|
||||||
$core.String? name,
|
$core.String? name,
|
||||||
$core.String? desc,
|
$core.String? desc,
|
||||||
ViewType? viewType,
|
ViewType? viewType,
|
||||||
@ -151,8 +151,8 @@ class View extends $pb.GeneratedMessage {
|
|||||||
if (id != null) {
|
if (id != null) {
|
||||||
_result.id = id;
|
_result.id = id;
|
||||||
}
|
}
|
||||||
if (appId != null) {
|
if (belongToId != null) {
|
||||||
_result.appId = appId;
|
_result.belongToId = belongToId;
|
||||||
}
|
}
|
||||||
if (name != null) {
|
if (name != null) {
|
||||||
_result.name = name;
|
_result.name = name;
|
||||||
@ -196,13 +196,13 @@ class View extends $pb.GeneratedMessage {
|
|||||||
void clearId() => clearField(1);
|
void clearId() => clearField(1);
|
||||||
|
|
||||||
@$pb.TagNumber(2)
|
@$pb.TagNumber(2)
|
||||||
$core.String get appId => $_getSZ(1);
|
$core.String get belongToId => $_getSZ(1);
|
||||||
@$pb.TagNumber(2)
|
@$pb.TagNumber(2)
|
||||||
set appId($core.String v) { $_setString(1, v); }
|
set belongToId($core.String v) { $_setString(1, v); }
|
||||||
@$pb.TagNumber(2)
|
@$pb.TagNumber(2)
|
||||||
$core.bool hasAppId() => $_has(1);
|
$core.bool hasBelongToId() => $_has(1);
|
||||||
@$pb.TagNumber(2)
|
@$pb.TagNumber(2)
|
||||||
void clearAppId() => clearField(2);
|
void clearBelongToId() => clearField(2);
|
||||||
|
|
||||||
@$pb.TagNumber(3)
|
@$pb.TagNumber(3)
|
||||||
$core.String get name => $_getSZ(2);
|
$core.String get name => $_getSZ(2);
|
||||||
|
@ -10,25 +10,17 @@ import 'dart:core' as $core;
|
|||||||
import 'package:protobuf/protobuf.dart' as $pb;
|
import 'package:protobuf/protobuf.dart' as $pb;
|
||||||
|
|
||||||
class ViewType extends $pb.ProtobufEnum {
|
class ViewType extends $pb.ProtobufEnum {
|
||||||
static const ViewType Blank = ViewType._(
|
static const ViewType Blank = ViewType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Blank');
|
||||||
0,
|
static const ViewType Doc = ViewType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Doc');
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_enum_names')
|
|
||||||
? ''
|
|
||||||
: 'Blank');
|
|
||||||
static const ViewType Doc = ViewType._(
|
|
||||||
1,
|
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_enum_names')
|
|
||||||
? ''
|
|
||||||
: 'Doc');
|
|
||||||
|
|
||||||
static const $core.List<ViewType> values = <ViewType>[
|
static const $core.List<ViewType> values = <ViewType> [
|
||||||
Blank,
|
Blank,
|
||||||
Doc,
|
Doc,
|
||||||
];
|
];
|
||||||
|
|
||||||
static final $core.Map<$core.int, ViewType> _byValue =
|
static final $core.Map<$core.int, ViewType> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||||
$pb.ProtobufEnum.initByValue(values);
|
|
||||||
static ViewType? valueOf($core.int value) => _byValue[value];
|
static ViewType? valueOf($core.int value) => _byValue[value];
|
||||||
|
|
||||||
const ViewType._($core.int v, $core.String n) : super(v, n);
|
const ViewType._($core.int v, $core.String n) : super(v, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ final $typed_data.Uint8List viewTypeDescriptor = $convert.base64Decode('CghWaWV3
|
|||||||
const CreateViewRequest$json = const {
|
const CreateViewRequest$json = const {
|
||||||
'1': 'CreateViewRequest',
|
'1': 'CreateViewRequest',
|
||||||
'2': const [
|
'2': const [
|
||||||
const {'1': 'app_id', '3': 1, '4': 1, '5': 9, '10': 'appId'},
|
const {'1': 'belong_to_id', '3': 1, '4': 1, '5': 9, '10': 'belongToId'},
|
||||||
const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'},
|
const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'},
|
||||||
const {'1': 'desc', '3': 3, '4': 1, '5': 9, '10': 'desc'},
|
const {'1': 'desc', '3': 3, '4': 1, '5': 9, '10': 'desc'},
|
||||||
const {'1': 'thumbnail', '3': 4, '4': 1, '5': 9, '9': 0, '10': 'thumbnail'},
|
const {'1': 'thumbnail', '3': 4, '4': 1, '5': 9, '9': 0, '10': 'thumbnail'},
|
||||||
@ -35,13 +35,13 @@ const CreateViewRequest$json = const {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// Descriptor for `CreateViewRequest`. Decode as a `google.protobuf.DescriptorProto`.
|
/// Descriptor for `CreateViewRequest`. Decode as a `google.protobuf.DescriptorProto`.
|
||||||
final $typed_data.Uint8List createViewRequestDescriptor = $convert.base64Decode('ChFDcmVhdGVWaWV3UmVxdWVzdBIVCgZhcHBfaWQYASABKAlSBWFwcElkEhIKBG5hbWUYAiABKAlSBG5hbWUSEgoEZGVzYxgDIAEoCVIEZGVzYxIeCgl0aHVtYm5haWwYBCABKAlIAFIJdGh1bWJuYWlsEiYKCXZpZXdfdHlwZRgFIAEoDjIJLlZpZXdUeXBlUgh2aWV3VHlwZUISChBvbmVfb2ZfdGh1bWJuYWls');
|
final $typed_data.Uint8List createViewRequestDescriptor = $convert.base64Decode('ChFDcmVhdGVWaWV3UmVxdWVzdBIgCgxiZWxvbmdfdG9faWQYASABKAlSCmJlbG9uZ1RvSWQSEgoEbmFtZRgCIAEoCVIEbmFtZRISCgRkZXNjGAMgASgJUgRkZXNjEh4KCXRodW1ibmFpbBgEIAEoCUgAUgl0aHVtYm5haWwSJgoJdmlld190eXBlGAUgASgOMgkuVmlld1R5cGVSCHZpZXdUeXBlQhIKEG9uZV9vZl90aHVtYm5haWw=');
|
||||||
@$core.Deprecated('Use viewDescriptor instead')
|
@$core.Deprecated('Use viewDescriptor instead')
|
||||||
const View$json = const {
|
const View$json = const {
|
||||||
'1': 'View',
|
'1': 'View',
|
||||||
'2': const [
|
'2': const [
|
||||||
const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'},
|
const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'},
|
||||||
const {'1': 'app_id', '3': 2, '4': 1, '5': 9, '10': 'appId'},
|
const {'1': 'belong_to_id', '3': 2, '4': 1, '5': 9, '10': 'belongToId'},
|
||||||
const {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'},
|
const {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'},
|
||||||
const {'1': 'desc', '3': 4, '4': 1, '5': 9, '10': 'desc'},
|
const {'1': 'desc', '3': 4, '4': 1, '5': 9, '10': 'desc'},
|
||||||
const {'1': 'view_type', '3': 5, '4': 1, '5': 14, '6': '.ViewType', '10': 'viewType'},
|
const {'1': 'view_type', '3': 5, '4': 1, '5': 14, '6': '.ViewType', '10': 'viewType'},
|
||||||
@ -49,7 +49,7 @@ const View$json = const {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// Descriptor for `View`. Decode as a `google.protobuf.DescriptorProto`.
|
/// Descriptor for `View`. Decode as a `google.protobuf.DescriptorProto`.
|
||||||
final $typed_data.Uint8List viewDescriptor = $convert.base64Decode('CgRWaWV3Eg4KAmlkGAEgASgJUgJpZBIVCgZhcHBfaWQYAiABKAlSBWFwcElkEhIKBG5hbWUYAyABKAlSBG5hbWUSEgoEZGVzYxgEIAEoCVIEZGVzYxImCgl2aWV3X3R5cGUYBSABKA4yCS5WaWV3VHlwZVIIdmlld1R5cGU=');
|
final $typed_data.Uint8List viewDescriptor = $convert.base64Decode('CgRWaWV3Eg4KAmlkGAEgASgJUgJpZBIgCgxiZWxvbmdfdG9faWQYAiABKAlSCmJlbG9uZ1RvSWQSEgoEbmFtZRgDIAEoCVIEbmFtZRISCgRkZXNjGAQgASgJUgRkZXNjEiYKCXZpZXdfdHlwZRgFIAEoDjIJLlZpZXdUeXBlUgh2aWV3VHlwZQ==');
|
||||||
@$core.Deprecated('Use repeatedViewDescriptor instead')
|
@$core.Deprecated('Use repeatedViewDescriptor instead')
|
||||||
const RepeatedView$json = const {
|
const RepeatedView$json = const {
|
||||||
'1': 'RepeatedView',
|
'1': 'RepeatedView',
|
||||||
|
@ -5,231 +5,231 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: _fe_analyzer_shared
|
name: _fe_analyzer_shared
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "23.0.0"
|
version: "23.0.0"
|
||||||
analyzer:
|
analyzer:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: analyzer
|
name: analyzer
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.0"
|
||||||
animations:
|
animations:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: animations
|
name: animations
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.1"
|
||||||
args:
|
args:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: args
|
name: args
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.0"
|
version: "2.2.0"
|
||||||
async:
|
async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: async
|
name: async
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.7.0"
|
version: "2.7.0"
|
||||||
bloc:
|
bloc:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: bloc
|
name: bloc
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "7.0.0"
|
version: "7.0.0"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: boolean_selector
|
name: boolean_selector
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.0"
|
||||||
build:
|
build:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build
|
name: build
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.3"
|
version: "2.0.3"
|
||||||
build_config:
|
build_config:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build_config
|
name: build_config
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
build_daemon:
|
build_daemon:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build_daemon
|
name: build_daemon
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.0"
|
version: "3.0.0"
|
||||||
build_resolvers:
|
build_resolvers:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build_resolvers
|
name: build_resolvers
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.4"
|
version: "2.0.4"
|
||||||
build_runner:
|
build_runner:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: build_runner
|
name: build_runner
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.6"
|
version: "2.0.6"
|
||||||
build_runner_core:
|
build_runner_core:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build_runner_core
|
name: build_runner_core
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "7.0.1"
|
version: "7.0.1"
|
||||||
built_collection:
|
built_collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: built_collection
|
name: built_collection
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.1.0"
|
version: "5.1.0"
|
||||||
built_value:
|
built_value:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: built_value
|
name: built_value
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "8.1.1"
|
version: "8.1.1"
|
||||||
characters:
|
characters:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: characters
|
name: characters
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.0"
|
||||||
charcode:
|
charcode:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: charcode
|
name: charcode
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.1"
|
version: "1.3.1"
|
||||||
checked_yaml:
|
checked_yaml:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: checked_yaml
|
name: checked_yaml
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.1"
|
||||||
cli_util:
|
cli_util:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: cli_util
|
name: cli_util
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.3"
|
version: "0.3.3"
|
||||||
clock:
|
clock:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: clock
|
name: clock
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.0"
|
||||||
code_builder:
|
code_builder:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: code_builder
|
name: code_builder
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.1.0"
|
version: "4.1.0"
|
||||||
collection:
|
collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.15.0"
|
version: "1.15.0"
|
||||||
convert:
|
convert:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: convert
|
name: convert
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.1"
|
version: "3.0.1"
|
||||||
crypto:
|
crypto:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: crypto
|
name: crypto
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.1"
|
version: "3.0.1"
|
||||||
cupertino_icons:
|
cupertino_icons:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: cupertino_icons
|
name: cupertino_icons
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.3"
|
version: "1.0.3"
|
||||||
dart_style:
|
dart_style:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: dart_style
|
name: dart_style
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.3"
|
version: "2.0.3"
|
||||||
dartz:
|
dartz:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: dartz
|
name: dartz
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.10.0-nullsafety.2"
|
version: "0.10.0-nullsafety.2"
|
||||||
equatable:
|
equatable:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: equatable
|
name: equatable
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.3"
|
version: "2.0.3"
|
||||||
expandable:
|
expandable:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: expandable
|
name: expandable
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.0.1"
|
version: "5.0.1"
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: fake_async
|
name: fake_async
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.0"
|
||||||
ffi:
|
ffi:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: ffi
|
name: ffi
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.2"
|
version: "1.1.2"
|
||||||
file:
|
file:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: file
|
name: file
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.1.2"
|
version: "6.1.2"
|
||||||
fixnum:
|
fixnum:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: fixnum
|
name: fixnum
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
flowy_editor:
|
flowy_editor:
|
||||||
@ -283,42 +283,42 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: flutter_bloc
|
name: flutter_bloc
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "7.0.1"
|
version: "7.0.1"
|
||||||
flutter_colorpicker:
|
flutter_colorpicker:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: flutter_colorpicker
|
name: flutter_colorpicker
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.5.0"
|
version: "0.5.0"
|
||||||
flutter_keyboard_visibility:
|
flutter_keyboard_visibility:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: flutter_keyboard_visibility
|
name: flutter_keyboard_visibility
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.0.3"
|
version: "5.0.3"
|
||||||
flutter_keyboard_visibility_platform_interface:
|
flutter_keyboard_visibility_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: flutter_keyboard_visibility_platform_interface
|
name: flutter_keyboard_visibility_platform_interface
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.0"
|
||||||
flutter_keyboard_visibility_web:
|
flutter_keyboard_visibility_web:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: flutter_keyboard_visibility_web
|
name: flutter_keyboard_visibility_web
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.0"
|
||||||
flutter_lints:
|
flutter_lints:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: flutter_lints
|
name: flutter_lints
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.4"
|
version: "1.0.4"
|
||||||
flutter_test:
|
flutter_test:
|
||||||
@ -335,203 +335,203 @@ packages:
|
|||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: freezed
|
name: freezed
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.14.3"
|
version: "0.14.3"
|
||||||
freezed_annotation:
|
freezed_annotation:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: freezed_annotation
|
name: freezed_annotation
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.14.3"
|
version: "0.14.3"
|
||||||
frontend_server_client:
|
frontend_server_client:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: frontend_server_client
|
name: frontend_server_client
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.0"
|
||||||
get_it:
|
get_it:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: get_it
|
name: get_it
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "7.2.0"
|
version: "7.2.0"
|
||||||
glob:
|
glob:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: glob
|
name: glob
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.1"
|
||||||
graphs:
|
graphs:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: graphs
|
name: graphs
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.0"
|
||||||
http_multi_server:
|
http_multi_server:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: http_multi_server
|
name: http_multi_server
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.1"
|
version: "3.0.1"
|
||||||
http_parser:
|
http_parser:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: http_parser
|
name: http_parser
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.0"
|
version: "4.0.0"
|
||||||
io:
|
io:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: io
|
name: io
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.3"
|
version: "1.0.3"
|
||||||
isolates:
|
isolates:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: isolates
|
name: isolates
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.3+8"
|
version: "3.0.3+8"
|
||||||
js:
|
js:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: js
|
name: js
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.6.3"
|
version: "0.6.3"
|
||||||
json_annotation:
|
json_annotation:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: json_annotation
|
name: json_annotation
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.1.0"
|
version: "4.1.0"
|
||||||
lint:
|
lint:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: lint
|
name: lint
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.5.3"
|
version: "1.5.3"
|
||||||
lints:
|
lints:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: lints
|
name: lints
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.1"
|
version: "1.0.1"
|
||||||
loading_indicator:
|
loading_indicator:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: loading_indicator
|
name: loading_indicator
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.1"
|
version: "3.0.1"
|
||||||
logger:
|
logger:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: logger
|
name: logger
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
logging:
|
logging:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: logging
|
name: logging
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.1"
|
version: "1.0.1"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.10"
|
version: "0.12.10"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.7.0"
|
version: "1.7.0"
|
||||||
mime:
|
mime:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: mime
|
name: mime
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
nested:
|
nested:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: nested
|
name: nested
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
package_config:
|
package_config:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: package_config
|
name: package_config
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.0"
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path
|
name: path
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0"
|
version: "1.8.0"
|
||||||
path_provider:
|
path_provider:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: path_provider
|
name: path_provider
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.2"
|
version: "2.0.2"
|
||||||
path_provider_linux:
|
path_provider_linux:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_linux
|
name: path_provider_linux
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.2"
|
||||||
path_provider_macos:
|
path_provider_macos:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_macos
|
name: path_provider_macos
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.2"
|
||||||
path_provider_platform_interface:
|
path_provider_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_platform_interface
|
name: path_provider_platform_interface
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.1"
|
||||||
path_provider_windows:
|
path_provider_windows:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_windows
|
name: path_provider_windows
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.3"
|
||||||
pedantic:
|
pedantic:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: pedantic
|
name: pedantic
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.11.1"
|
version: "1.11.1"
|
||||||
photo_view:
|
photo_view:
|
||||||
@ -547,91 +547,91 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: platform
|
name: platform
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.0"
|
version: "3.0.0"
|
||||||
plugin_platform_interface:
|
plugin_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: plugin_platform_interface
|
name: plugin_platform_interface
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.1"
|
||||||
pool:
|
pool:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: pool
|
name: pool
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.5.0"
|
version: "1.5.0"
|
||||||
process:
|
process:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: process
|
name: process
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.2.3"
|
version: "4.2.3"
|
||||||
protobuf:
|
protobuf:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: protobuf
|
name: protobuf
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.0"
|
||||||
provider:
|
provider:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: provider
|
name: provider
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.0.0"
|
version: "5.0.0"
|
||||||
pub_semver:
|
pub_semver:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: pub_semver
|
name: pub_semver
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.0"
|
||||||
pubspec_parse:
|
pubspec_parse:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: pubspec_parse
|
name: pubspec_parse
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
quiver:
|
quiver:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: quiver
|
name: quiver
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.1"
|
version: "3.0.1"
|
||||||
quiver_hashcode:
|
quiver_hashcode:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: quiver_hashcode
|
name: quiver_hashcode
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.0"
|
||||||
shelf:
|
shelf:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: shelf
|
name: shelf
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.0"
|
||||||
shelf_web_socket:
|
shelf_web_socket:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: shelf_web_socket
|
name: shelf_web_socket
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.1"
|
version: "1.0.1"
|
||||||
sized_context:
|
sized_context:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: sized_context
|
name: sized_context
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0+1"
|
version: "1.0.0+1"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
@ -643,189 +643,189 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_gen
|
name: source_gen
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.5"
|
version: "1.0.5"
|
||||||
source_span:
|
source_span:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.1"
|
version: "1.8.1"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stack_trace
|
name: stack_trace
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.10.0"
|
version: "1.10.0"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stream_channel
|
name: stream_channel
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.0"
|
||||||
stream_transform:
|
stream_transform:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stream_transform
|
name: stream_transform
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.0"
|
||||||
string_scanner:
|
string_scanner:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: string_scanner
|
name: string_scanner
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.0"
|
||||||
string_validator:
|
string_validator:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: string_validator
|
name: string_validator
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.0"
|
version: "0.3.0"
|
||||||
styled_widget:
|
styled_widget:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: styled_widget
|
name: styled_widget
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.1+2"
|
version: "0.3.1+2"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: term_glyph
|
name: term_glyph
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.0"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.1"
|
version: "0.4.1"
|
||||||
textstyle_extensions:
|
textstyle_extensions:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: textstyle_extensions
|
name: textstyle_extensions
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0-nullsafety"
|
version: "2.0.0-nullsafety"
|
||||||
time:
|
time:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: time
|
name: time
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.0"
|
||||||
timing:
|
timing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: timing
|
name: timing
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
tuple:
|
tuple:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: tuple
|
name: tuple
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.0"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: typed_data
|
name: typed_data
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.3.0"
|
||||||
universal_platform:
|
universal_platform:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: universal_platform
|
name: universal_platform
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0+1"
|
version: "1.0.0+1"
|
||||||
url_launcher:
|
url_launcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: url_launcher
|
name: url_launcher
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.0.9"
|
version: "6.0.9"
|
||||||
url_launcher_linux:
|
url_launcher_linux:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: url_launcher_linux
|
name: url_launcher_linux
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.1"
|
||||||
url_launcher_macos:
|
url_launcher_macos:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: url_launcher_macos
|
name: url_launcher_macos
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.1"
|
||||||
url_launcher_platform_interface:
|
url_launcher_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: url_launcher_platform_interface
|
name: url_launcher_platform_interface
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.4"
|
version: "2.0.4"
|
||||||
url_launcher_web:
|
url_launcher_web:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: url_launcher_web
|
name: url_launcher_web
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.2"
|
||||||
url_launcher_windows:
|
url_launcher_windows:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: url_launcher_windows
|
name: url_launcher_windows
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.1"
|
||||||
uuid:
|
uuid:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: uuid
|
name: uuid
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.4"
|
version: "3.0.4"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vector_math
|
name: vector_math
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.0"
|
||||||
watcher:
|
watcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: watcher
|
name: watcher
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
web_socket_channel:
|
web_socket_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: web_socket_channel
|
name: web_socket_channel
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.0"
|
||||||
win32:
|
win32:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: win32
|
name: win32
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.5"
|
version: "2.2.5"
|
||||||
window_size:
|
window_size:
|
||||||
@ -841,14 +841,14 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: xdg_directories
|
name: xdg_directories
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.0"
|
version: "0.2.0"
|
||||||
yaml:
|
yaml:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: yaml
|
name: yaml
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.0"
|
version: "3.1.0"
|
||||||
sdks:
|
sdks:
|
||||||
|
@ -31,7 +31,7 @@ CREATE TABLE app_table (
|
|||||||
|
|
||||||
CREATE TABLE view_table (
|
CREATE TABLE view_table (
|
||||||
id TEXT NOT NULL PRIMARY KEY,
|
id TEXT NOT NULL PRIMARY KEY,
|
||||||
app_id TEXT NOT NULL DEFAULT '',
|
belong_to_id TEXT NOT NULL DEFAULT '',
|
||||||
name TEXT NOT NULL DEFAULT '',
|
name TEXT NOT NULL DEFAULT '',
|
||||||
desc TEXT NOT NULL DEFAULT '',
|
desc TEXT NOT NULL DEFAULT '',
|
||||||
modified_time BIGINT NOT NULL DEFAULT 0,
|
modified_time BIGINT NOT NULL DEFAULT 0,
|
||||||
|
@ -37,7 +37,7 @@ table! {
|
|||||||
table! {
|
table! {
|
||||||
view_table (id) {
|
view_table (id) {
|
||||||
id -> Text,
|
id -> Text,
|
||||||
app_id -> Text,
|
belong_to_id -> Text,
|
||||||
name -> Text,
|
name -> Text,
|
||||||
desc -> Text,
|
desc -> Text,
|
||||||
modified_time -> BigInt,
|
modified_time -> BigInt,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use crate::{entities::app::parser::AppId, errors::*};
|
use crate::{entities::app::parser::BelongToId, errors::*};
|
||||||
use flowy_derive::ProtoBuf;
|
use flowy_derive::ProtoBuf;
|
||||||
use std::convert::TryInto;
|
use std::convert::TryInto;
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ impl TryInto<QueryAppParams> for QueryAppRequest {
|
|||||||
type Error = WorkspaceError;
|
type Error = WorkspaceError;
|
||||||
|
|
||||||
fn try_into(self) -> Result<QueryAppParams, Self::Error> {
|
fn try_into(self) -> Result<QueryAppParams, Self::Error> {
|
||||||
let app_id = AppId::parse(self.app_id)
|
let app_id = BelongToId::parse(self.app_id)
|
||||||
.map_err(|e| ErrorBuilder::new(WsErrCode::AppIdInvalid).msg(e).build())?
|
.map_err(|e| ErrorBuilder::new(WsErrCode::AppIdInvalid).msg(e).build())?
|
||||||
.0;
|
.0;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
entities::{
|
entities::{
|
||||||
app::{
|
app::{
|
||||||
parser::{AppColorStyle, AppId, AppName},
|
parser::{AppColorStyle, AppName, BelongToId},
|
||||||
ColorStyle,
|
ColorStyle,
|
||||||
},
|
},
|
||||||
workspace::parser::WorkspaceId,
|
workspace::parser::WorkspaceId,
|
||||||
@ -41,7 +41,7 @@ impl TryInto<UpdateAppParams> for UpdateAppRequest {
|
|||||||
type Error = WorkspaceError;
|
type Error = WorkspaceError;
|
||||||
|
|
||||||
fn try_into(self) -> Result<UpdateAppParams, Self::Error> {
|
fn try_into(self) -> Result<UpdateAppParams, Self::Error> {
|
||||||
let app_id = AppId::parse(self.app_id)
|
let app_id = BelongToId::parse(self.app_id)
|
||||||
.map_err(|e| ErrorBuilder::new(WsErrCode::AppIdInvalid).msg(e).build())?
|
.map_err(|e| ErrorBuilder::new(WsErrCode::AppIdInvalid).msg(e).build())?
|
||||||
.0;
|
.0;
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct AppId(pub String);
|
pub struct BelongToId(pub String);
|
||||||
|
|
||||||
impl AppId {
|
impl BelongToId {
|
||||||
pub fn parse(s: String) -> Result<AppId, String> {
|
pub fn parse(s: String) -> Result<BelongToId, String> {
|
||||||
if s.trim().is_empty() {
|
if s.trim().is_empty() {
|
||||||
return Err(format!("App id can not be empty or whitespace"));
|
return Err(format!("App id can not be empty or whitespace"));
|
||||||
}
|
}
|
||||||
@ -11,6 +11,6 @@ impl AppId {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AsRef<str> for AppId {
|
impl AsRef<str> for BelongToId {
|
||||||
fn as_ref(&self) -> &str { &self.0 }
|
fn as_ref(&self) -> &str { &self.0 }
|
||||||
}
|
}
|
@ -1,7 +1,7 @@
|
|||||||
mod app_color_style;
|
mod app_color_style;
|
||||||
mod app_id;
|
|
||||||
mod app_name;
|
mod app_name;
|
||||||
|
mod belong_to_id;
|
||||||
|
|
||||||
pub use app_color_style::*;
|
pub use app_color_style::*;
|
||||||
pub use app_id::*;
|
|
||||||
pub use app_name::*;
|
pub use app_name::*;
|
||||||
|
pub use belong_to_id::*;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
entities::{app::parser::AppId, view::parser::*},
|
entities::{app::parser::BelongToId, view::parser::*},
|
||||||
errors::{ErrorBuilder, WorkspaceError, WsErrCode},
|
errors::{ErrorBuilder, WorkspaceError, WsErrCode},
|
||||||
impl_def_and_def_mut,
|
impl_def_and_def_mut,
|
||||||
sql_tables::view::ViewTableType,
|
sql_tables::view::ViewTableType,
|
||||||
@ -20,7 +20,7 @@ impl std::default::Default for ViewType {
|
|||||||
#[derive(Default, ProtoBuf)]
|
#[derive(Default, ProtoBuf)]
|
||||||
pub struct CreateViewRequest {
|
pub struct CreateViewRequest {
|
||||||
#[pb(index = 1)]
|
#[pb(index = 1)]
|
||||||
pub app_id: String,
|
pub belong_to_id: String,
|
||||||
|
|
||||||
#[pb(index = 2)]
|
#[pb(index = 2)]
|
||||||
pub name: String,
|
pub name: String,
|
||||||
@ -36,7 +36,7 @@ pub struct CreateViewRequest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub struct CreateViewParams {
|
pub struct CreateViewParams {
|
||||||
pub app_id: String,
|
pub belong_to_id: String,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub desc: String,
|
pub desc: String,
|
||||||
pub thumbnail: String,
|
pub thumbnail: String,
|
||||||
@ -51,7 +51,7 @@ impl TryInto<CreateViewParams> for CreateViewRequest {
|
|||||||
.map_err(|e| ErrorBuilder::new(WsErrCode::ViewNameInvalid).msg(e).build())?
|
.map_err(|e| ErrorBuilder::new(WsErrCode::ViewNameInvalid).msg(e).build())?
|
||||||
.0;
|
.0;
|
||||||
|
|
||||||
let app_id = AppId::parse(self.app_id)
|
let belong_to_id = BelongToId::parse(self.belong_to_id)
|
||||||
.map_err(|e| ErrorBuilder::new(WsErrCode::AppIdInvalid).msg(e).build())?
|
.map_err(|e| ErrorBuilder::new(WsErrCode::AppIdInvalid).msg(e).build())?
|
||||||
.0;
|
.0;
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ impl TryInto<CreateViewParams> for CreateViewRequest {
|
|||||||
|
|
||||||
let view_type = ViewTypeCheck::parse(self.view_type).unwrap().0;
|
let view_type = ViewTypeCheck::parse(self.view_type).unwrap().0;
|
||||||
Ok(CreateViewParams {
|
Ok(CreateViewParams {
|
||||||
app_id,
|
belong_to_id,
|
||||||
name,
|
name,
|
||||||
desc: self.desc,
|
desc: self.desc,
|
||||||
thumbnail,
|
thumbnail,
|
||||||
@ -85,7 +85,7 @@ pub struct View {
|
|||||||
pub id: String,
|
pub id: String,
|
||||||
|
|
||||||
#[pb(index = 2)]
|
#[pb(index = 2)]
|
||||||
pub app_id: String,
|
pub belong_to_id: String,
|
||||||
|
|
||||||
#[pb(index = 3)]
|
#[pb(index = 3)]
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#[derive(PartialEq,Clone,Default)]
|
#[derive(PartialEq,Clone,Default)]
|
||||||
pub struct CreateViewRequest {
|
pub struct CreateViewRequest {
|
||||||
// message fields
|
// message fields
|
||||||
pub app_id: ::std::string::String,
|
pub belong_to_id: ::std::string::String,
|
||||||
pub name: ::std::string::String,
|
pub name: ::std::string::String,
|
||||||
pub desc: ::std::string::String,
|
pub desc: ::std::string::String,
|
||||||
pub view_type: ViewType,
|
pub view_type: ViewType,
|
||||||
@ -53,30 +53,30 @@ impl CreateViewRequest {
|
|||||||
::std::default::Default::default()
|
::std::default::Default::default()
|
||||||
}
|
}
|
||||||
|
|
||||||
// string app_id = 1;
|
// string belong_to_id = 1;
|
||||||
|
|
||||||
|
|
||||||
pub fn get_app_id(&self) -> &str {
|
pub fn get_belong_to_id(&self) -> &str {
|
||||||
&self.app_id
|
&self.belong_to_id
|
||||||
}
|
}
|
||||||
pub fn clear_app_id(&mut self) {
|
pub fn clear_belong_to_id(&mut self) {
|
||||||
self.app_id.clear();
|
self.belong_to_id.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Param is passed by value, moved
|
// Param is passed by value, moved
|
||||||
pub fn set_app_id(&mut self, v: ::std::string::String) {
|
pub fn set_belong_to_id(&mut self, v: ::std::string::String) {
|
||||||
self.app_id = v;
|
self.belong_to_id = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mutable pointer to the field.
|
// Mutable pointer to the field.
|
||||||
// If field is not initialized, it is initialized with default value first.
|
// If field is not initialized, it is initialized with default value first.
|
||||||
pub fn mut_app_id(&mut self) -> &mut ::std::string::String {
|
pub fn mut_belong_to_id(&mut self) -> &mut ::std::string::String {
|
||||||
&mut self.app_id
|
&mut self.belong_to_id
|
||||||
}
|
}
|
||||||
|
|
||||||
// Take field
|
// Take field
|
||||||
pub fn take_app_id(&mut self) -> ::std::string::String {
|
pub fn take_belong_to_id(&mut self) -> ::std::string::String {
|
||||||
::std::mem::replace(&mut self.app_id, ::std::string::String::new())
|
::std::mem::replace(&mut self.belong_to_id, ::std::string::String::new())
|
||||||
}
|
}
|
||||||
|
|
||||||
// string name = 2;
|
// string name = 2;
|
||||||
@ -206,7 +206,7 @@ impl ::protobuf::Message for CreateViewRequest {
|
|||||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||||
match field_number {
|
match field_number {
|
||||||
1 => {
|
1 => {
|
||||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.app_id)?;
|
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.belong_to_id)?;
|
||||||
},
|
},
|
||||||
2 => {
|
2 => {
|
||||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
|
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
|
||||||
@ -235,8 +235,8 @@ impl ::protobuf::Message for CreateViewRequest {
|
|||||||
#[allow(unused_variables)]
|
#[allow(unused_variables)]
|
||||||
fn compute_size(&self) -> u32 {
|
fn compute_size(&self) -> u32 {
|
||||||
let mut my_size = 0;
|
let mut my_size = 0;
|
||||||
if !self.app_id.is_empty() {
|
if !self.belong_to_id.is_empty() {
|
||||||
my_size += ::protobuf::rt::string_size(1, &self.app_id);
|
my_size += ::protobuf::rt::string_size(1, &self.belong_to_id);
|
||||||
}
|
}
|
||||||
if !self.name.is_empty() {
|
if !self.name.is_empty() {
|
||||||
my_size += ::protobuf::rt::string_size(2, &self.name);
|
my_size += ::protobuf::rt::string_size(2, &self.name);
|
||||||
@ -260,8 +260,8 @@ impl ::protobuf::Message for CreateViewRequest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||||
if !self.app_id.is_empty() {
|
if !self.belong_to_id.is_empty() {
|
||||||
os.write_string(1, &self.app_id)?;
|
os.write_string(1, &self.belong_to_id)?;
|
||||||
}
|
}
|
||||||
if !self.name.is_empty() {
|
if !self.name.is_empty() {
|
||||||
os.write_string(2, &self.name)?;
|
os.write_string(2, &self.name)?;
|
||||||
@ -318,9 +318,9 @@ impl ::protobuf::Message for CreateViewRequest {
|
|||||||
descriptor.get(|| {
|
descriptor.get(|| {
|
||||||
let mut fields = ::std::vec::Vec::new();
|
let mut fields = ::std::vec::Vec::new();
|
||||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||||
"app_id",
|
"belong_to_id",
|
||||||
|m: &CreateViewRequest| { &m.app_id },
|
|m: &CreateViewRequest| { &m.belong_to_id },
|
||||||
|m: &mut CreateViewRequest| { &mut m.app_id },
|
|m: &mut CreateViewRequest| { &mut m.belong_to_id },
|
||||||
));
|
));
|
||||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||||
"name",
|
"name",
|
||||||
@ -358,7 +358,7 @@ impl ::protobuf::Message for CreateViewRequest {
|
|||||||
|
|
||||||
impl ::protobuf::Clear for CreateViewRequest {
|
impl ::protobuf::Clear for CreateViewRequest {
|
||||||
fn clear(&mut self) {
|
fn clear(&mut self) {
|
||||||
self.app_id.clear();
|
self.belong_to_id.clear();
|
||||||
self.name.clear();
|
self.name.clear();
|
||||||
self.desc.clear();
|
self.desc.clear();
|
||||||
self.one_of_thumbnail = ::std::option::Option::None;
|
self.one_of_thumbnail = ::std::option::Option::None;
|
||||||
@ -383,7 +383,7 @@ impl ::protobuf::reflect::ProtobufValue for CreateViewRequest {
|
|||||||
pub struct View {
|
pub struct View {
|
||||||
// message fields
|
// message fields
|
||||||
pub id: ::std::string::String,
|
pub id: ::std::string::String,
|
||||||
pub app_id: ::std::string::String,
|
pub belong_to_id: ::std::string::String,
|
||||||
pub name: ::std::string::String,
|
pub name: ::std::string::String,
|
||||||
pub desc: ::std::string::String,
|
pub desc: ::std::string::String,
|
||||||
pub view_type: ViewType,
|
pub view_type: ViewType,
|
||||||
@ -429,30 +429,30 @@ impl View {
|
|||||||
::std::mem::replace(&mut self.id, ::std::string::String::new())
|
::std::mem::replace(&mut self.id, ::std::string::String::new())
|
||||||
}
|
}
|
||||||
|
|
||||||
// string app_id = 2;
|
// string belong_to_id = 2;
|
||||||
|
|
||||||
|
|
||||||
pub fn get_app_id(&self) -> &str {
|
pub fn get_belong_to_id(&self) -> &str {
|
||||||
&self.app_id
|
&self.belong_to_id
|
||||||
}
|
}
|
||||||
pub fn clear_app_id(&mut self) {
|
pub fn clear_belong_to_id(&mut self) {
|
||||||
self.app_id.clear();
|
self.belong_to_id.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Param is passed by value, moved
|
// Param is passed by value, moved
|
||||||
pub fn set_app_id(&mut self, v: ::std::string::String) {
|
pub fn set_belong_to_id(&mut self, v: ::std::string::String) {
|
||||||
self.app_id = v;
|
self.belong_to_id = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mutable pointer to the field.
|
// Mutable pointer to the field.
|
||||||
// If field is not initialized, it is initialized with default value first.
|
// If field is not initialized, it is initialized with default value first.
|
||||||
pub fn mut_app_id(&mut self) -> &mut ::std::string::String {
|
pub fn mut_belong_to_id(&mut self) -> &mut ::std::string::String {
|
||||||
&mut self.app_id
|
&mut self.belong_to_id
|
||||||
}
|
}
|
||||||
|
|
||||||
// Take field
|
// Take field
|
||||||
pub fn take_app_id(&mut self) -> ::std::string::String {
|
pub fn take_belong_to_id(&mut self) -> ::std::string::String {
|
||||||
::std::mem::replace(&mut self.app_id, ::std::string::String::new())
|
::std::mem::replace(&mut self.belong_to_id, ::std::string::String::new())
|
||||||
}
|
}
|
||||||
|
|
||||||
// string name = 3;
|
// string name = 3;
|
||||||
@ -536,7 +536,7 @@ impl ::protobuf::Message for View {
|
|||||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
|
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
|
||||||
},
|
},
|
||||||
2 => {
|
2 => {
|
||||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.app_id)?;
|
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.belong_to_id)?;
|
||||||
},
|
},
|
||||||
3 => {
|
3 => {
|
||||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
|
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
|
||||||
@ -562,8 +562,8 @@ impl ::protobuf::Message for View {
|
|||||||
if !self.id.is_empty() {
|
if !self.id.is_empty() {
|
||||||
my_size += ::protobuf::rt::string_size(1, &self.id);
|
my_size += ::protobuf::rt::string_size(1, &self.id);
|
||||||
}
|
}
|
||||||
if !self.app_id.is_empty() {
|
if !self.belong_to_id.is_empty() {
|
||||||
my_size += ::protobuf::rt::string_size(2, &self.app_id);
|
my_size += ::protobuf::rt::string_size(2, &self.belong_to_id);
|
||||||
}
|
}
|
||||||
if !self.name.is_empty() {
|
if !self.name.is_empty() {
|
||||||
my_size += ::protobuf::rt::string_size(3, &self.name);
|
my_size += ::protobuf::rt::string_size(3, &self.name);
|
||||||
@ -583,8 +583,8 @@ impl ::protobuf::Message for View {
|
|||||||
if !self.id.is_empty() {
|
if !self.id.is_empty() {
|
||||||
os.write_string(1, &self.id)?;
|
os.write_string(1, &self.id)?;
|
||||||
}
|
}
|
||||||
if !self.app_id.is_empty() {
|
if !self.belong_to_id.is_empty() {
|
||||||
os.write_string(2, &self.app_id)?;
|
os.write_string(2, &self.belong_to_id)?;
|
||||||
}
|
}
|
||||||
if !self.name.is_empty() {
|
if !self.name.is_empty() {
|
||||||
os.write_string(3, &self.name)?;
|
os.write_string(3, &self.name)?;
|
||||||
@ -639,9 +639,9 @@ impl ::protobuf::Message for View {
|
|||||||
|m: &mut View| { &mut m.id },
|
|m: &mut View| { &mut m.id },
|
||||||
));
|
));
|
||||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||||
"app_id",
|
"belong_to_id",
|
||||||
|m: &View| { &m.app_id },
|
|m: &View| { &m.belong_to_id },
|
||||||
|m: &mut View| { &mut m.app_id },
|
|m: &mut View| { &mut m.belong_to_id },
|
||||||
));
|
));
|
||||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||||
"name",
|
"name",
|
||||||
@ -675,7 +675,7 @@ impl ::protobuf::Message for View {
|
|||||||
impl ::protobuf::Clear for View {
|
impl ::protobuf::Clear for View {
|
||||||
fn clear(&mut self) {
|
fn clear(&mut self) {
|
||||||
self.id.clear();
|
self.id.clear();
|
||||||
self.app_id.clear();
|
self.belong_to_id.clear();
|
||||||
self.name.clear();
|
self.name.clear();
|
||||||
self.desc.clear();
|
self.desc.clear();
|
||||||
self.view_type = ViewType::Blank;
|
self.view_type = ViewType::Blank;
|
||||||
@ -912,58 +912,59 @@ impl ::protobuf::reflect::ProtobufValue for ViewType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||||
\n\x11view_create.proto\"\xae\x01\n\x11CreateViewRequest\x12\x15\n\x06ap\
|
\n\x11view_create.proto\"\xb9\x01\n\x11CreateViewRequest\x12\x20\n\x0cbe\
|
||||||
p_id\x18\x01\x20\x01(\tR\x05appId\x12\x12\n\x04name\x18\x02\x20\x01(\tR\
|
long_to_id\x18\x01\x20\x01(\tR\nbelongToId\x12\x12\n\x04name\x18\x02\x20\
|
||||||
\x04name\x12\x12\n\x04desc\x18\x03\x20\x01(\tR\x04desc\x12\x1e\n\tthumbn\
|
\x01(\tR\x04name\x12\x12\n\x04desc\x18\x03\x20\x01(\tR\x04desc\x12\x1e\n\
|
||||||
ail\x18\x04\x20\x01(\tH\0R\tthumbnail\x12&\n\tview_type\x18\x05\x20\x01(\
|
\tthumbnail\x18\x04\x20\x01(\tH\0R\tthumbnail\x12&\n\tview_type\x18\x05\
|
||||||
\x0e2\t.ViewTypeR\x08viewTypeB\x12\n\x10one_of_thumbnail\"}\n\x04View\
|
\x20\x01(\x0e2\t.ViewTypeR\x08viewTypeB\x12\n\x10one_of_thumbnail\"\x88\
|
||||||
\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12\x15\n\x06app_id\x18\x02\
|
\x01\n\x04View\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12\x20\n\x0cbe\
|
||||||
\x20\x01(\tR\x05appId\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\x12\
|
long_to_id\x18\x02\x20\x01(\tR\nbelongToId\x12\x12\n\x04name\x18\x03\x20\
|
||||||
\x12\n\x04desc\x18\x04\x20\x01(\tR\x04desc\x12&\n\tview_type\x18\x05\x20\
|
\x01(\tR\x04name\x12\x12\n\x04desc\x18\x04\x20\x01(\tR\x04desc\x12&\n\tv\
|
||||||
\x01(\x0e2\t.ViewTypeR\x08viewType\"+\n\x0cRepeatedView\x12\x1b\n\x05ite\
|
iew_type\x18\x05\x20\x01(\x0e2\t.ViewTypeR\x08viewType\"+\n\x0cRepeatedV\
|
||||||
ms\x18\x01\x20\x03(\x0b2\x05.ViewR\x05items*\x1e\n\x08ViewType\x12\t\n\
|
iew\x12\x1b\n\x05items\x18\x01\x20\x03(\x0b2\x05.ViewR\x05items*\x1e\n\
|
||||||
\x05Blank\x10\0\x12\x07\n\x03Doc\x10\x01J\xca\x06\n\x06\x12\x04\0\0\x16\
|
\x08ViewType\x12\t\n\x05Blank\x10\0\x12\x07\n\x03Doc\x10\x01J\xca\x06\n\
|
||||||
\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x08\
|
\x06\x12\x04\0\0\x16\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\
|
||||||
\x01\n\n\n\x03\x04\0\x01\x12\x03\x02\x08\x19\n\x0b\n\x04\x04\0\x02\0\x12\
|
\x12\x04\x02\0\x08\x01\n\n\n\x03\x04\0\x01\x12\x03\x02\x08\x19\n\x0b\n\
|
||||||
\x03\x03\x04\x16\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\x04\n\n\x0c\n\
|
\x04\x04\0\x02\0\x12\x03\x03\x04\x1c\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\
|
||||||
\x05\x04\0\x02\0\x01\x12\x03\x03\x0b\x11\n\x0c\n\x05\x04\0\x02\0\x03\x12\
|
\x03\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x03\x0b\x17\n\x0c\n\x05\
|
||||||
\x03\x03\x14\x15\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x04\x04\x14\n\x0c\n\
|
\x04\0\x02\0\x03\x12\x03\x03\x1a\x1b\n\x0b\n\x04\x04\0\x02\x01\x12\x03\
|
||||||
\x05\x04\0\x02\x01\x05\x12\x03\x04\x04\n\n\x0c\n\x05\x04\0\x02\x01\x01\
|
\x04\x04\x14\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x04\x04\n\n\x0c\n\x05\
|
||||||
\x12\x03\x04\x0b\x0f\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x04\x12\x13\n\
|
\x04\0\x02\x01\x01\x12\x03\x04\x0b\x0f\n\x0c\n\x05\x04\0\x02\x01\x03\x12\
|
||||||
\x0b\n\x04\x04\0\x02\x02\x12\x03\x05\x04\x14\n\x0c\n\x05\x04\0\x02\x02\
|
\x03\x04\x12\x13\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x05\x04\x14\n\x0c\n\
|
||||||
\x05\x12\x03\x05\x04\n\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x05\x0b\x0f\
|
\x05\x04\0\x02\x02\x05\x12\x03\x05\x04\n\n\x0c\n\x05\x04\0\x02\x02\x01\
|
||||||
\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x05\x12\x13\n\x0b\n\x04\x04\0\x08\
|
\x12\x03\x05\x0b\x0f\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x05\x12\x13\n\
|
||||||
\0\x12\x03\x06\x044\n\x0c\n\x05\x04\0\x08\0\x01\x12\x03\x06\n\x1a\n\x0b\
|
\x0b\n\x04\x04\0\x08\0\x12\x03\x06\x044\n\x0c\n\x05\x04\0\x08\0\x01\x12\
|
||||||
\n\x04\x04\0\x02\x03\x12\x03\x06\x1d2\n\x0c\n\x05\x04\0\x02\x03\x05\x12\
|
\x03\x06\n\x1a\n\x0b\n\x04\x04\0\x02\x03\x12\x03\x06\x1d2\n\x0c\n\x05\
|
||||||
\x03\x06\x1d#\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03\x06$-\n\x0c\n\x05\
|
\x04\0\x02\x03\x05\x12\x03\x06\x1d#\n\x0c\n\x05\x04\0\x02\x03\x01\x12\
|
||||||
\x04\0\x02\x03\x03\x12\x03\x0601\n\x0b\n\x04\x04\0\x02\x04\x12\x03\x07\
|
\x03\x06$-\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\x0601\n\x0b\n\x04\x04\0\
|
||||||
\x04\x1b\n\x0c\n\x05\x04\0\x02\x04\x06\x12\x03\x07\x04\x0c\n\x0c\n\x05\
|
\x02\x04\x12\x03\x07\x04\x1b\n\x0c\n\x05\x04\0\x02\x04\x06\x12\x03\x07\
|
||||||
\x04\0\x02\x04\x01\x12\x03\x07\r\x16\n\x0c\n\x05\x04\0\x02\x04\x03\x12\
|
\x04\x0c\n\x0c\n\x05\x04\0\x02\x04\x01\x12\x03\x07\r\x16\n\x0c\n\x05\x04\
|
||||||
\x03\x07\x19\x1a\n\n\n\x02\x04\x01\x12\x04\t\0\x0f\x01\n\n\n\x03\x04\x01\
|
\0\x02\x04\x03\x12\x03\x07\x19\x1a\n\n\n\x02\x04\x01\x12\x04\t\0\x0f\x01\
|
||||||
\x01\x12\x03\t\x08\x0c\n\x0b\n\x04\x04\x01\x02\0\x12\x03\n\x04\x12\n\x0c\
|
\n\n\n\x03\x04\x01\x01\x12\x03\t\x08\x0c\n\x0b\n\x04\x04\x01\x02\0\x12\
|
||||||
\n\x05\x04\x01\x02\0\x05\x12\x03\n\x04\n\n\x0c\n\x05\x04\x01\x02\0\x01\
|
\x03\n\x04\x12\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\n\x04\n\n\x0c\n\x05\
|
||||||
\x12\x03\n\x0b\r\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\n\x10\x11\n\x0b\n\
|
\x04\x01\x02\0\x01\x12\x03\n\x0b\r\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\
|
||||||
\x04\x04\x01\x02\x01\x12\x03\x0b\x04\x16\n\x0c\n\x05\x04\x01\x02\x01\x05\
|
\n\x10\x11\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\x0b\x04\x1c\n\x0c\n\x05\
|
||||||
\x12\x03\x0b\x04\n\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x0b\x0b\x11\n\
|
\x04\x01\x02\x01\x05\x12\x03\x0b\x04\n\n\x0c\n\x05\x04\x01\x02\x01\x01\
|
||||||
\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\x0b\x14\x15\n\x0b\n\x04\x04\x01\
|
\x12\x03\x0b\x0b\x17\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\x0b\x1a\x1b\
|
||||||
\x02\x02\x12\x03\x0c\x04\x14\n\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03\x0c\
|
\n\x0b\n\x04\x04\x01\x02\x02\x12\x03\x0c\x04\x14\n\x0c\n\x05\x04\x01\x02\
|
||||||
\x04\n\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03\x0c\x0b\x0f\n\x0c\n\x05\
|
\x02\x05\x12\x03\x0c\x04\n\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03\x0c\
|
||||||
\x04\x01\x02\x02\x03\x12\x03\x0c\x12\x13\n\x0b\n\x04\x04\x01\x02\x03\x12\
|
\x0b\x0f\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03\x0c\x12\x13\n\x0b\n\x04\
|
||||||
\x03\r\x04\x14\n\x0c\n\x05\x04\x01\x02\x03\x05\x12\x03\r\x04\n\n\x0c\n\
|
\x04\x01\x02\x03\x12\x03\r\x04\x14\n\x0c\n\x05\x04\x01\x02\x03\x05\x12\
|
||||||
\x05\x04\x01\x02\x03\x01\x12\x03\r\x0b\x0f\n\x0c\n\x05\x04\x01\x02\x03\
|
\x03\r\x04\n\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\x03\r\x0b\x0f\n\x0c\n\
|
||||||
\x03\x12\x03\r\x12\x13\n\x0b\n\x04\x04\x01\x02\x04\x12\x03\x0e\x04\x1b\n\
|
\x05\x04\x01\x02\x03\x03\x12\x03\r\x12\x13\n\x0b\n\x04\x04\x01\x02\x04\
|
||||||
\x0c\n\x05\x04\x01\x02\x04\x06\x12\x03\x0e\x04\x0c\n\x0c\n\x05\x04\x01\
|
\x12\x03\x0e\x04\x1b\n\x0c\n\x05\x04\x01\x02\x04\x06\x12\x03\x0e\x04\x0c\
|
||||||
\x02\x04\x01\x12\x03\x0e\r\x16\n\x0c\n\x05\x04\x01\x02\x04\x03\x12\x03\
|
\n\x0c\n\x05\x04\x01\x02\x04\x01\x12\x03\x0e\r\x16\n\x0c\n\x05\x04\x01\
|
||||||
\x0e\x19\x1a\n\n\n\x02\x04\x02\x12\x04\x10\0\x12\x01\n\n\n\x03\x04\x02\
|
\x02\x04\x03\x12\x03\x0e\x19\x1a\n\n\n\x02\x04\x02\x12\x04\x10\0\x12\x01\
|
||||||
\x01\x12\x03\x10\x08\x14\n\x0b\n\x04\x04\x02\x02\0\x12\x03\x11\x04\x1c\n\
|
\n\n\n\x03\x04\x02\x01\x12\x03\x10\x08\x14\n\x0b\n\x04\x04\x02\x02\0\x12\
|
||||||
\x0c\n\x05\x04\x02\x02\0\x04\x12\x03\x11\x04\x0c\n\x0c\n\x05\x04\x02\x02\
|
\x03\x11\x04\x1c\n\x0c\n\x05\x04\x02\x02\0\x04\x12\x03\x11\x04\x0c\n\x0c\
|
||||||
\0\x06\x12\x03\x11\r\x11\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03\x11\x12\
|
\n\x05\x04\x02\x02\0\x06\x12\x03\x11\r\x11\n\x0c\n\x05\x04\x02\x02\0\x01\
|
||||||
\x17\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\x11\x1a\x1b\n\n\n\x02\x05\0\
|
\x12\x03\x11\x12\x17\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\x11\x1a\x1b\n\
|
||||||
\x12\x04\x13\0\x16\x01\n\n\n\x03\x05\0\x01\x12\x03\x13\x05\r\n\x0b\n\x04\
|
\n\n\x02\x05\0\x12\x04\x13\0\x16\x01\n\n\n\x03\x05\0\x01\x12\x03\x13\x05\
|
||||||
\x05\0\x02\0\x12\x03\x14\x04\x0e\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x14\
|
\r\n\x0b\n\x04\x05\0\x02\0\x12\x03\x14\x04\x0e\n\x0c\n\x05\x05\0\x02\0\
|
||||||
\x04\t\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x14\x0c\r\n\x0b\n\x04\x05\0\
|
\x01\x12\x03\x14\x04\t\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x14\x0c\r\n\
|
||||||
\x02\x01\x12\x03\x15\x04\x0c\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x15\
|
\x0b\n\x04\x05\0\x02\x01\x12\x03\x15\x04\x0c\n\x0c\n\x05\x05\0\x02\x01\
|
||||||
\x04\x07\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x15\n\x0bb\x06proto3\
|
\x01\x12\x03\x15\x04\x07\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x15\n\x0b\
|
||||||
|
b\x06proto3\
|
||||||
";
|
";
|
||||||
|
|
||||||
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
message CreateViewRequest {
|
message CreateViewRequest {
|
||||||
string app_id = 1;
|
string belong_to_id = 1;
|
||||||
string name = 2;
|
string name = 2;
|
||||||
string desc = 3;
|
string desc = 3;
|
||||||
oneof one_of_thumbnail { string thumbnail = 4; };
|
oneof one_of_thumbnail { string thumbnail = 4; };
|
||||||
@ -9,7 +9,7 @@ message CreateViewRequest {
|
|||||||
}
|
}
|
||||||
message View {
|
message View {
|
||||||
string id = 1;
|
string id = 1;
|
||||||
string app_id = 2;
|
string belong_to_id = 2;
|
||||||
string name = 3;
|
string name = 3;
|
||||||
string desc = 4;
|
string desc = 4;
|
||||||
ViewType view_type = 5;
|
ViewType view_type = 5;
|
||||||
|
@ -22,7 +22,7 @@ impl ViewController {
|
|||||||
let view: View = view_table.clone().into();
|
let view: View = view_table.clone().into();
|
||||||
let _ = self.sql.create_view(view_table)?;
|
let _ = self.sql.create_view(view_table)?;
|
||||||
|
|
||||||
send_observable(&view.app_id, WorkspaceObservable::AppAddView);
|
send_observable(&view.belong_to_id, WorkspaceObservable::AppAddView);
|
||||||
Ok(view)
|
Ok(view)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,11 +8,11 @@ use flowy_database::schema::view_table;
|
|||||||
use flowy_infra::{timestamp, uuid};
|
use flowy_infra::{timestamp, uuid};
|
||||||
|
|
||||||
#[derive(PartialEq, Clone, Debug, Queryable, Identifiable, Insertable, Associations)]
|
#[derive(PartialEq, Clone, Debug, Queryable, Identifiable, Insertable, Associations)]
|
||||||
#[belongs_to(AppTable, foreign_key = "app_id")]
|
#[belongs_to(AppTable, foreign_key = "belong_to_id")]
|
||||||
#[table_name = "view_table"]
|
#[table_name = "view_table"]
|
||||||
pub(crate) struct ViewTable {
|
pub(crate) struct ViewTable {
|
||||||
pub id: String,
|
pub id: String,
|
||||||
pub app_id: String,
|
pub belong_to_id: String,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub desc: String,
|
pub desc: String,
|
||||||
pub modified_time: i64,
|
pub modified_time: i64,
|
||||||
@ -28,7 +28,7 @@ impl ViewTable {
|
|||||||
let time = timestamp();
|
let time = timestamp();
|
||||||
ViewTable {
|
ViewTable {
|
||||||
id: view_id,
|
id: view_id,
|
||||||
app_id: params.app_id,
|
belong_to_id: params.belong_to_id,
|
||||||
name: params.name,
|
name: params.name,
|
||||||
desc: params.desc,
|
desc: params.desc,
|
||||||
modified_time: time,
|
modified_time: time,
|
||||||
@ -48,7 +48,7 @@ impl std::convert::Into<View> for ViewTable {
|
|||||||
|
|
||||||
View {
|
View {
|
||||||
id: self.id,
|
id: self.id,
|
||||||
app_id: self.app_id,
|
belong_to_id: self.belong_to_id,
|
||||||
name: self.name,
|
name: self.name,
|
||||||
desc: self.desc,
|
desc: self.desc,
|
||||||
view_type,
|
view_type,
|
||||||
|
@ -26,7 +26,7 @@ fn app_create_with_view_and_then_get_success() {
|
|||||||
let workspace = create_workspace("Workspace", "");
|
let workspace = create_workspace("Workspace", "");
|
||||||
let app = create_app("App A", "AppFlowy Github Project", &workspace.id);
|
let app = create_app("App A", "AppFlowy Github Project", &workspace.id);
|
||||||
let request_a = CreateViewRequest {
|
let request_a = CreateViewRequest {
|
||||||
app_id: app.id.clone(),
|
belong_to_id: app.id.clone(),
|
||||||
name: "View A".to_string(),
|
name: "View A".to_string(),
|
||||||
desc: "".to_string(),
|
desc: "".to_string(),
|
||||||
thumbnail: None,
|
thumbnail: None,
|
||||||
@ -34,7 +34,7 @@ fn app_create_with_view_and_then_get_success() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let request_b = CreateViewRequest {
|
let request_b = CreateViewRequest {
|
||||||
app_id: app.id.clone(),
|
belong_to_id: app.id.clone(),
|
||||||
name: "View B".to_string(),
|
name: "View B".to_string(),
|
||||||
desc: "".to_string(),
|
desc: "".to_string(),
|
||||||
thumbnail: None,
|
thumbnail: None,
|
||||||
|
Reference in New Issue
Block a user