mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-07-25 11:02:32 +00:00
chore: merge release 0.0.5.1
This commit is contained in:
@ -50,10 +50,10 @@ class _FieldEditorState extends State<FieldEditor> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return BlocProvider(
|
return BlocProvider(
|
||||||
create: (context) => FieldEditorBloc(
|
create: (context) => FieldEditorBloc(
|
||||||
gridId: gridId,
|
gridId: widget.gridId,
|
||||||
fieldName: fieldName,
|
fieldName: widget.fieldName,
|
||||||
isGroupField: isGroupField,
|
isGroupField: widget.isGroupField,
|
||||||
loader: typeOptionLoader,
|
loader: widget.typeOptionLoader,
|
||||||
)..add(const FieldEditorEvent.initial()),
|
)..add(const FieldEditorEvent.initial()),
|
||||||
child: BlocBuilder<FieldEditorBloc, FieldEditorState>(
|
child: BlocBuilder<FieldEditorBloc, FieldEditorState>(
|
||||||
buildWhen: (p, c) => false,
|
buildWhen: (p, c) => false,
|
||||||
@ -66,7 +66,7 @@ class _FieldEditorState extends State<FieldEditor> {
|
|||||||
const VSpace(10),
|
const VSpace(10),
|
||||||
const _FieldNameCell(),
|
const _FieldNameCell(),
|
||||||
const VSpace(10),
|
const VSpace(10),
|
||||||
const _DeleteFieldButton(),
|
_DeleteFieldButton(popoverMutex: popoverMutex),
|
||||||
const VSpace(10),
|
const VSpace(10),
|
||||||
_FieldTypeOptionCell(popoverMutex: popoverMutex),
|
_FieldTypeOptionCell(popoverMutex: popoverMutex),
|
||||||
],
|
],
|
||||||
@ -128,7 +128,12 @@ class _FieldNameCell extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _DeleteFieldButton extends StatelessWidget {
|
class _DeleteFieldButton extends StatelessWidget {
|
||||||
const _DeleteFieldButton({Key? key}) : super(key: key);
|
final PopoverMutex popoverMutex;
|
||||||
|
|
||||||
|
const _DeleteFieldButton({
|
||||||
|
required this.popoverMutex,
|
||||||
|
Key? key,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -136,37 +141,36 @@ class _DeleteFieldButton extends StatelessWidget {
|
|||||||
return BlocBuilder<FieldEditorBloc, FieldEditorState>(
|
return BlocBuilder<FieldEditorBloc, FieldEditorState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
final enable = !state.canDelete && !state.isGroupField;
|
final enable = !state.canDelete && !state.isGroupField;
|
||||||
return SizedBox(
|
|
||||||
height: GridSize.typeOptionItemHeight,
|
return Popover(
|
||||||
|
triggerActions: PopoverTriggerActionFlags.click,
|
||||||
|
mutex: popoverMutex,
|
||||||
|
direction: PopoverDirection.center,
|
||||||
|
popupBuilder: (context) {
|
||||||
|
return FlowyAlertDialog(
|
||||||
|
title: LocaleKeys.grid_field_deleteFieldPromptMessage.tr(),
|
||||||
|
cancel: () {
|
||||||
|
// FlowyOverlay.of(context).remove(FieldEditor.identifier())
|
||||||
|
// popoverMutex.state?.close();
|
||||||
|
},
|
||||||
|
confirm: () {
|
||||||
|
context
|
||||||
|
.read<FieldEditorBloc>()
|
||||||
|
.add(const FieldEditorEvent.deleteField());
|
||||||
|
|
||||||
|
// FlowyOverlay.of(context).remove(FieldEditor.identifier());
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
text: FlowyText.medium(
|
text: FlowyText.medium(
|
||||||
LocaleKeys.grid_field_delete.tr(),
|
LocaleKeys.grid_field_delete.tr(),
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: enable ? null : theme.shader4,
|
color: enable ? null : theme.shader4,
|
||||||
),
|
),
|
||||||
hoverColor: theme.hover,
|
|
||||||
onTap: () {
|
|
||||||
if (enable) {
|
|
||||||
FlowyAlertDialog(
|
|
||||||
title: LocaleKeys.grid_field_deleteFieldPromptMessage.tr(),
|
|
||||||
cancel: () {
|
|
||||||
FlowyOverlay.of(context).remove(FieldEditor.identifier());
|
|
||||||
},
|
|
||||||
confirm: () {
|
|
||||||
context
|
|
||||||
.read<FieldEditorBloc>()
|
|
||||||
.add(const FieldEditorEvent.deleteField());
|
|
||||||
FlowyOverlay.of(context).remove(FieldEditor.identifier());
|
|
||||||
},
|
|
||||||
).show(context);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
leftIcon: svgWidget('grid/delete', color: theme.iconColor),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void so() {}
|
|
||||||
}
|
}
|
||||||
|
@ -416,6 +416,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
ARCHS = arm64;
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
||||||
@ -549,6 +550,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
ARCHS = arm64;
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
||||||
@ -573,6 +575,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
ARCHS = arm64;
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
|
||||||
|
Reference in New Issue
Block a user