Skip to content

Commit

Permalink
v0.0.21
Browse files Browse the repository at this point in the history
  • Loading branch information
ahqsoftwares committed Jun 22, 2024
1 parent 07799be commit 12eef28
Show file tree
Hide file tree
Showing 14 changed files with 2,453 additions and 1,416 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.20
0.0.21
8 changes: 8 additions & 0 deletions lead_docs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
image = { version = "0.25.1", default-features = false, features = ["png"] }
include_dir = "0.7.4"
serde = { version = "1.0.203", features = ["derive"] }
serde_json = "1.0.117"
tao = { version = "0.28", features = ["rwh_06"] }
wry = "0.41"

[target.'cfg(windows)'.build-dependencies]
tauri-winres = "0.1.1"

[package.metadata.tauri-winres]
OriginalFilename = "lead_docs.exe"
LegalCopyright = "Copyright © 2024 - The AHQ Softwares' Lead lang Team"
9 changes: 9 additions & 0 deletions lead_docs/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
fn main() {
#[cfg(windows)]
{
let mut res = tauri_winres::WindowsResource::new();
res.set_icon("icon.ico")
.compile()
.unwrap();
}
}
Binary file added lead_docs/icon.ico
Binary file not shown.
Binary file added lead_docs/src/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion lead_docs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{env::consts::{OS, ARCH}, fs, path::Path, process};
use serde::{Deserialize, Serialize};
use serde_json::to_string_pretty;
use tao::{
dpi::LogicalSize, event::{Event, WindowEvent}, event_loop::{ControlFlow, EventLoop}, window::WindowBuilder
dpi::LogicalSize, event::{Event, WindowEvent}, event_loop::{ControlFlow, EventLoop}, window::{Icon, WindowBuilder}
};
use wry::{http::{HeaderValue, Response, StatusCode}, WebViewBuilder};

Expand All @@ -28,6 +28,13 @@ fn main() {
height: 500.0,
width: 800.0
})
.with_window_icon(Some({
let img = image::load_from_memory(include_bytes!("./icon.png")).unwrap();
let img = img.as_rgba8().unwrap();
let vect = img.to_vec();

Icon::from_rgba(vect, img.height(), img.width()).unwrap()
}))
.build(&app)
.unwrap();

Expand Down
14 changes: 8 additions & 6 deletions lead_docs/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@
"preview": "vite preview"
},
"dependencies": {
"solid-js": "^1.8.15"
"rehype-raw": "^7.0.0",
"remark-gfm": "^4.0.0",
"solid-js": "^1.8.17"
},
"devDependencies": {
"autoprefixer": "^10.4.19",
"daisyui": "^4.9.0",
"daisyui": "^4.12.2",
"postcss": "^8.4.38",
"solid-icons": "^1.1.0",
"solid-markdown": "^2.0.1",
"tailwindcss": "^3.4.3",
"typescript": "^5.2.2",
"vite": "^5.2.0",
"solid-markdown": "^2.0.13",
"tailwindcss": "^3.4.4",
"typescript": "^5.5.2",
"vite": "^5.3.1",
"vite-plugin-solid": "^2.10.2"
}
}
Loading

0 comments on commit 12eef28

Please sign in to comment.