mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: adjust ui
This commit is contained in:
@ -5,6 +5,8 @@ import 'package:flowy_infra_ui/style_widget/icon_button.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';
|
||||||
|
|
||||||
|
import 'define.dart';
|
||||||
|
|
||||||
class BoardCheckboxCell extends StatefulWidget {
|
class BoardCheckboxCell extends StatefulWidget {
|
||||||
final GridCellControllerBuilder cellControllerBuilder;
|
final GridCellControllerBuilder cellControllerBuilder;
|
||||||
|
|
||||||
@ -38,12 +40,17 @@ class _BoardCheckboxCellState extends State<BoardCheckboxCell> {
|
|||||||
final icon = state.isSelected
|
final icon = state.isSelected
|
||||||
? svgWidget('editor/editor_check')
|
? svgWidget('editor/editor_check')
|
||||||
: svgWidget('editor/editor_uncheck');
|
: svgWidget('editor/editor_uncheck');
|
||||||
return Align(
|
return Padding(
|
||||||
alignment: Alignment.centerLeft,
|
padding: EdgeInsets.symmetric(
|
||||||
child: FlowyIconButton(
|
vertical: BoardSizes.cardCellVPading,
|
||||||
iconPadding: EdgeInsets.zero,
|
),
|
||||||
icon: icon,
|
child: Align(
|
||||||
width: 20,
|
alignment: Alignment.centerLeft,
|
||||||
|
child: FlowyIconButton(
|
||||||
|
iconPadding: EdgeInsets.zero,
|
||||||
|
icon: icon,
|
||||||
|
width: 20,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
import 'package:app_flowy/plugins/board/application/card/board_date_cell_bloc.dart';
|
import 'package:app_flowy/plugins/board/application/card/board_date_cell_bloc.dart';
|
||||||
import 'package:app_flowy/plugins/grid/application/cell/cell_service/cell_service.dart';
|
import 'package:app_flowy/plugins/grid/application/cell/cell_service/cell_service.dart';
|
||||||
|
import 'package:flowy_infra/theme.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/text.dart';
|
import 'package:flowy_infra_ui/style_widget/text.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';
|
||||||
|
|
||||||
|
import 'define.dart';
|
||||||
|
|
||||||
class BoardDateCell extends StatefulWidget {
|
class BoardDateCell extends StatefulWidget {
|
||||||
final GridCellControllerBuilder cellControllerBuilder;
|
final GridCellControllerBuilder cellControllerBuilder;
|
||||||
|
|
||||||
@ -40,9 +43,15 @@ class _BoardDateCellState extends State<BoardDateCell> {
|
|||||||
} else {
|
} else {
|
||||||
return Align(
|
return Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: FlowyText.regular(
|
child: Padding(
|
||||||
state.dateStr,
|
padding: EdgeInsets.symmetric(
|
||||||
fontSize: 14,
|
vertical: BoardSizes.cardCellVPading,
|
||||||
|
),
|
||||||
|
child: FlowyText.regular(
|
||||||
|
state.dateStr,
|
||||||
|
fontSize: 13,
|
||||||
|
color: context.read<AppTheme>().shader3,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,8 @@ import 'package:flowy_infra_ui/style_widget/text.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';
|
||||||
|
|
||||||
|
import 'define.dart';
|
||||||
|
|
||||||
class BoardNumberCell extends StatefulWidget {
|
class BoardNumberCell extends StatefulWidget {
|
||||||
final GridCellControllerBuilder cellControllerBuilder;
|
final GridCellControllerBuilder cellControllerBuilder;
|
||||||
|
|
||||||
@ -38,11 +40,15 @@ class _BoardNumberCellState extends State<BoardNumberCell> {
|
|||||||
if (state.content.isEmpty) {
|
if (state.content.isEmpty) {
|
||||||
return const SizedBox();
|
return const SizedBox();
|
||||||
} else {
|
} else {
|
||||||
return Align(
|
return Padding(
|
||||||
alignment: Alignment.centerLeft,
|
padding:
|
||||||
child: FlowyText.regular(
|
EdgeInsets.symmetric(vertical: BoardSizes.cardCellVPading),
|
||||||
state.content,
|
child: Align(
|
||||||
fontSize: 14,
|
alignment: Alignment.centerLeft,
|
||||||
|
child: FlowyText.medium(
|
||||||
|
state.content,
|
||||||
|
fontSize: 14,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,8 @@ import 'package:app_flowy/plugins/grid/presentation/widgets/cell/select_option_c
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
|
||||||
|
import 'define.dart';
|
||||||
|
|
||||||
class BoardSelectOptionCell extends StatefulWidget {
|
class BoardSelectOptionCell extends StatefulWidget {
|
||||||
final GridCellControllerBuilder cellControllerBuilder;
|
final GridCellControllerBuilder cellControllerBuilder;
|
||||||
|
|
||||||
@ -42,10 +44,13 @@ class _BoardSelectOptionCellState extends State<BoardSelectOptionCell> {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
.toList();
|
.toList();
|
||||||
return Align(
|
return Padding(
|
||||||
alignment: Alignment.centerLeft,
|
padding: EdgeInsets.symmetric(vertical: BoardSizes.cardCellVPading),
|
||||||
child: AbsorbPointer(
|
child: Align(
|
||||||
child: Wrap(children: children, spacing: 4, runSpacing: 2),
|
alignment: Alignment.centerLeft,
|
||||||
|
child: AbsorbPointer(
|
||||||
|
child: Wrap(children: children, spacing: 4, runSpacing: 2),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -4,6 +4,8 @@ import 'package:flowy_infra_ui/style_widget/text.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';
|
||||||
|
|
||||||
|
import 'define.dart';
|
||||||
|
|
||||||
class BoardTextCell extends StatefulWidget {
|
class BoardTextCell extends StatefulWidget {
|
||||||
final GridCellControllerBuilder cellControllerBuilder;
|
final GridCellControllerBuilder cellControllerBuilder;
|
||||||
const BoardTextCell({required this.cellControllerBuilder, Key? key})
|
const BoardTextCell({required this.cellControllerBuilder, Key? key})
|
||||||
@ -37,11 +39,10 @@ class _BoardTextCellState extends State<BoardTextCell> {
|
|||||||
} else {
|
} else {
|
||||||
return Align(
|
return Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: ConstrainedBox(
|
child: Padding(
|
||||||
constraints: BoxConstraints.loose(
|
padding:
|
||||||
const Size(double.infinity, 100),
|
EdgeInsets.symmetric(vertical: BoardSizes.cardCellVPading),
|
||||||
),
|
child: FlowyText.medium(
|
||||||
child: FlowyText.regular(
|
|
||||||
state.content,
|
state.content,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
),
|
),
|
||||||
|
@ -4,6 +4,8 @@ import 'package:flowy_infra/theme.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';
|
||||||
|
|
||||||
|
import 'define.dart';
|
||||||
|
|
||||||
class BoardUrlCell extends StatefulWidget {
|
class BoardUrlCell extends StatefulWidget {
|
||||||
final GridCellControllerBuilder cellControllerBuilder;
|
final GridCellControllerBuilder cellControllerBuilder;
|
||||||
|
|
||||||
@ -38,16 +40,20 @@ class _BoardUrlCellState extends State<BoardUrlCell> {
|
|||||||
if (state.content.isEmpty) {
|
if (state.content.isEmpty) {
|
||||||
return const SizedBox();
|
return const SizedBox();
|
||||||
} else {
|
} else {
|
||||||
return Align(
|
return Padding(
|
||||||
alignment: Alignment.centerLeft,
|
padding:
|
||||||
child: RichText(
|
EdgeInsets.symmetric(vertical: BoardSizes.cardCellVPading),
|
||||||
textAlign: TextAlign.left,
|
child: Align(
|
||||||
text: TextSpan(
|
alignment: Alignment.centerLeft,
|
||||||
text: state.content,
|
child: RichText(
|
||||||
style: TextStyle(
|
textAlign: TextAlign.left,
|
||||||
color: theme.main2,
|
text: TextSpan(
|
||||||
fontSize: 14,
|
text: state.content,
|
||||||
decoration: TextDecoration.underline,
|
style: TextStyle(
|
||||||
|
color: theme.main2,
|
||||||
|
fontSize: 14,
|
||||||
|
decoration: TextDecoration.underline,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -73,7 +73,7 @@ class _BoardCardState extends State<BoardCard> {
|
|||||||
(cellId) {
|
(cellId) {
|
||||||
final child = widget.cellBuilder.buildCell(cellId);
|
final child = widget.cellBuilder.buildCell(cellId);
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 5),
|
padding: const EdgeInsets.symmetric(horizontal: 6),
|
||||||
child: child,
|
child: child,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
class BoardSizes {
|
||||||
|
static double get cardCellVPading => 4;
|
||||||
|
}
|
@ -279,7 +279,6 @@ class IGridCellController<T, D> extends Equatable {
|
|||||||
_loadDataOperation?.cancel();
|
_loadDataOperation?.cancel();
|
||||||
_loadDataOperation = Timer(const Duration(milliseconds: 10), () {
|
_loadDataOperation = Timer(const Duration(milliseconds: 10), () {
|
||||||
_cellDataLoader.loadData().then((data) {
|
_cellDataLoader.loadData().then((data) {
|
||||||
Log.debug('$fieldId CellData: Did Get cell data');
|
|
||||||
_cellsCache.insert(_cacheKey, GridCell(object: data));
|
_cellsCache.insert(_cacheKey, GridCell(object: data));
|
||||||
_cellDataNotifier?.value = data;
|
_cellDataNotifier?.value = data;
|
||||||
});
|
});
|
||||||
|
@ -114,7 +114,7 @@ class _MultiBoardListExampleState extends State<MultiBoardListExample> {
|
|||||||
return Align(
|
return Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 40),
|
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 60),
|
||||||
child: Text(item.s),
|
child: Text(item.s),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -124,7 +124,7 @@ class _MultiBoardListExampleState extends State<MultiBoardListExample> {
|
|||||||
return Align(
|
return Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(20),
|
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 60),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
Reference in New Issue
Block a user