diff --git a/vingo/Cargo.lock b/vingo/Cargo.lock index d2714b2..a4a6fa3 100644 --- a/vingo/Cargo.lock +++ b/vingo/Cargo.lock @@ -3047,7 +3047,7 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "vingo" -version = "0.1.0" +version = "1.1.0" dependencies = [ "axum", "chrono", diff --git a/vingo/Cargo.toml b/vingo/Cargo.toml index 66c7528..0215dda 100644 --- a/vingo/Cargo.toml +++ b/vingo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vingo" -version = "0.1.0" +version = "1.1.0" edition = "2021" [workspace] diff --git a/vingo/src/main.rs b/vingo/src/main.rs index 73950cf..0341d2a 100644 --- a/vingo/src/main.rs +++ b/vingo/src/main.rs @@ -8,7 +8,7 @@ use std::{ }; use chrono::Local; -use routes::{auth, cards, days, leaderboard, scans, seasons, settings}; +use routes::{auth, cards, days, info, leaderboard, scans, seasons, settings}; use axum::{ middleware::from_fn, @@ -102,6 +102,7 @@ fn open_routes() -> Router { .route("/login", post(auth::login)) .route("/auth/callback", get(auth::callback)) .route("/scans", post(scans::add)) + .route("/version", get(info::version)) } fn authenticated_routes() -> Router { diff --git a/vingo/src/routes/info.rs b/vingo/src/routes/info.rs new file mode 100644 index 0000000..fcc1bef --- /dev/null +++ b/vingo/src/routes/info.rs @@ -0,0 +1,12 @@ +use axum::Json; +use serde::{Deserialize, Serialize}; + +#[derive(Serialize, Deserialize)] +pub struct Version { + version: String, +} +pub async fn version() -> Json { + return Json(Version { + version: env!("CARGO_PKG_VERSION").to_string(), + }); +} diff --git a/vingo/src/routes/mod.rs b/vingo/src/routes/mod.rs index 45e62ef..b7fa9ba 100644 --- a/vingo/src/routes/mod.rs +++ b/vingo/src/routes/mod.rs @@ -1,6 +1,7 @@ pub mod auth; pub mod cards; pub mod days; +pub mod info; pub mod leaderboard; pub mod scans; pub mod seasons; diff --git a/vinvoor/src/App.tsx b/vinvoor/src/App.tsx index 4bde83d..9f58639 100644 --- a/vinvoor/src/App.tsx +++ b/vinvoor/src/App.tsx @@ -2,12 +2,13 @@ import { Box, Container } from "@mui/material"; import { useState } from "react"; import { Navigate, Outlet, useOutlet } from "react-router-dom"; import { LoadingSkeleton } from "./components/LoadingSkeleton"; +import { Footer } from "./footer/Footer"; +import { useUser } from "./hooks/useUser"; import { NavBar } from "./navbar/NavBar"; import { Overview } from "./overview/Overview"; -import { WelcomePage } from "./WelcomePage"; -import { randomInt } from "./util/util"; import "./themes/background.css"; -import { useUser } from "./hooks/useUser"; +import { randomInt } from "./util/util"; +import { WelcomePage } from "./WelcomePage"; export const App = () => { const userQuery = useUser(); @@ -16,11 +17,19 @@ export const App = () => { const [backgroundSix] = useState(() => randomInt(0, 50) === 1); return ( - + @@ -39,6 +48,7 @@ export const App = () => { )} +