fix(webui): refine workspace picker navigation and macOS behavior
This commit is contained in:
1 parent
4ca146aef3
commit
cc5f2a84d3
19 files changed
+716
-187
No files matched your search
@@ -7,6 +7,7 @@ import os
|
||||
import platform
|
||||
import socket
|
||||
import stat
|
||||
import sys
|
||||
from collections.abc import Iterator
|
||||
from pathlib import Path
|
||||
from typing import TypedDict
|
||||
@@ -70,6 +71,9 @@ def browse_workspace_directories(
|
||||
hidden = entry.name.startswith(".") or (
|
||||
os.name == "nt"
|
||||
and bool(entry.stat(follow_symlinks=False).st_file_attributes & stat.FILE_ATTRIBUTE_HIDDEN)
|
||||
) or (
|
||||
sys.platform == "darwin"
|
||||
and bool(entry.stat(follow_symlinks=False).st_flags & stat.UF_HIDDEN)
|
||||
)
|
||||
if show_hidden or prefix.startswith(".") or not hidden:
|
||||
yield {"name": entry.name, "path": entry.path}
|
||||
|
||||
@@ -204,6 +204,9 @@ def workspaces_payload(
|
||||
"controls": {
|
||||
"can_change_project": can_change_project,
|
||||
"can_use_full_access": can_use_full_access,
|
||||
"can_browse_directories": can_change_project,
|
||||
"can_resolve_project": can_change_project,
|
||||
"can_manage_favorites": can_change_project,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user