Skip to content

Commit 97eab3b

Browse files
committed
chore: merge release 0.0.5.1
1 parent cb293e9 commit 97eab3b

File tree

2 files changed

+35
-28
lines changed

2 files changed

+35
-28
lines changed

frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/field_editor.dart

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ class _FieldEditorState extends State<FieldEditor> {
5050
Widget build(BuildContext context) {
5151
return BlocProvider(
5252
create: (context) => FieldEditorBloc(
53-
gridId: gridId,
54-
fieldName: fieldName,
55-
isGroupField: isGroupField,
56-
loader: typeOptionLoader,
53+
gridId: widget.gridId,
54+
fieldName: widget.fieldName,
55+
isGroupField: widget.isGroupField,
56+
loader: widget.typeOptionLoader,
5757
)..add(const FieldEditorEvent.initial()),
5858
child: BlocBuilder<FieldEditorBloc, FieldEditorState>(
5959
buildWhen: (p, c) => false,
@@ -66,7 +66,7 @@ class _FieldEditorState extends State<FieldEditor> {
6666
const VSpace(10),
6767
const _FieldNameCell(),
6868
const VSpace(10),
69-
const _DeleteFieldButton(),
69+
_DeleteFieldButton(popoverMutex: popoverMutex),
7070
const VSpace(10),
7171
_FieldTypeOptionCell(popoverMutex: popoverMutex),
7272
],
@@ -128,45 +128,49 @@ class _FieldNameCell extends StatelessWidget {
128128
}
129129

130130
class _DeleteFieldButton extends StatelessWidget {
131-
const _DeleteFieldButton({Key? key}) : super(key: key);
131+
final PopoverMutex popoverMutex;
132+
133+
const _DeleteFieldButton({
134+
required this.popoverMutex,
135+
Key? key,
136+
}) : super(key: key);
132137

133138
@override
134139
Widget build(BuildContext context) {
135140
final theme = context.watch<AppTheme>();
136141
return BlocBuilder<FieldEditorBloc, FieldEditorState>(
137142
builder: (context, state) {
138143
final enable = !state.canDelete && !state.isGroupField;
139-
return SizedBox(
140-
height: GridSize.typeOptionItemHeight,
144+
145+
return Popover(
146+
triggerActions: PopoverTriggerActionFlags.click,
147+
mutex: popoverMutex,
148+
direction: PopoverDirection.center,
149+
popupBuilder: (context) {
150+
return FlowyAlertDialog(
151+
title: LocaleKeys.grid_field_deleteFieldPromptMessage.tr(),
152+
cancel: () {
153+
// FlowyOverlay.of(context).remove(FieldEditor.identifier())
154+
// popoverMutex.state?.close();
155+
},
156+
confirm: () {
157+
context
158+
.read<FieldEditorBloc>()
159+
.add(const FieldEditorEvent.deleteField());
160+
161+
// FlowyOverlay.of(context).remove(FieldEditor.identifier());
162+
},
163+
);
164+
},
141165
child: FlowyButton(
142166
text: FlowyText.medium(
143167
LocaleKeys.grid_field_delete.tr(),
144168
fontSize: 12,
145169
color: enable ? null : theme.shader4,
146170
),
147-
hoverColor: theme.hover,
148-
onTap: () {
149-
if (enable) {
150-
FlowyAlertDialog(
151-
title: LocaleKeys.grid_field_deleteFieldPromptMessage.tr(),
152-
cancel: () {
153-
FlowyOverlay.of(context).remove(FieldEditor.identifier());
154-
},
155-
confirm: () {
156-
context
157-
.read<FieldEditorBloc>()
158-
.add(const FieldEditorEvent.deleteField());
159-
FlowyOverlay.of(context).remove(FieldEditor.identifier());
160-
},
161-
).show(context);
162-
}
163-
},
164-
leftIcon: svgWidget('grid/delete', color: theme.iconColor),
165171
),
166172
);
167173
},
168174
);
169175
}
170-
171-
void so() {}
172176
}

frontend/app_flowy/macos/Runner.xcodeproj/project.pbxproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@
416416
isa = XCBuildConfiguration;
417417
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
418418
buildSettings = {
419+
ARCHS = arm64;
419420
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
420421
CLANG_ENABLE_MODULES = YES;
421422
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
@@ -549,6 +550,7 @@
549550
isa = XCBuildConfiguration;
550551
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
551552
buildSettings = {
553+
ARCHS = arm64;
552554
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
553555
CLANG_ENABLE_MODULES = YES;
554556
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
@@ -573,6 +575,7 @@
573575
isa = XCBuildConfiguration;
574576
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
575577
buildSettings = {
578+
ARCHS = arm64;
576579
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
577580
CLANG_ENABLE_MODULES = YES;
578581
CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;

0 commit comments

Comments
 (0)