fully support tauri v2

This commit is contained in:
Ren Amamiya
2023-07-29 09:28:15 +07:00
parent a1a5544789
commit aca17f104e
23 changed files with 751 additions and 111 deletions

View File

@@ -1,4 +1,4 @@
import { platform } from '@tauri-apps/api/os';
import { platform } from '@tauri-apps/plugin-os';
import { Outlet, useNavigate } from 'react-router-dom';
import { ArrowLeftIcon, ArrowRightIcon } from '@shared/icons';
@@ -29,7 +29,7 @@ export function AuthLayout() {
>
<div
className={`flex h-full items-center gap-2 ${
platformName === 'darwin' ? 'pl-[68px]' : ''
platformName === 'macos' ? 'pl-[68px]' : ''
}`}
>
<button

View File

@@ -1,7 +1,7 @@
import { Dialog, Transition } from '@headlessui/react';
import { NDKEvent } from '@nostr-dev-kit/ndk';
import { useQueryClient } from '@tanstack/react-query';
import { fetch } from '@tauri-apps/api/http';
import { fetch } from '@tauri-apps/plugin-http';
import { Fragment, useEffect, useState } from 'react';
import { useForm } from 'react-hook-form';

View File

@@ -1,6 +1,6 @@
import { Dialog, Transition } from '@headlessui/react';
import { useQueryClient } from '@tanstack/react-query';
import { relaunch } from '@tauri-apps/api/process';
import { relaunch } from '@tauri-apps/plugin-process';
import { Fragment, useState } from 'react';
import { removeAll } from '@libs/storage';

View File

@@ -1,5 +1,4 @@
import * as Tooltip from '@radix-ui/react-tooltip';
import { open } from '@tauri-apps/api/dialog';
import { useState } from 'react';
import { LoaderIcon, MediaIcon } from '@shared/icons';

View File

@@ -1,5 +1,5 @@
import { downloadDir } from '@tauri-apps/api/path';
import { download } from 'tauri-plugin-upload-api';
import { download } from '@tauri-apps/plugin-upload';
import { DownloadIcon } from '@shared/icons';
import { Image } from '@shared/image';