mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -38,8 +38,15 @@ Widget module(
|
||||
// 视频
|
||||
case 'DYNAMIC_TYPE_AV':
|
||||
return videoSeasonWidget(
|
||||
theme, isSave, isDetail, item, context, 'archive', callback,
|
||||
floor: floor);
|
||||
theme,
|
||||
isSave,
|
||||
isDetail,
|
||||
item,
|
||||
context,
|
||||
'archive',
|
||||
callback,
|
||||
floor: floor,
|
||||
);
|
||||
// 转发
|
||||
case 'DYNAMIC_TYPE_FORWARD':
|
||||
final orig = item.orig!;
|
||||
@@ -121,7 +128,8 @@ Widget module(
|
||||
GestureDetector(
|
||||
onTap: isNormalAuth
|
||||
? () => Get.toNamed(
|
||||
'/member?mid=${orig.modules.moduleAuthor!.mid}')
|
||||
'/member?mid=${orig.modules.moduleAuthor!.mid}',
|
||||
)
|
||||
: null,
|
||||
child: Text(
|
||||
'${isNormalAuth ? '@' : ''}${orig.modules.moduleAuthor!.name}',
|
||||
@@ -131,20 +139,37 @@ Widget module(
|
||||
const SizedBox(width: 6),
|
||||
Text(
|
||||
isSave
|
||||
? DateUtil.format(orig.modules.moduleAuthor!.pubTs,
|
||||
format: DateUtil.longFormatDs)
|
||||
? DateUtil.format(
|
||||
orig.modules.moduleAuthor!.pubTs,
|
||||
format: DateUtil.longFormatDs,
|
||||
)
|
||||
: DateUtil.dateFormat(orig.modules.moduleAuthor!.pubTs),
|
||||
style: TextStyle(
|
||||
color: theme.colorScheme.outline,
|
||||
fontSize: theme.textTheme.labelSmall!.fontSize),
|
||||
color: theme.colorScheme.outline,
|
||||
fontSize: theme.textTheme.labelSmall!.fontSize,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
content(theme, isSave, context, orig, isDetail, callback,
|
||||
floor: floor + 1),
|
||||
module(theme, isSave, orig, context, isDetail, callback,
|
||||
floor: floor + 1),
|
||||
content(
|
||||
theme,
|
||||
isSave,
|
||||
context,
|
||||
orig,
|
||||
isDetail,
|
||||
callback,
|
||||
floor: floor + 1,
|
||||
),
|
||||
module(
|
||||
theme,
|
||||
isSave,
|
||||
orig,
|
||||
context,
|
||||
isDetail,
|
||||
callback,
|
||||
floor: floor + 1,
|
||||
),
|
||||
if (orig.modules.moduleDynamic?.additional != null)
|
||||
addWidget(theme, orig, context, floor: floor + 1),
|
||||
if (orig.modules.moduleDynamic?.major?.blocked != null)
|
||||
@@ -162,21 +187,42 @@ Widget module(
|
||||
// 合集
|
||||
case 'DYNAMIC_TYPE_UGC_SEASON':
|
||||
return videoSeasonWidget(
|
||||
theme, isSave, isDetail, item, context, 'ugcSeason', callback);
|
||||
theme,
|
||||
isSave,
|
||||
isDetail,
|
||||
item,
|
||||
context,
|
||||
'ugcSeason',
|
||||
callback,
|
||||
);
|
||||
case 'DYNAMIC_TYPE_PGC':
|
||||
return videoSeasonWidget(
|
||||
theme, isSave, isDetail, item, context, 'pgc', callback,
|
||||
floor: floor);
|
||||
theme,
|
||||
isSave,
|
||||
isDetail,
|
||||
item,
|
||||
context,
|
||||
'pgc',
|
||||
callback,
|
||||
floor: floor,
|
||||
);
|
||||
case 'DYNAMIC_TYPE_PGC_UNION':
|
||||
return videoSeasonWidget(
|
||||
theme, isSave, isDetail, item, context, 'pgc', callback,
|
||||
floor: floor);
|
||||
theme,
|
||||
isSave,
|
||||
isDetail,
|
||||
item,
|
||||
context,
|
||||
'pgc',
|
||||
callback,
|
||||
floor: floor,
|
||||
);
|
||||
case 'DYNAMIC_TYPE_NONE':
|
||||
return Row(
|
||||
spacing: 4,
|
||||
children: [
|
||||
const Icon(FontAwesomeIcons.ghost, size: 14),
|
||||
Text(item.modules.moduleDynamic!.major!.none!.tips!)
|
||||
Text(item.modules.moduleDynamic!.major!.none!.tips!),
|
||||
],
|
||||
);
|
||||
// 课堂
|
||||
@@ -214,12 +260,21 @@ Widget module(
|
||||
} catch (_) {}
|
||||
},
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(left: 12, top: 10, right: 12, bottom: 10),
|
||||
padding: const EdgeInsets.only(
|
||||
left: 12,
|
||||
top: 10,
|
||||
right: 12,
|
||||
bottom: 10,
|
||||
),
|
||||
child: Row(
|
||||
spacing: 10,
|
||||
children: [
|
||||
if (item.modules.moduleDynamic!.major!.common!.cover
|
||||
if (item
|
||||
.modules
|
||||
.moduleDynamic!
|
||||
.major!
|
||||
.common!
|
||||
.cover
|
||||
?.isNotEmpty ==
|
||||
true)
|
||||
ClipRRect(
|
||||
@@ -228,8 +283,13 @@ Widget module(
|
||||
width: 45,
|
||||
height: 45,
|
||||
fit: BoxFit.cover,
|
||||
imageUrl: item.modules.moduleDynamic!.major!.common!
|
||||
.cover!.http2https,
|
||||
imageUrl: item
|
||||
.modules
|
||||
.moduleDynamic!
|
||||
.major!
|
||||
.common!
|
||||
.cover!
|
||||
.http2https,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
@@ -243,7 +303,12 @@ Widget module(
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
if (item.modules.moduleDynamic!.major!.common!.desc
|
||||
if (item
|
||||
.modules
|
||||
.moduleDynamic!
|
||||
.major!
|
||||
.common!
|
||||
.desc
|
||||
?.isNotEmpty ==
|
||||
true)
|
||||
Text(
|
||||
@@ -269,8 +334,12 @@ Widget module(
|
||||
onTap: () => PageUtils.handleWebview("https:${music['jump_url']}"),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
padding:
|
||||
const EdgeInsets.only(left: 12, top: 10, right: 12, bottom: 10),
|
||||
padding: const EdgeInsets.only(
|
||||
left: 12,
|
||||
top: 10,
|
||||
right: 12,
|
||||
bottom: 10,
|
||||
),
|
||||
color: theme.dividerColor.withValues(alpha: 0.08),
|
||||
child: Row(
|
||||
children: [
|
||||
@@ -303,7 +372,7 @@ Widget module(
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
],
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -331,7 +400,7 @@ Widget module(
|
||||
top: 6,
|
||||
text:
|
||||
item.modules.moduleDynamic!.major!.medialist!.badge?.text,
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(width: 14),
|
||||
@@ -347,8 +416,9 @@ Widget module(
|
||||
Text(
|
||||
item.modules.moduleDynamic!.major!.medialist!.title!,
|
||||
style: TextStyle(
|
||||
fontSize: theme.textTheme.titleMedium!.fontSize,
|
||||
fontWeight: FontWeight.bold),
|
||||
fontSize: theme.textTheme.titleMedium!.fontSize,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
if (item.modules.moduleDynamic?.major?.medialist?.subTitle !=
|
||||
null) ...[
|
||||
@@ -356,8 +426,9 @@ Widget module(
|
||||
Text(
|
||||
item.modules.moduleDynamic!.major!.medialist!.subTitle!,
|
||||
style: TextStyle(
|
||||
fontSize: theme.textTheme.labelLarge!.fontSize,
|
||||
color: theme.colorScheme.outline),
|
||||
fontSize: theme.textTheme.labelLarge!.fontSize,
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user