Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion web/Cargo-prd.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ itertools = "0.14.0"
rand = { version = "0.7.3", features = ["wasm-bindgen"] }
serde = { version = "1.0.214", features = ["derive"] }
serde_json = "1.0.133"
serde-wasm-bindgen = "0.6.5"
url = "2.5.4"
wasm-bindgen = "0.2.105"
wasm-bindgen-futures = "0.4.45"
web-sys = { version = "0.3.72", features = ["Navigator", "Clipboard", "Window"] }
web-sys = { version = "0.3.72", features = ["Clipboard", "EventTarget", "Navigator", "Request", "RequestInit", "RequestMode", "Response", "Window"] }

[profile.wasm-dev]
inherits = "dev"
Expand Down
50 changes: 27 additions & 23 deletions web/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ serde = { version = "1.0.214", features = ["derive"] }
serde_json = "1.0.133"
url = "2.5.4"
wasm-bindgen-futures = "0.4.45"
web-sys = { version = "0.3.72", features = ["Navigator", "Clipboard", "Window"] }
web-sys = { version = "0.3.72", features = ["Navigator", "Clipboard", "Window", "Request", "RequestInit", "RequestMode", "Response"] }

# 開発環境でのみ使用する依存関係
dioxus-logger = { version = "0.6.0", optional = true }
log = { version = "0.4.22", optional = true }
serde-wasm-bindgen = "0.6.5"
wasm-bindgen = "0.2.105"

[profile.wasm-dev]
inherits = "dev"
Expand Down
Binary file added web/assets/images/icons/uuid4_generator.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/assets/images/ogp/uuid4_generator.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions web/src/components/cards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ pub(crate) mod simple_calculator_card;
pub(crate) mod text_length_counter;
mod tool_card;
pub(crate) mod url_endecode_converter_card;
pub(crate) mod uuid4_generator_card;
34 changes: 34 additions & 0 deletions web/src/components/cards/uuid4_generator_card.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
use crate::components::cards::tool_card::ToolCard;
use crate::components::images::lazy_image::LazyImage;
use crate::routes::Route;
use dioxus::prelude::*;

pub(crate) fn Uuid4GeneratorCard() -> Element {
let icon: Element = rsx! {
LazyImage {
src: asset!("/assets/images/icons/uuid4_generator.webp"),
alt: "UUID Version 4 生成",
class: "justify-self-center py-3",
height: 60,
width: 150,
}
};

rsx! {
ToolCard {
to: Route::Uuid4Generator {},
icon: icon,
title: "UUID Version 4 生成",
description: vec![
vec![
"UUID Version 4をランダムに".to_string(),
"生成することができます。".to_string(),
],
vec![
"1個から100個まで、必要な数の".to_string(),
"UUIDを一度に生成できます。".to_string(),
],
],
}
}
}
4 changes: 4 additions & 0 deletions web/src/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use counter::text_length::TextLengthCounter;
use dioxus::prelude::*;
use formatter::json::JsonFormatter;
use generator::password::PasswordGenerator;
use generator::uuid4::Uuid4Generator;
use notfound::NotFound;
use top::TopPage;

Expand All @@ -32,6 +33,9 @@ pub(crate) enum Route {
#[nest("/generator")]
#[route("/password")]
PasswordGenerator {},

#[route("/uuid4")]
Uuid4Generator {},
#[end_nest]
#[nest("/counter")]
#[route("/text-length")]
Expand Down
6 changes: 1 addition & 5 deletions web/src/routes/formatter/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,7 @@ pub(crate) fn JsonFormatter() -> Element {

(String::new(), formatted, compressed)
}
Err(e) => (
format!("JSON構文エラー: {e}"),
String::new(),
String::new(),
),
Err(e) => (format!("JSON構文エラー: {e}"), String::new(), String::new()),
}
};

Expand Down
1 change: 1 addition & 0 deletions web/src/routes/generator.rs
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pub(crate) mod password;
pub(crate) mod uuid4;
Loading