mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-17 20:51:55 +01:00
Quicklook only for local files on mac (#1039)
bug fix so quicklook does attempt to launch for remote directory previews
This commit is contained in:
parent
69c99dd13a
commit
0b3888d900
@ -534,6 +534,7 @@ function DirectoryPreview({ model }: DirectoryPreviewProps) {
|
||||
const [selectedPath, setSelectedPath] = useState("");
|
||||
const [refreshVersion, setRefreshVersion] = useAtom(model.refreshVersion);
|
||||
const conn = useAtomValue(model.connection);
|
||||
const blockData = useAtomValue(model.blockAtom);
|
||||
|
||||
useEffect(() => {
|
||||
model.refreshCallback = () => {
|
||||
@ -593,7 +594,12 @@ function DirectoryPreview({ model }: DirectoryPreviewProps) {
|
||||
setSearchText((current) => current.slice(0, -1));
|
||||
return true;
|
||||
}
|
||||
if (checkKeyPressed(waveEvent, "Space") && searchText == "" && PLATFORM == "darwin") {
|
||||
if (
|
||||
checkKeyPressed(waveEvent, "Space") &&
|
||||
searchText == "" &&
|
||||
PLATFORM == "darwin" &&
|
||||
!blockData?.meta?.connection
|
||||
) {
|
||||
getApi().onQuicklook(selectedPath);
|
||||
console.log(selectedPath);
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user