chore: merge with main
@ -200,7 +200,7 @@ SPEC CHECKSUMS:
|
||||
file_picker: 09aa5ec1ab24135ccd7a1621c46c84134bfd6655
|
||||
flowy_infra_ui: 0455e1fa8c51885aa1437848e361e99419f34ebc
|
||||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||
fluttertoast: fafc4fa4d01a6a9e4f772ecd190ffa525e9e2d9c
|
||||
fluttertoast: 31b00dabfa7fb7bacd9e7dbee580d7a2ff4bf265
|
||||
image_gallery_saver: cb43cc43141711190510e92c460eb1655cd343cb
|
||||
image_picker_ios: 99dfe1854b4fa34d0364e74a78448a0151025425
|
||||
integration_test: ce0a3ffa1de96d1a89ca0ac26fca7ea18a749ef4
|
||||
@ -227,4 +227,4 @@ SPEC CHECKSUMS:
|
||||
|
||||
PODFILE CHECKSUM: d0d9b4ff572d8695c38eb3f9b490f55cdfc57eca
|
||||
|
||||
COCOAPODS: 1.11.3
|
||||
COCOAPODS: 1.15.2
|
||||
|
@ -127,7 +127,7 @@ class MoveWindowDetectorState extends State<MoveWindowDetector> {
|
||||
onPressed: () => context
|
||||
.read<HomeSettingBloc>()
|
||||
.add(const HomeSettingEvent.collapseMenu()),
|
||||
iconPadding: const EdgeInsets.fromLTRB(4, 4, 4, 4),
|
||||
iconPadding: const EdgeInsets.all(4.0),
|
||||
icon: context.read<HomeSettingBloc>().state.isMenuCollapsed
|
||||
? const FlowySvg(FlowySvgs.show_menu_s)
|
||||
: const FlowySvg(FlowySvgs.hide_menu_m),
|
||||
|
@ -21,6 +21,7 @@ class AddNewPageWidgetBottomSheet extends StatelessWidget {
|
||||
children: [
|
||||
FlowyOptionTile.text(
|
||||
text: LocaleKeys.document_menuName.tr(),
|
||||
height: 52.0,
|
||||
leftIcon: const FlowySvg(
|
||||
FlowySvgs.document_s,
|
||||
size: Size.square(18),
|
||||
@ -30,6 +31,7 @@ class AddNewPageWidgetBottomSheet extends StatelessWidget {
|
||||
),
|
||||
FlowyOptionTile.text(
|
||||
text: LocaleKeys.grid_menuName.tr(),
|
||||
height: 52.0,
|
||||
leftIcon: const FlowySvg(
|
||||
FlowySvgs.grid_s,
|
||||
size: Size.square(18),
|
||||
@ -39,6 +41,7 @@ class AddNewPageWidgetBottomSheet extends StatelessWidget {
|
||||
),
|
||||
FlowyOptionTile.text(
|
||||
text: LocaleKeys.board_menuName.tr(),
|
||||
height: 52.0,
|
||||
leftIcon: const FlowySvg(
|
||||
FlowySvgs.board_s,
|
||||
size: Size.square(18),
|
||||
@ -48,6 +51,7 @@ class AddNewPageWidgetBottomSheet extends StatelessWidget {
|
||||
),
|
||||
FlowyOptionTile.text(
|
||||
text: LocaleKeys.calendar_menuName.tr(),
|
||||
height: 52.0,
|
||||
leftIcon: const FlowySvg(
|
||||
FlowySvgs.calendar_s,
|
||||
size: Size.square(18),
|
||||
@ -55,6 +59,16 @@ class AddNewPageWidgetBottomSheet extends StatelessWidget {
|
||||
showTopBorder: false,
|
||||
onTap: () => onAction(ViewLayoutPB.Calendar),
|
||||
),
|
||||
FlowyOptionTile.text(
|
||||
text: LocaleKeys.chat_newChat.tr(),
|
||||
height: 52.0,
|
||||
leftIcon: const FlowySvg(
|
||||
FlowySvgs.chat_ai_page_s,
|
||||
size: Size.square(18),
|
||||
),
|
||||
showTopBorder: false,
|
||||
onTap: () => onAction(ViewLayoutPB.Chat),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ class MobileViewItemBottomSheetBody extends StatelessWidget {
|
||||
case MobileViewItemBottomSheetBodyAction.rename:
|
||||
return FlowyOptionTile.text(
|
||||
text: LocaleKeys.button_rename.tr(),
|
||||
height: 52.0,
|
||||
leftIcon: const FlowySvg(
|
||||
FlowySvgs.view_item_rename_s,
|
||||
size: Size.square(18),
|
||||
@ -57,6 +58,7 @@ class MobileViewItemBottomSheetBody extends StatelessWidget {
|
||||
case MobileViewItemBottomSheetBodyAction.duplicate:
|
||||
return FlowyOptionTile.text(
|
||||
text: LocaleKeys.button_duplicate.tr(),
|
||||
height: 52.0,
|
||||
leftIcon: const FlowySvg(
|
||||
FlowySvgs.duplicate_s,
|
||||
size: Size.square(18),
|
||||
@ -71,6 +73,7 @@ class MobileViewItemBottomSheetBody extends StatelessWidget {
|
||||
case MobileViewItemBottomSheetBodyAction.share:
|
||||
return FlowyOptionTile.text(
|
||||
text: LocaleKeys.button_share.tr(),
|
||||
height: 52.0,
|
||||
leftIcon: const FlowySvg(
|
||||
FlowySvgs.share_s,
|
||||
size: Size.square(18),
|
||||
@ -84,9 +87,10 @@ class MobileViewItemBottomSheetBody extends StatelessWidget {
|
||||
case MobileViewItemBottomSheetBodyAction.delete:
|
||||
return FlowyOptionTile.text(
|
||||
text: LocaleKeys.button_delete.tr(),
|
||||
height: 52.0,
|
||||
textColor: Theme.of(context).colorScheme.error,
|
||||
leftIcon: FlowySvg(
|
||||
FlowySvgs.delete_s,
|
||||
FlowySvgs.trash_s,
|
||||
size: const Size.square(18),
|
||||
color: Theme.of(context).colorScheme.error,
|
||||
),
|
||||
@ -98,6 +102,7 @@ class MobileViewItemBottomSheetBody extends StatelessWidget {
|
||||
);
|
||||
case MobileViewItemBottomSheetBodyAction.addToFavorites:
|
||||
return FlowyOptionTile.text(
|
||||
height: 52.0,
|
||||
text: LocaleKeys.button_addToFavorites.tr(),
|
||||
leftIcon: const FlowySvg(
|
||||
FlowySvgs.favorite_s,
|
||||
@ -111,6 +116,7 @@ class MobileViewItemBottomSheetBody extends StatelessWidget {
|
||||
);
|
||||
case MobileViewItemBottomSheetBodyAction.removeFromFavorites:
|
||||
return FlowyOptionTile.text(
|
||||
height: 52.0,
|
||||
text: LocaleKeys.button_removeFromFavorites.tr(),
|
||||
leftIcon: const FlowySvg(
|
||||
FlowySvgs.favorite_section_remove_from_favorite_s,
|
||||
@ -124,6 +130,7 @@ class MobileViewItemBottomSheetBody extends StatelessWidget {
|
||||
);
|
||||
case MobileViewItemBottomSheetBodyAction.removeFromRecent:
|
||||
return FlowyOptionTile.text(
|
||||
height: 52.0,
|
||||
text: LocaleKeys.button_removeFromRecent.tr(),
|
||||
leftIcon: const FlowySvg(
|
||||
FlowySvgs.remove_from_recent_s,
|
||||
@ -137,7 +144,10 @@ class MobileViewItemBottomSheetBody extends StatelessWidget {
|
||||
);
|
||||
|
||||
case MobileViewItemBottomSheetBodyAction.divider:
|
||||
return const Divider(height: 0.5);
|
||||
return const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.0),
|
||||
child: Divider(height: 0.5),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,15 @@
|
||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy/mobile/presentation/bottom_sheet/bottom_sheet.dart';
|
||||
import 'package:appflowy/mobile/presentation/home/shared/mobile_view_card.dart';
|
||||
import 'package:appflowy/mobile/presentation/page_item/mobile_slide_action_button.dart';
|
||||
import 'package:appflowy/workspace/application/favorite/favorite_bloc.dart';
|
||||
import 'package:appflowy/workspace/application/recent/recent_views_bloc.dart';
|
||||
import 'package:appflowy/workspace/application/sidebar/folder/folder_bloc.dart';
|
||||
import 'package:appflowy/workspace/application/view/view_bloc.dart';
|
||||
import 'package:flowy_infra/theme_extension.dart';
|
||||
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
|
||||
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:flutter_slidable/flutter_slidable.dart';
|
||||
@ -12,11 +18,14 @@ enum MobilePaneActionType {
|
||||
delete,
|
||||
addToFavorites,
|
||||
removeFromFavorites,
|
||||
more;
|
||||
more,
|
||||
add;
|
||||
|
||||
MobileSlideActionButton actionButton(
|
||||
BuildContext context,
|
||||
) {
|
||||
BuildContext context, {
|
||||
MobileViewCardType? cardType,
|
||||
FolderSpaceType? spaceType,
|
||||
}) {
|
||||
switch (this) {
|
||||
case MobilePaneActionType.delete:
|
||||
return MobileSlideActionButton(
|
||||
@ -28,58 +37,88 @@ enum MobilePaneActionType {
|
||||
);
|
||||
case MobilePaneActionType.removeFromFavorites:
|
||||
return MobileSlideActionButton(
|
||||
backgroundColor: Colors.orange,
|
||||
svg: FlowySvgs.favorite_s,
|
||||
backgroundColor: const Color(0xFFFA217F),
|
||||
svg: FlowySvgs.favorite_section_remove_from_favorite_s,
|
||||
size: 24.0,
|
||||
onPressed: (context) => context
|
||||
.read<FavoriteBloc>()
|
||||
.add(FavoriteEvent.toggle(context.read<ViewBloc>().view)),
|
||||
);
|
||||
case MobilePaneActionType.addToFavorites:
|
||||
return MobileSlideActionButton(
|
||||
backgroundColor: Colors.orange,
|
||||
svg: FlowySvgs.m_favorite_unselected_lg,
|
||||
size: 34.0,
|
||||
backgroundColor: const Color(0xFF00C8FF),
|
||||
svg: FlowySvgs.favorite_s,
|
||||
size: 24.0,
|
||||
onPressed: (context) => context
|
||||
.read<FavoriteBloc>()
|
||||
.add(FavoriteEvent.toggle(context.read<ViewBloc>().view)),
|
||||
);
|
||||
case MobilePaneActionType.more:
|
||||
case MobilePaneActionType.add:
|
||||
return MobileSlideActionButton(
|
||||
backgroundColor: Colors.grey,
|
||||
svg: FlowySvgs.three_dots_vertical_s,
|
||||
backgroundColor: const Color(0xFF00C8FF),
|
||||
svg: FlowySvgs.add_m,
|
||||
size: 28.0,
|
||||
onPressed: (context) {
|
||||
final viewBloc = context.read<ViewBloc>();
|
||||
final view = viewBloc.state.view;
|
||||
final title = view.name;
|
||||
showMobileBottomSheet(
|
||||
context,
|
||||
showHeader: true,
|
||||
title: title,
|
||||
showDragHandle: true,
|
||||
showCloseButton: true,
|
||||
useRootNavigator: true,
|
||||
backgroundColor: Theme.of(context).colorScheme.surface,
|
||||
builder: (sheetContext) {
|
||||
return AddNewPageWidgetBottomSheet(
|
||||
view: view,
|
||||
onAction: (layout) {
|
||||
context.read<ViewBloc>().add(
|
||||
ViewEvent.createView(
|
||||
LocaleKeys.menuAppHeader_defaultNewPageName.tr(),
|
||||
layout,
|
||||
section: spaceType!.toViewSectionPB,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
case MobilePaneActionType.more:
|
||||
return MobileSlideActionButton(
|
||||
backgroundColor: const Color(0xE5515563),
|
||||
svg: FlowySvgs.three_dots_s,
|
||||
size: 24.0,
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(10),
|
||||
bottomLeft: Radius.circular(10),
|
||||
),
|
||||
onPressed: (context) {
|
||||
final viewBloc = context.read<ViewBloc>();
|
||||
final favoriteBloc = context.read<FavoriteBloc>();
|
||||
final recentViewsBloc = context.read<RecentViewsBloc?>();
|
||||
showMobileBottomSheet(
|
||||
context,
|
||||
showDragHandle: true,
|
||||
showDivider: false,
|
||||
backgroundColor: AFThemeExtension.of(context).background,
|
||||
useRootNavigator: true,
|
||||
backgroundColor: Theme.of(context).colorScheme.surface,
|
||||
builder: (context) {
|
||||
return MultiBlocProvider(
|
||||
providers: [
|
||||
BlocProvider.value(value: viewBloc),
|
||||
BlocProvider.value(value: favoriteBloc),
|
||||
if (recentViewsBloc != null)
|
||||
BlocProvider.value(value: recentViewsBloc),
|
||||
],
|
||||
child: BlocBuilder<ViewBloc, ViewState>(
|
||||
builder: (context, state) {
|
||||
final isFavorite = state.view.isFavorite;
|
||||
return MobileViewItemBottomSheet(
|
||||
view: viewBloc.state.view,
|
||||
actions: [
|
||||
isFavorite
|
||||
? MobileViewItemBottomSheetBodyAction
|
||||
.removeFromFavorites
|
||||
: MobileViewItemBottomSheetBodyAction
|
||||
.addToFavorites,
|
||||
MobileViewItemBottomSheetBodyAction.divider,
|
||||
MobileViewItemBottomSheetBodyAction.rename,
|
||||
MobileViewItemBottomSheetBodyAction.duplicate,
|
||||
MobileViewItemBottomSheetBodyAction.divider,
|
||||
MobileViewItemBottomSheetBodyAction.delete,
|
||||
],
|
||||
actions: _buildActions(state.view, cardType: cardType),
|
||||
);
|
||||
},
|
||||
),
|
||||
@ -90,19 +129,71 @@ enum MobilePaneActionType {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
List<MobileViewItemBottomSheetBodyAction> _buildActions(
|
||||
ViewPB view, {
|
||||
MobileViewCardType? cardType,
|
||||
}) {
|
||||
final isFavorite = view.isFavorite;
|
||||
|
||||
if (cardType != null) {
|
||||
switch (cardType) {
|
||||
case MobileViewCardType.recent:
|
||||
return [
|
||||
isFavorite
|
||||
? MobileViewItemBottomSheetBodyAction.removeFromFavorites
|
||||
: MobileViewItemBottomSheetBodyAction.addToFavorites,
|
||||
MobileViewItemBottomSheetBodyAction.divider,
|
||||
if (view.layout != ViewLayoutPB.Chat)
|
||||
MobileViewItemBottomSheetBodyAction.duplicate,
|
||||
MobileViewItemBottomSheetBodyAction.divider,
|
||||
MobileViewItemBottomSheetBodyAction.removeFromRecent,
|
||||
];
|
||||
case MobileViewCardType.favorite:
|
||||
return [
|
||||
isFavorite
|
||||
? MobileViewItemBottomSheetBodyAction.removeFromFavorites
|
||||
: MobileViewItemBottomSheetBodyAction.addToFavorites,
|
||||
MobileViewItemBottomSheetBodyAction.divider,
|
||||
MobileViewItemBottomSheetBodyAction.duplicate,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
isFavorite
|
||||
? MobileViewItemBottomSheetBodyAction.removeFromFavorites
|
||||
: MobileViewItemBottomSheetBodyAction.addToFavorites,
|
||||
MobileViewItemBottomSheetBodyAction.divider,
|
||||
MobileViewItemBottomSheetBodyAction.rename,
|
||||
if (view.layout != ViewLayoutPB.Chat)
|
||||
MobileViewItemBottomSheetBodyAction.duplicate,
|
||||
MobileViewItemBottomSheetBodyAction.divider,
|
||||
MobileViewItemBottomSheetBodyAction.delete,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
ActionPane buildEndActionPane(
|
||||
BuildContext context,
|
||||
List<MobilePaneActionType> actions,
|
||||
) {
|
||||
List<MobilePaneActionType> actions, {
|
||||
bool needSpace = true,
|
||||
MobileViewCardType? cardType,
|
||||
FolderSpaceType? spaceType,
|
||||
}) {
|
||||
debugPrint('actions: $actions');
|
||||
return ActionPane(
|
||||
motion: const ScrollMotion(),
|
||||
extentRatio: actions.length / 5,
|
||||
children: actions
|
||||
.map(
|
||||
(action) => action.actionButton(context),
|
||||
)
|
||||
.toList(),
|
||||
children: [
|
||||
if (needSpace) const HSpace(20),
|
||||
...actions.map(
|
||||
(action) => action.actionButton(
|
||||
context,
|
||||
spaceType: spaceType,
|
||||
cardType: cardType,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -63,12 +63,16 @@ class MobileFavoriteFolder extends StatelessWidget {
|
||||
view: view,
|
||||
level: 0,
|
||||
onSelected: context.pushView,
|
||||
endActionPane: (context) => buildEndActionPane(context, [
|
||||
view.isFavorite
|
||||
? MobilePaneActionType.removeFromFavorites
|
||||
: MobilePaneActionType.addToFavorites,
|
||||
MobilePaneActionType.more,
|
||||
]),
|
||||
endActionPane: (context) => buildEndActionPane(
|
||||
context,
|
||||
[
|
||||
view.isFavorite
|
||||
? MobilePaneActionType.removeFromFavorites
|
||||
: MobilePaneActionType.addToFavorites,
|
||||
MobilePaneActionType.more,
|
||||
],
|
||||
spaceType: FolderSpaceType.favorite,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -111,7 +111,7 @@ class _TrashButton extends StatelessWidget {
|
||||
height: 52,
|
||||
child: FlowyButton(
|
||||
expand: true,
|
||||
margin: const EdgeInsets.symmetric(vertical: 8),
|
||||
margin: const EdgeInsets.symmetric(vertical: 8, horizontal: 2.0),
|
||||
leftIcon: const FlowySvg(
|
||||
FlowySvgs.m_delete_s,
|
||||
),
|
||||
|
@ -123,12 +123,13 @@ class _MobileWorkspace extends StatelessWidget {
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox.square(
|
||||
dimension: 34.0,
|
||||
dimension: currentWorkspace.icon.isNotEmpty ? 34.0 : 26.0,
|
||||
child: WorkspaceIcon(
|
||||
workspace: currentWorkspace,
|
||||
iconSize: 26,
|
||||
fontSize: 16.0,
|
||||
enableEdit: false,
|
||||
alignment: Alignment.centerLeft,
|
||||
onSelected: (result) => context.read<UserWorkspaceBloc>().add(
|
||||
UserWorkspaceEvent.updateWorkspaceIcon(
|
||||
currentWorkspace.workspaceId,
|
||||
@ -137,32 +138,13 @@ class _MobileWorkspace extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
const HSpace(8),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
FlowyText.semibold(
|
||||
currentWorkspace.name,
|
||||
fontSize: 16.0,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
const HSpace(4.0),
|
||||
const FlowySvg(FlowySvgs.list_dropdown_s),
|
||||
],
|
||||
),
|
||||
FlowyText.regular(
|
||||
userProfile.email.isNotEmpty
|
||||
? userProfile.email
|
||||
: userProfile.name,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
fontSize: 12,
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
],
|
||||
),
|
||||
currentWorkspace.icon.isNotEmpty
|
||||
? const HSpace(2)
|
||||
: const HSpace(8),
|
||||
FlowyText.semibold(
|
||||
currentWorkspace.name,
|
||||
fontSize: 16.0,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -179,7 +161,9 @@ class _MobileWorkspace extends StatelessWidget {
|
||||
showDivider: false,
|
||||
showHeader: true,
|
||||
showDragHandle: true,
|
||||
showCloseButton: true,
|
||||
title: LocaleKeys.workspace_menuTitle.tr(),
|
||||
backgroundColor: Theme.of(context).colorScheme.surface,
|
||||
builder: (_) {
|
||||
return BlocProvider.value(
|
||||
value: context.read<UserWorkspaceBloc>(),
|
||||
|
@ -6,6 +6,7 @@ import 'package:appflowy_backend/protobuf/flowy-folder/protobuf.dart';
|
||||
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_slidable/flutter_slidable.dart';
|
||||
|
||||
class MobileRecentSpace extends StatefulWidget {
|
||||
const MobileRecentSpace({super.key});
|
||||
@ -62,34 +63,36 @@ class _RecentViews extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scrollbar(
|
||||
child: ListView.separated(
|
||||
key: const PageStorageKey('recent_views_page_storage_key'),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: HomeSpaceViewSizes.mHorizontalPadding,
|
||||
),
|
||||
itemBuilder: (context, index) {
|
||||
final sectionView = recentViews[index];
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 24.0),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Theme.of(context).dividerColor,
|
||||
width: 0.5,
|
||||
return SlidableAutoCloseBehavior(
|
||||
child: Scrollbar(
|
||||
child: ListView.separated(
|
||||
key: const PageStorageKey('recent_views_page_storage_key'),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: HomeSpaceViewSizes.mHorizontalPadding,
|
||||
),
|
||||
itemBuilder: (context, index) {
|
||||
final sectionView = recentViews[index];
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 24.0),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Theme.of(context).dividerColor,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: MobileViewCard(
|
||||
key: ValueKey(sectionView.item.id),
|
||||
view: sectionView.item,
|
||||
timestamp: sectionView.timestamp,
|
||||
type: MobileViewCardType.recent,
|
||||
),
|
||||
);
|
||||
},
|
||||
separatorBuilder: (context, index) => const HSpace(8),
|
||||
itemCount: recentViews.length,
|
||||
child: MobileViewCard(
|
||||
key: ValueKey(sectionView.item.id),
|
||||
view: sectionView.item,
|
||||
timestamp: sectionView.timestamp,
|
||||
type: MobileViewCardType.recent,
|
||||
),
|
||||
);
|
||||
},
|
||||
separatorBuilder: (context, index) => const HSpace(8),
|
||||
itemCount: recentViews.length,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -1,9 +1,11 @@
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy/mobile/application/mobile_router.dart';
|
||||
import 'package:appflowy/mobile/presentation/bottom_sheet/default_mobile_action_pane.dart';
|
||||
import 'package:appflowy/mobile/presentation/home/section_folder/mobile_home_section_folder_header.dart';
|
||||
import 'package:appflowy/mobile/presentation/page_item/mobile_view_item.dart';
|
||||
import 'package:appflowy/workspace/application/menu/sidebar_sections_bloc.dart';
|
||||
import 'package:appflowy/workspace/application/sidebar/folder/folder_bloc.dart';
|
||||
import 'package:appflowy/workspace/application/view/view_bloc.dart';
|
||||
import 'package:appflowy/workspace/presentation/home/home_sizes.dart';
|
||||
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
@ -69,6 +71,19 @@ class MobileSectionFolder extends StatelessWidget {
|
||||
leftPadding: HomeSpaceViewSizes.leftPadding,
|
||||
isFeedback: false,
|
||||
onSelected: context.pushView,
|
||||
endActionPane: (context) {
|
||||
final view = context.read<ViewBloc>().state.view;
|
||||
return buildEndActionPane(
|
||||
context,
|
||||
[
|
||||
MobilePaneActionType.more,
|
||||
if (view.layout == ViewLayoutPB.Document)
|
||||
MobilePaneActionType.add,
|
||||
],
|
||||
spaceType: spaceType,
|
||||
needSpace: false,
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -38,7 +38,7 @@ class _MobileSectionFolderHeaderState extends State<MobileSectionFolderHeader> {
|
||||
widget.title,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
margin: const EdgeInsets.symmetric(vertical: 8),
|
||||
margin: const EdgeInsets.symmetric(vertical: 8, horizontal: 2.0),
|
||||
expandText: false,
|
||||
iconPadding: 2,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
|
@ -22,6 +22,7 @@ import 'package:flowy_infra/theme_extension.dart';
|
||||
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_slidable/flutter_slidable.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:string_validator/string_validator.dart';
|
||||
@ -63,21 +64,33 @@ class MobileViewCard extends StatelessWidget {
|
||||
],
|
||||
child: BlocBuilder<RecentViewBloc, RecentViewState>(
|
||||
builder: (context, state) {
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTapUp: (_) => context.pushView(view),
|
||||
onLongPressUp: () => _showActionSheet(context),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Expanded(child: _buildDescription(context, state)),
|
||||
const HSpace(20.0),
|
||||
SizedBox(
|
||||
width: 84,
|
||||
height: 60,
|
||||
child: _buildCover(context, state),
|
||||
),
|
||||
return Slidable(
|
||||
endActionPane: buildEndActionPane(
|
||||
context,
|
||||
[
|
||||
MobilePaneActionType.more,
|
||||
context.watch<ViewBloc>().state.view.isFavorite
|
||||
? MobilePaneActionType.removeFromFavorites
|
||||
: MobilePaneActionType.addToFavorites,
|
||||
],
|
||||
cardType: type,
|
||||
),
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTapUp: (_) => context.pushView(view),
|
||||
onLongPressUp: () => _showActionSheet(context),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Expanded(child: _buildDescription(context, state)),
|
||||
const HSpace(20.0),
|
||||
SizedBox(
|
||||
width: 84,
|
||||
height: 60,
|
||||
child: _buildCover(context, state),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
@ -257,10 +270,9 @@ class MobileViewCard extends StatelessWidget {
|
||||
],
|
||||
child: BlocBuilder<ViewBloc, ViewState>(
|
||||
builder: (context, state) {
|
||||
final isFavorite = state.view.isFavorite;
|
||||
return MobileViewItemBottomSheet(
|
||||
view: viewBloc.state.view,
|
||||
actions: _buildActions(isFavorite),
|
||||
actions: _buildActions(state.view),
|
||||
);
|
||||
},
|
||||
),
|
||||
@ -269,15 +281,16 @@ class MobileViewCard extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
List<MobileViewItemBottomSheetBodyAction> _buildActions(bool isFavorite) {
|
||||
List<MobileViewItemBottomSheetBodyAction> _buildActions(ViewPB view) {
|
||||
switch (type) {
|
||||
case MobileViewCardType.recent:
|
||||
return [
|
||||
isFavorite
|
||||
view.isFavorite
|
||||
? MobileViewItemBottomSheetBodyAction.removeFromFavorites
|
||||
: MobileViewItemBottomSheetBodyAction.addToFavorites,
|
||||
MobileViewItemBottomSheetBodyAction.divider,
|
||||
MobileViewItemBottomSheetBodyAction.duplicate,
|
||||
if (view.layout != ViewLayoutPB.Chat)
|
||||
MobileViewItemBottomSheetBodyAction.duplicate,
|
||||
MobileViewItemBottomSheetBodyAction.divider,
|
||||
MobileViewItemBottomSheetBodyAction.removeFromRecent,
|
||||
];
|
||||
|
@ -1,6 +1,7 @@
|
||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy/mobile/presentation/widgets/widgets.dart';
|
||||
import 'package:appflowy/util/theme_extension.dart';
|
||||
import 'package:appflowy/workspace/application/user/user_workspace_bloc.dart';
|
||||
import 'package:appflowy/workspace/presentation/home/menu/sidebar/workspace/_sidebar_workspace_icon.dart';
|
||||
import 'package:appflowy/workspace/presentation/settings/widgets/members/workspace_member_bloc.dart';
|
||||
@ -27,7 +28,13 @@ class MobileWorkspaceMenu extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final List<Widget> children = [];
|
||||
final List<Widget> children = [
|
||||
_WorkspaceUserItem(userProfile: userProfile),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 10),
|
||||
child: Divider(height: 0.5),
|
||||
),
|
||||
];
|
||||
for (var i = 0; i < workspaces.length; i++) {
|
||||
final workspace = workspaces[i];
|
||||
children.add(
|
||||
@ -35,7 +42,7 @@ class MobileWorkspaceMenu extends StatelessWidget {
|
||||
key: ValueKey(workspace.workspaceId),
|
||||
userProfile: userProfile,
|
||||
workspace: workspace,
|
||||
showTopBorder: i == 0,
|
||||
showTopBorder: false,
|
||||
currentWorkspace: currentWorkspace,
|
||||
onWorkspaceSelected: onWorkspaceSelected,
|
||||
),
|
||||
@ -47,6 +54,34 @@ class MobileWorkspaceMenu extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
class _WorkspaceUserItem extends StatelessWidget {
|
||||
const _WorkspaceUserItem({required this.userProfile});
|
||||
|
||||
final UserProfilePB userProfile;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final color = Theme.of(context).isLightMode
|
||||
? const Color(0x99333333)
|
||||
: const Color(0x99CCCCCC);
|
||||
return FlowyOptionTile.text(
|
||||
height: 32,
|
||||
showTopBorder: false,
|
||||
showBottomBorder: false,
|
||||
content: Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(),
|
||||
child: FlowyText(
|
||||
userProfile.email,
|
||||
fontSize: 14,
|
||||
color: color,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _WorkspaceMenuItem extends StatelessWidget {
|
||||
const _WorkspaceMenuItem({
|
||||
super.key,
|
||||
@ -102,6 +137,7 @@ class _WorkspaceMenuItem extends StatelessWidget {
|
||||
),
|
||||
height: 60,
|
||||
showTopBorder: showTopBorder,
|
||||
showBottomBorder: false,
|
||||
leftIcon: WorkspaceIcon(
|
||||
enableEdit: false,
|
||||
iconSize: 26,
|
||||
|
@ -9,6 +9,7 @@ class MobileSlideActionButton extends StatelessWidget {
|
||||
required this.svg,
|
||||
this.size = 32.0,
|
||||
this.backgroundColor = Colors.transparent,
|
||||
this.borderRadius = BorderRadius.zero,
|
||||
required this.onPressed,
|
||||
});
|
||||
|
||||
@ -16,15 +17,18 @@ class MobileSlideActionButton extends StatelessWidget {
|
||||
final double size;
|
||||
final Color backgroundColor;
|
||||
final SlidableActionCallback onPressed;
|
||||
final BorderRadius borderRadius;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CustomSlidableAction(
|
||||
borderRadius: borderRadius,
|
||||
backgroundColor: backgroundColor,
|
||||
onPressed: (context) {
|
||||
HapticFeedback.mediumImpact();
|
||||
onPressed(context);
|
||||
},
|
||||
padding: EdgeInsets.zero,
|
||||
child: FlowySvg(
|
||||
svg,
|
||||
size: Size.square(size),
|
||||
|
@ -1,16 +1,11 @@
|
||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy/mobile/application/mobile_router.dart';
|
||||
import 'package:appflowy/mobile/presentation/bottom_sheet/bottom_sheet.dart';
|
||||
import 'package:appflowy/mobile/presentation/page_item/mobile_view_item_add_button.dart';
|
||||
import 'package:appflowy/workspace/application/favorite/favorite_bloc.dart';
|
||||
import 'package:appflowy/workspace/application/sidebar/folder/folder_bloc.dart';
|
||||
import 'package:appflowy/workspace/application/view/view_bloc.dart';
|
||||
import 'package:appflowy/workspace/application/view/view_ext.dart';
|
||||
import 'package:appflowy/workspace/presentation/home/home_sizes.dart';
|
||||
import 'package:appflowy/workspace/presentation/home/menu/view/draggable_view_item.dart';
|
||||
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
|
||||
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';
|
||||
@ -270,17 +265,6 @@ class _SingleMobileInnerViewItemState extends State<SingleMobileInnerViewItem> {
|
||||
),
|
||||
];
|
||||
|
||||
// hover action
|
||||
|
||||
// ··· more action button
|
||||
children.add(_buildViewMoreButton(context));
|
||||
// only support add button for document layout
|
||||
if (!widget.isFeedback && widget.view.layout == ViewLayoutPB.Document) {
|
||||
// + button
|
||||
|
||||
children.add(_buildViewAddButton(context));
|
||||
}
|
||||
|
||||
Widget child = InkWell(
|
||||
borderRadius: BorderRadius.circular(4.0),
|
||||
onTap: () => widget.onSelected(widget.view),
|
||||
@ -345,85 +329,6 @@ class _SingleMobileInnerViewItemState extends State<SingleMobileInnerViewItem> {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
// + button
|
||||
Widget _buildViewAddButton(BuildContext context) {
|
||||
return MobileViewAddButton(
|
||||
onPressed: () {
|
||||
final title = widget.view.name;
|
||||
showMobileBottomSheet(
|
||||
context,
|
||||
showHeader: true,
|
||||
title: title,
|
||||
showDragHandle: true,
|
||||
showCloseButton: true,
|
||||
useRootNavigator: true,
|
||||
builder: (sheetContext) {
|
||||
return AddNewPageWidgetBottomSheet(
|
||||
view: widget.view,
|
||||
onAction: (layout) {
|
||||
Navigator.of(sheetContext).pop();
|
||||
context.read<ViewBloc>().add(
|
||||
ViewEvent.createView(
|
||||
LocaleKeys.menuAppHeader_defaultNewPageName.tr(),
|
||||
layout,
|
||||
section: widget.spaceType != FolderSpaceType.favorite
|
||||
? widget.spaceType.toViewSectionPB
|
||||
: null,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
// + button
|
||||
Widget _buildViewMoreButton(BuildContext context) {
|
||||
return MobileViewMoreButton(onPressed: () => _showMoreActions(context));
|
||||
}
|
||||
|
||||
Future<void> _showMoreActions(BuildContext context) async {
|
||||
final viewBloc = context.read<ViewBloc>();
|
||||
final favoriteBloc = context.read<FavoriteBloc>();
|
||||
await showMobileBottomSheet(
|
||||
context,
|
||||
showHeader: true,
|
||||
title: widget.view.name,
|
||||
showDragHandle: true,
|
||||
showCloseButton: true,
|
||||
useRootNavigator: true,
|
||||
builder: (context) {
|
||||
return MultiBlocProvider(
|
||||
providers: [
|
||||
BlocProvider.value(value: viewBloc),
|
||||
BlocProvider.value(value: favoriteBloc),
|
||||
],
|
||||
child: BlocBuilder<ViewBloc, ViewState>(
|
||||
builder: (context, state) {
|
||||
final isFavorite = state.view.isFavorite;
|
||||
return MobileViewItemBottomSheet(
|
||||
view: viewBloc.state.view,
|
||||
actions: [
|
||||
isFavorite
|
||||
? MobileViewItemBottomSheetBodyAction.removeFromFavorites
|
||||
: MobileViewItemBottomSheetBodyAction.addToFavorites,
|
||||
MobileViewItemBottomSheetBodyAction.divider,
|
||||
MobileViewItemBottomSheetBodyAction.rename,
|
||||
MobileViewItemBottomSheetBodyAction.divider,
|
||||
MobileViewItemBottomSheetBodyAction.duplicate,
|
||||
MobileViewItemBottomSheetBodyAction.divider,
|
||||
MobileViewItemBottomSheetBodyAction.delete,
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// workaround: we should use view.isEndPoint or something to check if the view can contain child views. But currently, we don't have that field.
|
||||
|
@ -21,7 +21,7 @@ class AIChatPluginBuilder extends PluginBuilder {
|
||||
}
|
||||
|
||||
@override
|
||||
String get menuName => "AIChat";
|
||||
String get menuName => "AI Chat";
|
||||
|
||||
@override
|
||||
FlowySvgData get icon => FlowySvgs.chat_ai_page_s;
|
||||
|
@ -25,6 +25,29 @@ import 'presentation/chat_theme.dart';
|
||||
import 'presentation/chat_user_invalid_message.dart';
|
||||
import 'presentation/chat_welcome_page.dart';
|
||||
|
||||
class AIChatUILayout {
|
||||
static EdgeInsets get chatPadding =>
|
||||
isMobile ? EdgeInsets.zero : const EdgeInsets.symmetric(horizontal: 70);
|
||||
|
||||
static EdgeInsets get welcomePagePadding => isMobile
|
||||
? const EdgeInsets.symmetric(horizontal: 20)
|
||||
: const EdgeInsets.symmetric(horizontal: 100);
|
||||
|
||||
static double get messageWidthRatio => 0.85;
|
||||
|
||||
static EdgeInsets safeAreaInsets(BuildContext context) {
|
||||
final query = MediaQuery.of(context);
|
||||
return isMobile
|
||||
? EdgeInsets.fromLTRB(
|
||||
query.padding.left,
|
||||
0,
|
||||
query.padding.right,
|
||||
query.viewInsets.bottom + query.padding.bottom,
|
||||
)
|
||||
: const EdgeInsets.symmetric(horizontal: 70);
|
||||
}
|
||||
}
|
||||
|
||||
class AIChatPage extends StatefulWidget {
|
||||
const AIChatPage({
|
||||
super.key,
|
||||
@ -67,7 +90,7 @@ class _AIChatPageState extends State<AIChatPage> {
|
||||
Widget buildChatWidget() {
|
||||
return SizedBox.expand(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 60),
|
||||
padding: AIChatUILayout.chatPadding,
|
||||
child: BlocProvider(
|
||||
create: (context) => ChatBloc(
|
||||
view: widget.view,
|
||||
@ -99,13 +122,22 @@ class _AIChatPageState extends State<AIChatPage> {
|
||||
builder: (context, state) {
|
||||
return state.initialLoadingStatus ==
|
||||
const LoadingState.finish()
|
||||
? const ChatWelcomePage()
|
||||
? Padding(
|
||||
padding: AIChatUILayout.welcomePagePadding,
|
||||
child: ChatWelcomePage(
|
||||
onSelectedQuestion: (question) {
|
||||
blocContext
|
||||
.read<ChatBloc>()
|
||||
.add(ChatEvent.sendMessage(question));
|
||||
},
|
||||
),
|
||||
)
|
||||
: const Center(
|
||||
child: CircularProgressIndicator.adaptive(),
|
||||
);
|
||||
},
|
||||
),
|
||||
messageWidthRatio: isMobile ? 0.8 : 0.86,
|
||||
messageWidthRatio: AIChatUILayout.messageWidthRatio,
|
||||
bubbleBuilder: (
|
||||
child, {
|
||||
required message,
|
||||
@ -248,35 +280,26 @@ class _AIChatPageState extends State<AIChatPage> {
|
||||
}
|
||||
|
||||
Widget buildChatInput(BuildContext context) {
|
||||
final query = MediaQuery.of(context);
|
||||
final safeAreaInsets = isMobile
|
||||
? EdgeInsets.fromLTRB(
|
||||
query.padding.left,
|
||||
0,
|
||||
query.padding.right,
|
||||
query.viewInsets.bottom + query.padding.bottom,
|
||||
)
|
||||
: const EdgeInsets.symmetric(horizontal: 70);
|
||||
return Column(
|
||||
children: [
|
||||
ClipRect(
|
||||
child: Padding(
|
||||
padding: safeAreaInsets,
|
||||
child: ChatInput(
|
||||
return ClipRect(
|
||||
child: Padding(
|
||||
padding: AIChatUILayout.safeAreaInsets(context),
|
||||
child: Column(
|
||||
children: [
|
||||
ChatInput(
|
||||
chatId: widget.view.id,
|
||||
onSendPressed: (message) => onSendPressed(context, message.text),
|
||||
),
|
||||
),
|
||||
const VSpace(6),
|
||||
Opacity(
|
||||
opacity: 0.6,
|
||||
child: FlowyText(
|
||||
LocaleKeys.chat_aiMistakePrompt.tr(),
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const VSpace(6),
|
||||
Opacity(
|
||||
opacity: 0.6,
|
||||
child: FlowyText(
|
||||
LocaleKeys.chat_aiMistakePrompt.tr(),
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -48,9 +48,8 @@ class ChatAIMessageBubble extends StatelessWidget {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ChatBorderedCircleAvatar(
|
||||
backgroundColor: Theme.of(context).colorScheme.secondary,
|
||||
child: const FlowySvg(
|
||||
const ChatBorderedCircleAvatar(
|
||||
child: FlowySvg(
|
||||
FlowySvgs.flowy_ai_chat_logo_s,
|
||||
size: Size.square(24),
|
||||
),
|
||||
|
@ -24,13 +24,11 @@ class ChatBorderedCircleAvatar extends StatelessWidget {
|
||||
super.key,
|
||||
this.border = const BorderSide(),
|
||||
this.backgroundImage,
|
||||
this.backgroundColor,
|
||||
this.child,
|
||||
});
|
||||
|
||||
final BorderSide border;
|
||||
final ImageProvider<Object>? backgroundImage;
|
||||
final Color? backgroundColor;
|
||||
final Widget? child;
|
||||
|
||||
@override
|
||||
@ -41,7 +39,8 @@ class ChatBorderedCircleAvatar extends StatelessWidget {
|
||||
constraints: const BoxConstraints.expand(),
|
||||
child: CircleAvatar(
|
||||
backgroundImage: backgroundImage,
|
||||
backgroundColor: backgroundColor,
|
||||
backgroundColor:
|
||||
Theme.of(context).colorScheme.surfaceContainerHighest,
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
@ -118,7 +117,7 @@ class ChatUserAvatar extends StatelessWidget {
|
||||
shape: BoxShape.circle,
|
||||
border: isHovering
|
||||
? Border.all(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
color: Theme.of(context).colorScheme.secondary,
|
||||
width: 4,
|
||||
)
|
||||
: null,
|
||||
|
@ -1,6 +1,8 @@
|
||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flowy_infra/theme_extension.dart';
|
||||
import 'package:flowy_infra_ui/style_widget/icon_button.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@ -109,7 +111,7 @@ class _ChatInputState extends State<ChatInput> {
|
||||
child: Padding(
|
||||
padding: inputPadding,
|
||||
child: Material(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
color: isMobile
|
||||
? Theme.of(context).colorScheme.surfaceContainer
|
||||
: Theme.of(context).colorScheme.surfaceContainerHighest,
|
||||
@ -169,9 +171,11 @@ class _ChatInputState extends State<ChatInput> {
|
||||
),
|
||||
child: Visibility(
|
||||
visible: _sendButtonVisible,
|
||||
child: SendButton(
|
||||
onPressed: _handleSendPressed,
|
||||
child: Padding(
|
||||
padding: buttonPadding,
|
||||
child: SendButton(
|
||||
onPressed: _handleSendPressed,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
@ -255,3 +259,25 @@ class InputOptions {
|
||||
|
||||
final isMobile = defaultTargetPlatform == TargetPlatform.android ||
|
||||
defaultTargetPlatform == TargetPlatform.iOS;
|
||||
|
||||
class SendButton extends StatelessWidget {
|
||||
const SendButton({required this.onPressed, super.key});
|
||||
|
||||
final void Function() onPressed;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return FlowyIconButton(
|
||||
width: 36,
|
||||
fillColor: AFThemeExtension.of(context).lightGreyHover,
|
||||
hoverColor: AFThemeExtension.of(context).lightGreyHover,
|
||||
radius: BorderRadius.circular(18),
|
||||
icon: FlowySvg(
|
||||
FlowySvgs.send_s,
|
||||
size: const Size.square(24),
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
onPressed: onPressed,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -71,9 +71,10 @@ class RelatedQuestionList extends StatelessWidget {
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: Row(
|
||||
children: [
|
||||
const FlowySvg(
|
||||
FlowySvg(
|
||||
FlowySvgs.ai_summary_generate_s,
|
||||
size: Size.square(24),
|
||||
size: const Size.square(24),
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
const HSpace(6),
|
||||
FlowyText(
|
||||
|
@ -25,7 +25,8 @@ class ChatUserMessageBubble extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
const borderRadius = BorderRadius.all(Radius.circular(6));
|
||||
final backgroundColor = Theme.of(context).colorScheme.secondary;
|
||||
final backgroundColor =
|
||||
Theme.of(context).colorScheme.surfaceContainerHighest;
|
||||
|
||||
return BlocProvider(
|
||||
create: (context) => ChatUserMessageBloc(message: message),
|
||||
|
@ -1,10 +1,88 @@
|
||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flowy_infra_ui/style_widget/hover.dart';
|
||||
import 'package:flowy_infra_ui/style_widget/text.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'chat_input.dart';
|
||||
|
||||
class ChatWelcomePage extends StatelessWidget {
|
||||
const ChatWelcomePage({super.key});
|
||||
ChatWelcomePage({required this.onSelectedQuestion, super.key});
|
||||
|
||||
final void Function(String) onSelectedQuestion;
|
||||
|
||||
final List<String> items = [
|
||||
LocaleKeys.chat_question1.tr(),
|
||||
LocaleKeys.chat_question2.tr(),
|
||||
LocaleKeys.chat_question3.tr(),
|
||||
LocaleKeys.chat_question4.tr(),
|
||||
];
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const FlowySvg(
|
||||
FlowySvgs.flowy_ai_chat_logo_s,
|
||||
size: Size.square(44),
|
||||
),
|
||||
const SizedBox(height: 40),
|
||||
GridView.builder(
|
||||
shrinkWrap: true,
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: isMobile ? 2 : 4,
|
||||
crossAxisSpacing: 6,
|
||||
mainAxisSpacing: 6,
|
||||
childAspectRatio: 16.0 / 9.0,
|
||||
),
|
||||
itemCount: items.length,
|
||||
itemBuilder: (context, index) => WelcomeQuestion(
|
||||
question: items[index],
|
||||
onSelected: onSelectedQuestion,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class WelcomeQuestion extends StatelessWidget {
|
||||
const WelcomeQuestion({
|
||||
required this.question,
|
||||
required this.onSelected,
|
||||
super.key,
|
||||
});
|
||||
|
||||
final void Function(String) onSelected;
|
||||
final String question;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const SizedBox.shrink();
|
||||
return InkWell(
|
||||
onTap: () => onSelected(question),
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
child: FlowyHover(
|
||||
// Make the hover effect only available on mobile
|
||||
isSelected: () => isMobile,
|
||||
style: HoverStyle(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
FlowyText(
|
||||
question,
|
||||
maxLines: null,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ class BoardPluginBuilder implements PluginBuilder {
|
||||
String get menuName => LocaleKeys.board_menuName.tr();
|
||||
|
||||
@override
|
||||
FlowySvgData get icon => FlowySvgs.board_s;
|
||||
FlowySvgData get icon => FlowySvgs.icon_board_s;
|
||||
|
||||
@override
|
||||
PluginType get pluginType => PluginType.board;
|
||||
|
@ -14,6 +14,7 @@ import 'package:appflowy/plugins/database/tab_bar/tab_bar_view.dart';
|
||||
import 'package:appflowy/plugins/database/widgets/card/card_bloc.dart';
|
||||
import 'package:appflowy/plugins/database/widgets/cell/card_cell_style_maps/desktop_board_card_cell_style.dart';
|
||||
import 'package:appflowy/plugins/database/widgets/row/row_detail.dart';
|
||||
import 'package:appflowy/plugins/shared/callback_shortcuts.dart';
|
||||
import 'package:appflowy/shared/conditional_listenable_builder.dart';
|
||||
import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart';
|
||||
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
|
||||
@ -28,6 +29,7 @@ import 'package:flowy_infra_ui/widget/flowy_tooltip.dart';
|
||||
import 'package:flutter/material.dart' hide Card;
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../widgets/card/card.dart';
|
||||
import '../../widgets/cell/card_cell_builder.dart';
|
||||
@ -320,64 +322,67 @@ class _BoardContentState extends State<_BoardContent> {
|
||||
},
|
||||
),
|
||||
],
|
||||
child: FocusScope(
|
||||
autofocus: true,
|
||||
child: BoardShortcutContainer(
|
||||
focusScope: widget.focusScope,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
child: AppFlowyBoard(
|
||||
boardScrollController: scrollManager,
|
||||
scrollController: scrollController,
|
||||
controller: context.read<BoardBloc>().boardController,
|
||||
groupConstraints: const BoxConstraints.tightFor(width: 256),
|
||||
config: config,
|
||||
leading: HiddenGroupsColumn(margin: config.groupHeaderPadding),
|
||||
trailing: context
|
||||
.read<BoardBloc>()
|
||||
.groupingFieldType
|
||||
?.canCreateNewGroup ??
|
||||
false
|
||||
? BoardTrailing(scrollController: scrollController)
|
||||
: const HSpace(40),
|
||||
headerBuilder: (_, groupData) => BlocProvider<BoardBloc>.value(
|
||||
value: context.read<BoardBloc>(),
|
||||
child: BoardColumnHeader(
|
||||
groupData: groupData,
|
||||
margin: config.groupHeaderPadding,
|
||||
child: Provider(
|
||||
create: (context) => AFCallbackShortcutsProvider(),
|
||||
child: FocusScope(
|
||||
autofocus: true,
|
||||
child: BoardShortcutContainer(
|
||||
focusScope: widget.focusScope,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
child: AppFlowyBoard(
|
||||
boardScrollController: scrollManager,
|
||||
scrollController: scrollController,
|
||||
controller: context.read<BoardBloc>().boardController,
|
||||
groupConstraints: const BoxConstraints.tightFor(width: 256),
|
||||
config: config,
|
||||
leading: HiddenGroupsColumn(margin: config.groupHeaderPadding),
|
||||
trailing: context
|
||||
.read<BoardBloc>()
|
||||
.groupingFieldType
|
||||
?.canCreateNewGroup ??
|
||||
false
|
||||
? BoardTrailing(scrollController: scrollController)
|
||||
: const HSpace(40),
|
||||
headerBuilder: (_, groupData) => BlocProvider<BoardBloc>.value(
|
||||
value: context.read<BoardBloc>(),
|
||||
child: BoardColumnHeader(
|
||||
groupData: groupData,
|
||||
margin: config.groupHeaderPadding,
|
||||
),
|
||||
),
|
||||
),
|
||||
footerBuilder: (_, groupData) => MultiBlocProvider(
|
||||
providers: [
|
||||
BlocProvider.value(
|
||||
value: context.read<BoardBloc>(),
|
||||
footerBuilder: (_, groupData) => MultiBlocProvider(
|
||||
providers: [
|
||||
BlocProvider.value(
|
||||
value: context.read<BoardBloc>(),
|
||||
),
|
||||
BlocProvider.value(
|
||||
value: context.read<BoardActionsCubit>(),
|
||||
),
|
||||
],
|
||||
child: BoardColumnFooter(
|
||||
columnData: groupData,
|
||||
boardConfig: config,
|
||||
scrollManager: scrollManager,
|
||||
),
|
||||
BlocProvider.value(
|
||||
value: context.read<BoardActionsCubit>(),
|
||||
),
|
||||
],
|
||||
child: BoardColumnFooter(
|
||||
columnData: groupData,
|
||||
boardConfig: config,
|
||||
scrollManager: scrollManager,
|
||||
),
|
||||
),
|
||||
cardBuilder: (_, column, columnItem) => MultiBlocProvider(
|
||||
key: ValueKey("board_card_${column.id}_${columnItem.id}"),
|
||||
providers: [
|
||||
BlocProvider<BoardBloc>.value(
|
||||
value: context.read<BoardBloc>(),
|
||||
cardBuilder: (_, column, columnItem) => MultiBlocProvider(
|
||||
key: ValueKey("board_card_${column.id}_${columnItem.id}"),
|
||||
providers: [
|
||||
BlocProvider<BoardBloc>.value(
|
||||
value: context.read<BoardBloc>(),
|
||||
),
|
||||
BlocProvider.value(
|
||||
value: context.read<BoardActionsCubit>(),
|
||||
),
|
||||
],
|
||||
child: _BoardCard(
|
||||
afGroupData: column,
|
||||
groupItem: columnItem as GroupItem,
|
||||
boardConfig: config,
|
||||
notifier: widget.focusScope,
|
||||
cellBuilder: cellBuilder,
|
||||
),
|
||||
BlocProvider.value(
|
||||
value: context.read<BoardActionsCubit>(),
|
||||
),
|
||||
],
|
||||
child: _BoardCard(
|
||||
afGroupData: column,
|
||||
groupItem: columnItem as GroupItem,
|
||||
boardConfig: config,
|
||||
notifier: widget.focusScope,
|
||||
cellBuilder: cellBuilder,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -3,6 +3,7 @@ import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy/plugins/database/board/application/board_bloc.dart';
|
||||
import 'package:appflowy/plugins/database/grid/presentation/layout/sizes.dart';
|
||||
import 'package:appflowy/plugins/database/grid/presentation/widgets/header/field_type_extension.dart';
|
||||
import 'package:appflowy/plugins/shared/callback_shortcuts.dart';
|
||||
import 'package:appflowy/workspace/presentation/widgets/dialogs.dart';
|
||||
import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart';
|
||||
import 'package:appflowy_board/appflowy_board.dart';
|
||||
@ -30,6 +31,8 @@ class BoardColumnHeader extends StatefulWidget {
|
||||
|
||||
class _BoardColumnHeaderState extends State<BoardColumnHeader> {
|
||||
final FocusNode _focusNode = FocusNode();
|
||||
final FocusNode _keyboardListenerFocusNode = FocusNode();
|
||||
late final AFCallbackShortcutsProvider _shortcutsProvider;
|
||||
|
||||
late final TextEditingController _controller =
|
||||
TextEditingController.fromValue(
|
||||
@ -44,16 +47,23 @@ class _BoardColumnHeaderState extends State<BoardColumnHeader> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_shortcutsProvider = context.read<AFCallbackShortcutsProvider>();
|
||||
_focusNode.addListener(() {
|
||||
if (!_focusNode.hasFocus) {
|
||||
_saveEdit();
|
||||
}
|
||||
});
|
||||
_keyboardListenerFocusNode.addListener(() {
|
||||
_shortcutsProvider.isShortcutsEnabled.value =
|
||||
!_keyboardListenerFocusNode.hasFocus;
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_shortcutsProvider.isShortcutsEnabled.value = true;
|
||||
_focusNode.dispose();
|
||||
_keyboardListenerFocusNode.dispose();
|
||||
_controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
@ -149,7 +159,7 @@ class _BoardColumnHeaderState extends State<BoardColumnHeader> {
|
||||
Widget _buildTextField(BuildContext context) {
|
||||
return Expanded(
|
||||
child: KeyboardListener(
|
||||
focusNode: FocusNode(),
|
||||
focusNode: _keyboardListenerFocusNode,
|
||||
onKeyEvent: (event) {
|
||||
if ([LogicalKeyboardKey.enter, LogicalKeyboardKey.escape]
|
||||
.contains(event.logicalKey)) {
|
||||
|
@ -2,6 +2,7 @@ import 'dart:io';
|
||||
|
||||
import 'package:appflowy/plugins/database/board/application/board_actions_bloc.dart';
|
||||
import 'package:appflowy/plugins/database/board/application/board_bloc.dart';
|
||||
import 'package:appflowy/plugins/shared/callback_shortcuts.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
@ -20,7 +21,9 @@ class BoardShortcutContainer extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CallbackShortcuts(
|
||||
return AFCallbackShortcuts(
|
||||
canAcceptEvent: (_, __) =>
|
||||
context.read<AFCallbackShortcutsProvider>().isShortcutsEnabled.value,
|
||||
bindings: {
|
||||
const SingleActivator(LogicalKeyboardKey.arrowUp):
|
||||
focusScope.focusPrevious,
|
||||
@ -93,9 +96,9 @@ class BoardShortcutContainer extends StatelessWidget {
|
||||
if (focusScope.value.length != 1) {
|
||||
return;
|
||||
}
|
||||
context
|
||||
.read<BoardActionsCubit>()
|
||||
.openCardWithRowId(focusScope.value.first.rowId);
|
||||
context
|
||||
.read<BoardActionsCubit>()
|
||||
.openCardWithRowId(focusScope.value.first.rowId);
|
||||
}
|
||||
|
||||
void _shitEnterHandler(BuildContext context) {
|
||||
|
@ -2,8 +2,8 @@ import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy/plugins/database/tab_bar/tab_bar_view.dart';
|
||||
import 'package:appflowy/startup/plugin/plugin.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
class CalendarPluginBuilder extends PluginBuilder {
|
||||
@override
|
||||
@ -19,7 +19,7 @@ class CalendarPluginBuilder extends PluginBuilder {
|
||||
String get menuName => LocaleKeys.calendar_menuName.tr();
|
||||
|
||||
@override
|
||||
FlowySvgData get icon => FlowySvgs.date_s;
|
||||
FlowySvgData get icon => FlowySvgs.icon_calendar_s;
|
||||
|
||||
@override
|
||||
PluginType get pluginType => PluginType.calendar;
|
||||
|
@ -2,8 +2,8 @@ import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy/plugins/database/tab_bar/tab_bar_view.dart';
|
||||
import 'package:appflowy/startup/plugin/plugin.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
class GridPluginBuilder implements PluginBuilder {
|
||||
@override
|
||||
@ -19,7 +19,7 @@ class GridPluginBuilder implements PluginBuilder {
|
||||
String get menuName => LocaleKeys.grid_menuName.tr();
|
||||
|
||||
@override
|
||||
FlowySvgData get icon => FlowySvgs.grid_s;
|
||||
FlowySvgData get icon => FlowySvgs.icon_grid_s;
|
||||
|
||||
@override
|
||||
PluginType get pluginType => PluginType.grid;
|
||||
|
@ -44,7 +44,7 @@ class DatabaseDocumentPluginBuilder extends PluginBuilder {
|
||||
String get menuName => LocaleKeys.document_menuName.tr();
|
||||
|
||||
@override
|
||||
FlowySvgData get icon => FlowySvgs.document_s;
|
||||
FlowySvgData get icon => FlowySvgs.icon_document_s;
|
||||
|
||||
@override
|
||||
PluginType get pluginType => PluginType.databaseDocument;
|
||||
|
@ -37,7 +37,7 @@ class DocumentPluginBuilder extends PluginBuilder {
|
||||
String get menuName => LocaleKeys.document_menuName.tr();
|
||||
|
||||
@override
|
||||
FlowySvgData get icon => FlowySvgs.document_s;
|
||||
FlowySvgData get icon => FlowySvgs.icon_document_s;
|
||||
|
||||
@override
|
||||
PluginType get pluginType => PluginType.document;
|
||||
@ -148,7 +148,7 @@ class DocumentPluginWidgetBuilder extends PluginWidgetBuilder
|
||||
? [
|
||||
DocumentCollaborators(
|
||||
key: ValueKey('collaborators_${view.id}'),
|
||||
width: 150,
|
||||
width: 120,
|
||||
height: 32,
|
||||
view: view,
|
||||
),
|
||||
|
@ -1,14 +1,17 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:appflowy_editor/appflowy_editor.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
const String kLocalImagesKey = 'local_images';
|
||||
|
||||
List<String> get builtInAssetImages => [
|
||||
"assets/images/app_flowy_abstract_cover_1.jpg",
|
||||
"assets/images/app_flowy_abstract_cover_2.jpg",
|
||||
'assets/images/built_in_cover_images/m_cover_image_1.jpg',
|
||||
'assets/images/built_in_cover_images/m_cover_image_2.jpg',
|
||||
'assets/images/built_in_cover_images/m_cover_image_3.jpg',
|
||||
'assets/images/built_in_cover_images/m_cover_image_4.jpg',
|
||||
'assets/images/built_in_cover_images/m_cover_image_5.jpg',
|
||||
'assets/images/built_in_cover_images/m_cover_image_6.jpg',
|
||||
];
|
||||
|
||||
class ColorOption {
|
||||
|
@ -155,7 +155,7 @@ class _DesktopCoverState extends State<DesktopCover> {
|
||||
);
|
||||
case CoverType.asset:
|
||||
return Image.asset(
|
||||
widget.coverDetails!,
|
||||
PageStyleCoverImageType.builtInImagePath(detail),
|
||||
fit: BoxFit.cover,
|
||||
);
|
||||
case CoverType.color:
|
||||
|
@ -28,8 +28,6 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:string_validator/string_validator.dart';
|
||||
|
||||
import 'cover_editor.dart';
|
||||
|
||||
const double kCoverHeight = 250.0;
|
||||
const double kIconHeight = 60.0;
|
||||
const double kToolbarHeight = 40.0; // with padding to the top
|
||||
@ -296,7 +294,7 @@ class _DocumentHeaderToolbarState extends State<DocumentHeaderToolbar> {
|
||||
leftIconSize: const Size.square(18),
|
||||
onTap: () => widget.onIconOrCoverChanged(
|
||||
cover: PlatformExtension.isDesktopOrWeb
|
||||
? (CoverType.asset, builtInAssetImages.first)
|
||||
? (CoverType.asset, '1')
|
||||
: (CoverType.color, '0xffe8e0ff'),
|
||||
),
|
||||
useIntrinsicWidth: true,
|
||||
|
@ -191,7 +191,13 @@ class EditorMigration {
|
||||
} else {
|
||||
switch (coverType) {
|
||||
case CoverType.asset:
|
||||
// The new version does not support the asset cover.
|
||||
extra = {
|
||||
ViewExtKeys.coverKey: {
|
||||
ViewExtKeys.coverTypeKey:
|
||||
PageStyleCoverImageType.builtInImage.toString(),
|
||||
ViewExtKeys.coverValueKey: coverDetails,
|
||||
},
|
||||
};
|
||||
break;
|
||||
case CoverType.color:
|
||||
extra = {
|
||||
|
@ -237,8 +237,7 @@ class EditorStyleCustomizer {
|
||||
try {
|
||||
return getGoogleFontSafely(fontFamily, fontWeight: fontWeight);
|
||||
} on Exception {
|
||||
if ([defaultFontFamily, fallbackFontFamily, builtInCodeFontFamily]
|
||||
.contains(fontFamily)) {
|
||||
if ([defaultFontFamily, builtInCodeFontFamily].contains(fontFamily)) {
|
||||
return TextStyle(fontFamily: fontFamily, fontWeight: fontWeight);
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,48 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
class AFCallbackShortcutsProvider {
|
||||
final ValueNotifier<bool> isShortcutsEnabled = ValueNotifier(true);
|
||||
}
|
||||
|
||||
class AFCallbackShortcuts extends StatelessWidget {
|
||||
const AFCallbackShortcuts({
|
||||
super.key,
|
||||
required this.bindings,
|
||||
required this.canAcceptEvent,
|
||||
required this.child,
|
||||
});
|
||||
|
||||
final Map<ShortcutActivator, VoidCallback> bindings;
|
||||
final bool Function(FocusNode node, KeyEvent event) canAcceptEvent;
|
||||
final Widget child;
|
||||
|
||||
bool _applyKeyEventBinding(ShortcutActivator activator, KeyEvent event) {
|
||||
if (activator.accepts(event, HardwareKeyboard.instance)) {
|
||||
bindings[activator]!.call();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Focus(
|
||||
canRequestFocus: false,
|
||||
skipTraversal: true,
|
||||
onKeyEvent: (FocusNode node, KeyEvent event) {
|
||||
if (!canAcceptEvent(node, event)) {
|
||||
return KeyEventResult.ignored;
|
||||
}
|
||||
KeyEventResult result = KeyEventResult.ignored;
|
||||
for (final ShortcutActivator activator in bindings.keys) {
|
||||
result = _applyKeyEventBinding(activator, event)
|
||||
? KeyEventResult.handled
|
||||
: result;
|
||||
}
|
||||
return result;
|
||||
},
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
}
|
@ -102,9 +102,9 @@ enum FeatureFlag {
|
||||
switch (this) {
|
||||
case FeatureFlag.collaborativeWorkspace:
|
||||
case FeatureFlag.membersSettings:
|
||||
case FeatureFlag.search:
|
||||
case FeatureFlag.unknown:
|
||||
return false;
|
||||
case FeatureFlag.search:
|
||||
case FeatureFlag.syncDocument:
|
||||
case FeatureFlag.syncDatabase:
|
||||
return true;
|
||||
|
@ -6,7 +6,6 @@ import 'package:google_fonts/google_fonts.dart';
|
||||
const _defaultFontFamilies = [
|
||||
defaultFontFamily,
|
||||
builtInCodeFontFamily,
|
||||
fallbackFontFamily,
|
||||
];
|
||||
|
||||
// if the font family is not available, google fonts packages will throw an exception
|
||||
|
@ -1,5 +1,8 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:appflowy/mobile/application/mobile_router.dart';
|
||||
import 'package:appflowy/plugins/document/application/document_appearance_cubit.dart';
|
||||
import 'package:appflowy/shared/feature_flags.dart';
|
||||
@ -13,6 +16,7 @@ import 'package:appflowy/workspace/application/notification/notification_service
|
||||
import 'package:appflowy/workspace/application/settings/appearance/appearance_cubit.dart';
|
||||
import 'package:appflowy/workspace/application/settings/notifications/notification_settings_cubit.dart';
|
||||
import 'package:appflowy/workspace/application/sidebar/rename_view/rename_view_bloc.dart';
|
||||
import 'package:appflowy/workspace/application/tabs/tabs_bloc.dart';
|
||||
import 'package:appflowy/workspace/application/view/view_ext.dart';
|
||||
import 'package:appflowy/workspace/presentation/command_palette/command_palette.dart';
|
||||
import 'package:appflowy_backend/log.dart';
|
||||
@ -21,8 +25,6 @@ import 'package:appflowy_editor/appflowy_editor.dart' hide Log;
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flowy_infra/theme.dart';
|
||||
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
@ -175,8 +177,12 @@ class _ApplicationWidgetState extends State<ApplicationWidget> {
|
||||
if (action?.type == ActionType.openView &&
|
||||
PlatformExtension.isDesktop) {
|
||||
final view = action!.arguments?[ActionArgumentKeys.view];
|
||||
final nodePath = action.arguments?[ActionArgumentKeys.nodePath];
|
||||
if (view != null) {
|
||||
AppGlobals.rootNavKey.currentContext?.pushView(view);
|
||||
getIt<TabsBloc>().openPlugin(
|
||||
view.plugin(),
|
||||
arguments: {PluginArgumentKeys.selection: nodePath},
|
||||
);
|
||||
}
|
||||
} else if (action?.type == ActionType.openRow &&
|
||||
PlatformExtension.isMobile) {
|
||||
|
@ -21,11 +21,11 @@ class ActionNavigationBloc
|
||||
currentAction = currentAction.copyWith(arguments: {});
|
||||
}
|
||||
|
||||
action.arguments?.addAll({ActionArgumentKeys.view: view});
|
||||
currentAction.arguments?.addAll({ActionArgumentKeys.view: view});
|
||||
}
|
||||
}
|
||||
|
||||
emit(state.copyWith(action: action, nextActions: nextActions));
|
||||
emit(state.copyWith(action: currentAction, nextActions: nextActions));
|
||||
|
||||
if (nextActions.isNotEmpty) {
|
||||
final newActions = [...nextActions];
|
||||
|
@ -101,22 +101,15 @@ class CommandPaletteBloc
|
||||
Future<void> _initTrash() async {
|
||||
_trashListener.start(
|
||||
trashUpdated: (trashOrFailed) {
|
||||
final trash = trashOrFailed.fold(
|
||||
(trash) => trash,
|
||||
(error) => null,
|
||||
);
|
||||
|
||||
final trash = trashOrFailed.toNullable();
|
||||
add(CommandPaletteEvent.trashChanged(trash: trash));
|
||||
},
|
||||
);
|
||||
|
||||
final trashOrFailure = await _trashService.readTrash();
|
||||
final trashRes = trashOrFailure.fold(
|
||||
(trash) => trash,
|
||||
(error) => null,
|
||||
);
|
||||
final trash = trashOrFailure.toNullable();
|
||||
|
||||
add(CommandPaletteEvent.trashChanged(trash: trashRes?.items));
|
||||
add(CommandPaletteEvent.trashChanged(trash: trash?.items));
|
||||
}
|
||||
|
||||
void _debounceOnSearchChanged(String value) {
|
||||
|
@ -41,7 +41,6 @@ class AppearanceSettingsCubit extends Cubit<AppearanceSettingsState> {
|
||||
appTheme,
|
||||
appearanceSettings.themeMode,
|
||||
appearanceSettings.font,
|
||||
appearanceSettings.monospaceFont,
|
||||
appearanceSettings.layoutDirection,
|
||||
appearanceSettings.textDirection,
|
||||
appearanceSettings.enableRtlToolbarItems,
|
||||
@ -374,7 +373,6 @@ class AppearanceSettingsState with _$AppearanceSettingsState {
|
||||
required AppTheme appTheme,
|
||||
required ThemeMode themeMode,
|
||||
required String font,
|
||||
required String monospaceFont,
|
||||
required LayoutDirection layoutDirection,
|
||||
required AppFlowyTextDirection? textDirection,
|
||||
required bool enableRtlToolbarItems,
|
||||
@ -393,7 +391,6 @@ class AppearanceSettingsState with _$AppearanceSettingsState {
|
||||
AppTheme appTheme,
|
||||
ThemeModePB themeModePB,
|
||||
String font,
|
||||
String monospaceFont,
|
||||
LayoutDirectionPB layoutDirectionPB,
|
||||
TextDirectionPB? textDirectionPB,
|
||||
bool enableRtlToolbarItems,
|
||||
@ -410,7 +407,6 @@ class AppearanceSettingsState with _$AppearanceSettingsState {
|
||||
return AppearanceSettingsState(
|
||||
appTheme: appTheme,
|
||||
font: font,
|
||||
monospaceFont: monospaceFont,
|
||||
layoutDirection: LayoutDirection.fromLayoutDirectionPB(layoutDirectionPB),
|
||||
textDirection: AppFlowyTextDirection.fromTextDirectionPB(textDirectionPB),
|
||||
enableRtlToolbarItems: enableRtlToolbarItems,
|
||||
@ -435,7 +431,7 @@ class AppearanceSettingsState with _$AppearanceSettingsState {
|
||||
appTheme,
|
||||
brightness,
|
||||
font,
|
||||
monospaceFont,
|
||||
builtInCodeFontFamily,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -11,9 +11,6 @@ import 'package:flutter/material.dart';
|
||||
// Desktop: Based on the OS
|
||||
const defaultFontFamily = '';
|
||||
|
||||
// the Poppins font is embedded in the app, so we can use it without GoogleFonts
|
||||
// TODO(Lucas): after releasing version 0.5.6, remove it.
|
||||
const fallbackFontFamily = 'Poppins';
|
||||
const builtInCodeFontFamily = 'RobotoMono';
|
||||
|
||||
abstract class BaseAppearance {
|
||||
@ -47,7 +44,7 @@ abstract class BaseAppearance {
|
||||
height: lineHeight,
|
||||
);
|
||||
|
||||
if (fontFamily == defaultFontFamily || fontFamily == fallbackFontFamily) {
|
||||
if (fontFamily == defaultFontFamily) {
|
||||
return textStyle;
|
||||
}
|
||||
|
||||
|
@ -41,10 +41,10 @@ class ViewExtKeys {
|
||||
extension ViewExtension on ViewPB {
|
||||
Widget defaultIcon() => FlowySvg(
|
||||
switch (layout) {
|
||||
ViewLayoutPB.Board => FlowySvgs.board_s,
|
||||
ViewLayoutPB.Calendar => FlowySvgs.calendar_s,
|
||||
ViewLayoutPB.Grid => FlowySvgs.grid_s,
|
||||
ViewLayoutPB.Document => FlowySvgs.document_s,
|
||||
ViewLayoutPB.Board => FlowySvgs.icon_board_s,
|
||||
ViewLayoutPB.Calendar => FlowySvgs.icon_calendar_s,
|
||||
ViewLayoutPB.Grid => FlowySvgs.icon_grid_s,
|
||||
ViewLayoutPB.Document => FlowySvgs.icon_document_s,
|
||||
ViewLayoutPB.Chat => FlowySvgs.chat_ai_page_s,
|
||||
_ => FlowySvgs.document_s,
|
||||
},
|
||||
|
@ -134,15 +134,22 @@ class FavoriteHeader extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return FlowyButton(
|
||||
onTap: onPressed,
|
||||
margin: const EdgeInsets.symmetric(horizontal: 6.0, vertical: 7.0),
|
||||
leftIcon: const FlowySvg(
|
||||
FlowySvgs.favorite_header_icon_s,
|
||||
blendMode: null,
|
||||
return SizedBox(
|
||||
height: HomeSizes.newPageSectionHeight,
|
||||
child: FlowyButton(
|
||||
onTap: onPressed,
|
||||
margin: const EdgeInsets.symmetric(horizontal: 4.0, vertical: 3.0),
|
||||
leftIcon: const FlowySvg(
|
||||
FlowySvgs.favorite_header_icon_m,
|
||||
blendMode: null,
|
||||
),
|
||||
leftIconSize: const Size.square(24.0),
|
||||
iconPadding: 8.0,
|
||||
text: FlowyText.regular(
|
||||
LocaleKeys.sideBar_favorites.tr(),
|
||||
lineHeight: 1.15,
|
||||
),
|
||||
),
|
||||
iconPadding: 10.0,
|
||||
text: FlowyText.regular(LocaleKeys.sideBar_favorites.tr()),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -182,11 +189,13 @@ class FavoriteMoreButton extends StatelessWidget {
|
||||
margin: EdgeInsets.zero,
|
||||
child: FlowyButton(
|
||||
onTap: () {},
|
||||
margin: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 7.0),
|
||||
margin: const EdgeInsets.symmetric(horizontal: 20.0, vertical: 7.0),
|
||||
leftIcon: const FlowySvg(
|
||||
FlowySvgs.workspace_three_dots_s,
|
||||
),
|
||||
text: FlowyText.regular(LocaleKeys.button_more.tr()),
|
||||
text: FlowyText.regular(
|
||||
LocaleKeys.button_more.tr(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||
import 'package:appflowy/workspace/presentation/home/home_sizes.dart';
|
||||
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
@ -11,6 +12,7 @@ class FolderHeader extends StatefulWidget {
|
||||
required this.addButtonTooltip,
|
||||
required this.onPressed,
|
||||
required this.onAdded,
|
||||
required this.isExpanded,
|
||||
});
|
||||
|
||||
final String title;
|
||||
@ -18,6 +20,7 @@ class FolderHeader extends StatefulWidget {
|
||||
final String addButtonTooltip;
|
||||
final VoidCallback onPressed;
|
||||
final VoidCallback onAdded;
|
||||
final bool isExpanded;
|
||||
|
||||
@override
|
||||
State<FolderHeader> createState() => _FolderHeaderState();
|
||||
@ -34,24 +37,42 @@ class _FolderHeaderState extends State<FolderHeader> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MouseRegion(
|
||||
onEnter: (_) => isHovered.value = true,
|
||||
onExit: (_) => isHovered.value = false,
|
||||
child: FlowyButton(
|
||||
onTap: widget.onPressed,
|
||||
margin: const EdgeInsets.symmetric(horizontal: 6.0),
|
||||
rightIcon: ValueListenableBuilder(
|
||||
valueListenable: isHovered,
|
||||
builder: (context, onHover, child) =>
|
||||
Opacity(opacity: onHover ? 1 : 0, child: child),
|
||||
child: FlowyIconButton(
|
||||
tooltipText: widget.addButtonTooltip,
|
||||
icon: const FlowySvg(FlowySvgs.view_item_add_s),
|
||||
onPressed: widget.onAdded,
|
||||
return SizedBox(
|
||||
height: HomeSizes.workspaceSectionHeight,
|
||||
child: MouseRegion(
|
||||
onEnter: (_) => isHovered.value = true,
|
||||
onExit: (_) => isHovered.value = false,
|
||||
child: FlowyButton(
|
||||
onTap: widget.onPressed,
|
||||
margin: const EdgeInsets.only(left: 6.0, right: 4.0),
|
||||
rightIcon: ValueListenableBuilder(
|
||||
valueListenable: isHovered,
|
||||
builder: (context, onHover, child) =>
|
||||
Opacity(opacity: onHover ? 1 : 0, child: child),
|
||||
child: FlowyIconButton(
|
||||
width: 24,
|
||||
iconPadding: const EdgeInsets.all(4.0),
|
||||
tooltipText: widget.addButtonTooltip,
|
||||
icon: const FlowySvg(FlowySvgs.view_item_add_s),
|
||||
onPressed: widget.onAdded,
|
||||
),
|
||||
),
|
||||
iconPadding: 10.0,
|
||||
text: Row(
|
||||
children: [
|
||||
FlowyText(
|
||||
widget.title,
|
||||
lineHeight: 1.15,
|
||||
),
|
||||
const HSpace(4.0),
|
||||
FlowySvg(
|
||||
widget.isExpanded
|
||||
? FlowySvgs.workspace_drop_down_menu_show_s
|
||||
: FlowySvgs.workspace_drop_down_menu_hide_s,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
iconPadding: 10.0,
|
||||
text: FlowyText(widget.title),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -76,6 +76,7 @@ class _SectionFolderState extends State<SectionFolder> {
|
||||
Widget _buildHeader(BuildContext context) {
|
||||
return FolderHeader(
|
||||
title: widget.title,
|
||||
isExpanded: context.watch<FolderBloc>().state.isExpanded,
|
||||
expandButtonTooltip: widget.expandButtonTooltip,
|
||||
addButtonTooltip: widget.addButtonTooltip,
|
||||
onPressed: () =>
|
||||
|
@ -1,8 +1,12 @@
|
||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy/startup/plugin/plugin.dart';
|
||||
import 'package:appflowy/startup/startup.dart';
|
||||
import 'package:appflowy/workspace/application/tabs/tabs_bloc.dart';
|
||||
import 'package:appflowy/workspace/presentation/home/home_sizes.dart';
|
||||
import 'package:appflowy/workspace/presentation/home/menu/menu_shared_state.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SidebarFooter extends StatelessWidget {
|
||||
@ -31,12 +35,20 @@ class SidebarTrashButton extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ValueListenableBuilder(
|
||||
valueListenable: getIt<MenuSharedState>().notifier,
|
||||
builder: (context, value, child) {
|
||||
return MouseRegion(
|
||||
cursor: SystemMouseCursors.click,
|
||||
child: GestureDetector(
|
||||
return SizedBox(
|
||||
height: HomeSizes.workspaceSectionHeight,
|
||||
child: ValueListenableBuilder(
|
||||
valueListenable: getIt<MenuSharedState>().notifier,
|
||||
builder: (context, value, child) {
|
||||
return FlowyButton(
|
||||
leftIcon: const FlowySvg(FlowySvgs.sidebar_footer_trash_m),
|
||||
leftIconSize: const Size.square(24.0),
|
||||
iconPadding: 8.0,
|
||||
margin: const EdgeInsets.all(4.0),
|
||||
text: FlowyText.regular(
|
||||
LocaleKeys.trash_text.tr(),
|
||||
lineHeight: 1.15,
|
||||
),
|
||||
onTap: () {
|
||||
getIt<MenuSharedState>().latestOpenView = null;
|
||||
getIt<TabsBloc>().add(
|
||||
@ -45,10 +57,9 @@ class SidebarTrashButton extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
},
|
||||
child: const FlowySvg(FlowySvgs.sidebar_footer_trash_s),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -23,8 +23,11 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
class SidebarTopMenu extends StatelessWidget {
|
||||
const SidebarTopMenu({
|
||||
super.key,
|
||||
required this.isSidebarOnHover,
|
||||
});
|
||||
|
||||
final ValueNotifier<bool> isSidebarOnHover;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BlocBuilder<SidebarSectionsBloc, SidebarSectionsState>(
|
||||
@ -80,17 +83,26 @@ class SidebarTopMenu extends StatelessWidget {
|
||||
],
|
||||
);
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(top: 12.0),
|
||||
child: FlowyTooltip(
|
||||
richMessage: textSpan,
|
||||
child: FlowyIconButton(
|
||||
width: 24,
|
||||
onPressed: () => context
|
||||
.read<HomeSettingBloc>()
|
||||
.add(const HomeSettingEvent.collapseMenu()),
|
||||
iconPadding: const EdgeInsets.all(2),
|
||||
icon: const FlowySvg(FlowySvgs.hide_menu_s),
|
||||
return ValueListenableBuilder(
|
||||
valueListenable: isSidebarOnHover,
|
||||
builder: (_, value, ___) => Opacity(
|
||||
opacity: value ? 1 : 0,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 12.0, right: 6.0),
|
||||
child: FlowyTooltip(
|
||||
richMessage: textSpan,
|
||||
child: Listener(
|
||||
onPointerDown: (_) => context
|
||||
.read<HomeSettingBloc>()
|
||||
.add(const HomeSettingEvent.collapseMenu()),
|
||||
child: FlowyIconButton(
|
||||
width: 24,
|
||||
onPressed: () {},
|
||||
iconPadding: const EdgeInsets.all(4),
|
||||
icon: const FlowySvg(FlowySvgs.hide_menu_s),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -28,17 +28,26 @@ class SidebarUser extends StatelessWidget {
|
||||
child: BlocBuilder<MenuUserBloc, MenuUserState>(
|
||||
builder: (context, state) => Row(
|
||||
children: [
|
||||
const HSpace(6),
|
||||
const HSpace(4),
|
||||
UserAvatar(
|
||||
iconUrl: state.userProfile.iconUrl,
|
||||
name: state.userProfile.name,
|
||||
size: 16.0,
|
||||
fontSize: 10.0,
|
||||
size: 24.0,
|
||||
fontSize: 16.0,
|
||||
decoration: ShapeDecoration(
|
||||
color: const Color(0xFFFBE8FB),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: const BorderSide(width: 0.50, color: Color(0x19171717)),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
),
|
||||
const HSpace(10),
|
||||
const HSpace(8),
|
||||
Expanded(child: _buildUserName(context, state)),
|
||||
UserSettingButton(userProfile: state.userProfile),
|
||||
const HSpace(8.0),
|
||||
const NotificationButton(),
|
||||
const HSpace(10.0),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -51,6 +60,7 @@ class SidebarUser extends StatelessWidget {
|
||||
name,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
color: Theme.of(context).colorScheme.tertiary,
|
||||
fontSize: 15.0,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -25,22 +25,21 @@ class SidebarFolder extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
const sectionPadding = 16.0;
|
||||
return ValueListenableBuilder(
|
||||
valueListenable: getIt<MenuSharedState>().notifier,
|
||||
builder: (context, value, child) {
|
||||
return Column(
|
||||
children: [
|
||||
const VSpace(4.0),
|
||||
// favorite
|
||||
BlocBuilder<FavoriteBloc, FavoriteState>(
|
||||
builder: (context, state) {
|
||||
if (state.views.isEmpty) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(top: 16.0, bottom: 10),
|
||||
child: FavoriteFolder(
|
||||
views: state.views.map((e) => e.item).toList(),
|
||||
),
|
||||
return FavoriteFolder(
|
||||
views: state.views.map((e) => e.item).toList(),
|
||||
);
|
||||
},
|
||||
),
|
||||
@ -56,18 +55,18 @@ class SidebarFolder extends StatelessWidget {
|
||||
children: isCollaborativeWorkspace
|
||||
? [
|
||||
// public
|
||||
const VSpace(10),
|
||||
const VSpace(sectionPadding),
|
||||
PublicSectionFolder(views: state.section.publicViews),
|
||||
|
||||
// private
|
||||
const VSpace(10),
|
||||
const VSpace(sectionPadding),
|
||||
PrivateSectionFolder(
|
||||
views: state.section.privateViews,
|
||||
),
|
||||
]
|
||||
: [
|
||||
// personal
|
||||
const VSpace(10),
|
||||
const VSpace(sectionPadding),
|
||||
PersonalSectionFolder(
|
||||
views: state.section.publicViews,
|
||||
),
|
||||
@ -75,6 +74,7 @@ class SidebarFolder extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
),
|
||||
const VSpace(200),
|
||||
],
|
||||
);
|
||||
},
|
||||
|
@ -18,20 +18,20 @@ class SidebarNewPageButton extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
height: HomeSizes.newPageSectionHeight,
|
||||
child: FlowyButton(
|
||||
onTap: () async => _createNewPage(context),
|
||||
leftIcon: const FlowySvg(
|
||||
FlowySvgs.new_app_s,
|
||||
FlowySvgs.new_app_m,
|
||||
blendMode: null,
|
||||
),
|
||||
iconPadding: 10.0,
|
||||
text: SizedBox(
|
||||
height: 18.0,
|
||||
child: FlowyText.regular(
|
||||
LocaleKeys.newPageText.tr(),
|
||||
),
|
||||
leftIconSize: const Size.square(24.0),
|
||||
margin: const EdgeInsets.only(left: 4.0),
|
||||
iconPadding: 8.0,
|
||||
text: FlowyText.regular(
|
||||
LocaleKeys.newPageText.tr(),
|
||||
lineHeight: 1.15,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -1,12 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy/plugins/document/application/document_appearance_cubit.dart';
|
||||
import 'package:appflowy/startup/startup.dart';
|
||||
import 'package:appflowy/workspace/application/user/user_workspace_bloc.dart';
|
||||
import 'package:appflowy/workspace/presentation/home/af_focus_manager.dart';
|
||||
import 'package:appflowy/workspace/presentation/home/home_sizes.dart';
|
||||
import 'package:appflowy/workspace/presentation/home/hotkeys.dart';
|
||||
import 'package:appflowy/workspace/presentation/settings/settings_dialog.dart';
|
||||
import 'package:appflowy_backend/log.dart';
|
||||
@ -16,6 +13,7 @@ import 'package:appflowy_editor/appflowy_editor.dart' hide Log;
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
||||
import 'package:flowy_infra_ui/widget/flowy_tooltip.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:hotkey_manager/hotkey_manager.dart';
|
||||
|
||||
@ -51,13 +49,15 @@ class UserSettingButton extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox.square(
|
||||
dimension: HomeSizes.workspaceSectionHeight,
|
||||
dimension: 24.0,
|
||||
child: FlowyTooltip(
|
||||
message: LocaleKeys.settings_menu_open.tr(),
|
||||
child: FlowyButton(
|
||||
onTap: () => showSettingsDialog(context, userProfile),
|
||||
margin: EdgeInsets.zero,
|
||||
text: const FlowySvg(
|
||||
FlowySvgs.settings_s,
|
||||
opacity: 0.7,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1,5 +1,7 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy/shared/feature_flags.dart';
|
||||
@ -30,7 +32,6 @@ import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flowy_infra_ui/style_widget/button.dart';
|
||||
import 'package:flowy_infra_ui/style_widget/text.dart';
|
||||
import 'package:flowy_infra_ui/widget/spacing.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
|
||||
/// Home Sidebar is the left side bar of the home page.
|
||||
@ -95,7 +96,7 @@ class HomeSideBar extends StatelessWidget {
|
||||
}
|
||||
return MultiBlocProvider(
|
||||
providers: [
|
||||
BlocProvider(create: (_) => getIt<ActionNavigationBloc>()),
|
||||
BlocProvider.value(value: getIt<ActionNavigationBloc>()),
|
||||
BlocProvider(
|
||||
create: (_) => SidebarSectionsBloc()
|
||||
..add(
|
||||
@ -189,7 +190,9 @@ class _Sidebar extends StatefulWidget {
|
||||
class _SidebarState extends State<_Sidebar> {
|
||||
final _scrollController = ScrollController();
|
||||
Timer? _scrollDebounce;
|
||||
bool isScrolling = false;
|
||||
bool _isScrolling = false;
|
||||
final _isHovered = ValueNotifier(false);
|
||||
final _scrollOffset = ValueNotifier<double>(0);
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -202,88 +205,122 @@ class _SidebarState extends State<_Sidebar> {
|
||||
_scrollDebounce?.cancel();
|
||||
_scrollController.removeListener(_onScrollChanged);
|
||||
_scrollController.dispose();
|
||||
_scrollOffset.dispose();
|
||||
_isHovered.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
const menuHorizontalInset = EdgeInsets.symmetric(horizontal: 12);
|
||||
const menuHorizontalInset = EdgeInsets.symmetric(horizontal: 8);
|
||||
final userState = context.read<UserWorkspaceBloc>().state;
|
||||
return DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surfaceContainerHighest,
|
||||
border: Border(
|
||||
right: BorderSide(color: Theme.of(context).dividerColor),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
// top menu
|
||||
const Padding(padding: menuHorizontalInset, child: SidebarTopMenu()),
|
||||
// user or workspace, setting
|
||||
Container(
|
||||
height: HomeSizes.workspaceSectionHeight,
|
||||
padding: menuHorizontalInset - const EdgeInsets.only(right: 6),
|
||||
child:
|
||||
// if the workspaces are empty, show the user profile instead
|
||||
userState.isCollabWorkspaceOn && userState.workspaces.isNotEmpty
|
||||
? SidebarWorkspace(userProfile: widget.userProfile)
|
||||
: SidebarUser(userProfile: widget.userProfile),
|
||||
return MouseRegion(
|
||||
onEnter: (_) => _isHovered.value = true,
|
||||
onExit: (_) => _isHovered.value = false,
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surfaceContainerHighest,
|
||||
border: Border(
|
||||
right: BorderSide(color: Theme.of(context).dividerColor),
|
||||
),
|
||||
if (FeatureFlag.search.isOn) ...[
|
||||
const VSpace(6),
|
||||
Container(
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
// top menu
|
||||
Padding(
|
||||
padding: menuHorizontalInset,
|
||||
height: HomeSizes.searchSectionHeight,
|
||||
child: const _SidebarSearchButton(),
|
||||
child: SidebarTopMenu(
|
||||
isSidebarOnHover: _isHovered,
|
||||
),
|
||||
),
|
||||
],
|
||||
// new page button
|
||||
const SidebarNewPageButton(),
|
||||
// scrollable document list
|
||||
Expanded(
|
||||
child: Padding(
|
||||
// user or workspace, setting
|
||||
Container(
|
||||
height: HomeSizes.workspaceSectionHeight,
|
||||
padding: menuHorizontalInset - const EdgeInsets.only(right: 6),
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.only(right: 6),
|
||||
controller: _scrollController,
|
||||
physics: const ClampingScrollPhysics(),
|
||||
child: SidebarFolder(
|
||||
userProfile: widget.userProfile,
|
||||
isHoverEnabled: !isScrolling,
|
||||
child:
|
||||
// if the workspaces are empty, show the user profile instead
|
||||
userState.isCollabWorkspaceOn &&
|
||||
userState.workspaces.isNotEmpty
|
||||
? SidebarWorkspace(userProfile: widget.userProfile)
|
||||
: SidebarUser(userProfile: widget.userProfile),
|
||||
),
|
||||
if (FeatureFlag.search.isOn) ...[
|
||||
const VSpace(6),
|
||||
Container(
|
||||
padding: menuHorizontalInset,
|
||||
height: HomeSizes.searchSectionHeight,
|
||||
child: const _SidebarSearchButton(),
|
||||
),
|
||||
],
|
||||
const VSpace(6.0),
|
||||
// new page button
|
||||
const SidebarNewPageButton(),
|
||||
// scrollable document list
|
||||
const VSpace(12.0),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
||||
child: ValueListenableBuilder(
|
||||
valueListenable: _scrollOffset,
|
||||
builder: (_, offset, child) {
|
||||
return Opacity(
|
||||
opacity: offset > 0 ? 1 : 0,
|
||||
child: child,
|
||||
);
|
||||
},
|
||||
child: const Divider(
|
||||
color: Color(0x141F2329),
|
||||
height: 0.5,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const VSpace(10),
|
||||
// trash
|
||||
const Padding(
|
||||
padding: menuHorizontalInset,
|
||||
child: Divider(height: 1.0, color: Color(0x141F2329)),
|
||||
),
|
||||
const VSpace(14),
|
||||
const Padding(
|
||||
padding: menuHorizontalInset,
|
||||
child: SidebarFooter(),
|
||||
),
|
||||
const VSpace(10),
|
||||
],
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: menuHorizontalInset - const EdgeInsets.only(right: 6),
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.only(right: 6),
|
||||
controller: _scrollController,
|
||||
physics: const ClampingScrollPhysics(),
|
||||
child: SidebarFolder(
|
||||
userProfile: widget.userProfile,
|
||||
isHoverEnabled: !_isScrolling,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// trash
|
||||
Padding(
|
||||
padding: menuHorizontalInset +
|
||||
const EdgeInsets.symmetric(horizontal: 4.0),
|
||||
child: const Divider(height: 0.5, color: Color(0x141F2329)),
|
||||
),
|
||||
const VSpace(8),
|
||||
Padding(
|
||||
padding: menuHorizontalInset +
|
||||
const EdgeInsets.symmetric(horizontal: 4.0),
|
||||
child: const SidebarFooter(),
|
||||
),
|
||||
const VSpace(14),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _onScrollChanged() {
|
||||
setState(() => isScrolling = true);
|
||||
setState(() => _isScrolling = true);
|
||||
|
||||
_scrollDebounce?.cancel();
|
||||
_scrollDebounce =
|
||||
Timer(const Duration(milliseconds: 300), _setScrollStopped);
|
||||
|
||||
_scrollOffset.value = _scrollController.offset;
|
||||
}
|
||||
|
||||
void _setScrollStopped() {
|
||||
if (mounted) {
|
||||
setState(() => isScrolling = false);
|
||||
setState(() => _isScrolling = false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,13 +15,19 @@ class WorkspaceIcon extends StatefulWidget {
|
||||
required this.iconSize,
|
||||
required this.fontSize,
|
||||
required this.onSelected,
|
||||
this.borderRadius = 4,
|
||||
this.emojiSize,
|
||||
this.alignment,
|
||||
});
|
||||
|
||||
final UserWorkspacePB workspace;
|
||||
final double iconSize;
|
||||
final bool enableEdit;
|
||||
final double fontSize;
|
||||
final double? emojiSize;
|
||||
final void Function(EmojiPickerResult) onSelected;
|
||||
final double borderRadius;
|
||||
final Alignment? alignment;
|
||||
|
||||
@override
|
||||
State<WorkspaceIcon> createState() => _WorkspaceIconState();
|
||||
@ -34,22 +40,26 @@ class _WorkspaceIconState extends State<WorkspaceIcon> {
|
||||
Widget build(BuildContext context) {
|
||||
Widget child = widget.workspace.icon.isNotEmpty
|
||||
? Container(
|
||||
width: widget.iconSize,
|
||||
alignment: Alignment.center,
|
||||
width: widget.emojiSize ?? widget.iconSize,
|
||||
alignment: widget.alignment ?? Alignment.center,
|
||||
child: FlowyText.emoji(
|
||||
widget.workspace.icon,
|
||||
fontSize: widget.iconSize,
|
||||
fontSize: widget.emojiSize ?? widget.iconSize,
|
||||
),
|
||||
)
|
||||
: Container(
|
||||
alignment: Alignment.center,
|
||||
width: widget.iconSize,
|
||||
height: min(widget.iconSize, 26),
|
||||
height: min(widget.iconSize, 24),
|
||||
decoration: BoxDecoration(
|
||||
color: ColorGenerator(widget.workspace.name).toColor(),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
borderRadius: BorderRadius.circular(widget.borderRadius),
|
||||
border: Border.all(
|
||||
color: const Color(0xa1717171),
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
child: FlowyText(
|
||||
child: FlowyText.semibold(
|
||||
widget.workspace.name.isEmpty
|
||||
? ''
|
||||
: widget.workspace.name.substring(0, 1),
|
||||
|
@ -1,4 +1,3 @@
|
||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy/plugins/document/presentation/editor_plugins/openai/widgets/loading.dart';
|
||||
import 'package:appflowy/workspace/application/user/user_workspace_bloc.dart';
|
||||
@ -49,7 +48,9 @@ class _SidebarWorkspaceState extends State<SidebarWorkspace> {
|
||||
),
|
||||
),
|
||||
UserSettingButton(userProfile: widget.userProfile),
|
||||
const HSpace(8.0),
|
||||
const NotificationButton(),
|
||||
const HSpace(12.0),
|
||||
],
|
||||
);
|
||||
},
|
||||
@ -203,12 +204,14 @@ class _SidebarSwitchWorkspaceButtonState
|
||||
height: 30,
|
||||
child: Row(
|
||||
children: [
|
||||
const HSpace(6.0),
|
||||
const HSpace(4.0),
|
||||
WorkspaceIcon(
|
||||
workspace: widget.currentWorkspace,
|
||||
iconSize: 16,
|
||||
fontSize: 10,
|
||||
iconSize: 24,
|
||||
fontSize: 16,
|
||||
emojiSize: 18,
|
||||
enableEdit: false,
|
||||
borderRadius: 8.0,
|
||||
onSelected: (result) => context.read<UserWorkspaceBloc>().add(
|
||||
UserWorkspaceEvent.updateWorkspaceIcon(
|
||||
widget.currentWorkspace.workspaceId,
|
||||
@ -216,23 +219,16 @@ class _SidebarSwitchWorkspaceButtonState
|
||||
),
|
||||
),
|
||||
),
|
||||
const HSpace(10),
|
||||
const HSpace(8),
|
||||
Flexible(
|
||||
child: FlowyText.medium(
|
||||
widget.currentWorkspace.name,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
withTooltip: true,
|
||||
fontSize: 15.0,
|
||||
),
|
||||
),
|
||||
const HSpace(4),
|
||||
ValueListenableBuilder(
|
||||
valueListenable: _isWorkSpaceMenuExpanded,
|
||||
builder: (context, value, _) => FlowySvg(
|
||||
value
|
||||
? FlowySvgs.workspace_drop_down_menu_hide_s
|
||||
: FlowySvgs.workspace_drop_down_menu_show_s,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -50,10 +50,12 @@ class ViewAddButton extends StatelessWidget {
|
||||
return PopoverActionList<PopoverAction>(
|
||||
direction: PopoverDirection.bottomWithLeftAligned,
|
||||
actions: _actions,
|
||||
offset: const Offset(0, 4),
|
||||
offset: const Offset(0, 8),
|
||||
constraints: const BoxConstraints(
|
||||
minWidth: 200,
|
||||
),
|
||||
buildChild: (popover) {
|
||||
return FlowyIconButton(
|
||||
hoverColor: Colors.transparent,
|
||||
width: 24,
|
||||
icon: const FlowySvg(FlowySvgs.view_item_add_s),
|
||||
onPressed: () {
|
||||
@ -106,7 +108,10 @@ class ViewAddButtonActionWrapper extends ActionCell {
|
||||
final PluginBuilder pluginBuilder;
|
||||
|
||||
@override
|
||||
Widget? leftIcon(Color iconColor) => FlowySvg(pluginBuilder.icon);
|
||||
Widget? leftIcon(Color iconColor) => FlowySvg(
|
||||
pluginBuilder.icon,
|
||||
size: const Size.square(16),
|
||||
);
|
||||
|
||||
@override
|
||||
String get name => pluginBuilder.menuName;
|
||||
@ -122,7 +127,7 @@ class ViewImportActionWrapper extends ActionCell {
|
||||
final DocumentPluginBuilder pluginBuilder;
|
||||
|
||||
@override
|
||||
Widget? leftIcon(Color iconColor) => const FlowySvg(FlowySvgs.import_s);
|
||||
Widget? leftIcon(Color iconColor) => const FlowySvg(FlowySvgs.icon_import_s);
|
||||
|
||||
@override
|
||||
String get name => LocaleKeys.moreAction_import.tr();
|
||||
|
@ -422,15 +422,13 @@ class _SingleInnerViewItemState extends State<SingleInnerViewItem> {
|
||||
|
||||
Widget _buildViewItem(bool onHover, [bool isSelected = false]) {
|
||||
final children = [
|
||||
const HSpace(2),
|
||||
// expand icon or placeholder
|
||||
widget.leftIconBuilder?.call(context, widget.view) ?? _buildLeftIcon(),
|
||||
const HSpace(2),
|
||||
// icon
|
||||
_buildViewIconButton(),
|
||||
const HSpace(6),
|
||||
// const SizedBox(
|
||||
// width: 6.0,
|
||||
// height: 1,
|
||||
// ),
|
||||
// title
|
||||
Expanded(
|
||||
child: FlowyText.regular(
|
||||
@ -447,10 +445,10 @@ class _SingleInnerViewItemState extends State<SingleInnerViewItem> {
|
||||
} else {
|
||||
// ··· more action button
|
||||
children.add(_buildViewMoreActionButton(context));
|
||||
children.add(const HSpace(8.0));
|
||||
// only support add button for document layout
|
||||
if (widget.view.layout == ViewLayoutPB.Document) {
|
||||
// + button
|
||||
children.add(const HSpace(8.0));
|
||||
children.add(_buildViewAddButton(context));
|
||||
}
|
||||
children.add(const HSpace(4.0));
|
||||
@ -467,7 +465,6 @@ class _SingleInnerViewItemState extends State<SingleInnerViewItem> {
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(left: widget.level * widget.leftPadding),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: children,
|
||||
),
|
||||
),
|
||||
@ -501,7 +498,7 @@ class _SingleInnerViewItemState extends State<SingleInnerViewItem> {
|
||||
widget.view.icon.value,
|
||||
fontSize: 16.0,
|
||||
)
|
||||
: widget.view.defaultIcon();
|
||||
: Opacity(opacity: 0.6, child: widget.view.defaultIcon());
|
||||
|
||||
return AppFlowyPopover(
|
||||
offset: const Offset(20, 0),
|
||||
@ -545,16 +542,18 @@ class _SingleInnerViewItemState extends State<SingleInnerViewItem> {
|
||||
return HSpace(widget.leftPadding);
|
||||
}
|
||||
|
||||
final child = GestureDetector(
|
||||
child: FlowySvg(
|
||||
widget.isExpanded
|
||||
? FlowySvgs.view_item_expand_s
|
||||
: FlowySvgs.view_item_unexpand_s,
|
||||
size: const Size.square(16.0),
|
||||
final child = FlowyHover(
|
||||
child: GestureDetector(
|
||||
child: FlowySvg(
|
||||
widget.isExpanded
|
||||
? FlowySvgs.view_item_expand_s
|
||||
: FlowySvgs.view_item_unexpand_s,
|
||||
size: const Size.square(16.0),
|
||||
),
|
||||
onTap: () => context
|
||||
.read<ViewBloc>()
|
||||
.add(ViewEvent.setIsExpanded(!widget.isExpanded)),
|
||||
),
|
||||
onTap: () => context
|
||||
.read<ViewBloc>()
|
||||
.add(ViewEvent.setIsExpanded(!widget.isExpanded)),
|
||||
);
|
||||
|
||||
if (widget.isHovered != null) {
|
||||
|
@ -91,13 +91,16 @@ class FlowyNavigation extends StatelessWidget {
|
||||
turns: const AlwaysStoppedAnimation(180 / 360),
|
||||
child: FlowyTooltip(
|
||||
richMessage: textSpan,
|
||||
child: FlowyIconButton(
|
||||
width: 24,
|
||||
onPressed: () => context
|
||||
child: Listener(
|
||||
onPointerDown: (event) => context
|
||||
.read<HomeSettingBloc>()
|
||||
.add(const HomeSettingEvent.collapseMenu()),
|
||||
iconPadding: const EdgeInsets.all(2),
|
||||
icon: const FlowySvg(FlowySvgs.hide_menu_s),
|
||||
child: FlowyIconButton(
|
||||
width: 24,
|
||||
onPressed: () {},
|
||||
iconPadding: const EdgeInsets.all(4),
|
||||
icon: const FlowySvg(FlowySvgs.hide_menu_s),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -4,7 +4,6 @@ import 'package:appflowy/startup/startup.dart';
|
||||
import 'package:appflowy/user/application/reminder/reminder_bloc.dart';
|
||||
import 'package:appflowy/workspace/application/menu/sidebar_sections_bloc.dart';
|
||||
import 'package:appflowy/workspace/application/settings/notifications/notification_settings_cubit.dart';
|
||||
import 'package:appflowy/workspace/presentation/home/home_sizes.dart';
|
||||
import 'package:appflowy/workspace/presentation/notifications/notification_dialog.dart';
|
||||
import 'package:appflowy_popover/appflowy_popover.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
@ -43,9 +42,10 @@ class NotificationButton extends StatelessWidget {
|
||||
popupBuilder: (_) =>
|
||||
NotificationDialog(views: views, mutex: mutex),
|
||||
child: SizedBox.square(
|
||||
dimension: HomeSizes.workspaceSectionHeight,
|
||||
dimension: 24.0,
|
||||
child: FlowyButton(
|
||||
useIntrinsicWidth: true,
|
||||
margin: EdgeInsets.zero,
|
||||
text:
|
||||
_buildNotificationIcon(context, state.hasUnreads),
|
||||
),
|
||||
@ -62,8 +62,11 @@ class NotificationButton extends StatelessWidget {
|
||||
Widget _buildNotificationIcon(BuildContext context, bool hasUnreads) {
|
||||
return Stack(
|
||||
children: [
|
||||
const FlowySvg(
|
||||
FlowySvgs.notification_s,
|
||||
const Center(
|
||||
child: FlowySvg(
|
||||
FlowySvgs.notification_s,
|
||||
opacity: 0.7,
|
||||
),
|
||||
),
|
||||
if (hasUnreads)
|
||||
Positioned(
|
||||
|
@ -33,8 +33,9 @@ class ViewFavoriteButton extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(6),
|
||||
child: FlowySvg(
|
||||
isFavorite ? FlowySvgs.unfavorite_s : FlowySvgs.favorite_s,
|
||||
isFavorite ? FlowySvgs.favorited_s : FlowySvgs.favorite_s,
|
||||
size: const Size.square(18),
|
||||
blendMode: null,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2,14 +2,14 @@ import 'package:appflowy/core/helpers/url_launcher.dart';
|
||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy/startup/tasks/rust_sdk.dart';
|
||||
import 'package:appflowy/util/theme_extension.dart';
|
||||
import 'package:appflowy/workspace/presentation/home/toast.dart';
|
||||
import 'package:appflowy/workspace/presentation/widgets/pop_up_action.dart';
|
||||
import 'package:appflowy_popover/appflowy_popover.dart';
|
||||
import 'package:device_info_plus/device_info_plus.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flowy_infra/size.dart';
|
||||
import 'package:flowy_infra_ui/style_widget/button.dart';
|
||||
import 'package:flowy_infra_ui/style_widget/text.dart';
|
||||
import 'package:flowy_infra_ui/widget/flowy_tooltip.dart';
|
||||
import 'package:flowy_infra_ui/widget/spacing.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@ -21,9 +21,8 @@ class QuestionBubble extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const SizedBox(
|
||||
width: 30,
|
||||
height: 30,
|
||||
return const SizedBox.square(
|
||||
dimension: 36.0,
|
||||
child: BubbleActionList(),
|
||||
);
|
||||
}
|
||||
@ -61,24 +60,55 @@ class _BubbleActionListState extends State<BubbleActionList> {
|
||||
);
|
||||
actions.add(FlowyVersionDescription());
|
||||
|
||||
final (color, borderColor, shadowColor, iconColor) =
|
||||
Theme.of(context).isLightMode
|
||||
? (
|
||||
Colors.white,
|
||||
const Color(0x2D454849),
|
||||
const Color(0x14000000),
|
||||
Colors.black,
|
||||
)
|
||||
: (
|
||||
const Color(0xFF242B37),
|
||||
const Color(0x2DFFFFFF),
|
||||
const Color(0x14000000),
|
||||
Colors.white,
|
||||
);
|
||||
|
||||
return PopoverActionList<PopoverAction>(
|
||||
direction: PopoverDirection.topWithRightAligned,
|
||||
actions: actions,
|
||||
offset: const Offset(0, -8),
|
||||
buildChild: (controller) {
|
||||
return FlowyTextButton(
|
||||
'?',
|
||||
tooltip: LocaleKeys.questionBubble_help.tr(),
|
||||
fontWeight: FontWeight.w600,
|
||||
fontColor: fontColor,
|
||||
fillColor: fillColor,
|
||||
hoverColor: Theme.of(context).colorScheme.primary,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
radius: Corners.s10Border,
|
||||
onPressed: () {
|
||||
toggle();
|
||||
controller.show();
|
||||
},
|
||||
return FlowyTooltip(
|
||||
message: LocaleKeys.questionBubble_help.tr(),
|
||||
child: MouseRegion(
|
||||
cursor: SystemMouseCursors.click,
|
||||
child: GestureDetector(
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
decoration: ShapeDecoration(
|
||||
color: color,
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(width: 0.50, color: borderColor),
|
||||
borderRadius: BorderRadius.circular(18),
|
||||
),
|
||||
shadows: [
|
||||
BoxShadow(
|
||||
color: shadowColor,
|
||||
blurRadius: 20,
|
||||
offset: const Offset(0, 8),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: FlowySvg(
|
||||
FlowySvgs.help_center_s,
|
||||
color: iconColor,
|
||||
),
|
||||
),
|
||||
onTap: () => controller.show(),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
onClosed: toggle,
|
||||
|
@ -245,9 +245,10 @@ class HoverButton extends StatelessWidget {
|
||||
HSpace(ActionListSizes.itemHPadding),
|
||||
],
|
||||
Expanded(
|
||||
child: FlowyText.medium(
|
||||
child: FlowyText.regular(
|
||||
name,
|
||||
overflow: TextOverflow.visible,
|
||||
lineHeight: 1.15,
|
||||
),
|
||||
),
|
||||
if (rightIcon != null) ...[
|
||||
|
@ -16,12 +16,14 @@ class UserAvatar extends StatelessWidget {
|
||||
required this.size,
|
||||
required this.fontSize,
|
||||
this.isHovering = false,
|
||||
this.decoration,
|
||||
});
|
||||
|
||||
final String iconUrl;
|
||||
final String name;
|
||||
final double size;
|
||||
final double fontSize;
|
||||
final Decoration? decoration;
|
||||
|
||||
// If true, a border will be applied on top of the avatar
|
||||
final bool isHovering;
|
||||
@ -54,17 +56,18 @@ class UserAvatar extends StatelessWidget {
|
||||
width: size,
|
||||
height: size,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
color: color,
|
||||
shape: BoxShape.circle,
|
||||
border: isHovering
|
||||
? Border.all(
|
||||
color: _darken(color),
|
||||
width: 4,
|
||||
)
|
||||
: null,
|
||||
),
|
||||
child: FlowyText.regular(
|
||||
decoration: decoration ??
|
||||
BoxDecoration(
|
||||
color: color,
|
||||
shape: BoxShape.circle,
|
||||
border: isHovering
|
||||
? Border.all(
|
||||
color: _darken(color),
|
||||
width: 4,
|
||||
)
|
||||
: null,
|
||||
),
|
||||
child: FlowyText.medium(
|
||||
nameInitials,
|
||||
color: Colors.black,
|
||||
fontSize: fontSize,
|
||||
@ -76,15 +79,16 @@ class UserAvatar extends StatelessWidget {
|
||||
return SizedBox.square(
|
||||
dimension: size,
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
border: isHovering
|
||||
? Border.all(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
width: 4,
|
||||
)
|
||||
: null,
|
||||
),
|
||||
decoration: decoration ??
|
||||
BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
border: isHovering
|
||||
? Border.all(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
width: 4,
|
||||
)
|
||||
: null,
|
||||
),
|
||||
child: ClipRRect(
|
||||
borderRadius: Corners.s5Border,
|
||||
child: CircleAvatar(
|
||||
@ -105,15 +109,16 @@ class UserAvatar extends StatelessWidget {
|
||||
return SizedBox.square(
|
||||
dimension: size,
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
border: isHovering
|
||||
? Border.all(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
width: 4,
|
||||
)
|
||||
: null,
|
||||
),
|
||||
decoration: decoration ??
|
||||
BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
border: isHovering
|
||||
? Border.all(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
width: 4,
|
||||
)
|
||||
: null,
|
||||
),
|
||||
child: ClipRRect(
|
||||
borderRadius: Corners.s5Border,
|
||||
child: CircleAvatar(
|
||||
|
@ -33,6 +33,7 @@ class ViewTitleBar extends StatelessWidget {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
return SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: SizedBox(
|
||||
height: 24,
|
||||
child: Row(children: _buildViewTitles(context, ancestors)),
|
||||
@ -165,11 +166,14 @@ class _ViewTitleState extends State<_ViewTitle> {
|
||||
Widget _buildUnEditableViewTitle(BuildContext context, ViewTitleState state) {
|
||||
return Listener(
|
||||
onPointerDown: (_) => context.read<TabsBloc>().openPlugin(widget.view),
|
||||
child: FlowyButton(
|
||||
useIntrinsicWidth: true,
|
||||
margin: const EdgeInsets.symmetric(horizontal: 6.0),
|
||||
onTap: () {},
|
||||
text: _buildIconAndName(state),
|
||||
child: SizedBox(
|
||||
height: 32.0,
|
||||
child: FlowyButton(
|
||||
useIntrinsicWidth: true,
|
||||
margin: const EdgeInsets.symmetric(horizontal: 6.0),
|
||||
onTap: () {},
|
||||
text: _buildIconAndName(state, false),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
@ -194,15 +198,18 @@ class _ViewTitleState extends State<_ViewTitle> {
|
||||
emoji: state.icon,
|
||||
);
|
||||
},
|
||||
child: FlowyButton(
|
||||
useIntrinsicWidth: true,
|
||||
margin: const EdgeInsets.symmetric(horizontal: 6.0),
|
||||
text: _buildIconAndName(state),
|
||||
child: SizedBox(
|
||||
height: 32.0,
|
||||
child: FlowyButton(
|
||||
useIntrinsicWidth: true,
|
||||
margin: const EdgeInsets.symmetric(horizontal: 6.0),
|
||||
text: _buildIconAndName(state, true),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildIconAndName(ViewTitleState state) {
|
||||
Widget _buildIconAndName(ViewTitleState state, bool isEditable) {
|
||||
return SingleChildScrollView(
|
||||
child: Row(
|
||||
children: [
|
||||
@ -211,10 +218,10 @@ class _ViewTitleState extends State<_ViewTitle> {
|
||||
state.icon,
|
||||
fontSize: 14.0,
|
||||
),
|
||||
const HSpace(6.0),
|
||||
const HSpace(4.0),
|
||||
],
|
||||
ConstrainedBox(
|
||||
constraints: const BoxConstraints(),
|
||||
Opacity(
|
||||
opacity: isEditable ? 1.0 : 0.5,
|
||||
child: FlowyText.regular(
|
||||
state.name,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
|
@ -6,19 +6,19 @@ const _white = Color(0xFFFFFFFF);
|
||||
const _lightHover = Color(0xFFe0f8FF);
|
||||
const _lightSelector = Color(0xFFf2fcFF);
|
||||
const _lightBg1 = Color(0xFFf7f8fc);
|
||||
const _lightBg2 = Color(0xFFedeef2);
|
||||
const _lightBg2 = Color(0x0F1F2329);
|
||||
const _lightShader1 = Color(0xFF333333);
|
||||
const _lightShader3 = Color(0xFF828282);
|
||||
const _lightShader5 = Color(0xFFe0e0e0);
|
||||
const _lightShader6 = Color(0xFFf2f2f2);
|
||||
const _lightMain1 = Color(0xFF00bcf0);
|
||||
const _lightTint9 = Color(0xFFe1fbFF);
|
||||
const _darkShader1 = Color(0xE5FFFFFF);
|
||||
const _darkShader1 = Color(0xFF131720);
|
||||
const _darkShader2 = Color(0xFF1A202C);
|
||||
const _darkShader3 = Color(0xFF363D49);
|
||||
const _darkShader5 = Color(0xFFBBC3CD);
|
||||
const _darkShader6 = Color(0xFFF2F2F2);
|
||||
const _darkMain1 = Color(0x19FFFFFF);
|
||||
const _darkMain1 = Color(0xFF00BCF0);
|
||||
const _darkMain2 = Color(0xFF00BCF0);
|
||||
const _darkInput = Color(0xFF282E3A);
|
||||
|
||||
|
@ -84,6 +84,7 @@ class FlowyIconButton extends StatelessWidget {
|
||||
richMessage: richTooltipText,
|
||||
showDuration: Duration.zero,
|
||||
child: RawMaterialButton(
|
||||
clipBehavior: Clip.antiAlias,
|
||||
visualDensity: VisualDensity.compact,
|
||||
hoverElevation: 0,
|
||||
highlightElevation: 0,
|
||||
|
@ -3,8 +3,6 @@ import 'dart:io';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
const String _emojiFontFamily = 'noto color emoji';
|
||||
|
||||
class FlowyText extends StatelessWidget {
|
||||
final String text;
|
||||
final TextOverflow? overflow;
|
||||
@ -138,16 +136,13 @@ class FlowyText extends StatelessWidget {
|
||||
|
||||
var fontFamily = this.fontFamily;
|
||||
var fallbackFontFamily = this.fallbackFontFamily;
|
||||
if (isEmoji && (Platform.isLinux || Platform.isAndroid)) {
|
||||
var fontSize =
|
||||
this.fontSize ?? Theme.of(context).textTheme.bodyMedium!.fontSize!;
|
||||
if (isEmoji && _useNotoColorEmoji) {
|
||||
fontFamily = _loadEmojiFontFamilyIfNeeded();
|
||||
if (fontFamily != null && fallbackFontFamily == null) {
|
||||
fallbackFontFamily = [fontFamily];
|
||||
}
|
||||
}
|
||||
|
||||
var fontSize =
|
||||
this.fontSize ?? Theme.of(context).textTheme.bodyMedium!.fontSize!;
|
||||
if (Platform.isLinux && fontFamily == _emojiFontFamily) {
|
||||
fontSize = fontSize * 0.8;
|
||||
}
|
||||
|
||||
@ -166,7 +161,6 @@ class FlowyText extends StatelessWidget {
|
||||
text,
|
||||
maxLines: maxLines,
|
||||
textAlign: textAlign,
|
||||
strutStyle: strutStyle,
|
||||
style: textStyle,
|
||||
);
|
||||
} else {
|
||||
@ -176,6 +170,14 @@ class FlowyText extends StatelessWidget {
|
||||
textAlign: textAlign,
|
||||
overflow: overflow ?? TextOverflow.clip,
|
||||
style: textStyle,
|
||||
strutStyle: Platform.isMacOS
|
||||
? StrutStyle.fromTextStyle(
|
||||
textStyle,
|
||||
forceStrutHeight: true,
|
||||
leadingDistribution: TextLeadingDistribution.even,
|
||||
height: 1.1,
|
||||
)
|
||||
: null,
|
||||
);
|
||||
}
|
||||
|
||||
@ -190,10 +192,13 @@ class FlowyText extends StatelessWidget {
|
||||
}
|
||||
|
||||
String? _loadEmojiFontFamilyIfNeeded() {
|
||||
if (Platform.isLinux || Platform.isAndroid) {
|
||||
if (_useNotoColorEmoji) {
|
||||
return GoogleFonts.notoColorEmoji().fontFamily;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
bool get _useNotoColorEmoji =>
|
||||
Platform.isLinux || Platform.isAndroid || Platform.isWindows;
|
||||
}
|
||||
|
@ -25,6 +25,8 @@ class FlowyTooltip extends StatelessWidget {
|
||||
final isLightMode = Theme.of(context).brightness == Brightness.light;
|
||||
return Tooltip(
|
||||
margin: margin,
|
||||
verticalOffset: 16.0,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0),
|
||||
decoration: BoxDecoration(
|
||||
color: isLightMode ? const Color(0xE5171717) : const Color(0xE5E5E5E5),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
|
@ -23,6 +23,7 @@ class FlowySvg extends StatelessWidget {
|
||||
this.size,
|
||||
this.color,
|
||||
this.blendMode = BlendMode.srcIn,
|
||||
this.opacity = 1.0,
|
||||
});
|
||||
|
||||
/// The data for the flowy svg. Will be generated by the generator in this
|
||||
@ -46,11 +47,16 @@ class FlowySvg extends StatelessWidget {
|
||||
/// svg widget.
|
||||
final BlendMode? blendMode;
|
||||
|
||||
/// The opacity of the svg
|
||||
///
|
||||
/// The default value is 1.0
|
||||
final double opacity;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final iconColor = color ?? Theme.of(context).iconTheme.color;
|
||||
final iconColor =
|
||||
(color ?? Theme.of(context).iconTheme.color)?.withOpacity(opacity);
|
||||
final textScaleFactor = MediaQuery.textScalerOf(context).scale(1);
|
||||
|
||||
return Transform.scale(
|
||||
scale: textScaleFactor,
|
||||
child: SizedBox(
|
||||
|
@ -37,7 +37,6 @@ void main() {
|
||||
),
|
||||
verify: (bloc) {
|
||||
expect(bloc.state.font, defaultFontFamily);
|
||||
expect(bloc.state.monospaceFont, 'SF Mono');
|
||||
expect(bloc.state.themeMode, ThemeMode.system);
|
||||
},
|
||||
);
|
||||
|
@ -1,17 +1,17 @@
|
||||
import 'package:appflowy/workspace/presentation/settings/pages/settings_workspace_view.dart';
|
||||
import 'package:appflowy/workspace/presentation/settings/shared/settings_radio_select.dart';
|
||||
import 'package:flowy_infra/theme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy/plugins/document/application/document_appearance_cubit.dart';
|
||||
import 'package:appflowy/user/application/user_settings_service.dart';
|
||||
import 'package:appflowy/workspace/application/settings/appearance/appearance_cubit.dart';
|
||||
import 'package:appflowy/workspace/presentation/settings/pages/settings_workspace_view.dart';
|
||||
import 'package:appflowy/workspace/presentation/settings/shared/settings_radio_select.dart';
|
||||
import 'package:appflowy_backend/protobuf/flowy-user/user_setting.pb.dart';
|
||||
import 'package:bloc_test/bloc_test.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flowy_infra/theme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:mocktail/mocktail.dart';
|
||||
import 'package:bloc_test/bloc_test.dart';
|
||||
import 'package:appflowy_backend/protobuf/flowy-user/user_setting.pb.dart';
|
||||
import 'package:appflowy/user/application/user_settings_service.dart';
|
||||
|
||||
import '../util.dart';
|
||||
|
||||
@ -41,7 +41,6 @@ void main() {
|
||||
AppTheme.fallback,
|
||||
appearanceSettings.themeMode,
|
||||
appearanceSettings.font,
|
||||
appearanceSettings.monospaceFont,
|
||||
appearanceSettings.layoutDirection,
|
||||
appearanceSettings.textDirection,
|
||||
appearanceSettings.enableRtlToolbarItems,
|
||||
|
54
frontend/appflowy_tauri/src-tauri/Cargo.lock
generated
@ -162,7 +162,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
|
||||
[[package]]
|
||||
name = "app-error"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
@ -182,7 +182,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "appflowy-ai-client"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
@ -756,7 +756,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "client-api"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"again",
|
||||
"anyhow",
|
||||
@ -803,7 +803,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "client-websocket"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"futures-util",
|
||||
@ -877,7 +877,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -901,7 +901,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-database"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -931,7 +931,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-document"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"collab",
|
||||
@ -950,7 +950,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-entity"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
@ -965,7 +965,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-folder"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
@ -1003,7 +1003,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-plugins"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-stream",
|
||||
@ -1042,7 +1042,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-rt-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
@ -1067,7 +1067,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-rt-protocol"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -1084,7 +1084,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-user"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"collab",
|
||||
@ -1313,7 +1313,7 @@ dependencies = [
|
||||
"cssparser-macros",
|
||||
"dtoa-short",
|
||||
"itoa 1.0.6",
|
||||
"phf 0.8.0",
|
||||
"phf 0.11.2",
|
||||
"smallvec",
|
||||
]
|
||||
|
||||
@ -1424,7 +1424,7 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
|
||||
[[package]]
|
||||
name = "database-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -2129,12 +2129,14 @@ dependencies = [
|
||||
"flowy-folder-pub",
|
||||
"flowy-notification",
|
||||
"flowy-search-pub",
|
||||
"flowy-sqlite",
|
||||
"lazy_static",
|
||||
"lib-dispatch",
|
||||
"lib-infra",
|
||||
"nanoid",
|
||||
"parking_lot 0.12.1",
|
||||
"protobuf",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"strum_macros 0.21.1",
|
||||
"tokio",
|
||||
@ -2832,7 +2834,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gotrue"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"futures-util",
|
||||
@ -2849,7 +2851,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gotrue-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -3281,7 +3283,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "infra"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"reqwest",
|
||||
@ -4602,18 +4604,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pin-project"
|
||||
version = "1.1.3"
|
||||
version = "1.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422"
|
||||
checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3"
|
||||
dependencies = [
|
||||
"pin-project-internal",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-internal"
|
||||
version = "1.1.3"
|
||||
version = "1.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
|
||||
checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -4784,7 +4786,7 @@ checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"heck 0.4.1",
|
||||
"itertools 0.10.5",
|
||||
"itertools 0.11.0",
|
||||
"log",
|
||||
"multimap",
|
||||
"once_cell",
|
||||
@ -4805,7 +4807,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"itertools 0.10.5",
|
||||
"itertools 0.11.0",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.47",
|
||||
@ -5769,16 +5771,18 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "shared-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
"appflowy-ai-client",
|
||||
"bytes",
|
||||
"chrono",
|
||||
"collab-entity",
|
||||
"database-entity",
|
||||
"futures",
|
||||
"gotrue-entity",
|
||||
"pin-project",
|
||||
"reqwest",
|
||||
"serde",
|
||||
"serde_json",
|
||||
|
@ -52,7 +52,7 @@ collab-user = { version = "0.2" }
|
||||
# Run the script:
|
||||
# scripts/tool/update_client_api_rev.sh new_rev_id
|
||||
# ⚠️⚠️⚠️️
|
||||
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "b36715dc2427e23a15fa81c629e1817d3dbf1e1a" }
|
||||
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "3f55cea9ca386875a1668ef30600c83cd6a1ffe2" }
|
||||
|
||||
[dependencies]
|
||||
serde_json.workspace = true
|
||||
@ -106,10 +106,10 @@ default = ["custom-protocol"]
|
||||
custom-protocol = ["tauri/custom-protocol"]
|
||||
|
||||
[patch.crates-io]
|
||||
collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
218
frontend/appflowy_web/wasm-libs/Cargo.lock
generated
@ -216,7 +216,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
|
||||
[[package]]
|
||||
name = "app-error"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
@ -236,7 +236,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "appflowy-ai-client"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
@ -562,7 +562,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "client-api"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"again",
|
||||
"anyhow",
|
||||
@ -609,7 +609,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "client-websocket"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"futures-util",
|
||||
@ -653,7 +653,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -677,7 +677,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-document"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"collab",
|
||||
@ -696,7 +696,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-entity"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
@ -711,7 +711,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-folder"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
@ -749,7 +749,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-plugins"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-stream",
|
||||
@ -787,7 +787,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-rt-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
@ -812,7 +812,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-rt-protocol"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -829,7 +829,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-user"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"collab",
|
||||
@ -1026,7 +1026,7 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5"
|
||||
[[package]]
|
||||
name = "database-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -1091,6 +1091,52 @@ version = "1.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3ae2a35373c5c74340b79ae6780b498b2b183915ec5dacf263aac5a099bf485a"
|
||||
|
||||
[[package]]
|
||||
name = "diesel"
|
||||
version = "2.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "62c6fcf842f17f8c78ecf7c81d75c5ce84436b41ee07e03f490fbb5f5a8731d8"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"diesel_derives",
|
||||
"libsqlite3-sys",
|
||||
"r2d2",
|
||||
"serde_json",
|
||||
"time",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "diesel_derives"
|
||||
version = "2.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ef8337737574f55a468005a83499da720f20c65586241ffea339db9ecdfd2b44"
|
||||
dependencies = [
|
||||
"diesel_table_macro_syntax",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.48",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "diesel_migrations"
|
||||
version = "2.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6036b3f0120c5961381b570ee20a02432d7e2d27ea60de9578799cf9156914ac"
|
||||
dependencies = [
|
||||
"diesel",
|
||||
"migrations_internals",
|
||||
"migrations_macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "diesel_table_macro_syntax"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5"
|
||||
dependencies = [
|
||||
"syn 2.0.48",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "digest"
|
||||
version = "0.10.7"
|
||||
@ -1286,7 +1332,7 @@ dependencies = [
|
||||
"similar 1.3.0",
|
||||
"syn 1.0.109",
|
||||
"tera",
|
||||
"toml",
|
||||
"toml 0.5.11",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
@ -1421,12 +1467,14 @@ dependencies = [
|
||||
"flowy-folder-pub",
|
||||
"flowy-notification",
|
||||
"flowy-search-pub",
|
||||
"flowy-sqlite",
|
||||
"lazy_static",
|
||||
"lib-dispatch",
|
||||
"lib-infra",
|
||||
"nanoid",
|
||||
"parking_lot 0.12.1",
|
||||
"protobuf",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"strum_macros 0.21.1",
|
||||
"tokio",
|
||||
@ -1532,6 +1580,24 @@ dependencies = [
|
||||
"serde_repr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "flowy-sqlite"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"diesel",
|
||||
"diesel_derives",
|
||||
"diesel_migrations",
|
||||
"libsqlite3-sys",
|
||||
"parking_lot 0.12.1",
|
||||
"r2d2",
|
||||
"scheduled-thread-pool",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "flowy-storage"
|
||||
version = "0.1.0"
|
||||
@ -1815,7 +1881,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gotrue"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"futures-util",
|
||||
@ -1832,7 +1898,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gotrue-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -2133,7 +2199,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "infra"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"reqwest",
|
||||
@ -2321,6 +2387,17 @@ dependencies = [
|
||||
"zstd-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libsqlite3-sys"
|
||||
version = "0.27.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"pkg-config",
|
||||
"vcpkg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libz-sys"
|
||||
version = "1.1.14"
|
||||
@ -2439,6 +2516,27 @@ version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3"
|
||||
|
||||
[[package]]
|
||||
name = "migrations_internals"
|
||||
version = "2.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0f23f71580015254b020e856feac3df5878c2c7a8812297edd6c0a485ac9dada"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"toml 0.7.8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "migrations_macros"
|
||||
version = "2.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cce3325ac70e67bbab5bd837a31cae01f1a6db64e0e744a33cb03a543469ef08"
|
||||
dependencies = [
|
||||
"migrations_internals",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mime"
|
||||
version = "0.3.17"
|
||||
@ -2947,18 +3045,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pin-project"
|
||||
version = "1.1.4"
|
||||
version = "1.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0"
|
||||
checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3"
|
||||
dependencies = [
|
||||
"pin-project-internal",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-internal"
|
||||
version = "1.1.4"
|
||||
version = "1.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690"
|
||||
checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -3237,6 +3335,17 @@ dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "r2d2"
|
||||
version = "0.8.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93"
|
||||
dependencies = [
|
||||
"log",
|
||||
"parking_lot 0.12.1",
|
||||
"scheduled-thread-pool",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.7.3"
|
||||
@ -3545,6 +3654,15 @@ dependencies = [
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "scheduled-thread-pool"
|
||||
version = "0.2.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19"
|
||||
dependencies = [
|
||||
"parking_lot 0.12.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "scoped-tls"
|
||||
version = "1.0.1"
|
||||
@ -3712,6 +3830,15 @@ dependencies = [
|
||||
"syn 2.0.48",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_spanned"
|
||||
version = "0.6.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_urlencoded"
|
||||
version = "0.7.1"
|
||||
@ -3773,16 +3900,18 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "shared-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
"appflowy-ai-client",
|
||||
"bytes",
|
||||
"chrono",
|
||||
"collab-entity",
|
||||
"database-entity",
|
||||
"futures",
|
||||
"gotrue-entity",
|
||||
"pin-project",
|
||||
"reqwest",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@ -4252,6 +4381,40 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.7.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_spanned",
|
||||
"toml_datetime",
|
||||
"toml_edit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_datetime"
|
||||
version = "0.6.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_edit"
|
||||
version = "0.19.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"serde",
|
||||
"serde_spanned",
|
||||
"toml_datetime",
|
||||
"winnow",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tower-service"
|
||||
version = "0.3.2"
|
||||
@ -4941,6 +5104,15 @@ version = "0.52.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
|
||||
|
||||
[[package]]
|
||||
name = "winnow"
|
||||
version = "0.5.40"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winreg"
|
||||
version = "0.50.0"
|
||||
@ -5039,4 +5211,4 @@ dependencies = [
|
||||
[[patch.unused]]
|
||||
name = "collab-database"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
|
@ -55,7 +55,7 @@ yrs = "0.18.8"
|
||||
# Run the script:
|
||||
# scripts/tool/update_client_api_rev.sh new_rev_id
|
||||
# ⚠️⚠️⚠️️
|
||||
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "b36715dc2427e23a15fa81c629e1817d3dbf1e1a" }
|
||||
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "3f55cea9ca386875a1668ef30600c83cd6a1ffe2" }
|
||||
|
||||
|
||||
|
||||
@ -70,10 +70,10 @@ opt-level = 3
|
||||
codegen-units = 1
|
||||
|
||||
[patch.crates-io]
|
||||
collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
39
frontend/appflowy_web_app/src-tauri/Cargo.lock
generated
@ -153,7 +153,7 @@ checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247"
|
||||
[[package]]
|
||||
name = "app-error"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
@ -173,7 +173,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "appflowy-ai-client"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
@ -730,7 +730,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "client-api"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"again",
|
||||
"anyhow",
|
||||
@ -777,7 +777,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "client-websocket"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"futures-util",
|
||||
@ -860,7 +860,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -884,7 +884,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-database"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -914,7 +914,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-document"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"collab",
|
||||
@ -933,7 +933,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-entity"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
@ -948,7 +948,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-folder"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
@ -986,7 +986,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-plugins"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-stream",
|
||||
@ -1025,7 +1025,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-rt-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
@ -1050,7 +1050,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-rt-protocol"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -1067,7 +1067,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-user"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"collab",
|
||||
@ -1411,7 +1411,7 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5"
|
||||
[[package]]
|
||||
name = "database-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -2166,6 +2166,7 @@ dependencies = [
|
||||
"flowy-folder-pub",
|
||||
"flowy-notification",
|
||||
"flowy-search-pub",
|
||||
"flowy-sqlite",
|
||||
"lazy_static",
|
||||
"lib-dispatch",
|
||||
"lib-infra",
|
||||
@ -2906,7 +2907,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gotrue"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"futures-util",
|
||||
@ -2923,7 +2924,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gotrue-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -3360,7 +3361,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "infra"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"reqwest",
|
||||
@ -5864,16 +5865,18 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "shared-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
"appflowy-ai-client",
|
||||
"bytes",
|
||||
"chrono",
|
||||
"collab-entity",
|
||||
"database-entity",
|
||||
"futures",
|
||||
"gotrue-entity",
|
||||
"pin-project",
|
||||
"reqwest",
|
||||
"serde",
|
||||
"serde_json",
|
||||
|
@ -52,7 +52,7 @@ collab-user = { version = "0.2" }
|
||||
# Run the script:
|
||||
# scripts/tool/update_client_api_rev.sh new_rev_id
|
||||
# ⚠️⚠️⚠️️
|
||||
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "b36715dc2427e23a15fa81c629e1817d3dbf1e1a" }
|
||||
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "3f55cea9ca386875a1668ef30600c83cd6a1ffe2" }
|
||||
|
||||
[dependencies]
|
||||
serde_json.workspace = true
|
||||
@ -107,10 +107,10 @@ default = ["custom-protocol"]
|
||||
custom-protocol = ["tauri/custom-protocol"]
|
||||
|
||||
[patch.crates-io]
|
||||
collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
@ -1,4 +1 @@
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M17 3.33782C15.5291 2.48697 13.8214 2 12 2C6.47715 2 2 6.47715 2 12C2 13.5997 2.37562 15.1116 3.04346 16.4525C3.22094 16.8088 3.28001 17.2161 3.17712 17.6006L2.58151 19.8267C2.32295 20.793 3.20701 21.677 4.17335 21.4185L6.39939 20.8229C6.78393 20.72 7.19121 20.7791 7.54753 20.9565C8.88837 21.6244 10.4003 22 12 22C17.5228 22 22 17.5228 22 12C22 10.1786 21.513 8.47087 20.6622 7" stroke="#171717" stroke-opacity="0.7" stroke-width="1.125" stroke-linecap="round"/>
|
||||
<path d="M8 12H8.009M11.991 12H12M15.991 12H16" stroke="#171717" stroke-opacity="0.7" stroke-width="1.05" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<svg width="64px" height="64px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M12 16V8" stroke="#333333" stroke-width="1.656" stroke-linecap="round" style="--darkreader-inline-stroke: #c8c3bc;" data-darkreader-inline-stroke=""></path> <path d="M8 14V10" stroke="#333333" stroke-width="1.656" stroke-linecap="round" style="--darkreader-inline-stroke: #c8c3bc;" data-darkreader-inline-stroke=""></path> <path d="M16 14V10" stroke="#333333" stroke-width="1.656" stroke-linecap="round" style="--darkreader-inline-stroke: #c8c3bc;" data-darkreader-inline-stroke=""></path> <path d="M17 3.33782C15.5291 2.48697 13.8214 2 12 2C6.47715 2 2 6.47715 2 12C2 13.5997 2.37562 15.1116 3.04346 16.4525C3.22094 16.8088 3.28001 17.2161 3.17712 17.6006L2.58151 19.8267C2.32295 20.793 3.20701 21.677 4.17335 21.4185L6.39939 20.8229C6.78393 20.72 7.19121 20.7791 7.54753 20.9565C8.88837 21.6244 10.4003 22 12 22C17.5228 22 22 17.5228 22 12C22 10.1786 21.513 8.47087 20.6622 7" stroke="#333333" stroke-width="1.656" stroke-linecap="round" style="--darkreader-inline-stroke: #c8c3bc;" data-darkreader-inline-stroke=""></path> </g></svg>
|
Before Width: | Height: | Size: 735 B After Width: | Height: | Size: 1.3 KiB |
3
frontend/resources/flowy_icons/16x/favorited.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.2967 2.63248L11.6167 5.27248C11.7967 5.63998 12.2767 5.99248 12.6817 6.05998L15.0742 6.45748C16.6042 6.71248 16.9642 7.82248 15.8617 8.91748L14.0017 10.7775C13.6867 11.0925 13.5142 11.7 13.6117 12.135L14.1442 14.4375C14.5642 16.26 13.5967 16.965 11.9842 16.0125L9.7417 14.685C9.3367 14.445 8.6692 14.445 8.2567 14.685L6.0142 16.0125C4.4092 16.965 3.4342 16.2525 3.8542 14.4375L4.3867 12.135C4.4842 11.7 4.3117 11.0925 3.9967 10.7775L2.1367 8.91748C1.0417 7.82248 1.3942 6.71248 2.9242 6.45748L5.3167 6.05998C5.7142 5.99248 6.1942 5.63998 6.3742 5.27248L7.6942 2.63248C8.4142 1.19998 9.5842 1.19998 10.2967 2.63248Z" fill="#FFBA00"/>
|
||||
</svg>
|
After Width: | Height: | Size: 749 B |
11
frontend/resources/flowy_icons/16x/help_center.svg
Normal file
@ -0,0 +1,11 @@
|
||||
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_859_40861)">
|
||||
<path d="M8.00207 15.9668C3.84348 15.9668 0.472656 12.596 0.472656 8.43737C0.472656 4.27878 3.84348 0.907959 8.00207 0.907959C12.1607 0.907959 15.5315 4.27878 15.5315 8.43737C15.5315 12.596 12.1607 15.9668 8.00207 15.9668ZM8.00207 15.0256C11.6407 15.0256 14.5903 12.076 14.5903 8.43737C14.5903 4.79878 11.6407 1.84914 8.00207 1.84914C4.36348 1.84914 1.41383 4.79878 1.41383 8.43737C1.41383 12.076 4.36348 15.0256 8.00207 15.0256Z" fill="#171717" stroke="black" stroke-width="0.133333"/>
|
||||
<path d="M7.96863 12.6016C7.78728 12.6016 7.61337 12.5295 7.48513 12.4013C7.3569 12.2731 7.28486 12.0992 7.28486 11.9178C7.28486 11.7365 7.3569 11.5626 7.48513 11.4343C7.61337 11.3061 7.78728 11.2341 7.96863 11.2341C8.14997 11.2341 8.32389 11.3061 8.45212 11.4343C8.58035 11.5626 8.65239 11.7365 8.65239 11.9178C8.65239 12.0992 8.58035 12.2731 8.45212 12.4013C8.32389 12.5295 8.14997 12.6016 7.96863 12.6016ZM6.12016 7.2157C6.05257 7.21522 5.98585 7.20044 5.92438 7.17233C5.86292 7.14423 5.80809 7.10344 5.76351 7.05263C5.71893 7.00183 5.68561 6.94217 5.66572 6.87757C5.64584 6.81297 5.63986 6.7449 5.64816 6.67782C5.67922 6.41194 5.72863 6.19453 5.79639 6.02559C5.91127 5.74558 6.08998 5.49629 6.31828 5.29759C6.55006 5.08809 6.82166 4.92741 7.11686 4.82512C7.41609 4.72254 7.73043 4.671 8.04675 4.67265C8.70557 4.67265 9.25381 4.86653 9.69239 5.25476C10.131 5.64159 10.3507 6.15829 10.3507 6.803C10.3507 7.09288 10.2943 7.35547 10.1813 7.59076C10.0693 7.82653 9.83028 8.12017 9.46463 8.47123C9.09804 8.82276 8.85616 9.07265 8.73616 9.22135C8.61183 9.3793 8.51973 9.56014 8.4651 9.75359C8.43216 9.86229 8.40863 9.99076 8.39592 10.1385C8.37334 10.3879 8.17286 10.5856 7.92251 10.5856C7.85592 10.5852 7.79014 10.5709 7.72937 10.5436C7.66861 10.5164 7.6142 10.4768 7.5696 10.4273C7.52501 10.3778 7.49122 10.3196 7.47039 10.2564C7.44956 10.1931 7.44215 10.1262 7.44863 10.0599C7.4651 9.88865 7.49004 9.73947 7.52486 9.61241C7.58933 9.37006 7.68722 9.15829 7.81804 8.97712C7.94839 8.79547 8.18369 8.52912 8.52392 8.17759C8.86463 7.82653 9.08392 7.57053 9.18275 7.41194C9.27969 7.25241 9.38181 6.99312 9.38181 6.67782C9.38181 6.36253 9.21569 6.10606 8.99216 5.86323C8.76722 5.62041 8.4411 5.49853 8.01333 5.49853C7.17851 5.49853 6.7051 5.92817 6.59404 6.78747C6.56251 7.02935 6.3658 7.2157 6.12204 7.2157H6.12016Z" fill="#171717" stroke="black" stroke-width="0.133333"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_859_40861">
|
||||
<rect width="16" height="16" fill="white" transform="translate(0 0.4375)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 2.6 KiB |
5
frontend/resources/flowy_icons/16x/icon_board.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5.89999 13.8666L5.89999 3.36531L5.89999 2.1333H3.59999C2.49542 2.1333 1.59999 3.02874 1.59999 4.1333L1.59999 11.8666C1.59999 12.9712 2.49542 13.8666 3.59999 13.8666H5.89999Z" stroke="#171717" stroke-width="1.1" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M5.89999 2.1333V12.6346V13.8666H10.2V12.6346V2.1333H5.89999Z" stroke="#171717" stroke-width="1.1" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M10.2 2.1333V12.6346V13.8666H12.5C13.6046 13.8666 14.5 12.9712 14.5 11.8666V4.1333C14.5 3.02873 13.6046 2.1333 12.5 2.1333H10.2Z" stroke="#171717" stroke-width="1.1" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
After Width: | Height: | Size: 753 B |
3
frontend/resources/flowy_icons/16x/icon_calendar.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.5522 1.33329C11.5522 1.02954 11.3059 0.783295 11.0022 0.783295C10.6984 0.783295 10.4522 1.02954 10.4522 1.33329V2.01127H5.75V1.33341C5.75 1.02965 5.50376 0.783409 5.2 0.783409C4.89624 0.783409 4.65 1.02965 4.65 1.33341V2.01127H3.66667C2.19391 2.01127 1 3.20518 1 4.67794V12C1 13.4727 2.19391 14.6666 3.66667 14.6666H12.3333C13.8061 14.6666 15 13.4727 15 12V4.67794C15 3.20518 13.8061 2.01127 12.3333 2.01127H11.5522V1.33329ZM10.4522 3.11127V3.48019C10.4522 3.78394 10.6984 4.03019 11.0022 4.03019C11.3059 4.03019 11.5522 3.78394 11.5522 3.48019V3.11127H12.3333C13.1986 3.11127 13.9 3.81269 13.9 4.67794V5.85763H2.1V4.67794C2.1 3.81269 2.80142 3.11127 3.66667 3.11127H4.65V3.4803C4.65 3.78406 4.89624 4.0303 5.2 4.0303C5.50376 4.0303 5.75 3.78406 5.75 3.4803V3.11127H10.4522ZM2.1 6.95763V12C2.1 12.8652 2.80142 13.5666 3.66667 13.5666H12.3333C13.1986 13.5666 13.9 12.8652 13.9 12V6.95763H2.1Z" fill="#171717"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.0 KiB |
4
frontend/resources/flowy_icons/16x/icon_document.svg
Normal file
@ -0,0 +1,4 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13.9024 6.7V10.2122C13.9024 13.6321 13.0245 15 10.0489 15H5.84803C2.87244 15 2 13.6321 2 10.2122V6.10841C2 2.68856 3.19024 1.32062 6.16583 1.32062H8.78861" stroke="#171717" stroke-width="1.1" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M13.8503 6.6332C13.9081 6.69759 13.8624 6.8 13.7759 6.8H11.419C9.63363 6.8 8.79428 6.02268 8.79428 3.95962V1.52225C8.79428 1.33882 9.0206 1.25215 9.14312 1.38866L13.8503 6.6332Z" stroke="#171717" stroke-width="1.1" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
After Width: | Height: | Size: 627 B |
3
frontend/resources/flowy_icons/16x/icon_grid.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.75 2.6H12.8C13.4075 2.6 13.9 3.09249 13.9 3.7V5.31699H6.75V2.6ZM6.75 6.41699H13.9V9.58256H6.75V6.41699ZM5.65 9.58256V6.41699H2.1V9.58256H5.65ZM2.1 10.6826H5.65V13.4H3.2C2.59249 13.4 2.1 12.9075 2.1 12.3V10.6826ZM6.75 10.6826H13.9V12.3C13.9 12.9075 13.4075 13.4 12.8 13.4H6.75V10.6826ZM5.65 2.6V5.31699H2.1V3.7C2.1 3.09249 2.59249 2.6 3.2 2.6H5.65ZM1 3.7C1 2.48497 1.98497 1.5 3.2 1.5H12.8C14.015 1.5 15 2.48497 15 3.7V12.3C15 13.515 14.015 14.5 12.8 14.5H3.2C1.98497 14.5 1 13.515 1 12.3V3.7Z" fill="#171717"/>
|
||||
</svg>
|
After Width: | Height: | Size: 666 B |
5
frontend/resources/flowy_icons/16x/icon_import.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11.2701 5.93359C13.9185 6.14536 15 7.40916 15 10.1758V10.2646C15 13.3182 13.6831 14.5411 10.3946 14.5411H5.60536C2.31687 14.5411 1 13.3182 1 10.2646V10.1758C1 7.42965 2.06674 6.16586 4.67105 5.94043" stroke="#171717" stroke-width="1.0247" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M8 1.33334V9.92001" stroke="#171717" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M10.2323 8.43359L7.99896 10.6669L5.76562 8.43359" stroke="#171717" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
After Width: | Height: | Size: 621 B |
@ -1,8 +1,3 @@
|
||||
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<mask id="path-1-outside-1_598_58130" maskUnits="userSpaceOnUse" x="1.33203" y="3" width="8" height="5" fill="black">
|
||||
<rect fill="white" x="1.33203" y="3" width="8" height="5"/>
|
||||
<path d="M8.20999 7.62796C8.04727 7.79068 7.78346 7.79068 7.62074 7.62796L4.9987 5.00592L2.37666 7.62796C2.21394 7.79068 1.95012 7.79068 1.7874 7.62796C1.62468 7.46524 1.62468 7.20142 1.7874 7.03871L4.70407 4.12204C4.78221 4.0439 4.88819 4 4.9987 4C5.1092 4 5.21519 4.0439 5.29333 4.12204L8.20999 7.03871C8.37271 7.20142 8.37271 7.46524 8.20999 7.62796Z"/>
|
||||
</mask>
|
||||
<path d="M8.20999 7.62796C8.04727 7.79068 7.78346 7.79068 7.62074 7.62796L4.9987 5.00592L2.37666 7.62796C2.21394 7.79068 1.95012 7.79068 1.7874 7.62796C1.62468 7.46524 1.62468 7.20142 1.7874 7.03871L4.70407 4.12204C4.78221 4.0439 4.88819 4 4.9987 4C5.1092 4 5.21519 4.0439 5.29333 4.12204L8.20999 7.03871C8.37271 7.20142 8.37271 7.46524 8.20999 7.62796Z" fill="#171717"/>
|
||||
<path d="M7.62074 7.62796L7.67966 7.56904L7.62074 7.62796ZM8.20999 7.62796L8.15107 7.56904H8.15107L8.20999 7.62796ZM4.9987 5.00592L4.93977 4.947C4.9554 4.93137 4.9766 4.92259 4.9987 4.92259C5.0208 4.92259 5.042 4.93137 5.05762 4.947L4.9987 5.00592ZM2.37666 7.62796L2.31773 7.56904L2.37666 7.62796ZM1.7874 7.62796L1.84633 7.56904L1.7874 7.62796ZM1.7874 7.03871L1.84633 7.09763L1.7874 7.03871ZM4.70407 4.12204L4.64514 4.06311V4.06311L4.70407 4.12204ZM5.29333 4.12204L5.2344 4.18096L5.2344 4.18096L5.29333 4.12204ZM8.20999 7.03871L8.26892 6.97978L8.20999 7.03871ZM7.67966 7.56904C7.80984 7.69921 8.02089 7.69921 8.15107 7.56904L8.26892 7.68689C8.07366 7.88215 7.75707 7.88215 7.56181 7.68689L7.67966 7.56904ZM5.05762 4.947L7.67966 7.56904L7.56181 7.68689L4.93977 5.06485L5.05762 4.947ZM2.31773 7.56904L4.93977 4.947L5.05762 5.06485L2.43558 7.68689L2.31773 7.56904ZM1.84633 7.56904C1.9765 7.69921 2.18756 7.69921 2.31773 7.56904L2.43558 7.68689C2.24032 7.88215 1.92374 7.88215 1.72848 7.68689L1.84633 7.56904ZM1.84633 7.09763C1.71615 7.22781 1.71615 7.43886 1.84633 7.56904L1.72848 7.68689C1.53322 7.49163 1.53322 7.17504 1.72848 6.97978L1.84633 7.09763ZM4.763 4.18096L1.84633 7.09763L1.72848 6.97978L4.64514 4.06311L4.763 4.18096ZM4.9987 4.08333C4.91029 4.08333 4.82551 4.11845 4.763 4.18096L4.64514 4.06311C4.73891 3.96935 4.86609 3.91667 4.9987 3.91667V4.08333ZM5.2344 4.18096C5.17189 4.11845 5.0871 4.08333 4.9987 4.08333V3.91667C5.13131 3.91667 5.25848 3.96935 5.35225 4.06311L5.2344 4.18096ZM8.15107 7.09763L5.2344 4.18096L5.35225 4.06311L8.26892 6.97978L8.15107 7.09763ZM8.15107 7.56904C8.28124 7.43886 8.28124 7.22781 8.15107 7.09763L8.26892 6.97978C8.46418 7.17504 8.46418 7.49163 8.26892 7.68689L8.15107 7.56904Z" fill="#171717" fill-opacity="0.8" mask="url(#path-1-outside-1_598_58130)"/>
|
||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5.25 9.5L8.67929 6.07071C8.71834 6.03166 8.71834 5.96834 8.67929 5.92929L5.25 2.5" stroke="#171717" stroke-width="1.2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 257 B |
@ -1,8 +1,3 @@
|
||||
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<mask id="path-1-outside-1_628_27017" maskUnits="userSpaceOnUse" x="0.667969" y="4" width="8" height="5" fill="black">
|
||||
<rect fill="white" x="0.667969" y="4" width="8" height="5"/>
|
||||
<path d="M1.79001 4.37204C1.95273 4.20932 2.21654 4.20932 2.37926 4.37204L5.0013 6.99408L7.62334 4.37204C7.78606 4.20932 8.04988 4.20932 8.2126 4.37204C8.37532 4.53476 8.37532 4.79858 8.2126 4.96129L5.29593 7.87796C5.21779 7.9561 5.11181 8 5.0013 8C4.8908 8 4.78481 7.9561 4.70667 7.87796L1.79001 4.96129C1.62729 4.79858 1.62729 4.53476 1.79001 4.37204Z"/>
|
||||
</mask>
|
||||
<path d="M1.79001 4.37204C1.95273 4.20932 2.21654 4.20932 2.37926 4.37204L5.0013 6.99408L7.62334 4.37204C7.78606 4.20932 8.04988 4.20932 8.2126 4.37204C8.37532 4.53476 8.37532 4.79858 8.2126 4.96129L5.29593 7.87796C5.21779 7.9561 5.11181 8 5.0013 8C4.8908 8 4.78481 7.9561 4.70667 7.87796L1.79001 4.96129C1.62729 4.79858 1.62729 4.53476 1.79001 4.37204Z" fill="#171717"/>
|
||||
<path d="M2.37926 4.37204L2.32034 4.43096L2.37926 4.37204ZM1.79001 4.37204L1.84893 4.43096H1.84893L1.79001 4.37204ZM5.0013 6.99408L5.06023 7.053C5.0446 7.06863 5.0234 7.07741 5.0013 7.07741C4.9792 7.07741 4.958 7.06863 4.94238 7.053L5.0013 6.99408ZM7.62334 4.37204L7.68227 4.43096L7.62334 4.37204ZM8.2126 4.37204L8.15367 4.43096L8.2126 4.37204ZM8.2126 4.96129L8.15367 4.90237L8.2126 4.96129ZM5.29593 7.87796L5.35486 7.93689V7.93689L5.29593 7.87796ZM4.70667 7.87796L4.7656 7.81904L4.7656 7.81904L4.70667 7.87796ZM1.79001 4.96129L1.73108 5.02022L1.79001 4.96129ZM2.32034 4.43096C2.19016 4.30079 1.97911 4.30079 1.84893 4.43096L1.73108 4.31311C1.92634 4.11785 2.24293 4.11785 2.43819 4.31311L2.32034 4.43096ZM4.94238 7.053L2.32034 4.43096L2.43819 4.31311L5.06023 6.93515L4.94238 7.053ZM7.68227 4.43096L5.06023 7.053L4.94238 6.93515L7.56442 4.31311L7.68227 4.43096ZM8.15367 4.43096C8.0235 4.30079 7.81244 4.30079 7.68227 4.43096L7.56442 4.31311C7.75968 4.11785 8.07626 4.11785 8.27152 4.31311L8.15367 4.43096ZM8.15367 4.90237C8.28385 4.77219 8.28385 4.56114 8.15367 4.43096L8.27152 4.31311C8.46678 4.50837 8.46678 4.82496 8.27152 5.02022L8.15367 4.90237ZM5.237 7.81904L8.15367 4.90237L8.27152 5.02022L5.35486 7.93689L5.237 7.81904ZM5.0013 7.91667C5.08971 7.91667 5.17449 7.88155 5.237 7.81904L5.35486 7.93689C5.26109 8.03065 5.13391 8.08333 5.0013 8.08333V7.91667ZM4.7656 7.81904C4.82811 7.88155 4.9129 7.91667 5.0013 7.91667V8.08333C4.86869 8.08333 4.74152 8.03065 4.64775 7.93689L4.7656 7.81904ZM1.84893 4.90237L4.7656 7.81904L4.64775 7.93689L1.73108 5.02022L1.84893 4.90237ZM1.84893 4.43096C1.71876 4.56114 1.71876 4.77219 1.84893 4.90237L1.73108 5.02022C1.53582 4.82496 1.53582 4.50837 1.73108 4.31311L1.84893 4.43096Z" fill="#171717" fill-opacity="0.8" mask="url(#path-1-outside-1_628_27017)"/>
|
||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.5 5.5L5.92929 8.92929C5.96834 8.96834 6.03166 8.96834 6.07071 8.92929L9.5 5.5" stroke="#171717" stroke-width="1.2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 255 B |
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13.2967 5.63248L14.6167 8.27248C14.7967 8.63998 15.2767 8.99248 15.6817 9.05998L18.0742 9.45748C19.6042 9.71248 19.9642 10.8225 18.8617 11.9175L17.0017 13.7775C16.6867 14.0925 16.5142 14.7 16.6117 15.135L17.1442 17.4375C17.5642 19.26 16.5967 19.965 14.9842 19.0125L12.7417 17.685C12.3367 17.445 11.6692 17.445 11.2567 17.685L9.0142 19.0125C7.4092 19.965 6.4342 19.2525 6.8542 17.4375L7.3867 15.135C7.4842 14.7 7.3117 14.0925 6.9967 13.7775L5.1367 11.9175C4.0417 10.8225 4.3942 9.71248 5.9242 9.45748L8.3167 9.05998C8.7142 8.99248 9.1942 8.63998 9.3742 8.27248L10.6942 5.63248C11.4142 4.19998 12.5842 4.19998 13.2967 5.63248Z" fill="#FFBA00"/>
|
||||
</svg>
|
After Width: | Height: | Size: 756 B |
5
frontend/resources/flowy_icons/24x/new_app.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="3.75" y="3.75" width="16.5" height="16.5" rx="8.25" fill="#00BCF0"/>
|
||||
<rect x="11.3984" y="7.5" width="1.3" height="9" rx="0.65" fill="white"/>
|
||||
<rect x="16.5" y="11.4" width="1.3" height="9" rx="0.65" transform="rotate(90 16.5 11.4)" fill="white"/>
|
||||
</svg>
|
After Width: | Height: | Size: 360 B |
@ -0,0 +1,9 @@
|
||||
<svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g opacity="0.7">
|
||||
<path d="M18 8.48665C15.78 8.26665 13.5467 8.15332 11.32 8.15332C10 8.15332 8.68 8.21999 7.36 8.35332L6 8.48665" stroke="#171717" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M9.66797 7.81325L9.81464 6.93992C9.9213 6.30659 10.0013 5.83325 11.128 5.83325H12.8746C14.0013 5.83325 14.088 6.33325 14.188 6.94659L14.3346 7.81325" stroke="#171717" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M16.5669 10.5933L16.1336 17.3066C16.0603 18.3533 16.0003 19.1666 14.1403 19.1666H9.86026C8.00026 19.1666 7.94026 18.3533 7.86693 17.3066L7.43359 10.5933" stroke="#171717" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M10.8867 15.5H13.1067" stroke="#171717" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M10.332 12.8333H13.6654" stroke="#171717" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 957 B |
@ -153,9 +153,13 @@
|
||||
"unsupportedCloudPrompt": "This feature is only available when using AppFlowy Cloud",
|
||||
"relatedQuestion": "Related",
|
||||
"serverUnavailable": "Service Temporarily Unavailable. Please try again later.",
|
||||
"aiServerUnavailable": "There was an error generating a response.",
|
||||
"aiServerUnavailable": "🌈 Uh-oh! 🌈. A unicorn ate our response. Please retry!",
|
||||
"clickToRetry": "Click to retry",
|
||||
"regenerateAnswer": "Regenerate",
|
||||
"question1": "How to use Kanban to manage tasks",
|
||||
"question2": "Explain the GTD method",
|
||||
"question3": "Why use Rust",
|
||||
"question4": "Recipe with what's in my kitchen",
|
||||
"aiMistakePrompt": "AI can make mistakes. Check important info."
|
||||
},
|
||||
"trash": {
|
||||
|
48
frontend/rust-lib/Cargo.lock
generated
@ -163,7 +163,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
|
||||
[[package]]
|
||||
name = "app-error"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
@ -183,7 +183,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "appflowy-ai-client"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
@ -678,7 +678,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "client-api"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"again",
|
||||
"anyhow",
|
||||
@ -725,7 +725,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "client-websocket"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"futures-util",
|
||||
@ -768,7 +768,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -792,7 +792,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-database"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -822,7 +822,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-document"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"collab",
|
||||
@ -841,7 +841,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-entity"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
@ -856,7 +856,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-folder"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
@ -894,7 +894,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-plugins"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-stream",
|
||||
@ -933,7 +933,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-rt-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
@ -958,7 +958,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-rt-protocol"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -975,7 +975,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-user"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cca5135f0010fa5de22a298cbed939e21575538c#cca5135f0010fa5de22a298cbed939e21575538c"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6febf0397e66ebf0a281980a2e7602d7af00c975#6febf0397e66ebf0a281980a2e7602d7af00c975"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"collab",
|
||||
@ -1278,7 +1278,7 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
|
||||
[[package]]
|
||||
name = "database-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -1982,12 +1982,14 @@ dependencies = [
|
||||
"flowy-folder-pub",
|
||||
"flowy-notification",
|
||||
"flowy-search-pub",
|
||||
"flowy-sqlite",
|
||||
"lazy_static",
|
||||
"lib-dispatch",
|
||||
"lib-infra",
|
||||
"nanoid",
|
||||
"parking_lot 0.12.1",
|
||||
"protobuf",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"strum_macros 0.21.1",
|
||||
"tokio",
|
||||
@ -2533,7 +2535,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gotrue"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"futures-util",
|
||||
@ -2550,7 +2552,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gotrue-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -2915,7 +2917,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "infra"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"reqwest",
|
||||
@ -3906,18 +3908,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pin-project"
|
||||
version = "1.1.3"
|
||||
version = "1.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422"
|
||||
checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3"
|
||||
dependencies = [
|
||||
"pin-project-internal",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-internal"
|
||||
version = "1.1.3"
|
||||
version = "1.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
|
||||
checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -4998,16 +5000,18 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "shared-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b36715dc2427e23a15fa81c629e1817d3dbf1e1a#b36715dc2427e23a15fa81c629e1817d3dbf1e1a"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f55cea9ca386875a1668ef30600c83cd6a1ffe2#3f55cea9ca386875a1668ef30600c83cd6a1ffe2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
"appflowy-ai-client",
|
||||
"bytes",
|
||||
"chrono",
|
||||
"collab-entity",
|
||||
"database-entity",
|
||||
"futures",
|
||||
"gotrue-entity",
|
||||
"pin-project",
|
||||
"reqwest",
|
||||
"serde",
|
||||
"serde_json",
|
||||
|
@ -121,8 +121,8 @@ lto = false
|
||||
incremental = false
|
||||
|
||||
[patch.crates-io]
|
||||
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "b36715dc2427e23a15fa81c629e1817d3dbf1e1a" }
|
||||
shared-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "b36715dc2427e23a15fa81c629e1817d3dbf1e1a" }
|
||||
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "3f55cea9ca386875a1668ef30600c83cd6a1ffe2" }
|
||||
shared-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "3f55cea9ca386875a1668ef30600c83cd6a1ffe2" }
|
||||
|
||||
# TODO(Lucas.Xu) Upgrade to the latest version of RocksDB once PR(https://github.com/rust-rocksdb/rust-rocksdb/pull/869) is merged.
|
||||
# Currently, using the following revision id. This commit is patched to fix the 32-bit build issue and it's checked out from 0.21.0, not 0.22.0.
|
||||
@ -136,10 +136,10 @@ rocksdb = { git = "https://github.com/LucasXu0/rust-rocksdb", rev = "21cf4a23ec1
|
||||
# To switch to the local path, run:
|
||||
# scripts/tool/update_collab_source.sh
|
||||
# ⚠️⚠️⚠️️
|
||||
collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cca5135f0010fa5de22a298cbed939e21575538c" }
|
||||
collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6febf0397e66ebf0a281980a2e7602d7af00c975" }
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::util::receive_with_timeout;
|
||||
use event_integration_test::user_event::user_localhost_af_cloud;
|
||||
use event_integration_test::EventIntegrationTest;
|
||||
use flowy_chat::entities::{ChatMessageListPB, ChatMessageTypePB};
|
||||
use flowy_chat::entities::ChatMessageListPB;
|
||||
use flowy_chat::notification::ChatNotification;
|
||||
|
||||
use flowy_chat_pub::cloud::ChatMessageType;
|
||||
@ -131,31 +131,31 @@ async fn af_cloud_load_remote_system_message_test() {
|
||||
assert_eq!(first_five_messages.messages[4].content, "hello server 0");
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn af_cloud_load_remote_user_message_test() {
|
||||
user_localhost_af_cloud().await;
|
||||
let test = EventIntegrationTest::new().await;
|
||||
test.af_cloud_sign_up().await;
|
||||
|
||||
let current_workspace = test.get_current_workspace().await;
|
||||
let view = test.create_chat(¤t_workspace.id).await;
|
||||
let chat_id = view.id.clone();
|
||||
let rx = test
|
||||
.notification_sender
|
||||
.subscribe_without_payload(&chat_id, ChatNotification::FinishAnswerQuestion);
|
||||
test
|
||||
.send_message(&chat_id, "hello world", ChatMessageTypePB::User)
|
||||
.await;
|
||||
let _ = receive_with_timeout(rx, Duration::from_secs(60))
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
let all = test.load_next_message(&chat_id, 5, None).await;
|
||||
assert_eq!(all.messages.len(), 2);
|
||||
// 3 means AI
|
||||
assert_eq!(all.messages[0].author_type, 3);
|
||||
// 2 means User
|
||||
assert_eq!(all.messages[1].author_type, 1);
|
||||
// The message ID is incremented by 1.
|
||||
assert_eq!(all.messages[1].message_id + 1, all.messages[0].message_id);
|
||||
}
|
||||
// #[tokio::test]
|
||||
// async fn af_cloud_load_remote_user_message_test() {
|
||||
// user_localhost_af_cloud().await;
|
||||
// let test = EventIntegrationTest::new().await;
|
||||
// test.af_cloud_sign_up().await;
|
||||
//
|
||||
// let current_workspace = test.get_current_workspace().await;
|
||||
// let view = test.create_chat(¤t_workspace.id).await;
|
||||
// let chat_id = view.id.clone();
|
||||
// let rx = test
|
||||
// .notification_sender
|
||||
// .subscribe_without_payload(&chat_id, ChatNotification::FinishAnswerQuestion);
|
||||
// test
|
||||
// .send_message(&chat_id, "hello world", ChatMessageTypePB::User)
|
||||
// .await;
|
||||
// let _ = receive_with_timeout(rx, Duration::from_secs(60))
|
||||
// .await
|
||||
// .unwrap();
|
||||
//
|
||||
// let all = test.load_next_message(&chat_id, 5, None).await;
|
||||
// assert_eq!(all.messages.len(), 2);
|
||||
// // 3 means AI
|
||||
// assert_eq!(all.messages[0].author_type, 3);
|
||||
// // 2 means User
|
||||
// assert_eq!(all.messages[1].author_type, 1);
|
||||
// // The message ID is incremented by 1.
|
||||
// assert_eq!(all.messages[1].message_id + 1, all.messages[0].message_id);
|
||||
// }
|
||||
|
@ -368,7 +368,7 @@ fn stream_send_chat_messages(
|
||||
messages.push(message);
|
||||
},
|
||||
Err(err) => {
|
||||
error!("Failed to send chat message: {}", err);
|
||||
error!("stream chat message error: {}", err);
|
||||
let pb = ChatMessageErrorPB {
|
||||
chat_id: chat_id.clone(),
|
||||
content: message_content.clone(),
|
||||
|
@ -18,6 +18,7 @@ use flowy_folder::view_operation::{
|
||||
use flowy_folder::ViewLayout;
|
||||
use flowy_folder_pub::folder_builder::NestedViewBuilder;
|
||||
use flowy_search::folder::indexer::FolderIndexManagerImpl;
|
||||
use flowy_sqlite::kv::StorePreferences;
|
||||
use flowy_user::services::authenticate_user::AuthenticateUser;
|
||||
use lib_dispatch::prelude::ToBytes;
|
||||
use lib_infra::future::FutureResult;
|
||||
@ -37,6 +38,7 @@ impl FolderDepsResolver {
|
||||
collab_builder: Arc<AppFlowyCollabBuilder>,
|
||||
server_provider: Arc<ServerProvider>,
|
||||
folder_indexer: Arc<FolderIndexManagerImpl>,
|
||||
store_preferences: Arc<StorePreferences>,
|
||||
chat_manager: &Arc<ChatManager>,
|
||||
) -> Arc<FolderManager> {
|
||||
let user: Arc<dyn FolderUser> = Arc::new(FolderUserImpl {
|
||||
@ -55,8 +57,8 @@ impl FolderDepsResolver {
|
||||
handlers,
|
||||
server_provider.clone(),
|
||||
folder_indexer,
|
||||
store_preferences,
|
||||
)
|
||||
.await
|
||||
.unwrap(),
|
||||
)
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use anyhow::Context;
|
||||
use collab_entity::CollabType;
|
||||
use tracing::event;
|
||||
|
||||
use collab_entity::CollabType;
|
||||
use collab_integrate::collab_builder::AppFlowyCollabBuilder;
|
||||
use flowy_database2::DatabaseManager;
|
||||
use flowy_document::manager::DocumentManager;
|
||||
|
@ -169,7 +169,10 @@ impl AppFlowyCore {
|
||||
|
||||
let chat_manager =
|
||||
ChatDepsResolver::resolve(Arc::downgrade(&authenticate_user), server_provider.clone());
|
||||
let folder_indexer = Arc::new(FolderIndexManagerImpl::new(None));
|
||||
|
||||
let folder_indexer = Arc::new(FolderIndexManagerImpl::new(Some(Arc::downgrade(
|
||||
&authenticate_user,
|
||||
))));
|
||||
let folder_manager = FolderDepsResolver::resolve(
|
||||
Arc::downgrade(&authenticate_user),
|
||||
&document_manager,
|
||||
@ -177,6 +180,7 @@ impl AppFlowyCore {
|
||||
collab_builder.clone(),
|
||||
server_provider.clone(),
|
||||
folder_indexer.clone(),
|
||||
store_preference.clone(),
|
||||
&chat_manager,
|
||||
)
|
||||
.await;
|
||||
|