opt: item

opt: util

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-16 23:48:25 +08:00
parent 12c711424b
commit d886569dc3
85 changed files with 1983 additions and 1964 deletions

View File

@@ -43,7 +43,7 @@ class _CreateFavPageState extends State<CreateFavPage> {
if (data['status']) {
_titleController.text = data['data']['title'];
_introController.text = data['data']['intro'];
_isPublic = Utils.isPublic(data['data']['attr']);
_isPublic = Utils.isPublicFav(data['data']['attr']);
_cover = data['data']['cover'];
_attr = data['data']['attr'];
} else {
@@ -171,7 +171,7 @@ class _CreateFavPageState extends State<CreateFavPage> {
Widget get _buildBody => SingleChildScrollView(
child: Column(
children: [
if (_attr == null || !Utils.isDefault(_attr!)) ...[
if (_attr == null || !Utils.isDefaultFav(_attr!)) ...[
ListTile(
tileColor: Theme.of(context).colorScheme.onInverseSurface,
onTap: () {
@@ -285,11 +285,11 @@ class _CreateFavPageState extends State<CreateFavPage> {
),
title: TextField(
autofocus: true,
readOnly: _attr != null && Utils.isDefault(_attr!),
readOnly: _attr != null && Utils.isDefaultFav(_attr!),
controller: _titleController,
style: TextStyle(
fontSize: 14,
color: _attr != null && Utils.isDefault(_attr!)
color: _attr != null && Utils.isDefaultFav(_attr!)
? Theme.of(context).colorScheme.outline
: null,
),
@@ -312,7 +312,7 @@ class _CreateFavPageState extends State<CreateFavPage> {
),
),
const SizedBox(height: 16),
if (_attr == null || !Utils.isDefault(_attr!)) ...[
if (_attr == null || !Utils.isDefaultFav(_attr!)) ...[
ListTile(
tileColor: Theme.of(context).colorScheme.onInverseSurface,
title: Row(

View File

@@ -107,7 +107,7 @@ class _FavPanelState extends State<FavPanel> {
1,
index),
dense: true,
leading: Utils.isPublic(widget
leading: Utils.isPublicFav(widget
.ctr.favFolderData.value.list[index].attr)
? const Icon(Icons.folder_outlined)
: const Icon(Icons.lock_outline),
@@ -115,7 +115,7 @@ class _FavPanelState extends State<FavPanel> {
title: Text(widget
.ctr.favFolderData.value.list[index].title!),
subtitle: Text(
'${widget.ctr.favFolderData.value.list[index].mediaCount}个内容 . ${Utils.isPublicText(widget.ctr.favFolderData.value.list[index].attr)}',
'${widget.ctr.favFolderData.value.list[index].mediaCount}个内容 . ${Utils.isPublicFavText(widget.ctr.favFolderData.value.list[index].attr)}',
),
trailing: Transform.scale(
scale: 0.9,