mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-29 13:51:46 +02:00
Upgrade Tauri dependencies
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { getCurrent } from '@tauri-apps/api/webviewWindow';
|
||||
import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow';
|
||||
import { useWindowSize } from 'react-use';
|
||||
import { useDebouncedValue } from './useDebouncedValue';
|
||||
|
||||
@@ -15,7 +15,7 @@ export function useIsFullscreen() {
|
||||
useQuery({
|
||||
queryKey: ['is_fullscreen', debouncedWindowWidth],
|
||||
queryFn: async () => {
|
||||
return getCurrent().isFullscreen();
|
||||
return getCurrentWebviewWindow().isFullscreen();
|
||||
},
|
||||
}).data ?? false
|
||||
);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getCurrent } from '@tauri-apps/api/webviewWindow';
|
||||
import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow';
|
||||
import { useEffect } from 'react';
|
||||
import { fallbackRequestName } from '../lib/fallbackRequestName';
|
||||
import { useActiveEnvironment } from './useActiveEnvironment';
|
||||
@@ -30,7 +30,7 @@ export function useSyncWorkspaceRequestTitle() {
|
||||
// TODO: This resets the stoplight position so we can't use it on macOS yet. So we send
|
||||
// a custom command instead
|
||||
if (osInfo?.osType !== 'macos') {
|
||||
getCurrent().setTitle(newTitle).catch(console.error);
|
||||
getCurrentWebviewWindow().setTitle(newTitle).catch(console.error);
|
||||
} else {
|
||||
emit('yaak_title_changed', newTitle).catch(console.error);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getCurrent } from '@tauri-apps/api/webviewWindow';
|
||||
import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
export function useWindowFocus() {
|
||||
@@ -6,7 +6,7 @@ export function useWindowFocus() {
|
||||
|
||||
useEffect(() => {
|
||||
let unsub: undefined | (() => void) = undefined;
|
||||
getCurrent()
|
||||
getCurrentWebviewWindow()
|
||||
.onFocusChanged((e) => {
|
||||
setVisible(e.payload);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user