mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-01 08:38:18 +08:00
@@ -54,70 +54,68 @@ class SearchArticleController
|
|||||||
builder: (context) {
|
builder: (context) {
|
||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
child: Padding(
|
padding: EdgeInsets.only(
|
||||||
padding: EdgeInsets.only(
|
top: 20,
|
||||||
top: 20,
|
left: 16,
|
||||||
left: 16,
|
right: 16,
|
||||||
right: 16,
|
bottom: 100 + MediaQuery.viewPaddingOf(context).bottom,
|
||||||
bottom: 100 + MediaQuery.viewPaddingOf(context).bottom,
|
),
|
||||||
),
|
child: Column(
|
||||||
child: Column(
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisSize: MainAxisSize.min,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
children: [
|
||||||
children: [
|
const SizedBox(height: 10),
|
||||||
const SizedBox(height: 10),
|
const Text('排序', style: TextStyle(fontSize: 16)),
|
||||||
const Text('排序', style: TextStyle(fontSize: 16)),
|
const SizedBox(height: 10),
|
||||||
const SizedBox(height: 10),
|
Wrap(
|
||||||
Wrap(
|
spacing: 8,
|
||||||
spacing: 8,
|
runSpacing: 8,
|
||||||
runSpacing: 8,
|
children: ArticleOrderType.values.map(
|
||||||
children: ArticleOrderType.values.map(
|
(e) {
|
||||||
(e) {
|
final isCurr = e == articleOrderType.value;
|
||||||
final isCurr = e == articleOrderType.value;
|
return SearchText(
|
||||||
return SearchText(
|
text: e.label,
|
||||||
text: e.label,
|
onTap: (_) {
|
||||||
onTap: (_) {
|
articleOrderType.value = e;
|
||||||
articleOrderType.value = e;
|
order = e.order;
|
||||||
order = e.order;
|
onSortSearch(label: e.label);
|
||||||
onSortSearch(label: e.label);
|
},
|
||||||
},
|
bgColor: isCurr
|
||||||
bgColor: isCurr
|
? theme.colorScheme.secondaryContainer
|
||||||
? theme.colorScheme.secondaryContainer
|
: null,
|
||||||
: null,
|
textColor: isCurr
|
||||||
textColor: isCurr
|
? theme.colorScheme.onSecondaryContainer
|
||||||
? theme.colorScheme.onSecondaryContainer
|
: null,
|
||||||
: null,
|
);
|
||||||
);
|
},
|
||||||
},
|
).toList(),
|
||||||
).toList(),
|
),
|
||||||
),
|
const SizedBox(height: 20),
|
||||||
const SizedBox(height: 20),
|
const Text('分区', style: TextStyle(fontSize: 16)),
|
||||||
const Text('分区', style: TextStyle(fontSize: 16)),
|
const SizedBox(height: 10),
|
||||||
const SizedBox(height: 10),
|
Wrap(
|
||||||
Wrap(
|
spacing: 8,
|
||||||
spacing: 8,
|
runSpacing: 8,
|
||||||
runSpacing: 8,
|
children: ArticleZoneType.values.map(
|
||||||
children: ArticleZoneType.values.map(
|
(e) {
|
||||||
(e) {
|
final isCurr = e == articleZoneType!.value;
|
||||||
final isCurr = e == articleZoneType!.value;
|
return SearchText(
|
||||||
return SearchText(
|
text: e.label,
|
||||||
text: e.label,
|
onTap: (_) {
|
||||||
onTap: (_) {
|
articleZoneType!.value = e;
|
||||||
articleZoneType!.value = e;
|
onSortSearch(label: e.label);
|
||||||
onSortSearch(label: e.label);
|
},
|
||||||
},
|
bgColor: isCurr
|
||||||
bgColor: isCurr
|
? theme.colorScheme.secondaryContainer
|
||||||
? theme.colorScheme.secondaryContainer
|
: null,
|
||||||
: null,
|
textColor: isCurr
|
||||||
textColor: isCurr
|
? theme.colorScheme.onSecondaryContainer
|
||||||
? theme.colorScheme.onSecondaryContainer
|
: null,
|
||||||
: null,
|
);
|
||||||
);
|
},
|
||||||
},
|
).toList(),
|
||||||
).toList(),
|
),
|
||||||
),
|
],
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -34,70 +34,68 @@ class SearchUserController
|
|||||||
builder: (context) {
|
builder: (context) {
|
||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
child: Padding(
|
padding: EdgeInsets.only(
|
||||||
padding: EdgeInsets.only(
|
top: 20,
|
||||||
top: 20,
|
left: 16,
|
||||||
left: 16,
|
right: 16,
|
||||||
right: 16,
|
bottom: 100 + MediaQuery.viewPaddingOf(context).bottom,
|
||||||
bottom: 100 + MediaQuery.viewPaddingOf(context).bottom,
|
),
|
||||||
),
|
child: Column(
|
||||||
child: Column(
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisSize: MainAxisSize.min,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
children: [
|
||||||
children: [
|
const SizedBox(height: 10),
|
||||||
const SizedBox(height: 10),
|
const Text('用户粉丝数及等级排序顺序', style: TextStyle(fontSize: 16)),
|
||||||
const Text('用户粉丝数及等级排序顺序', style: TextStyle(fontSize: 16)),
|
const SizedBox(height: 10),
|
||||||
const SizedBox(height: 10),
|
Wrap(
|
||||||
Wrap(
|
spacing: 8,
|
||||||
spacing: 8,
|
runSpacing: 8,
|
||||||
runSpacing: 8,
|
children: UserOrderType.values.map(
|
||||||
children: UserOrderType.values.map(
|
(e) {
|
||||||
(e) {
|
final isCurr = e == userOrderType!.value;
|
||||||
final isCurr = e == userOrderType!.value;
|
return SearchText(
|
||||||
return SearchText(
|
text: e.label,
|
||||||
text: e.label,
|
onTap: (_) {
|
||||||
onTap: (_) {
|
userOrderType!.value = e;
|
||||||
userOrderType!.value = e;
|
order = e.order;
|
||||||
order = e.order;
|
onSortSearch(label: e.label);
|
||||||
onSortSearch(label: e.label);
|
},
|
||||||
},
|
bgColor: isCurr
|
||||||
bgColor: isCurr
|
? theme.colorScheme.secondaryContainer
|
||||||
? theme.colorScheme.secondaryContainer
|
: null,
|
||||||
: null,
|
textColor: isCurr
|
||||||
textColor: isCurr
|
? theme.colorScheme.onSecondaryContainer
|
||||||
? theme.colorScheme.onSecondaryContainer
|
: null,
|
||||||
: null,
|
);
|
||||||
);
|
},
|
||||||
},
|
).toList(),
|
||||||
).toList(),
|
),
|
||||||
),
|
const SizedBox(height: 20),
|
||||||
const SizedBox(height: 20),
|
const Text('用户分类', style: TextStyle(fontSize: 16)),
|
||||||
const Text('用户分类', style: TextStyle(fontSize: 16)),
|
const SizedBox(height: 10),
|
||||||
const SizedBox(height: 10),
|
Wrap(
|
||||||
Wrap(
|
spacing: 8,
|
||||||
spacing: 8,
|
runSpacing: 8,
|
||||||
runSpacing: 8,
|
children: UserType.values.map(
|
||||||
children: UserType.values.map(
|
(e) {
|
||||||
(e) {
|
final isCurr = e == userType!.value;
|
||||||
final isCurr = e == userType!.value;
|
return SearchText(
|
||||||
return SearchText(
|
text: e.label,
|
||||||
text: e.label,
|
onTap: (_) {
|
||||||
onTap: (_) {
|
userType!.value = e;
|
||||||
userType!.value = e;
|
onSortSearch(label: e.label);
|
||||||
onSortSearch(label: e.label);
|
},
|
||||||
},
|
bgColor: isCurr
|
||||||
bgColor: isCurr
|
? theme.colorScheme.secondaryContainer
|
||||||
? theme.colorScheme.secondaryContainer
|
: null,
|
||||||
: null,
|
textColor: isCurr
|
||||||
textColor: isCurr
|
? theme.colorScheme.onSecondaryContainer
|
||||||
? theme.colorScheme.onSecondaryContainer
|
: null,
|
||||||
: null,
|
);
|
||||||
);
|
},
|
||||||
},
|
).toList(),
|
||||||
).toList(),
|
),
|
||||||
),
|
],
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -154,134 +154,132 @@ class SearchVideoController
|
|||||||
}
|
}
|
||||||
|
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
child: Padding(
|
padding: EdgeInsets.only(
|
||||||
padding: EdgeInsets.only(
|
top: 20,
|
||||||
top: 20,
|
left: 16,
|
||||||
left: 16,
|
right: 16,
|
||||||
right: 16,
|
bottom: 100 + MediaQuery.viewPaddingOf(context).bottom,
|
||||||
bottom: 100 + MediaQuery.viewPaddingOf(context).bottom,
|
),
|
||||||
),
|
child: Column(
|
||||||
child: Column(
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisSize: MainAxisSize.min,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
children: [
|
||||||
children: [
|
const SizedBox(height: 10),
|
||||||
const SizedBox(height: 10),
|
const Text('发布时间', style: TextStyle(fontSize: 16)),
|
||||||
const Text('发布时间', style: TextStyle(fontSize: 16)),
|
const SizedBox(height: 10),
|
||||||
const SizedBox(height: 10),
|
Wrap(
|
||||||
Wrap(
|
spacing: 8,
|
||||||
spacing: 8,
|
runSpacing: 8,
|
||||||
runSpacing: 8,
|
children: VideoPubTimeType.values.map(
|
||||||
children: VideoPubTimeType.values.map(
|
(e) {
|
||||||
(e) {
|
final isCurr = e == pubTimeType;
|
||||||
final isCurr = e == pubTimeType;
|
return SearchText(
|
||||||
return SearchText(
|
text: e.label,
|
||||||
text: e.label,
|
onTap: (text) {
|
||||||
onTap: (text) {
|
pubTimeType = e;
|
||||||
pubTimeType = e;
|
DateTime now = DateTime.now();
|
||||||
DateTime now = DateTime.now();
|
if (e == VideoPubTimeType.all) {
|
||||||
if (e == VideoPubTimeType.all) {
|
pubBegin = null;
|
||||||
pubBegin = null;
|
pubEnd = null;
|
||||||
pubEnd = null;
|
} else {
|
||||||
} else {
|
pubBegin =
|
||||||
pubBegin =
|
DateTime(
|
||||||
DateTime(
|
now.year,
|
||||||
now.year,
|
now.month,
|
||||||
now.month,
|
now.day -
|
||||||
now.day -
|
(e == VideoPubTimeType.day
|
||||||
(e == VideoPubTimeType.day
|
? 0
|
||||||
? 0
|
: e == VideoPubTimeType.week
|
||||||
: e == VideoPubTimeType.week
|
? 6
|
||||||
? 6
|
: 179),
|
||||||
: 179),
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
).millisecondsSinceEpoch ~/
|
||||||
).millisecondsSinceEpoch ~/
|
1000;
|
||||||
1000;
|
pubEnd =
|
||||||
pubEnd =
|
DateTime(
|
||||||
DateTime(
|
now.year,
|
||||||
now.year,
|
now.month,
|
||||||
now.month,
|
now.day,
|
||||||
now.day,
|
23,
|
||||||
23,
|
59,
|
||||||
59,
|
59,
|
||||||
59,
|
).millisecondsSinceEpoch ~/
|
||||||
).millisecondsSinceEpoch ~/
|
1000;
|
||||||
1000;
|
}
|
||||||
}
|
onSortSearch();
|
||||||
onSortSearch();
|
},
|
||||||
},
|
bgColor: isCurr
|
||||||
bgColor: isCurr
|
? theme.colorScheme.secondaryContainer
|
||||||
? theme.colorScheme.secondaryContainer
|
: null,
|
||||||
: null,
|
textColor: isCurr
|
||||||
textColor: isCurr
|
? theme.colorScheme.onSecondaryContainer
|
||||||
? theme.colorScheme.onSecondaryContainer
|
: null,
|
||||||
: null,
|
);
|
||||||
);
|
},
|
||||||
},
|
).toList(),
|
||||||
).toList(),
|
),
|
||||||
),
|
const SizedBox(height: 8),
|
||||||
const SizedBox(height: 8),
|
Row(
|
||||||
Row(
|
spacing: 8,
|
||||||
spacing: 8,
|
children: [
|
||||||
children: [
|
Expanded(child: dateWidget()),
|
||||||
Expanded(child: dateWidget()),
|
const Text('至', style: TextStyle(fontSize: 13)),
|
||||||
const Text('至', style: TextStyle(fontSize: 13)),
|
Expanded(child: dateWidget(false)),
|
||||||
Expanded(child: dateWidget(false)),
|
],
|
||||||
],
|
),
|
||||||
),
|
const SizedBox(height: 20),
|
||||||
const SizedBox(height: 20),
|
const Text('内容时长', style: TextStyle(fontSize: 16)),
|
||||||
const Text('内容时长', style: TextStyle(fontSize: 16)),
|
const SizedBox(height: 10),
|
||||||
const SizedBox(height: 10),
|
Wrap(
|
||||||
Wrap(
|
spacing: 8,
|
||||||
spacing: 8,
|
runSpacing: 8,
|
||||||
runSpacing: 8,
|
children: VideoDurationType.values.map(
|
||||||
children: VideoDurationType.values.map(
|
(e) {
|
||||||
(e) {
|
final isCurr = e == videoDurationType;
|
||||||
final isCurr = e == videoDurationType;
|
return SearchText(
|
||||||
return SearchText(
|
text: e.label,
|
||||||
text: e.label,
|
onTap: (_) {
|
||||||
onTap: (_) {
|
videoDurationType = e;
|
||||||
videoDurationType = e;
|
onSortSearch(label: e.label);
|
||||||
onSortSearch(label: e.label);
|
},
|
||||||
},
|
bgColor: isCurr
|
||||||
bgColor: isCurr
|
? theme.colorScheme.secondaryContainer
|
||||||
? theme.colorScheme.secondaryContainer
|
: null,
|
||||||
: null,
|
textColor: isCurr
|
||||||
textColor: isCurr
|
? theme.colorScheme.onSecondaryContainer
|
||||||
? theme.colorScheme.onSecondaryContainer
|
: null,
|
||||||
: null,
|
);
|
||||||
);
|
},
|
||||||
},
|
).toList(),
|
||||||
).toList(),
|
),
|
||||||
),
|
const SizedBox(height: 20),
|
||||||
const SizedBox(height: 20),
|
const Text('内容分区', style: TextStyle(fontSize: 16)),
|
||||||
const Text('内容分区', style: TextStyle(fontSize: 16)),
|
const SizedBox(height: 10),
|
||||||
const SizedBox(height: 10),
|
Wrap(
|
||||||
Wrap(
|
spacing: 8,
|
||||||
spacing: 8,
|
runSpacing: 8,
|
||||||
runSpacing: 8,
|
children: VideoZoneType.values.map(
|
||||||
children: VideoZoneType.values.map(
|
(e) {
|
||||||
(e) {
|
final isCurr = e == videoZoneType;
|
||||||
final isCurr = e == videoZoneType;
|
return SearchText(
|
||||||
return SearchText(
|
text: e.label,
|
||||||
text: e.label,
|
onTap: (_) {
|
||||||
onTap: (_) {
|
videoZoneType = e;
|
||||||
videoZoneType = e;
|
onSortSearch(label: e.label);
|
||||||
onSortSearch(label: e.label);
|
},
|
||||||
},
|
bgColor: isCurr
|
||||||
bgColor: isCurr
|
? theme.colorScheme.secondaryContainer
|
||||||
? theme.colorScheme.secondaryContainer
|
: null,
|
||||||
: null,
|
textColor: isCurr
|
||||||
textColor: isCurr
|
? theme.colorScheme.onSecondaryContainer
|
||||||
? theme.colorScheme.onSecondaryContainer
|
: null,
|
||||||
: null,
|
);
|
||||||
);
|
},
|
||||||
},
|
).toList(),
|
||||||
).toList(),
|
),
|
||||||
),
|
],
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user