hide/show tags panel button

This commit is contained in:
rustdesk
2023-06-29 15:18:35 +08:00
parent 137c5a00b6
commit 9f7706ca3e
2 changed files with 30 additions and 2 deletions

View File

@@ -69,6 +69,8 @@ class _PeerTabPageState extends State<PeerTabPage>
? PeerUiType.list
: PeerUiType.grid;
}
hideAbTagsPanel.value =
bind.mainGetLocalOption(key: "hideAbTagsPanel").isNotEmpty;
super.initState();
}
@@ -102,6 +104,28 @@ class _PeerTabPageState extends State<PeerTabPage>
offstage: gFFI.peerTabModel.currentTab == 0,
child: PeerSortDropdown().marginOnly(left: 8),
),
Offstage(
offstage: gFFI.peerTabModel.currentTab != 3,
child: InkWell(
child: Obx(() => Container(
padding: EdgeInsets.all(4.0),
decoration: hideAbTagsPanel.value
? null
: BoxDecoration(
color: Theme.of(context).colorScheme.background,
borderRadius: BorderRadius.circular(6)),
child: Icon(
Icons.tag_rounded,
size: 18,
))),
onTap: () async {
await bind.mainSetLocalOption(
key: "hideAbTagsPanel",
value: hideAbTagsPanel.value ? "" : "Y");
hideAbTagsPanel.value = !hideAbTagsPanel.value;
},
).marginOnly(left: 8),
),
],
),
),