chore: ui update

This commit is contained in:
Simon Ding
2024-08-07 22:55:24 +08:00
parent 7e88533ea2
commit e8a38aa6f8
3 changed files with 7 additions and 5 deletions

View File

@@ -282,7 +282,7 @@ class _MainSkeletonState extends State<MainSkeleton> {
label: '系统', label: '系统',
), ),
], ],
body: (context) => widget.body, body: (context) => SafeArea(child: widget.body),
// Define a default secondaryBody. // Define a default secondaryBody.
// Override the default secondaryBody during the smallBreakpoint to be // Override the default secondaryBody during the smallBreakpoint to be
// empty. Must use AdaptiveScaffold.emptyBuilder to ensure it is properly // empty. Must use AdaptiveScaffold.emptyBuilder to ensure it is properly

View File

@@ -134,7 +134,7 @@ class _DetailCardState extends ConsumerState<DetailCard> {
child: const Text("取消")), child: const Text("取消")),
TextButton( TextButton(
onPressed: () { onPressed: () {
var f = ref ref
.read(mediaDetailsProvider(widget.details.id.toString()) .read(mediaDetailsProvider(widget.details.id.toString())
.notifier) .notifier)
.delete() .delete()
@@ -165,8 +165,8 @@ class _DetailCardState extends ConsumerState<DetailCard> {
title: Text("编辑 ${details.name}"), title: Text("编辑 ${details.name}"),
content: SelectionArea( content: SelectionArea(
child: SizedBox( child: SizedBox(
width: MediaQuery.of(context).size.width * 0.5, width: MediaQuery.of(context).size.width * 0.3,
height: MediaQuery.of(context).size.height * 0.3, height: MediaQuery.of(context).size.height * 0.4,
child: SingleChildScrollView( child: SingleChildScrollView(
child: FormBuilder( child: FormBuilder(
key: _formKey, key: _formKey,
@@ -191,6 +191,7 @@ class _DetailCardState extends ConsumerState<DetailCard> {
), ),
FormBuilderTextField( FormBuilderTextField(
name: "target_dir", name: "target_dir",
decoration: const InputDecoration(labelText: "存储路径"),
validator: FormBuilderValidators.required(), validator: FormBuilderValidators.required(),
), ),
const MyRangeSlider(name: "limiter"), const MyRangeSlider(name: "limiter"),

View File

@@ -103,8 +103,9 @@ class _MySliderState extends State<MyRangeSlider> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return FormBuilderRangeSlider( return FormBuilderRangeSlider(
decoration: const InputDecoration(labelText: "文件大小限制"),
maxValueWidget: (max) => Text("${sizeMax / 1000} GB"), maxValueWidget: (max) => Text("${sizeMax / 1000} GB"),
minValueWidget: (min) => Text("0"), minValueWidget: (min) => const Text("0"),
valueWidget: (value) { valueWidget: (value) {
final sss = value.split(" "); final sss = value.split(" ");
return Text("${readableSize(sss[0])} - ${readableSize(sss[2])}"); return Text("${readableSize(sss[0])} - ${readableSize(sss[2])}");