diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/bottom_sheet/bottom_sheet_edit_link_widget.dart b/frontend/appflowy_flutter/lib/mobile/presentation/bottom_sheet/bottom_sheet_edit_link_widget.dart index aec7054c4f..9c1870b678 100644 --- a/frontend/appflowy_flutter/lib/mobile/presentation/bottom_sheet/bottom_sheet_edit_link_widget.dart +++ b/frontend/appflowy_flutter/lib/mobile/presentation/bottom_sheet/bottom_sheet_edit_link_widget.dart @@ -53,6 +53,7 @@ class _MobileBottomSheetEditLinkWidgetState ViewPB? currentView; bool showErrorText = false; bool showRemoveLink = false; + String title = LocaleKeys.editor_editLink.tr(); AppFlowyThemeData get theme => AppFlowyTheme.of(context); @@ -73,6 +74,7 @@ class _MobileBottomSheetEditLinkWidgetState )..searchRecentViews(); if (linkInfo.link.isEmpty) { isShowingSearchResult = true; + title = LocaleKeys.toolbar_addLink.tr(); } else { showRemoveLink = true; textFocusNode.requestFocus(); @@ -104,7 +106,7 @@ class _MobileBottomSheetEditLinkWidgetState child: Column( children: [ BottomSheetHeader( - title: LocaleKeys.editor_editLink.tr(), + title: title, onClose: () => context.pop(), confirmButton: FlowyTextButton( LocaleKeys.button_done.tr(), diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/search/mobile_search_cell.dart b/frontend/appflowy_flutter/lib/mobile/presentation/search/mobile_search_cell.dart index 48a45d7bd6..9f6af36152 100644 --- a/frontend/appflowy_flutter/lib/mobile/presentation/search/mobile_search_cell.dart +++ b/frontend/appflowy_flutter/lib/mobile/presentation/search/mobile_search_cell.dart @@ -1,9 +1,11 @@ +import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/workspace/application/command_palette/command_palette_bloc.dart'; import 'package:appflowy/workspace/application/command_palette/search_result_ext.dart'; import 'package:appflowy/workspace/application/view/view_ext.dart'; import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-search/result.pb.dart'; import 'package:appflowy_ui/appflowy_ui.dart'; +import 'package:easy_localization/easy_localization.dart'; import 'package:flowy_infra_ui/widget/spacing.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -20,12 +22,18 @@ class MobileSearchResultCell extends StatelessWidget { final theme = AppFlowyTheme.of(context), textColor = theme.textColorScheme.primary; final commandPaletteState = context.read().state; + final displayName = item.displayName.isEmpty + ? LocaleKeys.menuAppHeader_defaultNewPageName.tr() + : item.displayName; return Padding( padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 12), child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - buildIcon(theme), + SizedBox.square( + dimension: 24, + child: Center(child: buildIcon(theme)), + ), HSpace(12), Flexible( child: Column( @@ -35,7 +43,7 @@ class MobileSearchResultCell extends StatelessWidget { maxLines: 1, overflow: TextOverflow.ellipsis, text: buildHighLightSpan( - content: item.displayName, + content: displayName, normal: theme.textStyle.heading4.standard(color: textColor), highlight: theme.textStyle.heading4 .standard(color: textColor) @@ -45,7 +53,7 @@ class MobileSearchResultCell extends StatelessWidget { ), ), buildPath(commandPaletteState, theme), - buildSummary(theme), + ...buildSummary(theme), ], ), ), @@ -84,24 +92,25 @@ class MobileSearchResultCell extends StatelessWidget { ); } - Widget buildSummary(AppFlowyThemeData theme) { - if (item.content.isEmpty) { - return const SizedBox.shrink(); - } - return RichText( - maxLines: 3, - overflow: TextOverflow.ellipsis, - text: buildHighLightSpan( - content: item.content, - normal: theme.textStyle.heading4 - .standard(color: theme.textColorScheme.secondary), - highlight: theme.textStyle.heading4 - .standard(color: theme.textColorScheme.primary) - .copyWith( - backgroundColor: theme.fillColorScheme.themeSelect, - ), + List buildSummary(AppFlowyThemeData theme) { + if (item.content.isEmpty) return []; + return [ + VSpace(theme.spacing.m), + RichText( + maxLines: 3, + overflow: TextOverflow.ellipsis, + text: buildHighLightSpan( + content: item.content, + normal: theme.textStyle.heading4 + .standard(color: theme.textColorScheme.secondary), + highlight: theme.textStyle.heading4 + .standard(color: theme.textColorScheme.primary) + .copyWith( + backgroundColor: theme.fillColorScheme.themeSelect, + ), + ), ), - ); + ]; } TextSpan buildHighLightSpan({ diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/search/mobile_search_textfield.dart b/frontend/appflowy_flutter/lib/mobile/presentation/search/mobile_search_textfield.dart index 06e7f6be1b..6dc1872e07 100644 --- a/frontend/appflowy_flutter/lib/mobile/presentation/search/mobile_search_textfield.dart +++ b/frontend/appflowy_flutter/lib/mobile/presentation/search/mobile_search_textfield.dart @@ -55,7 +55,7 @@ class _MobileSearchTextfieldState extends State { Widget build(BuildContext context) { final theme = AppFlowyTheme.of(context); return SizedBox( - height: 40, + height: 42, child: ValueListenableBuilder( valueListenable: controller, builder: (context, _, __) { @@ -84,12 +84,17 @@ class _MobileSearchTextfieldState extends State { if (!hasFocus || !hasText) return SizedBox.shrink(); return GestureDetector( onTap: () => focusNode.unfocus(), - child: Padding( + behavior: HitTestBehavior.opaque, + child: Container( + height: 42, padding: EdgeInsets.only(left: 8), - child: Text( - LocaleKeys.button_cancel.tr(), - style: theme.textStyle.body - .standard(color: theme.textColorScheme.action), + child: Align( + alignment: Alignment.centerLeft, + child: Text( + LocaleKeys.button_cancel.tr(), + style: theme.textStyle.body + .standard(color: theme.textColorScheme.action), + ), ), ), ); diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/selection_menu/mobile_selection_menu_widget.dart b/frontend/appflowy_flutter/lib/mobile/presentation/selection_menu/mobile_selection_menu_widget.dart index d96dd224e1..9b7d675fe2 100644 --- a/frontend/appflowy_flutter/lib/mobile/presentation/selection_menu/mobile_selection_menu_widget.dart +++ b/frontend/appflowy_flutter/lib/mobile/presentation/selection_menu/mobile_selection_menu_widget.dart @@ -2,6 +2,7 @@ import 'dart:math'; import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy_editor/appflowy_editor.dart'; +import 'package:appflowy_ui/appflowy_ui.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; @@ -328,6 +329,7 @@ class _MobileSelectionMenuWidgetState extends State { } Widget _buildNoResultsWidget(BuildContext context) { + final theme = AppFlowyTheme.of(context); return DecoratedBox( decoration: BoxDecoration( color: Theme.of(context).cardColor, @@ -350,7 +352,10 @@ class _MobileSelectionMenuWidgetState extends State { child: Center( child: Text( LocaleKeys.inlineActions_noResults.tr(), - style: TextStyle(fontSize: 18.0, color: Color(0x801F2225)), + style: TextStyle( + fontSize: 18.0, + color: theme.textColorScheme.primary, + ), textAlign: TextAlign.center, ), ), diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_embed/link_embed_block_component.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_embed/link_embed_block_component.dart index e619a8bcae..3b90c460cb 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_embed/link_embed_block_component.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_embed/link_embed_block_component.dart @@ -12,6 +12,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:universal_platform/universal_platform.dart'; import 'link_embed_menu.dart'; @@ -156,7 +157,9 @@ class LinkEmbedBlockComponentState child: ValueListenableBuilder( valueListenable: showActionsNotifier, builder: (context, showActions, child) { - if (!showActions) return SizedBox.shrink(); + if (!showActions || UniversalPlatform.isMobile) { + return SizedBox.shrink(); + } return LinkEmbedMenu( editorState: context.read(), node: node, @@ -189,11 +192,19 @@ class LinkEmbedBlockComponentState crossAxisAlignment: CrossAxisAlignment.start, children: [ Expanded( - child: ClipRRect( - borderRadius: const BorderRadius.vertical(top: Radius.circular(16)), - child: FlowyNetworkImage( - url: linkInfo.imageUrl ?? '', - width: MediaQuery.of(context).size.width, + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: !UniversalPlatform.isMobile + ? null + : () => + afLaunchUrlString(url, addingHttpSchemeWhenFailed: true), + child: ClipRRect( + borderRadius: + const BorderRadius.vertical(top: Radius.circular(16)), + child: FlowyNetworkImage( + url: linkInfo.imageUrl ?? '', + width: MediaQuery.of(context).size.width, + ), ), ), ), @@ -258,46 +269,53 @@ class LinkEmbedBlockComponentState child: CircularProgressIndicator.adaptive(), ), ) - : Center( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - SvgPicture.asset( - FlowySvgs.embed_error_xl.path, - ), - VSpace(4), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 24), - child: RichText( - maxLines: 1, - overflow: TextOverflow.ellipsis, - text: TextSpan( - children: [ - TextSpan( - text: '$url ', - style: TextStyle( - color: textSceme.secondary, - fontSize: 14, - height: 20 / 14, - fontWeight: FontWeight.w700, + : GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: !UniversalPlatform.isMobile + ? null + : () => + afLaunchUrlString(url, addingHttpSchemeWhenFailed: true), + child: Center( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + SvgPicture.asset( + FlowySvgs.embed_error_xl.path, + ), + VSpace(4), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 24), + child: RichText( + maxLines: 1, + overflow: TextOverflow.ellipsis, + text: TextSpan( + children: [ + TextSpan( + text: '$url ', + style: TextStyle( + color: textSceme.secondary, + fontSize: 14, + height: 20 / 14, + fontWeight: FontWeight.w700, + ), ), - ), - TextSpan( - text: LocaleKeys - .document_plugins_linkPreview_linkPreviewMenu_unableToDisplay - .tr(), - style: TextStyle( - color: textSceme.secondary, - fontSize: 14, - height: 20 / 14, - fontWeight: FontWeight.w400, + TextSpan( + text: LocaleKeys + .document_plugins_linkPreview_linkPreviewMenu_unableToDisplay + .tr(), + style: TextStyle( + color: textSceme.secondary, + fontSize: 14, + height: 20 / 14, + fontWeight: FontWeight.w400, + ), ), - ), - ], + ], + ), ), ), - ), - ], + ], + ), ), ); } diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_preview/custom_link_preview.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_preview/custom_link_preview.dart index 9be73fcc0b..e5ed7d1843 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_preview/custom_link_preview.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_preview/custom_link_preview.dart @@ -122,7 +122,8 @@ class CustomLinkPreviewWidget extends StatelessWidget { return MouseRegion( cursor: SystemMouseCursors.click, child: GestureDetector( - onTap: () => afLaunchUrlString(url), + behavior: HitTestBehavior.opaque, + onTap: () => afLaunchUrlString(url, addingHttpSchemeWhenFailed: true), child: child, ), ); @@ -133,7 +134,8 @@ class CustomLinkPreviewWidget extends StatelessWidget { editorState: context.read(), extendActionWidgets: _buildExtendActionWidgets(context), child: GestureDetector( - onTap: () => afLaunchUrlString(url), + behavior: HitTestBehavior.opaque, + onTap: () => afLaunchUrlString(url, addingHttpSchemeWhenFailed: true), child: child, ), ); diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_preview/custom_link_preview_block_component.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_preview/custom_link_preview_block_component.dart index 3f2128db52..70325b91ce 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_preview/custom_link_preview_block_component.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_preview/custom_link_preview_block_component.dart @@ -4,6 +4,7 @@ import 'package:appflowy/plugins/document/presentation/editor_plugins/link_previ import 'package:appflowy_editor/appflowy_editor.dart'; import 'package:appflowy_editor_plugins/appflowy_editor_plugins.dart'; import 'package:flutter/material.dart'; +import 'package:universal_platform/universal_platform.dart'; import 'custom_link_preview.dart'; import 'default_selectable_mixin.dart'; @@ -148,7 +149,7 @@ class CustomLinkPreviewBlockComponentState child = Stack( children: [ child, - if (showActions) + if (showActions && UniversalPlatform.isDesktopOrWeb) Positioned( top: 12, right: 12, diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/mention/mention_link_block.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/mention/mention_link_block.dart index 06ebcb5002..8bc59d28ef 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/mention/mention_link_block.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/mention/mention_link_block.dart @@ -13,6 +13,7 @@ import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flowy_infra_ui/style_widget/hover.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:universal_platform/universal_platform.dart'; import 'mention_link_error_preview.dart'; import 'mention_link_preview.dart'; @@ -91,6 +92,10 @@ class _MentionLinkBlockState extends State { @override Widget build(BuildContext context) { + final child = buildIconWithTitle(context); + + if (UniversalPlatform.isMobile) return child; + return AppFlowyPopover( key: ValueKey(showAtBottom), controller: previewController, @@ -143,7 +148,12 @@ class _MentionLinkBlockState extends State { onRemoveLink: removeLink, onOpenLink: openLink, ), - child: buildIconWithTitle(context), + child: MouseRegion( + cursor: SystemMouseCursors.click, + onEnter: onEnter, + onExit: onExit, + child: child, + ), ); } @@ -151,50 +161,44 @@ class _MentionLinkBlockState extends State { final theme = AppFlowyTheme.of(context); final siteName = linkInfo.siteName, linkTitle = linkInfo.title ?? url; - return MouseRegion( - cursor: SystemMouseCursors.click, - onEnter: onEnter, - onExit: onExit, - child: GestureDetector( - onTap: () async { - await afLaunchUrlString(url, addingHttpSchemeWhenFailed: true); - }, - child: FlowyHoverContainer( - style: - HoverStyle(hoverColor: Theme.of(context).colorScheme.secondary), - applyStyle: isHovering, - child: Row( - mainAxisSize: MainAxisSize.min, - key: key, - children: [ - HSpace(2), - buildIcon(), - HSpace(4), - Flexible( - child: RichText( - overflow: TextOverflow.ellipsis, - text: TextSpan( - children: [ - if (siteName != null) ...[ - TextSpan( - text: siteName, - style: theme.textStyle.body - .standard(color: theme.textColorScheme.secondary), - ), - WidgetSpan(child: HSpace(2)), - ], + return GestureDetector( + onTap: () async { + await afLaunchUrlString(url, addingHttpSchemeWhenFailed: true); + }, + child: FlowyHoverContainer( + style: HoverStyle(hoverColor: Theme.of(context).colorScheme.secondary), + applyStyle: isHovering, + child: Row( + mainAxisSize: MainAxisSize.min, + key: key, + children: [ + HSpace(2), + buildIcon(), + HSpace(4), + Flexible( + child: RichText( + overflow: TextOverflow.ellipsis, + text: TextSpan( + children: [ + if (siteName != null) ...[ TextSpan( - text: linkTitle, + text: siteName, style: theme.textStyle.body - .standard(color: theme.textColorScheme.primary), + .standard(color: theme.textColorScheme.secondary), ), + WidgetSpan(child: HSpace(2)), ], - ), + TextSpan( + text: linkTitle, + style: theme.textStyle.body + .standard(color: theme.textColorScheme.primary), + ), + ], ), ), - HSpace(2), - ], - ), + ), + HSpace(2), + ], ), ), ); diff --git a/frontend/appflowy_flutter/lib/user/application/reminder/reminder_bloc.dart b/frontend/appflowy_flutter/lib/user/application/reminder/reminder_bloc.dart index d80b5144e5..1623b26af3 100644 --- a/frontend/appflowy_flutter/lib/user/application/reminder/reminder_bloc.dart +++ b/frontend/appflowy_flutter/lib/user/application/reminder/reminder_bloc.dart @@ -37,7 +37,6 @@ class ReminderBloc extends Bloc { _listener = AppLifecycleListener( onResume: () { if (!isClosed) { - add(const ReminderEvent.refresh()); add(const ReminderEvent.resetTimer()); } }, @@ -437,15 +436,11 @@ class ReminderBloc extends Bloc { Future checkReminderAvailable( ReminderPB reminder, - Set reminderIds, { - Set? removedIds, - }) async { + Set reminderIds, + ) async { /// blockId is null means no node final blockId = reminder.meta[ReminderMetaKeys.blockId]; - if (blockId == null) { - removedIds?.add(reminder.id); - return false; - } + if (blockId == null) return false; /// check if schedule time is comming final scheduledAt = reminder.scheduledAt.toDateTime(); @@ -457,19 +452,13 @@ class ReminderBloc extends Bloc { final viewId = reminder.objectId; final view = await ViewBackendService.getView(viewId).fold((s) => s, (_) => null); - if (view == null) { - removedIds?.add(reminder.id); - return false; - } + if (view == null) return false; /// check if document is not null final document = await DocumentService() .openDocument(documentId: viewId) .fold((s) => s.toDocument(), (_) => null); - if (document == null) { - removedIds?.add(reminder.id); - return false; - } + if (document == null) return false; Node? searchById(Node current, String id) { if (current.id == id) { return current; @@ -488,10 +477,7 @@ class ReminderBloc extends Bloc { /// check if node is not null final node = searchById(document.root, blockId); - if (node == null) { - removedIds?.add(reminder.id); - return false; - } + if (node == null) return false; final textInserts = node.delta?.whereType(); if (textInserts == null) return false; for (final text in textInserts) { @@ -502,8 +488,6 @@ class ReminderBloc extends Bloc { return true; } } - - removedIds?.add(reminder.id); return false; } @@ -512,19 +496,11 @@ class ReminderBloc extends Bloc { ) async { final List availableReminders = []; final reminderIds = reminders.map((e) => e.id).toSet(); - final removedIds = {}; for (final r in reminders) { - if (await checkReminderAvailable( - r, - reminderIds, - removedIds: removedIds, - )) { + if (await checkReminderAvailable(r, reminderIds)) { availableReminders.add(r); } } - for (final id in removedIds) { - add(ReminderEvent.remove(reminderId: id)); - } return availableReminders; } } diff --git a/frontend/appflowy_flutter/lib/workspace/application/user/user_workspace_bloc.dart b/frontend/appflowy_flutter/lib/workspace/application/user/user_workspace_bloc.dart index 927f72502d..c37feee90c 100644 --- a/frontend/appflowy_flutter/lib/workspace/application/user/user_workspace_bloc.dart +++ b/frontend/appflowy_flutter/lib/workspace/application/user/user_workspace_bloc.dart @@ -1,5 +1,7 @@ import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/shared/feature_flags.dart'; +import 'package:appflowy/startup/startup.dart'; +import 'package:appflowy/user/application/reminder/reminder_bloc.dart'; import 'package:appflowy/user/application/user_listener.dart'; import 'package:appflowy/user/application/user_service.dart'; import 'package:appflowy_backend/log.dart'; @@ -285,6 +287,7 @@ class UserWorkspaceBloc extends Bloc { ), ), ); + getIt().add(ReminderEvent.started()); }, renameWorkspace: (workspaceId, name) async { final result = diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/home/desktop_home_screen.dart b/frontend/appflowy_flutter/lib/workspace/presentation/home/desktop_home_screen.dart index a02d25d209..39055bf93b 100644 --- a/frontend/appflowy_flutter/lib/workspace/presentation/home/desktop_home_screen.dart +++ b/frontend/appflowy_flutter/lib/workspace/presentation/home/desktop_home_screen.dart @@ -276,7 +276,7 @@ class DesktopHomeScreen extends StatelessWidget { .animatedPanelX( closeX: -layout.notificationPanelWidth, isClosed: !layout.showNotificationPanel, - curve: Curves.easeInOut, + curve: Curves.easeOutQuad, duration: layout.animDuration.inMilliseconds * 0.001, ) .positioned( diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/header/sidebar_top_menu.dart b/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/header/sidebar_top_menu.dart index c076297e47..954518de88 100644 --- a/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/header/sidebar_top_menu.dart +++ b/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/header/sidebar_top_menu.dart @@ -6,6 +6,7 @@ import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/workspace/application/home/home_setting_bloc.dart'; import 'package:appflowy/workspace/application/menu/sidebar_sections_bloc.dart'; import 'package:appflowy/workspace/presentation/home/home_sizes.dart'; +import 'package:appflowy_ui/appflowy_ui.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flowy_infra_ui/style_widget/hover.dart'; import 'package:flowy_infra_ui/widget/flowy_tooltip.dart'; @@ -83,6 +84,7 @@ class SidebarTopMenu extends StatelessWidget { ), ], ); + final theme = AppFlowyTheme.of(context); return ValueListenableBuilder( valueListenable: isSidebarOnHover, @@ -97,10 +99,12 @@ class SidebarTopMenu extends StatelessWidget { onPointerDown: (_) => context.read().collapseMenu(), child: FlowyHover( - child: Container( + child: SizedBox( width: 24, - padding: const EdgeInsets.all(4), - child: const FlowySvg(FlowySvgs.hide_menu_s), + child: FlowySvg( + FlowySvgs.double_back_arrow_m, + color: theme.iconColorScheme.secondary, + ), ), ), ), diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/home/navigation.dart b/frontend/appflowy_flutter/lib/workspace/presentation/home/navigation.dart index cfb6706c3f..fce716c676 100644 --- a/frontend/appflowy_flutter/lib/workspace/presentation/home/navigation.dart +++ b/frontend/appflowy_flutter/lib/workspace/presentation/home/navigation.dart @@ -4,6 +4,7 @@ import 'package:appflowy/generated/flowy_svgs.g.dart'; import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/workspace/application/home/home_setting_bloc.dart'; import 'package:appflowy/workspace/presentation/home/home_stack.dart'; +import 'package:appflowy_ui/appflowy_ui.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flowy_infra/size.dart'; import 'package:flowy_infra_ui/style_widget/icon_button.dart'; @@ -81,6 +82,7 @@ class FlowyNavigation extends StatelessWidget { ), ], ); + final theme = AppFlowyTheme.of(context); return Padding( padding: const EdgeInsets.only(right: 8.0), child: SizedBox( @@ -101,8 +103,10 @@ class FlowyNavigation extends StatelessWidget { child: FlowyIconButton( width: 24, onPressed: () {}, - iconPadding: const EdgeInsets.all(4), - icon: const FlowySvg(FlowySvgs.hide_menu_s), + icon: FlowySvg( + FlowySvgs.double_back_arrow_m, + color: theme.iconColorScheme.secondary, + ), ), ), ), diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/notifications/notification_panel.dart b/frontend/appflowy_flutter/lib/workspace/presentation/notifications/notification_panel.dart index 534e5aa51f..4590bd1d88 100644 --- a/frontend/appflowy_flutter/lib/workspace/presentation/notifications/notification_panel.dart +++ b/frontend/appflowy_flutter/lib/workspace/presentation/notifications/notification_panel.dart @@ -99,32 +99,37 @@ class _NotificationPanelState extends State Widget buildTitle({ required BuildContext context, required VoidCallback onHide, - }) => - Container( - padding: const EdgeInsets.symmetric(horizontal: 16), - height: 24, - child: Row( - children: [ - FlowyText.medium( - LocaleKeys.notificationHub_title.tr(), - fontSize: 16, - figmaLineHeight: 24, + }) { + final theme = AppFlowyTheme.of(context); + return Container( + padding: const EdgeInsets.symmetric(horizontal: 16), + height: 24, + child: Row( + children: [ + FlowyText.medium( + LocaleKeys.notificationHub_title.tr(), + fontSize: 16, + figmaLineHeight: 24, + ), + Spacer(), + FlowyIconButton( + width: 24, + icon: FlowySvg( + FlowySvgs.double_back_arrow_m, + color: theme.iconColorScheme.secondary, ), - Spacer(), - FlowyIconButton( - icon: FlowySvg(FlowySvgs.hide_menu_s), - width: 24, - richTooltipText: colappsedButtonTooltip(context), - onPressed: onHide, - iconPadding: const EdgeInsets.all(4), - ), - HSpace(8), - buildMoreActionButton(context), - ], - ), - ); + richTooltipText: colappsedButtonTooltip(context), + onPressed: onHide, + ), + HSpace(8), + buildMoreActionButton(context), + ], + ), + ); + } Widget buildMoreActionButton(BuildContext context) { + final theme = AppFlowyTheme.of(context); return AppFlowyPopover( constraints: BoxConstraints.loose(const Size(240, 78)), offset: const Offset(-24, 24), @@ -134,13 +139,15 @@ class _NotificationPanelState extends State onClose: () => keepEditorFocusNotifier.decrease(), popupBuilder: (_) => buildMoreActions(), child: FlowyIconButton( - icon: FlowySvg(FlowySvgs.three_dots_s), width: 24, + icon: FlowySvg( + FlowySvgs.three_dots_m, + color: theme.iconColorScheme.secondary, + ), onPressed: () { keepEditorFocusNotifier.increase(); moreActionController.show(); }, - iconPadding: const EdgeInsets.all(4), ), ); } diff --git a/frontend/resources/flowy_icons/24x/double_back_arrow.svg b/frontend/resources/flowy_icons/24x/double_back_arrow.svg new file mode 100644 index 0000000000..063bfe86b7 --- /dev/null +++ b/frontend/resources/flowy_icons/24x/double_back_arrow.svg @@ -0,0 +1,4 @@ + + + + diff --git a/frontend/resources/flowy_icons/24x/three_dots.svg b/frontend/resources/flowy_icons/24x/three_dots.svg new file mode 100644 index 0000000000..728f7344b9 --- /dev/null +++ b/frontend/resources/flowy_icons/24x/three_dots.svg @@ -0,0 +1,5 @@ + + + + +