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: '系统',
),
],
body: (context) => widget.body,
body: (context) => SafeArea(child: widget.body),
// Define a default secondaryBody.
// Override the default secondaryBody during the smallBreakpoint to be
// empty. Must use AdaptiveScaffold.emptyBuilder to ensure it is properly

View File

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

View File

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