Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
Merge remote-tracking branch 'origin/main' into customize_font_size
Lucas.Xu14ac2db06d74
diff --cc frontend/app_flowy/lib/plugins/document/document.dartindex 6ee7f65b52,5d695ff83e..7700fa4f45--- a/frontend/app_flowy/lib/plugins/document/document.dart+++ b/frontend/app_flowy/lib/plugins/document/document.dart@@@ -110,34 -140,92 +110,23 @@@ class DocumentPluginDisplay extends Plu);}- void _handleExportData(ExportDataPB exportData) {- switch (exportData.exportType) {- case ExportType.Link:- break;- case ExportType.Markdown:- FlutterClipboard.copy(exportData.data)- .then((value) => Log.info('copied to clipboard'));- break;- case ExportType.Text:- break;- }- }-- void _handleExportError(FlowyError error) {}-}--class ShareActionList extends StatelessWidget {- const ShareActionList({- Key? key,- required this.view,- }) : super(key: key);-- final ViewPB view;+ @override+ Widget get leftBarItem => ViewLeftBarItem(view: view);@override- Widget build(BuildContext context) {- final docShareBloc = context.read<DocShareBloc>();- return PopoverActionList<ShareActionWrapper>(- direction: PopoverDirection.bottomWithCenterAligned,- actions: ShareAction.values- .map((action) => ShareActionWrapper(action))- .toList(),- buildChild: (controller) {- return RoundedTextButton(- title: LocaleKeys.shareAction_buttonText.tr(),- onPressed: () => controller.show(),- );- },- onSelected: (action, controller) async {- switch (action.inner) {- case ShareAction.markdown:- final exportPath = await FilePicker.platform.saveFile(- dialogTitle: '',- fileName: '${view.name}.md',- );- if (exportPath != null) {- docShareBloc.add(DocShareEvent.shareMarkdown(exportPath));- showMessageToast('Exported to: $exportPath');- }- break;- case ShareAction.copyLink:- NavigatorAlertDialog(- title: LocaleKeys.shareAction_workInProgress.tr())- .show(context);- break;- }- controller.close();- },+ Widget? get rightBarItem {+ return Row(+ children: [+ DocumentShareButton(view: view),+ const SizedBox(width: 10),+ BlocProvider.value(+ value: documentAppearanceCubit,+ child: const DocumentMoreButton(),+ ),+ ],);}-}--enum ShareAction {- markdown,- copyLink,-}--class ShareActionWrapper extends ActionCell {- final ShareAction inner;-- ShareActionWrapper(this.inner);-- @override- Widget? leftIcon(Color iconColor) => null;@override- String get name => inner.name;-}--extension QuestionBubbleExtension on ShareAction {- String get name {- switch (this) {- case ShareAction.markdown:- return LocaleKeys.shareAction_markdown.tr();- case ShareAction.copyLink:- return LocaleKeys.shareAction_copyLink.tr();- }- }+ List<NavigationItem> get navigationItems => [this];}-- extension QuestionBubbleExtension on ShareAction {- String get name {- switch (this) {- case ShareAction.markdown:- return LocaleKeys.shareAction_markdown.tr();- case ShareAction.copyLink:- return LocaleKeys.shareAction_copyLink.tr();- }- }- }