Skip to content
Draft
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
56 changes: 26 additions & 30 deletions Cargo.lock

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

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ crate-type = ["cdylib", "rlib"]
[dependencies]
actix-files = { version = "0.6.10", optional = true }
actix-web = { version = "4.14.0", features = ["macros"], optional = true }
leptos = { version = "0.8.20", features = ["nightly", "islands", "islands-router"] }
leptos = { version = "0.8.21", features = ["nightly", "islands", "islands-router"] }
leptos_meta = "0.8.6"
leptos_actix = { version = "0.8.7", features = ["islands-router"], optional = true }
leptos_router = { version = "0.8.15", features = ["nightly"] }
leptos_actix = { version = "0.8.8", features = ["islands-router"], optional = true }
leptos_router = { version = "0.8.16", features = ["nightly"] }
wasm-bindgen = "0.2.126"
serde = { version = "1.0.229", features = ["derive"] }
reqwest = { version = "0.13.4", features = [
Expand Down Expand Up @@ -87,9 +87,9 @@ end2end-dir = "end2end"
# The browserlist query used for optimizing the CSS.
browserquery = "defaults"
# Set by cargo-leptos watch when building with that tool. Controls whether autoreload JS will be included in the head
watch = false
# watch = false
# The environment Leptos will run in, usually either "DEV" or "PROD"
env = "DEV"
# env = "DEV"
# The features to use when compiling the bin target
#
# Optional. Can be over-ridden with the command line parameter --bin-features
Expand Down
8 changes: 0 additions & 8 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,11 @@ cp node_modules/@rustlanges/styles/dist/bundled.css bundled.css

[tasks.build]
dependencies = ["prebuild"]
install_crate = { crate_name = "cargo-leptos", binary = "cargo", test_arg = [
"leptos",
"--version",
], version = "0.3.6" }
command = "cargo"
args = ["leptos", "serve", "-r", "--split"]

[tasks.serve]
dependencies = ["prebuild"]
install_crate = { crate_name = "cargo-leptos", binary = "cargo", test_arg = [
"leptos",
"--version",
], version = "0.3.6" }
command = "cargo"
env = { LEPTOS_TAILWIND_VERSION="v4.1.14" }
args = ["leptos", "watch", "--features", "development", "--hot-reload"]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ rustup default nightly
rustup target add wasm32-unknown-unknown

cargo install cargo-make
cargo install cargo-leptos
cargo install rusty-hook
cargo install leptosfmt --version 0.1.33
```
Expand Down
2 changes: 1 addition & 1 deletion design-system-components
1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
# Leptos specific tools
leptosfmt
cargo-leptos

# Additional development tools
pkg-config
openssl
Expand Down
9 changes: 2 additions & 7 deletions src/context/theme_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,14 @@ use serde::{Deserialize, Serialize};

/// This enum can be cloned, copied, and compared for equality.
/// It also supports serialization and deserialization for local storage.
#[derive(Clone, Copy, PartialEq, Serialize, Deserialize, Debug)]
#[derive(Clone, Copy, PartialEq, Serialize, Deserialize, Debug, Default)]
pub enum Theme {
Light,
#[default]
Dark,
System,
}

impl Default for Theme {
fn default() -> Self {
Theme::Dark
}
}

impl Display for Theme {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
Expand Down