From 44e5807bb2c54094740acca5bcc035f311992b3f Mon Sep 17 00:00:00 2001 From: zhongweili Date: Sun, 15 Dec 2024 15:47:01 +0800 Subject: [PATCH] Improve app initialization and version updates - Bump application version to 0.2.2 for both Cargo and Tauri configuration. - Enhance security by adding additional source URLs to the connect-src settings. - Improve code clarity and initialization logic in the App.vue component. --- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 4 ++-- src/App.vue | 30 ++++++++++++++++++++++++++---- 4 files changed, 30 insertions(+), 8 deletions(-) diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 474f0bf..459b44f 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -2282,7 +2282,7 @@ dependencies = [ [[package]] name = "imagenie" -version = "0.2.0" +version = "0.2.2" dependencies = [ "anyhow", "chrono", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 2b904d9..c74c674 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "imagenie" -version = "0.2.0" +version = "0.2.2" description = "A Tauri App" authors = ["zhongwei"] edition = "2021" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index c6e3f1c..5f47321 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": "imagenie", - "version": "0.2.0", + "version": "0.2.2", "identifier": "com.imagenie.app", "build": { "beforeDevCommand": "yarn dev", @@ -27,7 +27,7 @@ "style-src": "'self' 'unsafe-inline'", "img-src": "'self' asset: http://asset.localhost https://raw.githubusercontent.com blob: data:", "default-src": "'self' asset:", - "connect-src": "'self' tauri: http://tauri.localhost ipc: http://ipc.localhost http://localhost:8023 ipc: https://api.github.com", + "connect-src": "'self' tauri: http://tauri.localhost ipc: http://ipc.localhost http://localhost:8023 ipc: https://api.github.com https://api.iconify.design https://api.unisvg.com https://api.simplesvg.com", "script-src": "'self'" }, "assetProtocol": { diff --git a/src/App.vue b/src/App.vue index 4544e00..5dc16c5 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,20 +1,42 @@