diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index c8376ff..b99c04c 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -21,7 +21,7 @@ "bundle": { "active": true, "targets": "all", - "identifier": "com.tauri.dev", + "identifier": "minesweeper", "icon": [ "icons/32x32.png", "icons/128x128.png", diff --git a/src/app.rs b/src/app.rs index 3617af6..b389105 100644 --- a/src/app.rs +++ b/src/app.rs @@ -41,7 +41,7 @@ impl Component for App { type Properties = (); fn create(ctx: &Context) -> Self { - let mut game = Game::new(25, 40, 50); + let mut game = Game::new(10, 10, 5); game.start_board(); info!("\n{}", game.get_board().to_string()); diff --git a/src/components/board.rs b/src/components/board.rs index 58c0872..a3c0cf8 100644 --- a/src/components/board.rs +++ b/src/components/board.rs @@ -62,10 +62,10 @@ impl Component for BoardComponent { match msg { Msg::Discover {cell} => { // info!("Pos (from board): {}", format!("{:?}", cell.get_pos())); - self.onsignal.emit(cell) + self.onsignal.emit(cell); } } - true + false } fn changed(&mut self, ctx: &Context, _old_props: &Self::Properties) -> bool { diff --git a/src/components/button.rs b/src/components/button.rs index 57c5a4a..757cd5f 100644 --- a/src/components/button.rs +++ b/src/components/button.rs @@ -37,9 +37,15 @@ impl Component for Button { fn view(&self, ctx: &Context) -> Html { html!{ - + } } @@ -47,10 +53,10 @@ impl Component for Button { match msg { Msg::Clicked => { // info!("hid (from cell): {}", format!("{:?}", self.cell.is_hidden())); - self.onsignal.emit(self.cell) + self.onsignal.emit(self.cell); } } - true + false } fn changed(&mut self, ctx: &Context, _old_props: &Self::Properties) -> bool { diff --git a/styles.css b/styles.css index 0a633a9..fc3f86a 100644 --- a/styles.css +++ b/styles.css @@ -1,9 +1,9 @@ :root { - font-family: Courier , Avenir, Helvetica, Arial, sans-serif; + font-family: Verdana, Geneva, Tahoma, sans-serif; font-size: 16px; line-height: 24px; font-weight: 400; - + /* Verdana , Avenir, Helvetica, Arial, sans-serif */ color: #0f0f0f; background-color: #f6f6f6; @@ -22,9 +22,10 @@ margin: 0; padding: 10vh; display: flex; - flex-direction: column; + /* flex-direction: column; */ justify-content: center; text-align: center; + vertical-align: middle; } .logo { @@ -66,16 +67,14 @@ button { text-align: center; border-radius: 8px; border: 1px solid transparent; - /* padding: 16px; */ - /* font-size: 1em; */ font-weight: 500; - font-family: inherit; color: #ffffff; background-color: #0f0f0f98; box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2); height: 50px; width: 50px; margin: 2px; + transition: background-color 0.5s; -webkit-transition: background-color 0.5s; } @@ -85,30 +84,32 @@ button { text-align: center; border-radius: 8px; border: 1px solid transparent; - /* padding: 16px; */ font-size: 20px; font-weight: 500; - font-family: inherit; color: #ffffff; background-color: #2f2f2f; - /* transition: border-color 0.25s; */ - /* box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2); */ height: 50px; width: 50px; margin: 2px; } - - .button-hidden:hover { - background-color: #333333; + background-color: #262626; + transition: background-color 0.5s; -webkit-transition: background-color 0.5s; } -button:active { - border-color: #396cd8; - background-color: #e8e8e8; +.button-hidden:active { + background-color: #2f2f2f; + transition: background-color 0.5s; + -webkit-transition: background-color 0.5s; +} + +.button-shown:active { + background-color: #2f2f2f; + transition: background-color 0.5s; + -webkit-transition: background-color 0.5s; } input, @@ -116,10 +117,6 @@ button { outline: none; } -#greet-input { - margin-right: 5px; -} - @media (prefers-color-scheme: dark) { :root { color: #f6f6f6;