chore: remove include time icon for created at/last modified type option (#8031)

This commit is contained in:
Richard Shiue 2025-06-05 12:25:40 +08:00 committed by GitHub
parent 5eabaa7763
commit a080cffc1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 6 deletions

View File

@ -241,10 +241,12 @@ class IncludeTimeButton extends StatelessWidget {
super.key,
required this.onChanged,
required this.includeTime,
this.showIcon = true,
});
final Function(bool value) onChanged;
final bool includeTime;
final bool showIcon;
@override
Widget build(BuildContext context) {
@ -254,11 +256,13 @@ class IncludeTimeButton extends StatelessWidget {
padding: GridSize.typeOptionContentInsets,
child: Row(
children: [
FlowySvg(
FlowySvgs.clock_alarm_s,
color: Theme.of(context).iconTheme.color,
),
const HSpace(6),
if (showIcon) ...[
FlowySvg(
FlowySvgs.clock_alarm_s,
color: Theme.of(context).iconTheme.color,
),
const HSpace(6),
],
FlowyText(LocaleKeys.grid_field_includeTime.tr()),
const Spacer(),
Toggle(

View File

@ -30,6 +30,8 @@ class TimestampTypeOptionEditorFactory implements TypeOptionEditorFactory {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 12.0),
child: IncludeTimeButton(
includeTime: typeOption.includeTime,
showIcon: false,
onChanged: (value) {
final newTypeOption = _updateTypeOption(
typeOption: typeOption,
@ -37,7 +39,6 @@ class TimestampTypeOptionEditorFactory implements TypeOptionEditorFactory {
);
onTypeOptionUpdated(newTypeOption.writeToBuffer());
},
includeTime: typeOption.includeTime,
),
),
],