feat: support custom image icon (#7236)

* feat: supporting upload custom image as icon

* feat: support custom image icon on mobile

* chore: clean code
This commit is contained in:
Morn 2025-01-21 11:58:45 +08:00 committed by GitHub
parent 0c057243bc
commit 42bd4884fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 601 additions and 28 deletions

View file

@ -10,6 +10,7 @@ import 'package:appflowy/plugins/document/presentation/editor_plugins/shared_con
import 'package:appflowy/plugins/document/presentation/editor_plugins/transaction_handler/editor_transaction_service.dart';
import 'package:appflowy/plugins/document/presentation/editor_style.dart';
import 'package:appflowy/shared/flowy_error_page.dart';
import 'package:appflowy/shared/icon_emoji_picker/tab.dart';
import 'package:appflowy/startup/startup.dart';
import 'package:appflowy/workspace/application/action_navigation/action_navigation_bloc.dart';
import 'package:appflowy/workspace/application/action_navigation/navigation_action.dart';
@ -28,6 +29,7 @@ class DocumentPage extends StatefulWidget {
super.key,
required this.view,
required this.onDeleted,
required this.tabs,
this.initialSelection,
this.initialBlockId,
this.fixedTitle,
@ -38,6 +40,7 @@ class DocumentPage extends StatefulWidget {
final Selection? initialSelection;
final String? initialBlockId;
final String? fixedTitle;
final List<PickerTabType> tabs;
@override
State<DocumentPage> createState() => _DocumentPageState();
@ -210,6 +213,7 @@ class _DocumentPageState extends State<DocumentPage>
return DocumentImmersiveCover(
fixedTitle: widget.fixedTitle,
view: widget.view,
tabs: widget.tabs,
userProfilePB: userProfilePB,
);
}
@ -217,6 +221,7 @@ class _DocumentPageState extends State<DocumentPage>
final page = editorState.document.root;
return DocumentCoverWidget(
node: page,
tabs: widget.tabs,
editorState: editorState,
view: widget.view,
onIconChanged: (icon) async => ViewBackendService.updateViewIcon(