desktop/windows: ajustar NSIS (perMachine, escolher diretório, atalho) e mover store para AppData
- tauri.conf.json: configura nsis (installMode perMachine, allowToChangeInstallDirectory, installDirName, createDesktopShortcut) - main.tsx: Store.load agora usa appLocalDataDir (dados do app em AppData do usuário) - README: documenta instalação Windows, dados em AppData e build leve (--bundles nsis)
This commit is contained in:
parent
682d39db70
commit
087170e321
5 changed files with 48 additions and 9 deletions
|
|
@ -3,6 +3,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react"
|
|||
import { createRoot } from "react-dom/client"
|
||||
import { invoke } from "@tauri-apps/api/core"
|
||||
import { Store } from "@tauri-apps/plugin-store"
|
||||
import { appLocalDataDir } from "@tauri-apps/api/path"
|
||||
import { ExternalLink, Eye, EyeOff, GalleryVerticalEnd, Loader2, RefreshCw } from "lucide-react"
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./components/ui/tabs"
|
||||
import { cn } from "./lib/utils"
|
||||
|
|
@ -103,7 +104,8 @@ const appUrl = normalizeUrl(import.meta.env.VITE_APP_URL, DEFAULT_APP_URL)
|
|||
const apiBaseUrl = normalizeUrl(import.meta.env.VITE_API_BASE_URL, appUrl)
|
||||
|
||||
async function loadStore(): Promise<Store> {
|
||||
return await Store.load(STORE_FILENAME)
|
||||
const dir = await appLocalDataDir()
|
||||
return await Store.load(STORE_FILENAME, { dir })
|
||||
}
|
||||
|
||||
async function readToken(store: Store): Promise<string | null> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue