revert to tauri v1
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import Database from '@tauri-apps/plugin-sql';
|
||||
import Database from 'tauri-plugin-sql-api';
|
||||
|
||||
import { Account } from '@utils/types';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { readBinaryFile } from '@tauri-apps/plugin-fs';
|
||||
import { readBinaryFile } from '@tauri-apps/api/fs';
|
||||
|
||||
export async function createBlobFromFile(path: string): Promise<Blob> {
|
||||
const file = await readBinaryFile(path);
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
NDKUser,
|
||||
} from '@nostr-dev-kit/ndk';
|
||||
import { ndkAdapter } from '@nostr-fetch/adapter-ndk';
|
||||
import { message, open } from '@tauri-apps/plugin-dialog';
|
||||
import { message, open } from '@tauri-apps/api/dialog';
|
||||
import { VoidApi } from '@void-cat/api';
|
||||
import { LRUCache } from 'lru-cache';
|
||||
import { NostrFetcher } from 'nostr-fetch';
|
||||
@@ -362,7 +362,7 @@ export function useNostr() {
|
||||
error: 'Cancelled',
|
||||
};
|
||||
} else {
|
||||
filepath = selected.path;
|
||||
filepath = selected;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { magnetDecode } from '@ctrl/magnet-link';
|
||||
import { open } from '@tauri-apps/plugin-dialog';
|
||||
import { open } from '@tauri-apps/api/dialog';
|
||||
import { VoidApi } from '@void-cat/api';
|
||||
|
||||
import { createBlobFromFile } from '@utils/createBlobFromFile';
|
||||
@@ -38,7 +38,7 @@ export function useImageUploader() {
|
||||
} else if (selected === null) {
|
||||
// user cancelled the selection
|
||||
} else {
|
||||
filepath = selected.path;
|
||||
filepath = selected;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
isPermissionGranted,
|
||||
requestPermission,
|
||||
sendNotification,
|
||||
} from '@tauri-apps/plugin-notification';
|
||||
} from '@tauri-apps/api/notification';
|
||||
|
||||
export async function sendNativeNotification(content: string, title?: string) {
|
||||
let permissionGranted = await isPermissionGranted();
|
||||
|
||||
Reference in New Issue
Block a user