mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-20 00:56:31 +08:00
opt: scheme
This commit is contained in:
committed by
bggRGjQaUbCoE
parent
2b1759bd10
commit
a635767561
@@ -68,7 +68,7 @@ class _SavePanelState extends State<SavePanel> {
|
|||||||
bool showBottom = true;
|
bool showBottom = true;
|
||||||
|
|
||||||
// item
|
// item
|
||||||
dynamic get _item => widget.item;
|
Object get _item => widget.item;
|
||||||
late String viewType = '查看';
|
late String viewType = '查看';
|
||||||
late String itemType = '内容';
|
late String itemType = '内容';
|
||||||
|
|
||||||
@@ -135,8 +135,6 @@ class _SavePanelState extends State<SavePanel> {
|
|||||||
late final rootId = hasRoot ? reply.root : reply.id;
|
late final rootId = hasRoot ? reply.root : reply.id;
|
||||||
late final anchor = hasRoot ? 'anchor=${reply.id}&' : '';
|
late final anchor = hasRoot ? 'anchor=${reply.id}&' : '';
|
||||||
late final enterUri = parseDyn(dynItem);
|
late final enterUri = parseDyn(dynItem);
|
||||||
viewType = '查看';
|
|
||||||
itemType = '评论';
|
|
||||||
uri = switch (type) {
|
uri = switch (type) {
|
||||||
1 || 11 || 12 =>
|
1 || 11 || 12 =>
|
||||||
'bilibili://comment/detail/$type/${dynItem.basic!.ridStr}/$rootId/?${anchor}enterUri=$enterUri',
|
'bilibili://comment/detail/$type/${dynItem.basic!.ridStr}/$rootId/?${anchor}enterUri=$enterUri',
|
||||||
@@ -331,19 +329,19 @@ class _SavePanelState extends State<SavePanel> {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
if (_item is ReplyInfo)
|
if (_item case ReplyInfo reply)
|
||||||
IgnorePointer(
|
IgnorePointer(
|
||||||
child: ReplyItemGrpc(
|
child: ReplyItemGrpc(
|
||||||
replyItem: _item,
|
replyItem: reply,
|
||||||
replyLevel: 0,
|
replyLevel: 0,
|
||||||
needDivider: false,
|
needDivider: false,
|
||||||
upMid: widget.upMid,
|
upMid: widget.upMid,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
else if (_item is DynamicItemModel)
|
else if (_item case DynamicItemModel dyn)
|
||||||
IgnorePointer(
|
IgnorePointer(
|
||||||
child: DynamicPanel(
|
child: DynamicPanel(
|
||||||
item: _item,
|
item: dyn,
|
||||||
isDetail: true,
|
isDetail: true,
|
||||||
isSave: true,
|
isSave: true,
|
||||||
maxWidth: maxWidth - 24,
|
maxWidth: maxWidth - 24,
|
||||||
@@ -423,9 +421,9 @@ class _SavePanelState extends State<SavePanel> {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment:
|
crossAxisAlignment:
|
||||||
CrossAxisAlignment.end,
|
CrossAxisAlignment.end,
|
||||||
|
spacing: 4,
|
||||||
children: [
|
children: [
|
||||||
if (uname?.isNotEmpty ==
|
if (uname?.isNotEmpty == true)
|
||||||
true) ...[
|
|
||||||
Text(
|
Text(
|
||||||
'@$uname',
|
'@$uname',
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
@@ -437,8 +435,6 @@ class _SavePanelState extends State<SavePanel> {
|
|||||||
.primary,
|
.primary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
|
||||||
],
|
|
||||||
Text(
|
Text(
|
||||||
'识别二维码,$viewType$itemType',
|
'识别二维码,$viewType$itemType',
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
@@ -448,7 +444,6 @@ class _SavePanelState extends State<SavePanel> {
|
|||||||
.onSurfaceVariant,
|
.onSurfaceVariant,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
|
||||||
Text(
|
Text(
|
||||||
DateUtil.longFormatDs
|
DateUtil.longFormatDs
|
||||||
.format(
|
.format(
|
||||||
|
|||||||
@@ -133,11 +133,13 @@ class PiliScheme {
|
|||||||
IconButton(
|
IconButton(
|
||||||
tooltip: '前往原视频',
|
tooltip: '前往原视频',
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
String? enterUri = uri
|
routePush(
|
||||||
.toString()
|
Uri(
|
||||||
.split('?')
|
scheme: uri.scheme,
|
||||||
.first; // to check
|
host: uri.host,
|
||||||
routePush(Uri.parse(enterUri));
|
path: uri.path,
|
||||||
|
),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.open_in_new),
|
icon: const Icon(Icons.open_in_new),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user