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
fix apps refresh issue and share button layout issue
appflowy5a3099e3231f
diff --git a/frontend/app_flowy/assets/translations/en.json b/frontend/app_flowy/assets/translations/en.jsonindex 9294fb3f0e..7717e71229 100644--- a/frontend/app_flowy/assets/translations/en.json+++ b/frontend/app_flowy/assets/translations/en.json@@ -36,7 +36,7 @@},"shareAction": {"buttonText": "Share",- "workInProgress": "Work in progress",+ "workInProgress": "Coming soon","markdown": "Markdown","copyLink": "Copy Link"},diff --git a/frontend/app_flowy/assets/translations/fr-CA.json b/frontend/app_flowy/assets/translations/fr-CA.jsonindex ae13e352b0..7d7c51d22b 100644--- a/frontend/app_flowy/assets/translations/fr-CA.json+++ b/frontend/app_flowy/assets/translations/fr-CA.json@@ -36,7 +36,7 @@},"shareAction": {"buttonText": "Partager",- "workInProgress": "À venir",+ "workInProgress": "Bientôt disponible","markdown": "Markdown","copyLink": "Copier le liens"},diff --git a/frontend/app_flowy/assets/translations/it-IT.json b/frontend/app_flowy/assets/translations/it-IT.jsonindex 5695b0a8bd..861e2c2b0b 100644--- a/frontend/app_flowy/assets/translations/it-IT.json+++ b/frontend/app_flowy/assets/translations/it-IT.json@@ -36,7 +36,7 @@},"shareAction": {"buttonText": "Condividi",- "workInProgress": "In corso",+ "workInProgress": "Prossimamente","markdown": "Markdown","copyLink": "Copia Link"},diff --git a/frontend/app_flowy/assets/translations/zh-CN.json b/frontend/app_flowy/assets/translations/zh-CN.jsonindex 0dd0acd0fb..81b0ad13b1 100644--- a/frontend/app_flowy/assets/translations/zh-CN.json+++ b/frontend/app_flowy/assets/translations/zh-CN.json@@ -36,7 +36,7 @@},"shareAction": {"buttonText": "分享",- "workInProgress": "进行中",+ "workInProgress": "敬请期待","markdown": "Markdown","copyLink": "复制链接"},diff --git a/frontend/app_flowy/lib/workspace/application/menu/menu_bloc.dart b/frontend/app_flowy/lib/workspace/application/menu/menu_bloc.dartindex 6a8deb0d2c..79d94a020b 100644--- a/frontend/app_flowy/lib/workspace/application/menu/menu_bloc.dart+++ b/frontend/app_flowy/lib/workspace/application/menu/menu_bloc.dart@@ -49,13 +49,13 @@ class MenuBloc extends Bloc<MenuEvent, MenuState> {Future<void> _performActionOnCreateApp(CreateApp event, Emitter<MenuState> emit) async {final result = await workspaceManager.createApp(name: event.name, desc: event.desc);- emit(result.fold(- (app) => state.copyWith(apps: some([app])),+ result.fold(+ (app) => {},(error) {Log.error(error);- return state.copyWith(successOrFailure: right(error));+ emit(state.copyWith(successOrFailure: right(error)));},- ));+ );}// ignore: unused_elementdiff --git a/frontend/app_flowy/lib/workspace/infrastructure/repos/workspace_repo.dart b/frontend/app_flowy/lib/workspace/infrastructure/repos/workspace_repo.dartindex bea80f8d46..8e981fc085 100644--- a/frontend/app_flowy/lib/workspace/infrastructure/repos/workspace_repo.dart+++ b/frontend/app_flowy/lib/workspace/infrastructure/repos/workspace_repo.dart@@ -123,7 +123,7 @@ class WorkspaceListenerRepo {Future<void> close() async {await _subscription?.cancel();- _appsChanged = null;- _update = null;+ // _appsChanged = null;+ // _update = null;}}diff --git a/frontend/app_flowy/lib/workspace/presentation/stack_page/doc/doc_stack_page.dart b/frontend/app_flowy/lib/workspace/presentation/stack_page/doc/doc_stack_page.dartindex a801aea850..3c4e56a904 100644--- a/frontend/app_flowy/lib/workspace/presentation/stack_page/doc/doc_stack_page.dart+++ b/frontend/app_flowy/lib/workspace/presentation/stack_page/doc/doc_stack_page.dart@@ -49,7 +49,7 @@ class DocStackContext extends HomeStackContext<int, ShareActionWrapper> {Widget get leftBarItem => DocumentLeftBarItem(view: _view);@override- Widget? get rightBarItem => DococumentShareButton(view: _view);+ Widget? get rightBarItem => DocumentShareButton(view: _view);@overrideString get identifier => _view.id;@@ -150,9 +150,9 @@ class _DocumentLeftBarItemState extends State<DocumentLeftBarItem> {}}-class DococumentShareButton extends StatelessWidget {+class DocumentShareButton extends StatelessWidget {final View view;- DococumentShareButton({Key? key, required this.view}) : super(key: ValueKey(view.hashCode));+ DocumentShareButton({Key? key, required this.view}) : super(key: ValueKey(view.hashCode));@overrideWidget build(BuildContext context) {@@ -178,14 +178,21 @@ class DococumentShareButton extends StatelessWidget {value: Provider.of<AppearanceSettingModel>(context, listen: true),child: Selector<AppearanceSettingModel, AppLanguage>(selector: (ctx, notifier) => notifier.language,- builder: (ctx, _, child) => RoundedTextButton(- title: LocaleKeys.shareAction_buttonText.tr(),- height: 30,- width: buttonWidth,- fontSize: 12,- borderRadius: Corners.s6Border,- color: Colors.lightBlue,- onPressed: () => _showActionList(context, Offset(-(buttonWidth / 2), 10)),+ builder: (ctx, _, child) => ConstrainedBox(+ constraints: BoxConstraints(+ maxHeight: 30,+ minWidth: buttonWidth,+ maxWidth: 100,+ ),+ child: RoundedTextButton(+ title: LocaleKeys.shareAction_buttonText.tr(),+ // height: 30,+ // width: buttonWidth,+ fontSize: 12,+ borderRadius: Corners.s6Border,+ color: Colors.lightBlue,+ onPressed: () => _showActionList(context, Offset(-(buttonWidth / 2), 10)),+ ),),),);diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/menu/menu.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/menu/menu.dartindex 7e47426316..c2046fce39 100644--- a/frontend/app_flowy/lib/workspace/presentation/widgets/menu/menu.dart+++ b/frontend/app_flowy/lib/workspace/presentation/widgets/menu/menu.dart@@ -77,7 +77,9 @@ class HomeMenu extends StatelessWidget {),BlocListener<MenuBloc, MenuState>(listenWhen: (p, c) => p.isCollapse != c.isCollapse,- listener: (context, state) => _collapsedNotifier.value = state.isCollapse,+ listener: (context, state) {+ _collapsedNotifier.value = state.isCollapse;+ },)],child: BlocBuilder<MenuBloc, MenuState>(diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/menu_app.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/menu_app.dartindex 2ea4ba29aa..7dab60cf88 100644--- a/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/menu_app.dart+++ b/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/menu_app.dart@@ -41,13 +41,13 @@ class _MenuAppState extends State<MenuApp> {],child: BlocSelector<AppBloc, AppState, AppDataNotifier>(selector: (state) {- final menuState = Provider.of<MenuSharedState>(context, listen: false);+ final menuSharedState = Provider.of<MenuSharedState>(context, listen: false);if (state.latestCreatedView != null) {- menuState.forcedOpenView.value = state.latestCreatedView!;+ menuSharedState.forcedOpenView.value = state.latestCreatedView!;}notifier.views = state.views;- notifier.selectedView = menuState.selectedView.value;+ notifier.selectedView = menuSharedState.selectedView.value;return notifier;},builder: (context, notifier) => ChangeNotifierProvider.value(