Skip to content

Commit

Permalink
fix: up to d ate with new api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sargon64 committed Jan 14, 2024
1 parent 13a8851 commit e409266
Show file tree
Hide file tree
Showing 9 changed files with 296 additions and 195 deletions.
3 changes: 3 additions & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
},
"devDependencies": {
"@fontsource/fira-mono": "^5.0.8",
"@melt-ui/pp": "^0.3.0",
"@melt-ui/svelte": "^0.61.0",
"@neoconfetti/svelte": "^1.0.0",
"@sveltejs/adapter-auto": "^2.1.0",
"@sveltejs/adapter-node": "^1.3.1",
Expand All @@ -34,6 +36,7 @@
},
"type": "module",
"dependencies": {
"@urql/svelte": "^4.0.4",
"jwt-decode": "^4.0.0",
"sugar": "^2.0.6",
"svelte-tiny-virtual-list": "^2.0.5",
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
<meta property="og:image" content="/images/og_image.png" />
<meta name="twitter:card" content="summary_large_image" />

<script
<!-- <script
async
src="https://stats.beatforge.net/script.js"
data-website-id="bb624bfb-72f4-4f5d-9034-9186693a3360"
></script>
></script> -->
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/lib/components/ModListItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
let updatedAtProper: string;
try {
updatedAtProper = Sugar.Date.relative(new Date(updatedAt * 1000))
updatedAtProper = Sugar.Date.relative(new Date(updatedAt * 1000)).toString();
} catch (e) {
updatedAtProper = Sugar.Date.relative(new Date(Date.parse(updatedAt * 1000)))
updatedAtProper = Sugar.Date.relative(new Date(Date.parse(updatedAt * 1000))).toString();
}
</script>

Expand Down
2 changes: 2 additions & 0 deletions apps/web/src/lib/components/ModVersionItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
export let approved: boolean;
export let downloadUrl: string;
console.log(downloadUrl)
let isHovered: boolean = false
</script>

Expand Down
16 changes: 16 additions & 0 deletions apps/web/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@
import type { LayoutServerData } from './$types';
export let data: LayoutServerData;
import { Client, cacheExchange, fetchExchange, setContextClient } from '@urql/svelte';
const client = new Client({
url: `${import.meta.env.API_URL}/graphql`,
exchanges: [cacheExchange, fetchExchange],
fetchOptions: () => {
return {
headers: {
"Access-Control-Allow-Origin": "*",
}
};
}
});
setContextClient(client);
</script>

<!-- <NavBarDisclaimer /> -->
Expand Down
Loading

0 comments on commit e409266

Please sign in to comment.