From e0b1a9491f3d0aac2f21b18153f4cc1fa358eecb Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 31 May 2024 10:30:20 +0800 Subject: [PATCH] chore: adjust view title bar --- .../appflowy_flutter/lib/plugins/ai_chat/chat.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/appflowy_flutter/lib/plugins/ai_chat/chat.dart b/frontend/appflowy_flutter/lib/plugins/ai_chat/chat.dart index 3036c570b6426..cb69ee8d8d734 100644 --- a/frontend/appflowy_flutter/lib/plugins/ai_chat/chat.dart +++ b/frontend/appflowy_flutter/lib/plugins/ai_chat/chat.dart @@ -1,13 +1,12 @@ import 'package:appflowy/generated/flowy_svgs.g.dart'; -import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/plugins/ai_chat/chat_page.dart'; import 'package:appflowy/plugins/util.dart'; import 'package:appflowy/startup/plugin/plugin.dart'; import 'package:appflowy/workspace/application/view_info/view_info_bloc.dart'; import 'package:appflowy/workspace/presentation/home/home_stack.dart'; +import 'package:appflowy/workspace/presentation/widgets/tab_bar_item.dart'; +import 'package:appflowy/workspace/presentation/widgets/view_title_bar.dart'; import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; -import 'package:easy_localization/easy_localization.dart'; -import 'package:flowy_infra_ui/style_widget/text.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -25,7 +24,7 @@ class AIChatPluginBuilder extends PluginBuilder { String get menuName => "AIChat"; @override - FlowySvgData get icon => FlowySvgs.ai_summary_s; + FlowySvgData get icon => FlowySvgs.chat_ai_page_s; @override PluginType get pluginType => PluginType.chat; @@ -80,10 +79,11 @@ class AIChatPagePluginWidgetBuilder extends PluginWidgetBuilder int? deletedViewIndex; @override - Widget get leftBarItem => FlowyText.medium(LocaleKeys.blankPageTitle.tr()); + Widget get leftBarItem => + ViewTitleBar(key: ValueKey(notifier.view.id), view: notifier.view); @override - Widget tabBarItem(String pluginId) => leftBarItem; + Widget tabBarItem(String pluginId) => ViewTabBarItem(view: notifier.view); @override Widget buildWidget({