-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
254 additions
and
540 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,9 +19,10 @@ | |
"@tauri-apps/api": "^2.1.1", | ||
"@tauri-apps/plugin-dialog": "^2.2.0", | ||
"@tauri-apps/plugin-fs": "^2.2.0", | ||
"@tauri-apps/plugin-process": "~2", | ||
"@tauri-apps/plugin-shell": "~2", | ||
"@tauri-apps/plugin-updater": "~2", | ||
"@tauri-apps/plugin-process": "~2.2.0", | ||
"@tauri-apps/plugin-shell": "~2.2.0", | ||
"@tauri-apps/plugin-store": "~2", | ||
"@tauri-apps/plugin-updater": "~2.3.0", | ||
"bits-ui": "1.0.0-next.74", | ||
"clsx": "^2.1.1", | ||
"lucide-svelte": "^0.469.0", | ||
|
@@ -31,14 +32,14 @@ | |
"svelte-sonner": "^0.3.28", | ||
"tailwind-merge": "^2.6.0", | ||
"tailwind-variants": "^0.3.0", | ||
"unstorage": "^1.14.1", | ||
"unstorage": "^1.14.4", | ||
"web-novel-parser": "^0.1.6" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "1.9.2", | ||
"@svelte-put/shortcut": "^4.1.0", | ||
"@sveltejs/adapter-static": "^3.0.8", | ||
"@sveltejs/kit": "^2.15.0", | ||
"@sveltejs/kit": "^2.15.1", | ||
"@sveltejs/vite-plugin-svelte": "^5.0.3", | ||
"@tailwindcss/typography": "^0.5.15", | ||
"@tauri-apps/cli": "^2.1.0", | ||
|
@@ -54,7 +55,7 @@ | |
"tailwindcss-animate": "^1.0.7", | ||
"tslib": "^2.8.1", | ||
"typescript": "^5.7.2", | ||
"vite": "^6.0.5" | ||
"vite": "^6.0.6" | ||
}, | ||
"packageManager": "[email protected]", | ||
"module": "index.ts" | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p>test</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { load } from "@tauri-apps/plugin-store"; | ||
import { join, resourceDir } from "@tauri-apps/api/path"; | ||
|
||
export async function loadConfig() { | ||
//resourceDirを使えば実行パスでストア作成も可能 | ||
const configDir = await join(await resourceDir(), "settings.json"); | ||
|
||
//渡されたパスでストアの読み込み設定を確立 | ||
//(ファイルには直接アクセスしないため、config.jsonが無くてもエラーになりません。) | ||
const store = await load(configDir, { autoSave: false }); | ||
|
||
//getでキー値を渡して値を取得する | ||
//jsonが無いか、キーが存在しない場合はundefinedが返ってくる。 | ||
const data = await store.get<string>("data"); | ||
} |