mirror of https://github.com/hykilpikonna/AquaDX
parent
5adbcc0aff
commit
6733a0b873
Binary file not shown.
|
@ -8,6 +8,7 @@
|
||||||
import type { AquaNetUser } from "./libs/generalTypes";
|
import type { AquaNetUser } from "./libs/generalTypes";
|
||||||
import Settings from "./pages/User/Settings.svelte";
|
import Settings from "./pages/User/Settings.svelte";
|
||||||
import { pfp } from "./libs/ui"
|
import { pfp } from "./libs/ui"
|
||||||
|
import MaiPhoto from "./pages/MaiPhoto.svelte";
|
||||||
|
|
||||||
console.log(`%c
|
console.log(`%c
|
||||||
┏━┓ ┳━┓━┓┏━
|
┏━┓ ┳━┓━┓┏━
|
||||||
|
@ -40,6 +41,7 @@
|
||||||
<div on:click={() => alert("Coming soon™")} on:keydown={e => e.key === "Enter" && alert("Coming soon™")}
|
<div on:click={() => alert("Coming soon™")} on:keydown={e => e.key === "Enter" && alert("Coming soon™")}
|
||||||
role="button" tabindex="0">maps</div>
|
role="button" tabindex="0">maps</div>
|
||||||
<a href="/ranking">rankings</a>
|
<a href="/ranking">rankings</a>
|
||||||
|
<a href="/pictures">pictures</a>
|
||||||
{#if me}
|
{#if me}
|
||||||
<a href="/u/{me.username}">
|
<a href="/u/{me.username}">
|
||||||
<img alt="profile" class="pfp" use:pfp={me}/>
|
<img alt="profile" class="pfp" use:pfp={me}/>
|
||||||
|
@ -55,6 +57,7 @@
|
||||||
<Route path="/u/:username" component={UserHome} />
|
<Route path="/u/:username" component={UserHome} />
|
||||||
<Route path="/u/:username/:game" component={UserHome} />
|
<Route path="/u/:username/:game" component={UserHome} />
|
||||||
<Route path="/settings" component={Settings} />
|
<Route path="/settings" component={Settings} />
|
||||||
|
<Route path="/pictures" component={MaiPhoto} />
|
||||||
</Router>
|
</Router>
|
||||||
|
|
||||||
<style lang="sass">
|
<style lang="sass">
|
||||||
|
|
|
@ -284,6 +284,8 @@ export const CARD = {
|
||||||
export const GAME = {
|
export const GAME = {
|
||||||
trend: (username: string, game: GameName): Promise<TrendEntry[]> =>
|
trend: (username: string, game: GameName): Promise<TrendEntry[]> =>
|
||||||
post(`/api/v2/game/${game}/trend`, { username }),
|
post(`/api/v2/game/${game}/trend`, { username }),
|
||||||
|
photos: (): Promise<string[]> =>
|
||||||
|
post(`/api/v2/game/mai2/my-photo`, { }),
|
||||||
userSummary: (username: string, game: GameName): Promise<GenericGameSummary> =>
|
userSummary: (username: string, game: GameName): Promise<GenericGameSummary> =>
|
||||||
post(`/api/v2/game/${game}/user-summary`, { username }),
|
post(`/api/v2/game/${game}/user-summary`, { username }),
|
||||||
ranking: (game: GameName): Promise<GenericRanking[]> =>
|
ranking: (game: GameName): Promise<GenericRanking[]> =>
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
<script lang="ts">
|
||||||
|
import {GAME} from "../libs/sdk";
|
||||||
|
import {AQUA_HOST} from "../libs/config";
|
||||||
|
|
||||||
|
let photos: string[] = []
|
||||||
|
GAME.photos().then(result => {
|
||||||
|
console.log(result)
|
||||||
|
photos = result
|
||||||
|
}).catch(e => {
|
||||||
|
console.error(e)
|
||||||
|
})
|
||||||
|
|
||||||
|
const token = localStorage.getItem("token")
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<div class="content-main">
|
||||||
|
<p>Here you can see the pictures you have uploaded.</p>
|
||||||
|
<div class="pictures">
|
||||||
|
{#each photos as photo}
|
||||||
|
<img class="rounded-2xl" src="{AQUA_HOST}/api/v2/game/mai2/my-photo/{photo}?token={token}" alt="Memorial" />
|
||||||
|
{/each}
|
||||||
|
{#if photos.length === 0}
|
||||||
|
<p>There are no photos available. Try uploading some!</p>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<style lang="sass">
|
||||||
|
@use "../vars"
|
||||||
|
|
||||||
|
.pictures
|
||||||
|
display: flex
|
||||||
|
flex-direction: column
|
||||||
|
justify-content: center
|
||||||
|
gap: 1rem
|
||||||
|
</style>
|
Loading…
Reference in New Issue