mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-16 15:16:15 +08:00
feat: match info
opt dateformat Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -2,7 +2,8 @@ import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
|
||||
import 'package:PiliPlus/http/fav.dart';
|
||||
import 'package:PiliPlus/http/msg.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_folder/list.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:PiliPlus/utils/fav_util.dart';
|
||||
import 'package:PiliPlus/utils/image_util.dart';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:easy_debounce/easy_throttle.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -45,7 +46,7 @@ class _CreateFavPageState extends State<CreateFavPage> {
|
||||
FavFolderInfo data = res['data'];
|
||||
_titleController.text = data.title;
|
||||
_introController.text = data.intro ?? '';
|
||||
_isPublic = Utils.isPublicFav(data.attr);
|
||||
_isPublic = FavUtil.isPublicFav(data.attr);
|
||||
_cover = data.cover;
|
||||
_attr = data.attr;
|
||||
} else {
|
||||
@@ -173,7 +174,7 @@ class _CreateFavPageState extends State<CreateFavPage> {
|
||||
Widget _buildBody(ThemeData theme) => SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
if (_attr == null || !Utils.isDefaultFav(_attr!)) ...[
|
||||
if (_attr == null || !FavUtil.isDefaultFav(_attr!)) ...[
|
||||
ListTile(
|
||||
tileColor: theme.colorScheme.onInverseSurface,
|
||||
onTap: () {
|
||||
@@ -239,7 +240,7 @@ class _CreateFavPageState extends State<CreateFavPage> {
|
||||
borderRadius:
|
||||
const BorderRadius.all(Radius.circular(6)),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: Utils.thumbnailImgUrl(_cover!),
|
||||
imageUrl: ImageUtil.thumbnailUrl(_cover!),
|
||||
height: constraints.maxHeight,
|
||||
width: constraints.maxHeight * 16 / 9,
|
||||
fit: BoxFit.cover,
|
||||
@@ -287,11 +288,11 @@ class _CreateFavPageState extends State<CreateFavPage> {
|
||||
),
|
||||
title: TextField(
|
||||
autofocus: true,
|
||||
readOnly: _attr != null && Utils.isDefaultFav(_attr!),
|
||||
readOnly: _attr != null && FavUtil.isDefaultFav(_attr!),
|
||||
controller: _titleController,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: _attr != null && Utils.isDefaultFav(_attr!)
|
||||
color: _attr != null && FavUtil.isDefaultFav(_attr!)
|
||||
? theme.colorScheme.outline
|
||||
: null,
|
||||
),
|
||||
@@ -314,7 +315,7 @@ class _CreateFavPageState extends State<CreateFavPage> {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
if (_attr == null || !Utils.isDefaultFav(_attr!)) ...[
|
||||
if (_attr == null || !FavUtil.isDefaultFav(_attr!)) ...[
|
||||
ListTile(
|
||||
tileColor: theme.colorScheme.onInverseSurface,
|
||||
title: Row(
|
||||
|
||||
Reference in New Issue
Block a user