@setoelkahfi / svara / commits / a78de86

test

Seto Elkahfi committed Apr 7, 2025 at 23:27 UTC a78de865fe7c17ed744d0d0777fb545dc24efb14
5 files changed +118 -6
package.json
+2 -1
@@ -36,9 +36,10 @@
36 "sortablejs": "^1.15.6",
37 "svelte-splitpanes": "^8.0.9",
38 "tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log#v1",
39 - "tauri-pty": "^0.0.8"
39 + "tauri-pty": "0.1.0"
40 },
41 "devDependencies": {
42 + "@sveltejs/adapter-static": "^3.0.8",
43 "@sveltejs/vite-plugin-svelte": "^2.5.3",
44 "@tauri-apps/cli": "^2.4.1",
45 "@tsconfig/svelte": "^4.0.1",
pnpm-lock.yaml
+91
@@ -84,6 +84,9 @@ importers:
84 specifier: ^0.0.8
85 version: 0.0.8
86 devDependencies:
87 + '@sveltejs/adapter-static':
88 + specifier: ^3.0.8
89 + version: 3.0.8(@sveltejs/kit@2.20.4(@sveltejs/vite-plugin-svelte@2.5.3(svelte@4.2.19)(vite@4.5.12(@types/node@18.19.86)(sass@1.86.3)))(svelte@4.2.19)(vite@4.5.12(@types/node@18.19.86)(sass@1.86.3)))
90 '@sveltejs/vite-plugin-svelte':
91 specifier: ^2.5.3
92 version: 2.5.3(svelte@4.2.19)(vite@4.5.12(@types/node@18.19.86)(sass@1.86.3))
@@ -500,6 +503,9 @@ packages:
503 resolution: {integrity: sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==}
504 engines: {node: '>= 10.0.0'}
505
506 + '@polka/url@1.0.0-next.28':
507 + resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==}
508 +
509 '@replit/codemirror-indentation-markers@6.5.3':
510 resolution: {integrity: sha512-hL5Sfvw3C1vgg7GolLe/uxX5T3tmgOA3ZzqlMv47zjU1ON51pzNWiVbS22oh6crYhtVhv8b3gdXwoYp++2ilHw==}
511 peerDependencies:
@@ -507,6 +513,20 @@ packages:
513 '@codemirror/state': ^6.0.0
514 '@codemirror/view': ^6.0.0
515
516 + '@sveltejs/adapter-static@3.0.8':
517 + resolution: {integrity: sha512-YaDrquRpZwfcXbnlDsSrBQNCChVOT9MGuSg+dMAyfsAa1SmiAhrA5jUYUiIMC59G92kIbY/AaQOWcBdq+lh+zg==}
518 + peerDependencies:
519 + '@sveltejs/kit': ^2.0.0
520 +
521 + '@sveltejs/kit@2.20.4':
522 + resolution: {integrity: sha512-B3Y1mb1Qjt57zXLVch5tfqsK/ebHe6uYTcFSnGFNwRpId3+fplLgQK6Z2zhDVBezSsPuhDq6Pry+9PA88ocN6Q==}
523 + engines: {node: '>=18.13'}
524 + hasBin: true
525 + peerDependencies:
526 + '@sveltejs/vite-plugin-svelte': ^3.0.0 || ^4.0.0-next.1 || ^5.0.0
527 + svelte: ^4.0.0 || ^5.0.0-next.0
528 + vite: ^5.0.3 || ^6.0.0
529 +
530 '@sveltejs/vite-plugin-svelte-inspector@1.0.4':
531 resolution: {integrity: sha512-zjiuZ3yydBtwpF3bj0kQNV0YXe+iKE545QGZVTaylW3eAzFr+pJ/cwK8lZEaRp4JtaJXhD5DyWAV4AxLh6DgaQ==}
532 engines: {node: ^14.18.0 || >= 16}
@@ -624,6 +644,9 @@ packages:
644 '@tsconfig/svelte@4.0.1':
645 resolution: {integrity: sha512-B+XlGpmuAQzJqDoBATNCvEPqQg0HkO7S8pM14QDI5NsmtymzRexQ1N+nX2H6RTtFbuFgaZD4I8AAi8voGg0GLg==}
646
647 + '@types/cookie@0.6.0':
648 + resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==}
649 +
650 '@types/estree@1.0.7':
651 resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==}
652
@@ -696,6 +719,10 @@ packages:
719 concat-map@0.0.1:
720 resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
721
722 + cookie@0.6.0:
723 + resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==}
724 + engines: {node: '>= 0.6'}
725 +
726 crelt@1.0.6:
727 resolution: {integrity: sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==}
728
@@ -725,6 +752,9 @@ packages:
752 engines: {node: '>=0.10'}
753 hasBin: true
754
755 + devalue@5.1.1:
756 + resolution: {integrity: sha512-maua5KUiapvEwiEAe+XnlZ3Rh0GD+qI1J/nb9vrJc3muPXvcF/8gXYTWF76+5DAqHyDUtOIImEuo0YKE9mshVw==}
757 +
758 es6-promise@3.3.1:
759 resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==}
760
@@ -768,6 +798,9 @@ packages:
798 immutable@5.1.1:
799 resolution: {integrity: sha512-3jatXi9ObIsPGr3N5hGw/vWWcTkq6hUYhpQz4k0wLC+owqWi/LiugIw9x0EdNZ2yGedKN/HzePiBvaJRXa0Ujg==}
800
801 + import-meta-resolve@4.1.0:
802 + resolution: {integrity: sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==}
803 +
804 inflight@1.0.6:
805 resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}
806 deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
@@ -832,6 +865,10 @@ packages:
865 resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==}
866 engines: {node: '>=4'}
867
868 + mrmime@2.0.1:
869 + resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==}
870 + engines: {node: '>=10'}
871 +
872 ms@2.1.3:
873 resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
874
@@ -903,6 +940,13 @@ packages:
940 engines: {node: '>=14.0.0'}
941 hasBin: true
942
943 + set-cookie-parser@2.7.1:
944 + resolution: {integrity: sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==}
945 +
946 + sirv@3.0.1:
947 + resolution: {integrity: sha512-FoqMu0NCGBLCcAkS1qA+XJIQTR6/JHfQXl+uGteNCQ76T91DMUjPa9xfmeqMY3z80nLSg9yQmNjK0Px6RWsH/A==}
948 + engines: {node: '>=18'}
949 +
950 sorcery@0.11.1:
951 resolution: {integrity: sha512-o7npfeJE6wi6J9l0/5LKshFzZ2rMatRiCDwYeDQaOzqdzRJwALhX7mk/A/ecg6wjMu7wdZbmXfD2S/vpOg0bdQ==}
952 hasBin: true
@@ -990,6 +1034,10 @@ packages:
1034 resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
1035 engines: {node: '>=8.0'}
1036
1037 + totalist@3.0.1:
1038 + resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==}
1039 + engines: {node: '>=6'}
1040 +
1041 tslib@2.8.1:
1042 resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
1043
@@ -1527,12 +1575,35 @@ snapshots:
1575 '@parcel/watcher-win32-x64': 2.5.1
1576 optional: true
1577
1578 + '@polka/url@1.0.0-next.28': {}
1579 +
1580 '@replit/codemirror-indentation-markers@6.5.3(@codemirror/language@6.11.0)(@codemirror/state@6.5.2)(@codemirror/view@6.36.5)':
1581 dependencies:
1582 '@codemirror/language': 6.11.0
1583 '@codemirror/state': 6.5.2
1584 '@codemirror/view': 6.36.5
1585
1586 + '@sveltejs/adapter-static@3.0.8(@sveltejs/kit@2.20.4(@sveltejs/vite-plugin-svelte@2.5.3(svelte@4.2.19)(vite@4.5.12(@types/node@18.19.86)(sass@1.86.3)))(svelte@4.2.19)(vite@4.5.12(@types/node@18.19.86)(sass@1.86.3)))':
1587 + dependencies:
1588 + '@sveltejs/kit': 2.20.4(@sveltejs/vite-plugin-svelte@2.5.3(svelte@4.2.19)(vite@4.5.12(@types/node@18.19.86)(sass@1.86.3)))(svelte@4.2.19)(vite@4.5.12(@types/node@18.19.86)(sass@1.86.3))
1589 +
1590 + '@sveltejs/kit@2.20.4(@sveltejs/vite-plugin-svelte@2.5.3(svelte@4.2.19)(vite@4.5.12(@types/node@18.19.86)(sass@1.86.3)))(svelte@4.2.19)(vite@4.5.12(@types/node@18.19.86)(sass@1.86.3))':
1591 + dependencies:
1592 + '@sveltejs/vite-plugin-svelte': 2.5.3(svelte@4.2.19)(vite@4.5.12(@types/node@18.19.86)(sass@1.86.3))
1593 + '@types/cookie': 0.6.0
1594 + cookie: 0.6.0
1595 + devalue: 5.1.1
1596 + esm-env: 1.2.2
1597 + import-meta-resolve: 4.1.0
1598 + kleur: 4.1.5
1599 + magic-string: 0.30.17
1600 + mrmime: 2.0.1
1601 + sade: 1.8.1
1602 + set-cookie-parser: 2.7.1
1603 + sirv: 3.0.1
1604 + svelte: 4.2.19
1605 + vite: 4.5.12(@types/node@18.19.86)(sass@1.86.3)
1606 +
1607 '@sveltejs/vite-plugin-svelte-inspector@1.0.4(@sveltejs/vite-plugin-svelte@2.5.3(svelte@4.2.19)(vite@4.5.12(@types/node@18.19.86)(sass@1.86.3)))(svelte@4.2.19)(vite@4.5.12(@types/node@18.19.86)(sass@1.86.3))':
1608 dependencies:
1609 '@sveltejs/vite-plugin-svelte': 2.5.3(svelte@4.2.19)(vite@4.5.12(@types/node@18.19.86)(sass@1.86.3))
@@ -1637,6 +1708,8 @@ snapshots:
1708
1709 '@tsconfig/svelte@4.0.1': {}
1710
1711 + '@types/cookie@0.6.0': {}
1712 +
1713 '@types/estree@1.0.7': {}
1714
1715 '@types/node@18.19.86':
@@ -1715,6 +1788,8 @@ snapshots:
1788
1789 concat-map@0.0.1: {}
1790
1791 + cookie@0.6.0: {}
1792 +
1793 crelt@1.0.6: {}
1794
1795 css-tree@2.3.1:
@@ -1733,6 +1808,8 @@ snapshots:
1808 detect-libc@1.0.3:
1809 optional: true
1810
1811 + devalue@5.1.1: {}
1812 +
1813 es6-promise@3.3.1: {}
1814
1815 esbuild@0.18.20:
@@ -1796,6 +1873,8 @@ snapshots:
1873
1874 immutable@5.1.1: {}
1875
1876 + import-meta-resolve@4.1.0: {}
1877 +
1878 inflight@1.0.6:
1879 dependencies:
1880 once: 1.4.0
@@ -1851,6 +1930,8 @@ snapshots:
1930
1931 mri@1.2.0: {}
1932
1933 + mrmime@2.0.1: {}
1934 +
1935 ms@2.1.3: {}
1936
1937 nanoid@3.3.11: {}
@@ -1917,6 +1998,14 @@ snapshots:
1998 optionalDependencies:
1999 '@parcel/watcher': 2.5.1
2000
2001 + set-cookie-parser@2.7.1: {}
2002 +
2003 + sirv@3.0.1:
2004 + dependencies:
2005 + '@polka/url': 1.0.0-next.28
2006 + mrmime: 2.0.1
2007 + totalist: 3.0.1
2008 +
2009 sorcery@0.11.1:
2010 dependencies:
2011 '@jridgewell/sourcemap-codec': 1.5.0
@@ -2005,6 +2094,8 @@ snapshots:
2094 dependencies:
2095 is-number: 7.0.0
2096
2097 + totalist@3.0.1: {}
2098 +
2099 tslib@2.8.1: {}
2100
2101 typescript@5.8.3: {}
src-tauri/src/main.rs
+10 -5
@@ -407,14 +407,19 @@ fn load_settings(app: &mut App) {
407 .or_insert_with(|| settings.1.clone());
408 }
409
410 - let mut settings_store = tauri_plugin_store::StoreBuilder::new(app.handle(), settings_path)
410 + let mut settings_store = match tauri_plugin_store::StoreBuilder::new(app.handle(), settings_path)
411 .defaults(defaults)
412 - .build();
412 + .build() {
413 + Ok(store) => store,
414 + Err(e) => {
415 + error!("Failed to create settings store: {}", e);
416 + return;
417 + }
418 + };
419
414 - /*
415 - if let Err(e) = settings_store.load() {
420 + if let Err(e) = settings_store.reload() {
421 error!("Failed to load settings: {}", e);
417 - } */
422 + }
423 }
424
425 fn main() {
src-tauri/src/setup_store.rs
svelte.config.js new
+15
@@ -0,0 +1,15 @@
1 +import adapter from '@sveltejs/adapter-static';
2 +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
3 +
4 +/** @type {import('@sveltejs/kit').Config} */
5 +const config = {
6 + // Consult https://kit.svelte.dev/docs/integrations#preprocessors
7 + // for more information about preprocessors
8 + preprocess: vitePreprocess(),
9 +
10 + kit: {
11 + adapter: adapter(),
12 + },
13 +};
14 +
15 +export default config;
\ No newline at end of file