Skip to content

Commit

Permalink
Point visitors to the official leaderboard.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertvanhoesel committed Apr 29, 2024
1 parent 4d18caa commit f81b6cf
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 80 deletions.
10 changes: 4 additions & 6 deletions src/components/promos/DeprecationNotice.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,22 @@ import Svg from "@jasikpark/astro-svg-loader"
import { styles } from "../../lib/theme"
interface Props {
title?: string
lostValue: string
class?: string
}
---

<div class:list={[styles.layout.container, styles.layout.containerPadding, Astro.props.class, "pt-4 md:pt-6"]}>
<div class="flex flex-col gap-4 rounded-lg border border-yellow-600 bg-yellow-500/15 p-4 sm:flex-row">
<Svg src={import("lucide-static/icons/frown.svg?raw")} class="h-8 w-8 flex-none text-yellow-400" />
<Svg src={import("lucide-static/icons/info.svg?raw")} class="h-8 w-8 flex-none text-yellow-400" />
<div>
<h3 class="text-base font-bold text-yellow-400">
{Astro.props.title ?? "The data on this page is no longer updated."}
</h3>
<p class="mt-1 text-sm text-yellow-200">
Frost Giant Studios has restricted community API access, {
Astro.props.lostValue ?? "preventing us from updating this page"
}. We're keeping this page up for historical reference and hope to regain access in the future.
<a href="/api-restrictions" class="text-yellow-400 underline">Learn more</a>.
We've discontinued the Leaderboard, Player Profiles, Stats and API
<a href="/discontinued" class="text-yellow-400 underline">Learn more</a>.
</p>
<slot/>
</div>
</div>
</div>
20 changes: 12 additions & 8 deletions src/layouts/PlayerLayout.astro
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
export const prerender = false
import Layout from "./Layout.astro"
import { Image } from "astro:assets"
import { getCollection } from "astro:content"
import Header from "../components/layout/Header.astro"
import HeaderContent from "../components/layout/HeaderContent.astro"
import HeaderMeta from "../components/layout/HeaderMeta.astro"
import HeaderNav from "../components/layout/HeaderNav.astro"
import DeprecationNotice from "../components/promos/DeprecationNotice.astro"
import { RankedBadge } from "../components/ui/RankedBadge"
import HeaderMeta from "../components/layout/HeaderMeta.astro"
import { formatDateRelative, getPlayerSlug } from "../lib/format"
import type { PlayerResponse } from "../lib/api"
import { getCollection } from "astro:content"
import { Image } from "astro:assets"
import { Tooltip } from "../components/ui/Tooltip"
import DeprecationNotice from "../components/promos/DeprecationNotice.astro"
import type { PlayerResponse } from "../lib/api"
import { formatDateRelative, getPlayerSlug } from "../lib/format"
import Layout from "./Layout.astro"
interface Props {
player: PlayerResponse
}
Expand Down Expand Up @@ -105,6 +105,10 @@ const playerInfo = (await getCollection("players")).find((p) => p.data.playerId
]}
/>
</Header>
<DeprecationNotice lostValue="meaning we can't show recent matches or update player statistics" />
<DeprecationNotice>
<p class="text-sm text-yellow-200 mt-4">
Search for <a href={`https://stormgate.untapped.gg/en/players?q=${encodeURIComponent(player.nickname!)}`} target="_blank" class="text-yellow-400 underline">"{player.nickname}"</a> on the official leaderboard.
</p>
</DeprecationNotice>
<slot />
</Layout>
60 changes: 2 additions & 58 deletions src/pages/api-restrictions.astro
Original file line number Diff line number Diff line change
@@ -1,59 +1,3 @@
---
import Layout from "../layouts/Layout.astro"
---

