mod: repost panel

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-18 18:46:24 +08:00
parent b25de52b9e
commit 3191ae27a5
3 changed files with 13 additions and 8 deletions

View File

@@ -175,6 +175,7 @@ class EpisodeItem {
this.subtitle, this.subtitle,
this.title, this.title,
this.vid, this.vid,
this.showTitle,
}); });
int? aid; int? aid;
@@ -205,6 +206,7 @@ class EpisodeItem {
String? subtitle; String? subtitle;
String? title; String? title;
String? vid; String? vid;
String? showTitle;
EpisodeItem.fromJson(Map<String, dynamic> json) { EpisodeItem.fromJson(Map<String, dynamic> json) {
aid = json['aid']; aid = json['aid'];
@@ -235,6 +237,7 @@ class EpisodeItem {
subtitle = json['subtitle']; subtitle = json['subtitle'];
title = json['title']; title = json['title'];
vid = json['vid']; vid = json['vid'];
showTitle = json['show_title'];
} }
} }

View File

@@ -406,6 +406,8 @@ class BangumiIntroController extends CommonController {
), ),
onTap: () { onTap: () {
Get.back(); Get.back();
EpisodeItem? item = bangumiItem?.episodes
?.firstWhereOrNull((item) => item.epId == epId);
showModalBottomSheet( showModalBottomSheet(
context: context, context: context,
isScrollControlled: true, isScrollControlled: true,
@@ -430,7 +432,8 @@ class BangumiIntroController extends CommonController {
_ => -1, _ => -1,
}, },
pic: bangumiItem?.cover, pic: bangumiItem?.cover,
title: bangumiItem?.title, title:
'${bangumiItem?.title}${item != null ? '\n${item.showTitle}' : ''}',
uname: '', uname: '',
), ),
); );

View File

@@ -161,7 +161,6 @@ class _RepostPanelState extends CommonPublishPageState<RepostPanel> {
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
), ),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if (_pic != null) ...[ if (_pic != null) ...[
NetworkImgLayer( NetworkImgLayer(
@@ -248,8 +247,8 @@ class _RepostPanelState extends CommonPublishPageState<RepostPanel> {
? Row( ? Row(
children: [ children: [
const SizedBox(width: 16), const SizedBox(width: 16),
const Text( Text(
'转发动态', widget.rid != null ? '分享至动态' : '转发动态',
style: TextStyle(fontWeight: FontWeight.bold), style: TextStyle(fontWeight: FontWeight.bold),
), ),
const Spacer(), const Spacer(),
@@ -263,7 +262,7 @@ class _RepostPanelState extends CommonPublishPageState<RepostPanel> {
vertical: -2, vertical: -2,
), ),
), ),
child: const Text('立即转发'), child: Text(widget.rid != null ? '立即发布' : '立即转发'),
), ),
const SizedBox(width: 16), const SizedBox(width: 16),
], ],
@@ -298,8 +297,8 @@ class _RepostPanelState extends CommonPublishPageState<RepostPanel> {
), ),
), ),
Center( Center(
child: const Text( child: Text(
'转发动态', widget.rid != null ? '分享至动态' : '转发动态',
style: TextStyle(fontSize: 15, fontWeight: FontWeight.bold), style: TextStyle(fontSize: 15, fontWeight: FontWeight.bold),
), ),
), ),
@@ -318,7 +317,7 @@ class _RepostPanelState extends CommonPublishPageState<RepostPanel> {
vertical: -2, vertical: -2,
), ),
), ),
child: const Text('转发'), child: Text(widget.rid != null ? '发布' : '转发'),
), ),
), ),
], ],