mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: open-row-as-full-page-related launch review issues (#5266)
This commit is contained in:
@ -13,6 +13,7 @@ import 'package:appflowy/workspace/presentation/settings/widgets/emoji_picker/em
|
|||||||
import 'package:appflowy_popover/appflowy_popover.dart';
|
import 'package:appflowy_popover/appflowy_popover.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flowy_infra_ui/flowy_infra_ui.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/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
|
||||||
@ -262,11 +263,14 @@ class RowActionButton extends StatelessWidget {
|
|||||||
return AppFlowyPopover(
|
return AppFlowyPopover(
|
||||||
direction: PopoverDirection.bottomWithLeftAligned,
|
direction: PopoverDirection.bottomWithLeftAligned,
|
||||||
popupBuilder: (context) => RowActionList(rowController: rowController),
|
popupBuilder: (context) => RowActionList(rowController: rowController),
|
||||||
child: FlowyIconButton(
|
child: FlowyTooltip(
|
||||||
width: 20,
|
message: LocaleKeys.grid_rowPage_moreRowActions.tr(),
|
||||||
height: 20,
|
child: FlowyIconButton(
|
||||||
icon: const FlowySvg(FlowySvgs.details_horizontal_s),
|
width: 20,
|
||||||
iconColorOnHover: Theme.of(context).colorScheme.onSecondary,
|
height: 20,
|
||||||
|
icon: const FlowySvg(FlowySvgs.details_horizontal_s),
|
||||||
|
iconColorOnHover: Theme.of(context).colorScheme.onSecondary,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||||
|
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||||
import 'package:appflowy/plugins/database/application/database_controller.dart';
|
import 'package:appflowy/plugins/database/application/database_controller.dart';
|
||||||
import 'package:appflowy/plugins/database/application/row/row_controller.dart';
|
import 'package:appflowy/plugins/database/application/row/row_controller.dart';
|
||||||
import 'package:appflowy/plugins/database/domain/database_view_service.dart';
|
import 'package:appflowy/plugins/database/domain/database_view_service.dart';
|
||||||
@ -9,7 +10,9 @@ import 'package:appflowy/startup/plugin/plugin.dart';
|
|||||||
import 'package:appflowy/startup/startup.dart';
|
import 'package:appflowy/startup/startup.dart';
|
||||||
import 'package:appflowy/user/application/reminder/reminder_bloc.dart';
|
import 'package:appflowy/user/application/reminder/reminder_bloc.dart';
|
||||||
import 'package:appflowy/workspace/application/tabs/tabs_bloc.dart';
|
import 'package:appflowy/workspace/application/tabs/tabs_bloc.dart';
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flowy_infra_ui/flowy_infra_ui.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/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
|
||||||
@ -107,35 +110,39 @@ class _RowDetailPageState extends State<RowDetailPage> {
|
|||||||
List<Widget> _actions(BuildContext context) {
|
List<Widget> _actions(BuildContext context) {
|
||||||
return [
|
return [
|
||||||
if (widget.allowOpenAsFullPage) ...[
|
if (widget.allowOpenAsFullPage) ...[
|
||||||
FlowyIconButton(
|
FlowyTooltip(
|
||||||
width: 20,
|
message: LocaleKeys.grid_rowPage_openAsFullPage.tr(),
|
||||||
height: 20,
|
child: FlowyIconButton(
|
||||||
icon: const FlowySvg(FlowySvgs.full_view_s),
|
width: 20,
|
||||||
onPressed: () async {
|
height: 20,
|
||||||
Navigator.of(context).pop();
|
icon: const FlowySvg(FlowySvgs.full_view_s),
|
||||||
final databaseId = await DatabaseViewBackendService(
|
iconColorOnHover: Theme.of(context).colorScheme.onSurface,
|
||||||
viewId: widget.databaseController.viewId,
|
onPressed: () async {
|
||||||
)
|
Navigator.of(context).pop();
|
||||||
.getDatabaseId()
|
final databaseId = await DatabaseViewBackendService(
|
||||||
.then((value) => value.fold((s) => s, (f) => null));
|
viewId: widget.databaseController.viewId,
|
||||||
final documentId = widget.rowController.rowMeta.documentId;
|
)
|
||||||
if (databaseId != null) {
|
.getDatabaseId()
|
||||||
getIt<TabsBloc>().add(
|
.then((value) => value.fold((s) => s, (f) => null));
|
||||||
TabsEvent.openPlugin(
|
final documentId = widget.rowController.rowMeta.documentId;
|
||||||
plugin: DatabaseDocumentPlugin(
|
if (databaseId != null) {
|
||||||
data: DatabaseDocumentContext(
|
getIt<TabsBloc>().add(
|
||||||
view: widget.databaseController.view,
|
TabsEvent.openPlugin(
|
||||||
databaseId: databaseId,
|
plugin: DatabaseDocumentPlugin(
|
||||||
rowId: widget.rowController.rowId,
|
data: DatabaseDocumentContext(
|
||||||
documentId: documentId,
|
view: widget.databaseController.view,
|
||||||
|
databaseId: databaseId,
|
||||||
|
rowId: widget.rowController.rowId,
|
||||||
|
documentId: documentId,
|
||||||
|
),
|
||||||
|
pluginType: PluginType.databaseDocument,
|
||||||
),
|
),
|
||||||
pluginType: PluginType.databaseDocument,
|
setLatest: false,
|
||||||
),
|
),
|
||||||
setLatest: false,
|
);
|
||||||
),
|
}
|
||||||
);
|
},
|
||||||
}
|
),
|
||||||
},
|
|
||||||
),
|
),
|
||||||
const HSpace(4),
|
const HSpace(4),
|
||||||
],
|
],
|
||||||
|
@ -759,7 +759,9 @@
|
|||||||
"one": "Hide {count} hidden field",
|
"one": "Hide {count} hidden field",
|
||||||
"many": "Hide {count} hidden fields",
|
"many": "Hide {count} hidden fields",
|
||||||
"other": "Hide {count} hidden fields"
|
"other": "Hide {count} hidden fields"
|
||||||
}
|
},
|
||||||
|
"openAsFullPage": "Open as full page",
|
||||||
|
"moreRowActions": "More row actions"
|
||||||
},
|
},
|
||||||
"sort": {
|
"sort": {
|
||||||
"ascending": "Ascending",
|
"ascending": "Ascending",
|
||||||
|
Reference in New Issue
Block a user