add tauri v2 for local app
							
								
								
									
										4
									
								
								src-tauri/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,4 @@ | |||||||
|  | # Generated by Cargo | ||||||
|  | # will have compiled files and executables | ||||||
|  | /target/ | ||||||
|  | /gen/schemas | ||||||
							
								
								
									
										4560
									
								
								src-tauri/Cargo.lock
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										25
									
								
								src-tauri/Cargo.toml
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,25 @@ | |||||||
|  | [package] | ||||||
|  | name = "IT-Tools" | ||||||
|  | version = "0.1.0" | ||||||
|  | description = "Useful tools for developer and people working in IT" | ||||||
|  | authors = ["Corentin Thomasset"] | ||||||
|  | license = "GPLv3" | ||||||
|  | repository = "https://github.com/CorentinTh/it-tools" | ||||||
|  | edition = "2021" | ||||||
|  | rust-version = "1.82.0" | ||||||
|  | 
 | ||||||
|  | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||||||
|  | 
 | ||||||
|  | [lib] | ||||||
|  | name = "app_lib" | ||||||
|  | crate-type = ["staticlib", "cdylib", "rlib"] | ||||||
|  | 
 | ||||||
|  | [build-dependencies] | ||||||
|  | tauri-build = { version = "2.0", features = [] } | ||||||
|  | 
 | ||||||
|  | [dependencies] | ||||||
|  | serde_json = "1.0" | ||||||
|  | serde = { version = "1.0", features = ["derive"] } | ||||||
|  | log = "0.4" | ||||||
|  | tauri = { version = "2.0", features = [] } | ||||||
|  | tauri-plugin-log = "2.0" | ||||||
							
								
								
									
										3
									
								
								src-tauri/build.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,3 @@ | |||||||
|  | fn main() { | ||||||
|  |   tauri_build::build() | ||||||
|  | } | ||||||
							
								
								
									
										11
									
								
								src-tauri/capabilities/default.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,11 @@ | |||||||
|  | { | ||||||
|  |   "$schema": "../gen/schemas/desktop-schema.json", | ||||||
|  |   "identifier": "default", | ||||||
|  |   "description": "enables the default permissions", | ||||||
|  |   "windows": [ | ||||||
|  |     "main" | ||||||
|  |   ], | ||||||
|  |   "permissions": [ | ||||||
|  |     "core:default" | ||||||
|  |   ] | ||||||
|  | } | ||||||
							
								
								
									
										
											BIN
										
									
								
								src-tauri/icons/128x128.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 11 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src-tauri/icons/128x128@2x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 23 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src-tauri/icons/32x32.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 2.2 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src-tauri/icons/Square107x107Logo.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 9.0 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src-tauri/icons/Square142x142Logo.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 12 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src-tauri/icons/Square150x150Logo.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 13 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src-tauri/icons/Square284x284Logo.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 25 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src-tauri/icons/Square30x30Logo.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 2.0 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src-tauri/icons/Square310x310Logo.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 28 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src-tauri/icons/Square44x44Logo.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 3.3 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src-tauri/icons/Square71x71Logo.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 5.9 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src-tauri/icons/Square89x89Logo.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 7.4 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src-tauri/icons/StoreLogo.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 3.9 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src-tauri/icons/icon.icns
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										
											BIN
										
									
								
								src-tauri/icons/icon.ico
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 37 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src-tauri/icons/icon.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 49 KiB | 
							
								
								
									
										16
									
								
								src-tauri/src/lib.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,16 @@ | |||||||
|  | #[cfg_attr(mobile, tauri::mobile_entry_point)] | ||||||
|  | pub fn run() { | ||||||
|  |   tauri::Builder::default() | ||||||
|  |     .setup(|app| { | ||||||
|  |       if cfg!(debug_assertions) { | ||||||
|  |         app.handle().plugin( | ||||||
|  |           tauri_plugin_log::Builder::default() | ||||||
|  |             .level(log::LevelFilter::Info) | ||||||
|  |             .build(), | ||||||
|  |         )?; | ||||||
|  |       } | ||||||
|  |       Ok(()) | ||||||
|  |     }) | ||||||
|  |     .run(tauri::generate_context!()) | ||||||
|  |     .expect("error while running tauri application"); | ||||||
|  | } | ||||||
							
								
								
									
										6
									
								
								src-tauri/src/main.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,6 @@ | |||||||
|  | // Prevents additional console window on Windows in release, DO NOT REMOVE!!
 | ||||||
|  | #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] | ||||||
|  | 
 | ||||||
|  | fn main() { | ||||||
|  |   app_lib::run(); | ||||||
|  | } | ||||||
							
								
								
									
										37
									
								
								src-tauri/tauri.conf.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,37 @@ | |||||||
|  | { | ||||||
|  |   "$schema": "https://schema.tauri.app/config/2.0.0-rc", | ||||||
|  |   "productName": "IT Tools", | ||||||
|  |   "version": "0.1.0", | ||||||
|  |   "identifier": "tech.it-tools", | ||||||
|  |   "build": { | ||||||
|  |     "frontendDist": "../dist", | ||||||
|  |     "devUrl": "http://localhost:5173", | ||||||
|  |     "beforeDevCommand": "pnpm run dev", | ||||||
|  |     "beforeBuildCommand": "pnpm run build" | ||||||
|  |   }, | ||||||
|  |   "app": { | ||||||
|  |     "windows": [ | ||||||
|  |       { | ||||||
|  |         "title": "IT Tools", | ||||||
|  |         "width": 1024, | ||||||
|  |         "height": 768, | ||||||
|  |         "resizable": true, | ||||||
|  |         "fullscreen": false | ||||||
|  |       } | ||||||
|  |     ], | ||||||
|  |     "security": { | ||||||
|  |       "csp": null | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "bundle": { | ||||||
|  |     "active": true, | ||||||
|  |     "targets": "all", | ||||||
|  |     "icon": [ | ||||||
|  |       "icons/32x32.png", | ||||||
|  |       "icons/128x128.png", | ||||||
|  |       "icons/128x128@2x.png", | ||||||
|  |       "icons/icon.icns", | ||||||
|  |       "icons/icon.ico" | ||||||
|  |     ] | ||||||
|  |   } | ||||||
|  | } | ||||||