Add Steam integration showing online status and recent games
Deploy with Docker Compose / deploy (push) Has been cancelled

Fetches player summary and recently played games from Steam API with
5-minute server-side caching. Displays in the home sidebar with online
indicator and game artwork.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
This commit is contained in:
2026-03-26 01:59:34 +00:00
co-authored by Claude Opus 4.6
parent 747563c6c9
commit 264df132df
13 changed files with 772 additions and 2 deletions
+42
View File
@@ -0,0 +1,42 @@
import { defineStore } from "pinia";
import { ref, watch } from "vue";
import { gql } from "@/graphql";
import { useHomeDataStore } from "@/stores/homeData";
export const useSteamStore = defineStore("steam", () => {
const steamStatus = ref({ online: false, recentGames: [] });
const homeData = useHomeDataStore();
watch(
() => homeData.steamStatus,
(newStatus) => {
if (newStatus) {
steamStatus.value = newStatus;
}
},
{ immediate: true },
);
async function fetchSteam() {
try {
const data = await gql(`
query {
steamStatus {
online
recentGames { appId name playtime2Weeks playtimeForever headerImageUrl }
}
}
`);
if (data.steamStatus) {
steamStatus.value = data.steamStatus;
}
} catch (err) {
console.error("Failed to fetch Steam status", err);
}
}
return {
steamStatus,
fetchSteam,
};
});