Compare commits

..

1 Commits

Author SHA1 Message Date
296f4108b8 Merge branch 'main' into feature-ad 2024-03-26 22:15:30 +08:00
4 changed files with 15 additions and 45 deletions

View File

@ -437,8 +437,7 @@ class SearchArticleItemModel {
pubTime = json['pub_time']; pubTime = json['pub_time'];
like = json['like']; like = json['like'];
title = Em.regTitle(json['title']); title = Em.regTitle(json['title']);
subTitle = subTitle = json['title'].replaceAll(RegExp(r'<[^>]*>'), '');
Em.decodeHtmlEntities(json['title'].replaceAll(RegExp(r'<[^>]*>'), ''));
rankOffset = json['rank_offset']; rankOffset = json['rank_offset'];
mid = json['mid']; mid = json['mid'];
imageUrls = json['image_urls']; imageUrls = json['image_urls'];

View File

@ -185,7 +185,7 @@ class HistoryItem extends StatelessWidget {
? '已看完' ? '已看完'
: '${Utils.timeFormat(videoItem.progress!)}/${Utils.timeFormat(videoItem.duration!)}', : '${Utils.timeFormat(videoItem.progress!)}/${Utils.timeFormat(videoItem.duration!)}',
right: 6.0, right: 6.0,
bottom: 8.0, bottom: 6.0,
type: 'gray', type: 'gray',
), ),
// 右上角 // 右上角
@ -258,27 +258,6 @@ class HistoryItem extends StatelessWidget {
), ),
), ),
), ),
videoItem.progress != 0
? Positioned(
left: 3,
right: 3,
bottom: 0,
child: ClipRRect(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(
StyleString.imgRadius.x),
bottomRight: Radius.circular(
StyleString.imgRadius.x),
),
child: LinearProgressIndicator(
value: videoItem.progress == -1
? 100
: videoItem.progress /
videoItem.duration,
),
),
)
: const SizedBox()
], ],
), ),
VideoContent(videoItem: videoItem, ctr: ctr) VideoContent(videoItem: videoItem, ctr: ctr)

View File

@ -149,17 +149,14 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
delegate: _MySliverPersistentHeaderDelegate( delegate: _MySliverPersistentHeaderDelegate(
child: Container( child: Container(
height: 40, height: 40,
padding: const EdgeInsets.fromLTRB(12, 0, 6, 0), padding: const EdgeInsets.fromLTRB(12, 6, 6, 0),
color: Theme.of(context).colorScheme.surface,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Obx( Text(
() => Text(
'${_videoReplyController.sortTypeLabel.value}评论', '${_videoReplyController.sortTypeLabel.value}评论',
style: const TextStyle(fontSize: 13), style: const TextStyle(fontSize: 13),
), ),
),
SizedBox( SizedBox(
height: 35, height: 35,
child: TextButton.icon( child: TextButton.icon(

View File

@ -19,17 +19,7 @@ class Em {
return regCate(matchStr); return regCate(matchStr);
}, onNonMatch: (String str) { }, onNonMatch: (String str) {
if (str != '') { if (str != '') {
str = decodeHtmlEntities(str); str = str
Map map = {'type': 'text', 'text': str};
res.add(map);
}
return str;
});
return res;
}
static String decodeHtmlEntities(String title) {
return title
.replaceAll('&lt;', '<') .replaceAll('&lt;', '<')
.replaceAll('&gt;', '>') .replaceAll('&gt;', '>')
.replaceAll('&#34;', '"') .replaceAll('&#34;', '"')
@ -37,7 +27,12 @@ class Em {
.replaceAll('&quot;', '"') .replaceAll('&quot;', '"')
.replaceAll('&apos;', "'") .replaceAll('&apos;', "'")
.replaceAll('&nbsp;', " ") .replaceAll('&nbsp;', " ")
.replaceAll('&amp;', "&") .replaceAll('&amp;', "&");
.replaceAll('&#x27;', "'"); Map map = {'type': 'text', 'text': str};
res.add(map);
}
return str;
});
return res;
} }
} }