mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +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 [selectedPath, setSelectedPath] = useState("");
|
||||||
const [refreshVersion, setRefreshVersion] = useAtom(model.refreshVersion);
|
const [refreshVersion, setRefreshVersion] = useAtom(model.refreshVersion);
|
||||||
const conn = useAtomValue(model.connection);
|
const conn = useAtomValue(model.connection);
|
||||||
|
const blockData = useAtomValue(model.blockAtom);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
model.refreshCallback = () => {
|
model.refreshCallback = () => {
|
||||||
@ -593,7 +594,12 @@ function DirectoryPreview({ model }: DirectoryPreviewProps) {
|
|||||||
setSearchText((current) => current.slice(0, -1));
|
setSearchText((current) => current.slice(0, -1));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (checkKeyPressed(waveEvent, "Space") && searchText == "" && PLATFORM == "darwin") {
|
if (
|
||||||
|
checkKeyPressed(waveEvent, "Space") &&
|
||||||
|
searchText == "" &&
|
||||||
|
PLATFORM == "darwin" &&
|
||||||
|
!blockData?.meta?.connection
|
||||||
|
) {
|
||||||
getApi().onQuicklook(selectedPath);
|
getApi().onQuicklook(selectedPath);
|
||||||
console.log(selectedPath);
|
console.log(selectedPath);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user