From d77ff6b216ce7ce6081120a4f94f49c7b0aeb307 Mon Sep 17 00:00:00 2001 From: jude Date: Mon, 25 May 2026 20:29:14 +0100 Subject: [PATCH] 2nd attempt --- Cargo.lock | 2 +- Cargo.toml | 2 +- build.rs | 13 ++++++++++--- reminder-dashboard/src/api.ts | 4 ++-- reminder-dashboard/src/components/App/index.tsx | 1 - reminder-dashboard/src/components/Welcome/index.tsx | 3 +++ 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3846a2a..e05db42 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2623,7 +2623,7 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reminder-rs" -version = "1.7.42" +version = "1.7.44" dependencies = [ "base64 0.22.1", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 5d817f2..0942ef6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reminder-rs" -version = "1.7.42" +version = "1.7.44" authors = ["Jude Southworth "] edition = "2021" license = "AGPL-3.0 only" diff --git a/build.rs b/build.rs index 23b0fab..175f121 100644 --- a/build.rs +++ b/build.rs @@ -8,19 +8,26 @@ fn main() { .arg("run") .arg("build") .current_dir(Path::new("reminder-dashboard")) + .env("VITE_VERSION", env!("CARGO_PKG_VERSION")) .spawn() - .expect("Failed to build NPM"); + .expect("Failed to build NPM") + .wait() + .expect("Failed to wait for NPM build"); Command::new("cp") .arg("reminder-dashboard/dist/index.html") .arg("static/index.html") .spawn() - .expect("Failed to copy index.html"); + .expect("Failed to copy index.html") + .wait() + .expect("Failed to wait for index.html copy"); Command::new("cp") .arg("-r") .arg("reminder-dashboard/dist/static/assets") .arg("static/") .spawn() - .expect("Failed to copy assets"); + .expect("Failed to copy assets") + .wait() + .expect("Failed to wait for assets copy"); } diff --git a/reminder-dashboard/src/api.ts b/reminder-dashboard/src/api.ts index c66ba6f..de689b4 100644 --- a/reminder-dashboard/src/api.ts +++ b/reminder-dashboard/src/api.ts @@ -116,7 +116,7 @@ type Template = { embed_fields: EmbedField[] | null; }; -const USER_INFO_STALE_TIME = 120_000; +const USER_INFO_STALE_TIME = 86_400_000; const GUILD_INFO_STALE_TIME = 300_000; const OTHER_STALE_TIME = 120_000; @@ -236,7 +236,7 @@ export const fetchGuildTodos = (guild: string) => ({ }); export const patchGuildTodo = (guild: string) => ({ - mutationFn: ({ id, todo }) => axios.patch(`/dashboard/api/guild/${guild}/todos/${id}`, todo), + mutationFn: ({id, todo}) => axios.patch(`/dashboard/api/guild/${guild}/todos/${id}`, todo), }); export const postGuildTodo = (guild: string) => ({ diff --git a/reminder-dashboard/src/components/App/index.tsx b/reminder-dashboard/src/components/App/index.tsx index 919a381..3bd5ea0 100644 --- a/reminder-dashboard/src/components/App/index.tsx +++ b/reminder-dashboard/src/components/App/index.tsx @@ -52,7 +52,6 @@ const InnerApp = () => { const queryClient = new QueryClient(); export function App() { - return ( diff --git a/reminder-dashboard/src/components/Welcome/index.tsx b/reminder-dashboard/src/components/Welcome/index.tsx index 522ce89..ff13add 100644 --- a/reminder-dashboard/src/components/Welcome/index.tsx +++ b/reminder-dashboard/src/components/Welcome/index.tsx @@ -14,6 +14,9 @@ export const Welcome = () => (

Please report bugs! I can't fix issues if I am unaware of them.

+

+ Client version: {import.meta.env.VITE_VERSION} +

);