|
5 | 5 | import { initializeTooling, SessionState, State } from "$lib/state.js"; |
6 | 6 | import { onMount } from "svelte"; |
7 | 7 | import type { PageData } from "./$types.js"; |
| 8 | + import { getTimeBetween } from "$lib/helpers.js"; |
| 9 | + import { browser } from "$app/environment"; |
8 | 10 |
|
9 | 11 | const { data }: { data: PageData } = $props(); |
10 | 12 |
|
|
25 | 27 | /> |
26 | 28 | </svelte:head> |
27 | 29 |
|
28 | | -{#if (isAHost)} |
| 30 | +{#if isAHost || SessionState.devMode} |
29 | 31 | <div class="container"> |
30 | 32 | <div class="background"></div> |
31 | 33 | <Navigation /> |
32 | 34 | <CardGrid {games} /> |
33 | | - <footer> |
34 | | - <h3> |
35 | | - <b |
36 | | - >Can't find what you're looking for? <a |
37 | | - href="https://discord.gg/GDEFRBTT3Z">Join the discord</a |
38 | | - ></b |
39 | | - > |
40 | | - </h3> |
41 | | - <p> |
42 | | - CCPorted is not affiliated with or endorsed by any game |
43 | | - developers or publishers. All games are property of their |
44 | | - respective owners. |
45 | | - </p> |
46 | | - <p> |
47 | | - DMCA Requests can be sent to <a |
48 | | - href="mailto:ccported@ccported.click" |
49 | | - >ccported@ccported.click</a |
50 | | - > |
51 | | - </p> |
52 | | - <p> |
53 | | - Site, design, and development are protected under common law |
54 | | - copyright; © {new Date().getFullYear()} CCPorted |
55 | | - </p> |
56 | | - <p> |
57 | | - <a href="/tos/privacy_policy">Privacy Policy</a> | |
58 | | - <a href="/tos/terms_of_service">Terms of Service</a> |
59 | | - </p> |
60 | | - </footer> |
61 | 35 | </div> |
62 | 36 | {:else} |
63 | 37 | <Locked /> |
64 | 38 | {/if} |
| 39 | +<footer> |
| 40 | + <h3> |
| 41 | + <b |
| 42 | + >Can't find what you're looking for? <a |
| 43 | + href="https://discord.gg/GDEFRBTT3Z">Join the discord</a |
| 44 | + ></b |
| 45 | + > |
| 46 | + </h3> |
| 47 | + <p> |
| 48 | + CCPorted is not affiliated with or endorsed by any game developers or |
| 49 | + publishers. All games are property of their respective owners. |
| 50 | + </p> |
| 51 | + <p> |
| 52 | + DMCA Requests can be sent to <a href="mailto:ccported@ccported.click" |
| 53 | + >ccported@ccported.click</a |
| 54 | + > |
| 55 | + </p> |
| 56 | + <p> |
| 57 | + Site, design, and development are protected under common law copyright; |
| 58 | + © {new Date().getFullYear()} CCPorted |
| 59 | + </p> |
| 60 | + <p> |
| 61 | + <a href="/tos/privacy_policy">Privacy Policy</a> | |
| 62 | + <a href="/tos/terms_of_service">Terms of Service</a> |
| 63 | + </p> |
| 64 | + <div class="information"> |
| 65 | + <!-- none of this information is statefull, therefore none of it will update. this is intended behavior --> |
| 66 | + <b>Running Information:</b><br /> |
| 67 | + Browser: {navigator.userAgent}<br /> |
| 68 | + Host: {browser && window.location.hostname}<br /> |
| 69 | + DevMode: {SessionState.devMode}<br /> |
| 70 | + AdBlock: {SessionState.adBlockEnabled}<br /> |
| 71 | + Current Server: {State.currentServer.name} (Loaded {State.servers |
| 72 | + .length})<br /> |
| 73 | + AHost: {State.isAHost()} (Loaded {State.aHosts.length})<br /> |
| 74 | + Games Loaded: {games.length} ({State.pinnedGames.length} pinned) - rendered |
| 75 | + {State.homeView}<br /> |
| 76 | + Version: {State.version}<br /> |
| 77 | + Logged In: {State.loggedIn}<br /> |
| 78 | + SSR: {SessionState.ssr}<br /> |
| 79 | + AWS Ready: {SessionState.awsReady}<br /> |
| 80 | + AWS Acting: {SessionState.credentials?.identityId} | {SessionState |
| 81 | + .credentials?.accessKeyId}<br /> |
| 82 | + Credentials Expires: {SessionState.credentials?.expiration?.toLocaleTimeString()} |
| 83 | + {getTimeBetween( |
| 84 | + SessionState.credentials?.expiration || new Date(), |
| 85 | + new Date(), |
| 86 | + )} <br /> |
| 87 | + Plays: {SessionState.plays.toLocaleString()} ({State.localPlays.toLocaleString()} |
| 88 | + local)<br /> |
| 89 | + </div> |
| 90 | +</footer> |
65 | 91 |
|
66 | 92 | <style> |
67 | 93 | footer { |
|
70 | 96 | margin: 20px 0; |
71 | 97 | font-size: 14px; |
72 | 98 | } |
| 99 | + .information { |
| 100 | + margin-top: 10px; |
| 101 | + font-size: 12px; |
| 102 | + color: #999; |
| 103 | + max-width: 600px; |
| 104 | + margin: auto; |
| 105 | + text-align: left; |
| 106 | + font-family: "Courier New", Courier, monospace; |
| 107 | + } |
73 | 108 | </style> |
0 commit comments