-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚧 Use theme crate instead of hard-code.
- Loading branch information
Showing
15 changed files
with
70 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,12 @@ | ||
use crate::types::{Color, ColorType}; | ||
use once_cell::sync::Lazy; | ||
|
||
#[derive(Debug, Clone, Copy, PartialEq)] | ||
pub struct ColorWrapper(ColorType); | ||
use crate::types::{Color, ColorMap}; | ||
|
||
impl From<ColorType> for ColorWrapper { | ||
fn from(color_type: ColorType) -> Self { | ||
Self(color_type) | ||
} | ||
} | ||
|
||
impl From<ColorWrapper> for Color { | ||
fn from(color_wrapper: ColorWrapper) -> Self { | ||
match color_wrapper.0 { | ||
ColorType::Primary => Self::from_rgb_str_hex("#409EFF"), | ||
ColorType::Secondary => Self::from_rgb_str_hex("#79bbff"), | ||
ColorType::Success => Self::from_rgb_str_hex("#67C23A"), | ||
ColorType::Warning => Self::from_rgb_str_hex("#E6A23C"), | ||
ColorType::Error => Self::from_rgb_str_hex("#F56C6C"), | ||
ColorType::Info => Self::from_rgb_str_hex("#909399"), | ||
} | ||
} | ||
} | ||
pub static COLOR_MAP: Lazy<ColorMap> = Lazy::new(|| ColorMap { | ||
primary: Color::from_rgb_str_hex("#409EFF"), | ||
secondary: Color::from_rgb_str_hex("#79bbff"), | ||
success: Color::from_rgb_str_hex("#67C23A"), | ||
warning: Color::from_rgb_str_hex("#E6A23C"), | ||
error: Color::from_rgb_str_hex("#F56C6C"), | ||
info: Color::from_rgb_str_hex("#909399"), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
pub mod app; | ||
pub mod pages; | ||
pub mod utils; | ||
|
||
#[cfg(target_arch = "wasm32")] | ||
mod web_entry; | ||
|
This file was deleted.
Oops, something went wrong.