mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: show dyn gif emote
mod: emote tabbar opt: video progress indicator Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -4,11 +4,11 @@ Widget videoProgressIndicator(double progress) => ClipRect(
|
|||||||
clipper: ProgressClipper(),
|
clipper: ProgressClipper(),
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
bottomLeft: Radius.circular(12),
|
bottomLeft: Radius.circular(10),
|
||||||
bottomRight: Radius.circular(12),
|
bottomRight: Radius.circular(10),
|
||||||
),
|
),
|
||||||
child: LinearProgressIndicator(
|
child: LinearProgressIndicator(
|
||||||
minHeight: 12,
|
minHeight: 10,
|
||||||
value: progress,
|
value: progress,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -17,7 +17,7 @@ Widget videoProgressIndicator(double progress) => ClipRect(
|
|||||||
class ProgressClipper extends CustomClipper<Rect> {
|
class ProgressClipper extends CustomClipper<Rect> {
|
||||||
@override
|
@override
|
||||||
Rect getClip(Size size) {
|
Rect getClip(Size size) {
|
||||||
return Rect.fromLTWH(0, 8, size.width, size.height - 8);
|
return Rect.fromLTWH(0, 6, size.width, size.height - 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -638,11 +638,15 @@ class Emoji {
|
|||||||
});
|
});
|
||||||
|
|
||||||
String? iconUrl;
|
String? iconUrl;
|
||||||
|
String? webpUrl;
|
||||||
|
String? gifUrl;
|
||||||
double? size;
|
double? size;
|
||||||
String? text;
|
String? text;
|
||||||
int? type;
|
int? type;
|
||||||
Emoji.fromJson(Map<String, dynamic> json) {
|
Emoji.fromJson(Map<String, dynamic> json) {
|
||||||
iconUrl = json['icon_url'];
|
iconUrl = json['icon_url'];
|
||||||
|
webpUrl = json['webp_url'];
|
||||||
|
gifUrl = json['gif_url'];
|
||||||
size = json['size'].toDouble();
|
size = json['size'].toDouble();
|
||||||
text = json['text'];
|
text = json['text'];
|
||||||
type = json['type'];
|
type = json['type'];
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ InlineSpan? richNode(item, context) {
|
|||||||
spanChildren.add(
|
spanChildren.add(
|
||||||
WidgetSpan(
|
WidgetSpan(
|
||||||
child: NetworkImgLayer(
|
child: NetworkImgLayer(
|
||||||
src: i.emoji!.iconUrl,
|
src: i.emoji!.webpUrl ?? i.emoji!.gifUrl ?? i.emoji!.iconUrl,
|
||||||
type: 'emote',
|
type: 'emote',
|
||||||
width: (i.emoji!.size ?? 1) * 20,
|
width: (i.emoji!.size ?? 1) * 20,
|
||||||
height: (i.emoji!.size ?? 1) * 20,
|
height: (i.emoji!.size ?? 1) * 20,
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ class _EmotePanelState extends State<EmotePanel>
|
|||||||
),
|
),
|
||||||
TabBar(
|
TabBar(
|
||||||
controller: _emotePanelController.tabController,
|
controller: _emotePanelController.tabController,
|
||||||
|
padding: const EdgeInsets.only(right: 60),
|
||||||
dividerColor: Colors.transparent,
|
dividerColor: Colors.transparent,
|
||||||
isScrollable: true,
|
isScrollable: true,
|
||||||
tabs: (loadingState.response as List<Packages>)
|
tabs: (loadingState.response as List<Packages>)
|
||||||
|
|||||||
@@ -186,7 +186,6 @@ class HistoryItem extends StatelessWidget {
|
|||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
NetworkImgLayer(
|
NetworkImgLayer(
|
||||||
radius: 12,
|
|
||||||
src: (videoItem.cover != ''
|
src: (videoItem.cover != ''
|
||||||
? videoItem.cover
|
? videoItem.cover
|
||||||
: videoItem.covers.first),
|
: videoItem.covers.first),
|
||||||
@@ -228,7 +227,7 @@ class HistoryItem extends StatelessWidget {
|
|||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(10),
|
||||||
color: Colors.black.withOpacity(0.6),
|
color: Colors.black.withOpacity(0.6),
|
||||||
),
|
),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
|
|||||||
Reference in New Issue
Block a user