From 9df21eb764764eca65c1b09b0551465bf37177e4 Mon Sep 17 00:00:00 2001 From: blinkospace Date: Tue, 7 Jan 2025 12:34:08 +0800 Subject: [PATCH] update to v0.1.1 --- package.json | 2 +- src-tauri/capabilities/default.json | 2 ++ src-tauri/tauri.conf.json | 2 +- src/lib/tray.ts | 4 +++- src/store/blinkoStore.tsx | 1 - 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index b89f37d..ecbbe35 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "blinko-snap", "private": true, - "version": "0.1.0", + "version": "0.1.1", "type": "module", "scripts": { "dev": "vite", diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json index a475f2f..1d5f56d 100644 --- a/src-tauri/capabilities/default.json +++ b/src-tauri/capabilities/default.json @@ -23,7 +23,9 @@ "sql:default", "sql:allow-load", "sql:allow-execute", + "process:default", "process:allow-exit", + "process:allow-restart", "shell:allow-open", "global-shortcut:allow-is-registered", "global-shortcut:allow-register-all", diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index b34638f..e1b59af 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "Blinko Snap", - "version": "0.1.0", + "version": "0.1.1", "identifier": "com.blinko-snap.app", "build": { "beforeDevCommand": "pnpm run dev", diff --git a/src/lib/tray.ts b/src/lib/tray.ts index f21c6b5..44aeadd 100644 --- a/src/lib/tray.ts +++ b/src/lib/tray.ts @@ -7,6 +7,7 @@ import i18next from 'i18next'; import { BaseStore } from '@/store/baseStore'; import { RootStore } from '@/store/root'; import { resolveResource } from '@tauri-apps/api/path'; +import { path as tauriPath } from '@tauri-apps/api'; // Unique identifier for the system tray const TRAY_ID = 'blinko-snap-tray'; @@ -67,7 +68,8 @@ export async function setupTray() { }); // Load tray icon - const icon = await Image.fromPath('icons/icon.png'); + const resolvedPath = await tauriPath.resolveResource('icons/icon.png'); + const icon = await Image.fromPath(resolvedPath); // Create new tray instance const tray = await TrayIcon.new({ diff --git a/src/store/blinkoStore.tsx b/src/store/blinkoStore.tsx index a1483de..906613c 100644 --- a/src/store/blinkoStore.tsx +++ b/src/store/blinkoStore.tsx @@ -140,7 +140,6 @@ export class BlinkoStore implements Store { if(res?.data?.language != blinkoSnap.settings.value?.language){ setSetting('language', res?.data?.language) i18next.changeLanguage(res?.data?.language) - relaunch() } }) }