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

View File

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

View File

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