<Layout title="Frost Giant API Restrictions">
<div
class="m-2 max-w-screen-md space-y-4 rounded-lg border border-yellow-600 bg-yellow-500/15 p-4 leading-relaxed text-yellow-50 md:mx-auto md:my-12 md:p-8"
>
<h1 class="text-xl font-bold leading-normal text-yellow-400 md:text-3xl">
Frost Giant Studios no longer provides the community access to Match Data
</h1>
<p>
Since March 11, 2024, Frost Giant Studios no longer grants Stormgate World and the community API access to
Matches, Win-Rates, and other useful data. The <a
href="https://playstormgate.com/faq"
target="_blank"
class="font-bold underline">reason stated</a
> is that Frost Giant Studios is anticipating the release of their own (paid and free) learning tools and does not
want to report individual match outcomes externally. We are big proponents of having basic match data available to
the community, but we respect their decision and look forward to the release of these tools post-Early Access.
</p>
<p>As a result, the following features are no longer available / being updated:</p>
<ul class="ml-8 list-disc">
<li>Global (Balance) Stats and Faction Win-Rates</li>
<li>Player Match History</li>
<li>Player Win-Rates and Statistics</li>
<li>Streamer Overlay</li>
<li>The Community API</li>
</ul>
<p>Additionally, community projects that rely on our API will no longer function properly:</p>
<ul class="ml-8 list-disc">
<li>Replay Renamer</li>
<li>B.O.B. Discord Bot</li>
<li>Luminite.gg</li>
</ul>
<p>
The 1v1 leaderboard will likely remain available, but it is unclear if this would include win-rates and ranking.
</p>
<p>
While we are extremely disappointed by this decision and consider it a step backward, we remain hopeful that
someday in the future this data may become available again. We encourage the community to make their voice heard,
and share your wishes around data access, APIs, and community tools known with Frost Giant.
</p>
<p>
We want to thank the community for their support, and in particular the many contributors that have helped build
Stormgate World into what it is today. We are proud of the work we have done and the community we have built, and
we are excited to continue to support the community in any way we can.
</p>
<p>
In the meantime, feel free to check out our other RTS projects <a
href="https://aoe4world.com"
target="_blank"
class="font-bold underline">AoE4 World</a
> and
<a href="https://zerospaceworld.com" target="_blank" class="font-bold underline">ZeroSpace World</a>.
</p>
<p>- The Stormgate World Team</p>
</div>
</Layout>
return Astro.redirect('/discontinued')
---
32 changes: 32 additions & 0 deletions src/pages/discontinued.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
import Layout from "../layouts/Layout.astro"
---

<Layout title="Frost Giant API Restrictions">
<div
class="m-2 max-w-screen-md space-y-4 rounded-lg border border-yellow-600 bg-yellow-500/15 p-4 leading-relaxed text-yellow-50 md:mx-auto md:my-12 md:p-8"
>
<h1 class="text-xl font-bold leading-normal text-yellow-400 md:text-3xl">
We've discontinued the Leaderboard, Player Profiles and API
</h1>
<p>
Effective March 11, Frost Giant Studios began work on a new data project and official APIs developed in collaboration with Untapped.gg. As a result, our temporary data integration with Frost Giant comes to an end, and we’re no longer able to present Match Data and Player Profiles and will discontinue our unofficial Community API.
</p>
<p>
The new Official API is in an early stage, and the data and rate limits currently available are insufficient to the features we have developed. We have made the decision to pause our plans for an open-source, user-friendly, and community-driven platform while we follow how the Official APIs evolve.
</p>
<p>
We want to thank Frost Giant for their collaboration and the opportunity to play a major part during the Next Fest Playtest. We’re proud of what we created, and amazed by the community’s contributions and support. We’ll continue to partner with FGS behind the scenes and are excited for the future of Stormgate!

</p>
<p>- The Stormgate World Team</p>
<p>
View the <a
href="https://stormgate.untapped.gg/en/leaderboard"
target="_blank"
class="font-bold underline">Official Leaderboard </a
> and
<a href="https://stormgate.untapped.gg/en/docs/api" target="_blank" class="font-bold underline">Official API</a> on stormgate.untapped.gg.
</p>
</div>
</Layout>
20 changes: 12 additions & 8 deletions src/pages/leaderboards/[mode].astro
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
export const prerender = false
import Layout from "../../layouts/Layout.astro"
import hero from "../../assets/game/vanguard-base-hero.jpg"
import { Image } from "astro:assets"
import { Leaderboard } from "../../components/widgets/Leaderboard.tsx"
import type { LeaderboardOrder, Race } from "../../lib/api"
import { getCollection } from "astro:content"
import hero from "../../assets/game/vanguard-base-hero.jpg"
import DeprecationNotice from "../../components/promos/DeprecationNotice.astro"
import { Leaderboard } from "../../components/widgets/Leaderboard.tsx"
import Layout from "../../layouts/Layout.astro"
import type { LeaderboardOrder, Race } from "../../lib/api"
const mode = Astro.params.mode
// todo, mode as query param
const { page = 1, query, faction, order } = Object.fromEntries(new URL(Astro.request.url).searchParams.entries())
Expand All @@ -19,12 +19,16 @@ const badges = (await getCollection("badges")).map((b) => ({ ...b.data, icon: b.
<Image src={hero} alt="" class="absolute h-full w-full object-cover" />
<div class="absolute inset-0 bg-gradient-to-b from-gray-950/60 to-gray-950"></div>
</div>
<DeprecationNotice
title="Player Profiles will no longer be updated"
lostValue="the 1v1 leaderboard will likely stay active but we won't be able to show match history or win rates"
/>

<section class="relative mx-auto max-w-screen-md space-y-4 px-4 py-0">
<DeprecationNotice
class="bg-black !p-0 mt-12 mb-4 w-full rounded-lg"
>
<p class="text-sm text-yellow-200 mt-4">
View the <a href="https://stormgate.untapped.gg/en/leaderboard" class="text-yellow-400 underline" target="_blank">Official Leaderboard</a> on Untapped.gg
</p>
</DeprecationNotice>

<Leaderboard
mode={mode}
query={query}
Expand Down

0 comments on commit f81b6cf

Please sign in to comment.