opt. & fix

- fix: pve text color
- opt.: rm ssh tab appbar
- opt.: ssh tab only display fab on `Add` page
This commit is contained in:
lollipopkit
2024-03-22 22:52:31 +08:00
parent 7feebb8c1f
commit 2681e4eb28
9 changed files with 85 additions and 71 deletions

View File

@@ -111,7 +111,8 @@ class _HomePageState extends State<HomePage>
return Scaffold(
drawer: _buildDrawer(),
appBar: CustomAppBar(
appBar: _AppBar(
selectIndex: _selectIndex,
centerTitle: false,
title: const Text(BuildData.name),
actions: <Widget>[
@@ -357,3 +358,27 @@ ${GithubIds.participants.map((e) => '[$e](${e.url})').join(' ')}
}
}
}
final class _AppBar extends CustomAppBar {
final ValueNotifier<int> selectIndex;
const _AppBar({
required this.selectIndex,
super.title,
super.actions,
super.centerTitle,
});
@override
Widget build(BuildContext context) {
return ValueListenableBuilder(
valueListenable: selectIndex,
builder: (_, idx, __) {
if (idx == AppTab.ssh.index) {
return SizedBox(height: CustomAppBar.barHeight);
}
return super.build(context);
},
);
}
}