mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-21 00:49:17 +01:00
Upgrade to Tauri 2.0 (#23)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { invoke } from '@tauri-apps/api';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
|
||||
export type TrackResource =
|
||||
| 'app'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { invoke } from '@tauri-apps/api';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
import type { KeyValue } from './models';
|
||||
|
||||
export async function setKeyValue<T>({
|
||||
|
||||
@@ -14,6 +14,7 @@ export const AUTH_TYPE_BEARER = 'bearer';
|
||||
export type Model =
|
||||
| Settings
|
||||
| Workspace
|
||||
| Folder
|
||||
| GrpcConnection
|
||||
| GrpcRequest
|
||||
| GrpcEvent
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { appWindow } from '@tauri-apps/api/window';
|
||||
import { getCurrent } from '@tauri-apps/api/webviewWindow';
|
||||
import { getKeyValue, setKeyValue } from './keyValueStore';
|
||||
|
||||
const key = ['window_pathname', appWindow.label];
|
||||
const key = ['window_pathname', getCurrent().label];
|
||||
const namespace = 'no_sync';
|
||||
const fallback = undefined;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { readBinaryFile, readTextFile } from '@tauri-apps/api/fs';
|
||||
import { readFile, readTextFile } from '@tauri-apps/plugin-fs';
|
||||
import type { HttpResponse } from './models';
|
||||
|
||||
export async function getResponseBodyText(response: HttpResponse): Promise<string | null> {
|
||||
@@ -10,7 +10,7 @@ export async function getResponseBodyText(response: HttpResponse): Promise<strin
|
||||
|
||||
export async function getResponseBodyBlob(response: HttpResponse): Promise<Uint8Array | null> {
|
||||
if (response.bodyPath) {
|
||||
return readBinaryFile(response.bodyPath);
|
||||
return readFile(response.bodyPath);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { invoke } from '@tauri-apps/api';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
import type { HttpRequest, HttpResponse } from './models';
|
||||
|
||||
export async function sendEphemeralRequest(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { invoke } from '@tauri-apps/api';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
import type {
|
||||
CookieJar,
|
||||
Environment,
|
||||
|
||||
Reference in New Issue
Block a user