mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-05 09:37:52 +08:00
feat: 调整设置,支持导入导出,代码优化
This commit is contained in:
@@ -68,7 +68,7 @@ class HomeController extends GetxController with GetTickerProviderStateMixin {
|
||||
void setTabConfig() async {
|
||||
defaultTabs = [...tabsConfig];
|
||||
tabbarSort = settingStorage.get(SettingBoxKey.tabbarSort,
|
||||
defaultValue: ['live', 'rcmd', 'hot', 'bangumi']);
|
||||
defaultValue: ['live', 'rcmd', 'hot', 'bangumi']).map<String>((i) => i.toString()).toList();
|
||||
defaultTabs.retainWhere(
|
||||
(item) => tabbarSort.contains((item['type'] as TabType).id));
|
||||
defaultTabs.sort((a, b) => tabbarSort
|
||||
|
||||
@@ -184,12 +184,14 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
duration: const Duration(milliseconds: 500),
|
||||
height: snapshot.data ? top + 52 : top,
|
||||
padding: EdgeInsets.fromLTRB(14, top + 6, 14, 0),
|
||||
child: UserInfoWidget(
|
||||
top: top,
|
||||
ctr: ctr,
|
||||
userLogin: isUserLoggedIn,
|
||||
userFace: ctr?.userFace.value,
|
||||
callback: () => callback!(),
|
||||
child: Obx(
|
||||
() => UserInfoWidget(
|
||||
top: top,
|
||||
ctr: ctr,
|
||||
userLogin: isUserLoggedIn,
|
||||
userFace: ctr?.userFace.value,
|
||||
callback: () => callback!(),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -219,18 +221,18 @@ class UserInfoWidget extends StatelessWidget {
|
||||
return Row(
|
||||
children: [
|
||||
SearchBar(ctr: ctr),
|
||||
if (userLogin.value) ...[
|
||||
const SizedBox(width: 4),
|
||||
ClipRect(
|
||||
child: IconButton(
|
||||
tooltip: '消息',
|
||||
onPressed: () => Get.toNamed('/whisper'),
|
||||
icon: const Icon(
|
||||
Icons.notifications_none,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
const SizedBox(width: 4),
|
||||
Obx(() => userLogin.value
|
||||
? ClipRect(
|
||||
child: IconButton(
|
||||
tooltip: '消息',
|
||||
onPressed: () => Get.toNamed('/whisper'),
|
||||
icon: const Icon(
|
||||
Icons.notifications_none,
|
||||
),
|
||||
),
|
||||
)
|
||||
: const SizedBox.shrink()),
|
||||
const SizedBox(width: 8),
|
||||
Semantics(
|
||||
label: "我的",
|
||||
|
||||
Reference in New Issue
Block a user