fix list type peer view (#7887)

* Layout list type peer view with layout rather than calculated width
* Hide menu sync from recent and web console if no write permission
* Pull ab twice because it's force updated when refreshCurrentUser is called on startup and
  connection status changing
This commit is contained in:
21pages
2024-05-01 23:38:39 +08:00
committed by GitHub
parent f9cc8de93e
commit f853b29fd9
3 changed files with 41 additions and 53 deletions

View File

@@ -385,10 +385,10 @@ class _AddressBookState extends State<AddressBook> {
if (canWrite) getEntry(translate("Add Tag"), abAddTag),
getEntry(translate("Unselect all tags"), gFFI.abModel.unsetSelectedTags),
sortMenuItem(),
syncMenuItem(),
if (canWrite) syncMenuItem(),
filterMenuItem(),
if (!gFFI.abModel.legacyMode.value) MenuEntryDivider<String>(),
if (!gFFI.abModel.legacyMode.value)
if (!gFFI.abModel.legacyMode.value && canWrite)
getEntry(translate("ab_web_console_tip"), () async {
final url = await bind.mainGetApiServer();
if (await canLaunchUrlString(url)) {