mirror of
https://github.com/wavetermdev/waveterm
synced 2026-05-24 09:18:27 +00: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
1 changed files with 7 additions and 1 deletions
|
|
@ -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 a new issue