chore: prettier pass

This commit is contained in:
Huskydog9988
2025-04-15 21:46:34 -04:00
parent d361e01eef
commit 87215c4a1e
62 changed files with 247 additions and 236 deletions

1
.prettierignore Normal file
View File

@ -0,0 +1 @@
drop-base/

View File

@ -41,7 +41,8 @@ TODO: Add Troubleshooting
If not, look at the [Troubleshooting](https://github.com/Drop-OSS/docs/Troubleshooting) If not, look at the [Troubleshooting](https://github.com/Drop-OSS/docs/Troubleshooting)
page for instructions on how to gather data to better debug your problem. page for instructions on how to gather data to better debug your problem.
--> -->
If you cannot find an existing issue, you can go ahead and create an issue with as much
If you cannot find an existing issue, you can go ahead and create an issue with as much
detail as you can provide. detail as you can provide.
It should include the data gathered as indicated above, along with the following: It should include the data gathered as indicated above, along with the following:
@ -69,7 +70,8 @@ maintainers) by mentioning their GitHub handle (starting with `@`) in your messa
### Getting started ### Getting started
You should be familiar with the basics of You should be familiar with the basics of
[contributing on GitHub](https://help.github.com/articles/using-pull-requests) [contributing on GitHub](https://help.github.com/articles/using-pull-requests)
<!--and have a fork <!--and have a fork
[properly set up](https://github.com/drop/docs/Contribution-Technical-Practices). [properly set up](https://github.com/drop/docs/Contribution-Technical-Practices).
--> -->
@ -95,8 +97,8 @@ maintainers) by mentioning their GitHub handle (starting with `@`) in your messa
### You have an addition ### You have an addition
We are absolutely accepting more contributions or features to drop, but please, make sure We are absolutely accepting more contributions or features to drop, but please, make sure
that it is reasonable. Contributions that only cover a very small niche are likely to not that it is reasonable. Contributions that only cover a very small niche are likely to not
be added. be added.
Please be so kind as to [search](#use-the-search-luke) for any pending, merged or rejected Pull Requests Please be so kind as to [search](#use-the-search-luke) for any pending, merged or rejected Pull Requests
@ -109,7 +111,7 @@ maintainers) by mentioning their GitHub handle (starting with `@`) in your messa
For any extensive change, such as API changes, you will have to find testers to +1 your PR. For any extensive change, such as API changes, you will have to find testers to +1 your PR.
---- ---
## Use the Search, Luke ## Use the Search, Luke
@ -126,7 +128,7 @@ to be sure your contribution has not already come up.
If all fails, your thing has probably not been reported yet, so you can go ahead If all fails, your thing has probably not been reported yet, so you can go ahead
and [create an issue](#reporting-issues) or [submit a PR](#submitting-pull-requests). and [create an issue](#reporting-issues) or [submit a PR](#submitting-pull-requests).
---- ---
## Commit Guidelines ## Commit Guidelines
@ -161,11 +163,13 @@ type(scope)!: subject
Examples: Examples:
- Commit that changes the `git` plugin: - Commit that changes the `git` plugin:
``` ```
feat(git): add alias for `git commit` feat(git): add alias for `git commit`
``` ```
- Commit that changes many plugins: - Commit that changes many plugins:
``` ```
style: fix inline declaration of arrays style: fix inline declaration of arrays
``` ```
@ -203,6 +207,7 @@ type(scope)!: subject
Formatting tricks: the commit subject may contain: Formatting tricks: the commit subject may contain:
- Links to related issues or PRs by writing `#issue`. This will be highlighted by the changelog tool: - Links to related issues or PRs by writing `#issue`. This will be highlighted by the changelog tool:
``` ```
feat(archlinux): add support for aura AUR helper (#9467) feat(archlinux): add support for aura AUR helper (#9467)
``` ```
@ -219,7 +224,7 @@ Try to keep the first commit line short. It's harder to do using this commit sty
concise, and if you need more space, you can use the commit body. Try to make sure that the commit concise, and if you need more space, you can use the commit body. Try to make sure that the commit
subject is clear and precise enough that users will know what changed by just looking at the changelog. subject is clear and precise enough that users will know what changed by just looking at the changelog.
---- ---
<!-- <!--
## Volunteer ## Volunteer
@ -229,7 +234,9 @@ Very nice!! :)
Please have a look at the [Volunteer](https://github.com/ohmyzsh/ohmyzsh/wiki/Volunteers) Please have a look at the [Volunteer](https://github.com/ohmyzsh/ohmyzsh/wiki/Volunteers)
page for instructions on where to start and more. page for instructions on where to start and more.
--> -->
## Reference ## Reference
This contributing guide is adapted from the
[oh-my-zsh contribution guide](https://github.com/ohmyzsh/ohmyzsh/blob/master/CONTRIBUTING.md). This contributing guide is adapted from the
If there are any issues with this, please email admin@deepcore.dev. [oh-my-zsh contribution guide](https://github.com/ohmyzsh/ohmyzsh/blob/master/CONTRIBUTING.md).
If there are any issues with this, please email admin@deepcore.dev.

View File

@ -1,4 +1,5 @@
# Security # Security
To report a vulnerability, please DO NOT create an issue for it To report a vulnerability, please DO NOT create an issue for it
as this may lead to the vulnerability being exploited before it as this may lead to the vulnerability being exploited before it
can be fixed. Instead, please email [security@deepcore.dev](mailto:security@deepcore.dev) can be fixed. Instead, please email [security@deepcore.dev](mailto:security@deepcore.dev)

View File

@ -73,5 +73,5 @@ button {
} }
html { html {
background-color: oklch(.21 .006 285.885); background-color: oklch(0.21 0.006 285.885);
} }

View File

@ -1,4 +1,4 @@
@import "tailwindcss"; @import "tailwindcss";
@plugin "@tailwindcss/typography"; @plugin "@tailwindcss/typography";
@plugin "@tailwindcss/forms"; @plugin "@tailwindcss/forms";
@config "../tailwind.config.js"; @config "../tailwind.config.js";

View File

@ -1,8 +1,7 @@
## Release 0.2.0-beta ## Release 0.2.0-beta
### Fixes ### Fixes
- fix recursive dirs util #02d6346 - fix recursive dirs util #02d6346
- Fix username length requirement #0a5a649 - Fix username length requirement #0a5a649
- remove dynamic imports #0f10626 - remove dynamic imports #0f10626
@ -33,8 +32,8 @@
- fix FATAL: "root"... message #dbb315a - fix FATAL: "root"... message #dbb315a
- only show versions that are directories #ef8f3ae - only show versions that are directories #ef8f3ae
### Features ### Features
- update prisma & delete games #089c3e0 - update prisma & delete games #089c3e0
- manual handshake #12e3125 - manual handshake #12e3125
- fetch game endpoint #1f4d075 - fetch game endpoint #1f4d075
@ -81,9 +80,9 @@
- add support for overriding UMU id #fd4a7d1 - add support for overriding UMU id #fd4a7d1
- add .sh for linux #fe9373a - add .sh for linux #fe9373a
### Other Changes ### Other Changes
- quexeky <git@quexeky.dev>
- quexeky <git@quexeky.dev>
- fixed manifest generation #03a37f7 - fixed manifest generation #03a37f7
- manual ci/cd #03b0b0c - manual ci/cd #03b0b0c
- ability to fetch client certs for p2p #0a715fe - ability to fetch client certs for p2p #0a715fe
@ -189,12 +188,12 @@
- better server side signin redirects #ef13b68 - better server side signin redirects #ef13b68
- patch signin #f3672f8 - patch signin #f3672f8
_changelog generated by_ [go-conventional-commits](https://github.com/joselitofilho/go-conventional-commits) _changelog generated by_ [go-conventional-commits](https://github.com/joselitofilho/go-conventional-commits)
## Release 0.1.0-beta ## Release 0.1.0-beta
### Fixes ### Fixes
- remove dynamic imports #0f10626 - remove dynamic imports #0f10626
- fix for missing developers or publishers #25fc957 - fix for missing developers or publishers #25fc957
- split prisma schemas #2859005 - split prisma schemas #2859005
@ -214,8 +213,8 @@ _changelog generated by_ [go-conventional-commits](https://github.com/joselitofi
- moved icons and created PlatformClient so we can use the enum on the frontend #cada630 - moved icons and created PlatformClient so we can use the enum on the frontend #cada630
- only show versions that are directories #ef8f3ae - only show versions that are directories #ef8f3ae
### Features ### Features
- update prisma & delete games #089c3e0 - update prisma & delete games #089c3e0
- fetch game endpoint #1f4d075 - fetch game endpoint #1f4d075
- under the hood organisation and consolidation #26a31f6 - under the hood organisation and consolidation #26a31f6
@ -245,9 +244,9 @@ _changelog generated by_ [go-conventional-commits](https://github.com/joselitofi
- cleanup and raw accessors #f7d767d - cleanup and raw accessors #f7d767d
- add support for overriding UMU id #fd4a7d1 - add support for overriding UMU id #fd4a7d1
### Other Changes ### Other Changes
- quexeky <git@quexeky.dev>
- quexeky <git@quexeky.dev>
- fixed manifest generation #03a37f7 - fixed manifest generation #03a37f7
- manual ci/cd #03b0b0c - manual ci/cd #03b0b0c
- ability to fetch client certs for p2p #0a715fe - ability to fetch client certs for p2p #0a715fe
@ -350,5 +349,4 @@ _changelog generated by_ [go-conventional-commits](https://github.com/joselitofi
- better server side signin redirects #ef13b68 - better server side signin redirects #ef13b68
- patch signin #f3672f8 - patch signin #f3672f8
_changelog generated by_ [go-conventional-commits](https://github.com/joselitofilho/go-conventional-commits) _changelog generated by_ [go-conventional-commits](https://github.com/joselitofilho/go-conventional-commits)

View File

@ -44,7 +44,7 @@ import {
HomeIcon, HomeIcon,
LockClosedIcon, LockClosedIcon,
DevicePhoneMobileIcon, DevicePhoneMobileIcon,
WrenchScrewdriverIcon WrenchScrewdriverIcon,
} from "@heroicons/vue/24/outline"; } from "@heroicons/vue/24/outline";
import { UserIcon } from "@heroicons/vue/24/solid"; import { UserIcon } from "@heroicons/vue/24/solid";
import type { Component } from "vue"; import type { Component } from "vue";

View File

@ -1,7 +1,14 @@
<template> <template>
<svg class="text-blue-400" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg
<path class="text-blue-400"
d="M4 13.5C4 11.0008 5.38798 8.76189 7.00766 7C8.43926 5.44272 10.0519 4.25811 11.0471 3.5959C11.6287 3.20893 12.3713 3.20893 12.9529 3.5959C13.9481 4.25811 15.5607 5.44272 16.9923 7C18.612 8.76189 20 11.0008 20 13.5C20 17.9183 16.4183 21.5 12 21.5C7.58172 21.5 4 17.9183 4 13.5Z" viewBox="0 0 24 24"
stroke="currentColor" stroke-width="2" /> fill="none"
</svg> xmlns="http://www.w3.org/2000/svg"
</template> >
<path
d="M4 13.5C4 11.0008 5.38798 8.76189 7.00766 7C8.43926 5.44272 10.0519 4.25811 11.0471 3.5959C11.6287 3.20893 12.3713 3.20893 12.9529 3.5959C13.9481 4.25811 15.5607 5.44272 16.9923 7C18.612 8.76189 20 11.0008 20 13.5C20 17.9183 16.4183 21.5 12 21.5C7.58172 21.5 4 17.9183 4 13.5Z"
stroke="currentColor"
stroke-width="2"
/>
</svg>
</template>

View File

@ -1,12 +1,18 @@
<template> <template>
<div class="inline-flex justify-center items-center gap-x-1 -mb-1 relative"> <div class="inline-flex justify-center items-center gap-x-1 -mb-1 relative">
<svg <svg
aria-hidden="true" viewBox="0 0 418 42" class="absolute inset-0 h-full w-full fill-blue-300/30 scale-75" aria-hidden="true"
preserveAspectRatio="none"> viewBox="0 0 418 42"
<path class="absolute inset-0 h-full w-full fill-blue-300/30 scale-75"
d="M203.371.916c-26.013-2.078-76.686 1.963-124.73 9.946L67.3 12.749C35.421 18.062 18.2 21.766 6.004 25.934 1.244 27.561.828 27.778.874 28.61c.07 1.214.828 1.121 9.595-1.176 9.072-2.377 17.15-3.92 39.246-7.496C123.565 7.986 157.869 4.492 195.942 5.046c7.461.108 19.25 1.696 19.17 2.582-.107 1.183-7.874 4.31-25.75 10.366-21.992 7.45-35.43 12.534-36.701 13.884-2.173 2.308-.202 4.407 4.442 4.734 2.654.187 3.263.157 15.593-.78 35.401-2.686 57.944-3.488 88.365-3.143 46.327.526 75.721 2.23 130.788 7.584 19.787 1.924 20.814 1.98 24.557 1.332l.066-.011c1.201-.203 1.53-1.825.399-2.335-2.911-1.31-4.893-1.604-22.048-3.261-57.509-5.556-87.871-7.36-132.059-7.842-23.239-.254-33.617-.116-50.627.674-11.629.54-42.371 2.494-46.696 2.967-2.359.259 8.133-3.625 26.504-9.81 23.239-7.825 27.934-10.149 28.304-14.005.417-4.348-3.529-6-16.878-7.066Z" /> preserveAspectRatio="none"
</svg> >
<Logo class="h-6" /> <path
<span class="text-blue-400 font-display font-bold text-xl uppercase">Drop</span> d="M203.371.916c-26.013-2.078-76.686 1.963-124.73 9.946L67.3 12.749C35.421 18.062 18.2 21.766 6.004 25.934 1.244 27.561.828 27.778.874 28.61c.07 1.214.828 1.121 9.595-1.176 9.072-2.377 17.15-3.92 39.246-7.496C123.565 7.986 157.869 4.492 195.942 5.046c7.461.108 19.25 1.696 19.17 2.582-.107 1.183-7.874 4.31-25.75 10.366-21.992 7.45-35.43 12.534-36.701 13.884-2.173 2.308-.202 4.407 4.442 4.734 2.654.187 3.263.157 15.593-.78 35.401-2.686 57.944-3.488 88.365-3.143 46.327.526 75.721 2.23 130.788 7.584 19.787 1.924 20.814 1.98 24.557 1.332l.066-.011c1.201-.203 1.53-1.825.399-2.335-2.911-1.31-4.893-1.604-22.048-3.261-57.509-5.556-87.871-7.36-132.059-7.842-23.239-.254-33.617-.116-50.627.674-11.629.54-42.371 2.494-46.696 2.967-2.359.259 8.133-3.625 26.504-9.81 23.239-7.825 27.934-10.149 28.304-14.005.417-4.348-3.529-6-16.878-7.066Z"
</div> />
</template> </svg>
<Logo class="h-6" />
<span class="text-blue-400 font-display font-bold text-xl uppercase"
>Drop</span
>
</div>
</template>

View File

@ -46,7 +46,7 @@ const min = computed(() => Math.max(props.min ?? 8, props.items.length));
const games: Ref<Array<SerializeObject<Game> | undefined>> = computed(() => const games: Ref<Array<SerializeObject<Game> | undefined>> = computed(() =>
Array(min.value) Array(min.value)
.fill(0) .fill(0)
.map((_, i) => props.items[i]) .map((_, i) => props.items[i]),
); );
const singlePage = ref(2); const singlePage = ref(2);

View File

@ -1,8 +1,9 @@
<template> <template>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools --> <!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg"> <svg viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path <path
fill="currentColor" fill="currentColor"
d="M20.992 20.163c-1.511-0.099-2.699-1.349-2.699-2.877 0-0.051 0.001-0.102 0.004-0.153l-0 0.007c-0.003-0.048-0.005-0.104-0.005-0.161 0-1.525 1.19-2.771 2.692-2.862l0.008-0c1.509 0.082 2.701 1.325 2.701 2.847 0 0.062-0.002 0.123-0.006 0.184l0-0.008c0.003 0.050 0.005 0.109 0.005 0.168 0 1.523-1.191 2.768-2.693 2.854l-0.008 0zM11.026 20.163c-1.511-0.099-2.699-1.349-2.699-2.877 0-0.051 0.001-0.102 0.004-0.153l-0 0.007c-0.003-0.048-0.005-0.104-0.005-0.161 0-1.525 1.19-2.771 2.692-2.862l0.008-0c1.509 0.082 2.701 1.325 2.701 2.847 0 0.062-0.002 0.123-0.006 0.184l0-0.008c0.003 0.048 0.005 0.104 0.005 0.161 0 1.525-1.19 2.771-2.692 2.862l-0.008 0zM26.393 6.465c-1.763-0.832-3.811-1.49-5.955-1.871l-0.149-0.022c-0.005-0.001-0.011-0.002-0.017-0.002-0.035 0-0.065 0.019-0.081 0.047l-0 0c-0.234 0.411-0.488 0.924-0.717 1.45l-0.043 0.111c-1.030-0.165-2.218-0.259-3.428-0.259s-2.398 0.094-3.557 0.275l0.129-0.017c-0.27-0.63-0.528-1.142-0.813-1.638l0.041 0.077c-0.017-0.029-0.048-0.047-0.083-0.047-0.005 0-0.011 0-0.016 0.001l0.001-0c-2.293 0.403-4.342 1.060-6.256 1.957l0.151-0.064c-0.017 0.007-0.031 0.019-0.040 0.034l-0 0c-2.854 4.041-4.562 9.069-4.562 14.496 0 0.907 0.048 1.802 0.141 2.684l-0.009-0.11c0.003 0.029 0.018 0.053 0.039 0.070l0 0c2.14 1.601 4.628 2.891 7.313 3.738l0.176 0.048c0.008 0.003 0.018 0.004 0.028 0.004 0.032 0 0.060-0.015 0.077-0.038l0-0c0.535-0.72 1.044-1.536 1.485-2.392l0.047-0.1c0.006-0.012 0.010-0.027 0.010-0.043 0-0.041-0.026-0.075-0.062-0.089l-0.001-0c-0.912-0.352-1.683-0.727-2.417-1.157l0.077 0.042c-0.029-0.017-0.048-0.048-0.048-0.083 0-0.031 0.015-0.059 0.038-0.076l0-0c0.157-0.118 0.315-0.24 0.465-0.364 0.016-0.013 0.037-0.021 0.059-0.021 0.014 0 0.027 0.003 0.038 0.008l-0.001-0c2.208 1.061 4.8 1.681 7.536 1.681s5.329-0.62 7.643-1.727l-0.107 0.046c0.012-0.006 0.025-0.009 0.040-0.009 0.022 0 0.043 0.008 0.059 0.021l-0-0c0.15 0.124 0.307 0.248 0.466 0.365 0.023 0.018 0.038 0.046 0.038 0.077 0 0.035-0.019 0.065-0.046 0.082l-0 0c-0.661 0.395-1.432 0.769-2.235 1.078l-0.105 0.036c-0.036 0.014-0.062 0.049-0.062 0.089 0 0.016 0.004 0.031 0.011 0.044l-0-0.001c0.501 0.96 1.009 1.775 1.571 2.548l-0.040-0.057c0.017 0.024 0.046 0.040 0.077 0.040 0.010 0 0.020-0.002 0.029-0.004l-0.001 0c2.865-0.892 5.358-2.182 7.566-3.832l-0.065 0.047c0.022-0.016 0.036-0.041 0.039-0.069l0-0c0.087-0.784 0.136-1.694 0.136-2.615 0-5.415-1.712-10.43-4.623-14.534l0.052 0.078c-0.008-0.016-0.022-0.029-0.038-0.036l-0-0z"/> d="M20.992 20.163c-1.511-0.099-2.699-1.349-2.699-2.877 0-0.051 0.001-0.102 0.004-0.153l-0 0.007c-0.003-0.048-0.005-0.104-0.005-0.161 0-1.525 1.19-2.771 2.692-2.862l0.008-0c1.509 0.082 2.701 1.325 2.701 2.847 0 0.062-0.002 0.123-0.006 0.184l0-0.008c0.003 0.050 0.005 0.109 0.005 0.168 0 1.523-1.191 2.768-2.693 2.854l-0.008 0zM11.026 20.163c-1.511-0.099-2.699-1.349-2.699-2.877 0-0.051 0.001-0.102 0.004-0.153l-0 0.007c-0.003-0.048-0.005-0.104-0.005-0.161 0-1.525 1.19-2.771 2.692-2.862l0.008-0c1.509 0.082 2.701 1.325 2.701 2.847 0 0.062-0.002 0.123-0.006 0.184l0-0.008c0.003 0.048 0.005 0.104 0.005 0.161 0 1.525-1.19 2.771-2.692 2.862l-0.008 0zM26.393 6.465c-1.763-0.832-3.811-1.49-5.955-1.871l-0.149-0.022c-0.005-0.001-0.011-0.002-0.017-0.002-0.035 0-0.065 0.019-0.081 0.047l-0 0c-0.234 0.411-0.488 0.924-0.717 1.45l-0.043 0.111c-1.030-0.165-2.218-0.259-3.428-0.259s-2.398 0.094-3.557 0.275l0.129-0.017c-0.27-0.63-0.528-1.142-0.813-1.638l0.041 0.077c-0.017-0.029-0.048-0.047-0.083-0.047-0.005 0-0.011 0-0.016 0.001l0.001-0c-2.293 0.403-4.342 1.060-6.256 1.957l0.151-0.064c-0.017 0.007-0.031 0.019-0.040 0.034l-0 0c-2.854 4.041-4.562 9.069-4.562 14.496 0 0.907 0.048 1.802 0.141 2.684l-0.009-0.11c0.003 0.029 0.018 0.053 0.039 0.070l0 0c2.14 1.601 4.628 2.891 7.313 3.738l0.176 0.048c0.008 0.003 0.018 0.004 0.028 0.004 0.032 0 0.060-0.015 0.077-0.038l0-0c0.535-0.72 1.044-1.536 1.485-2.392l0.047-0.1c0.006-0.012 0.010-0.027 0.010-0.043 0-0.041-0.026-0.075-0.062-0.089l-0.001-0c-0.912-0.352-1.683-0.727-2.417-1.157l0.077 0.042c-0.029-0.017-0.048-0.048-0.048-0.083 0-0.031 0.015-0.059 0.038-0.076l0-0c0.157-0.118 0.315-0.24 0.465-0.364 0.016-0.013 0.037-0.021 0.059-0.021 0.014 0 0.027 0.003 0.038 0.008l-0.001-0c2.208 1.061 4.8 1.681 7.536 1.681s5.329-0.62 7.643-1.727l-0.107 0.046c0.012-0.006 0.025-0.009 0.040-0.009 0.022 0 0.043 0.008 0.059 0.021l-0-0c0.15 0.124 0.307 0.248 0.466 0.365 0.023 0.018 0.038 0.046 0.038 0.077 0 0.035-0.019 0.065-0.046 0.082l-0 0c-0.661 0.395-1.432 0.769-2.235 1.078l-0.105 0.036c-0.036 0.014-0.062 0.049-0.062 0.089 0 0.016 0.004 0.031 0.011 0.044l-0-0.001c0.501 0.96 1.009 1.775 1.571 2.548l-0.040-0.057c0.017 0.024 0.046 0.040 0.077 0.040 0.010 0 0.020-0.002 0.029-0.004l-0.001 0c2.865-0.892 5.358-2.182 7.566-3.832l-0.065 0.047c0.022-0.016 0.036-0.041 0.039-0.069l0-0c0.087-0.784 0.136-1.694 0.136-2.615 0-5.415-1.712-10.43-4.623-14.534l0.052 0.078c-0.008-0.016-0.022-0.029-0.038-0.036l-0-0z"
</svg> />
</template> </svg>
</template>

View File

@ -1,15 +1,29 @@
<template> <template>
<svg <svg
viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"
xmlns:xlink="http://www.w3.org/1999/xlink"> version="1.1"
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> xmlns="http://www.w3.org/2000/svg"
<g id="Dribbble-Light-Preview" transform="translate(-140.000000, -7559.000000)" fill="currentColor"> xmlns:xlink="http://www.w3.org/1999/xlink"
<g id="icons" transform="translate(56.000000, 160.000000)"> >
<path <g
id="github-[#142]" id="Page-1"
d="M94,7399 C99.523,7399 104,7403.59 104,7409.253 C104,7413.782 101.138,7417.624 97.167,7418.981 C96.66,7419.082 96.48,7418.762 96.48,7418.489 C96.48,7418.151 96.492,7417.047 96.492,7415.675 C96.492,7414.719 96.172,7414.095 95.813,7413.777 C98.04,7413.523 100.38,7412.656 100.38,7408.718 C100.38,7407.598 99.992,7406.684 99.35,7405.966 C99.454,7405.707 99.797,7404.664 99.252,7403.252 C99.252,7403.252 98.414,7402.977 96.505,7404.303 C95.706,7404.076 94.85,7403.962 94,7403.958 C93.15,7403.962 92.295,7404.076 91.497,7404.303 C89.586,7402.977 88.746,7403.252 88.746,7403.252 C88.203,7404.664 88.546,7405.707 88.649,7405.966 C88.01,7406.684 87.619,7407.598 87.619,7408.718 C87.619,7412.646 89.954,7413.526 92.175,7413.785 C91.889,7414.041 91.63,7414.493 91.54,7415.156 C90.97,7415.418 89.522,7415.871 88.63,7414.304 C88.63,7414.304 88.101,7413.319 87.097,7413.247 C87.097,7413.247 86.122,7413.234 87.029,7413.87 C87.029,7413.87 87.684,7414.185 88.139,7415.37 C88.139,7415.37 88.726,7417.2 91.508,7416.58 C91.513,7417.437 91.522,7418.245 91.522,7418.489 C91.522,7418.76 91.338,7419.077 90.839,7418.982 C86.865,7417.627 84,7413.783 84,7409.253 C84,7403.59 88.478,7399 94,7399"/> stroke="none"
</g> stroke-width="1"
</g> fill="none"
</g> fill-rule="evenodd"
</svg> >
</template> <g
id="Dribbble-Light-Preview"
transform="translate(-140.000000, -7559.000000)"
fill="currentColor"
>
<g id="icons" transform="translate(56.000000, 160.000000)">
<path
id="github-[#142]"
d="M94,7399 C99.523,7399 104,7403.59 104,7409.253 C104,7413.782 101.138,7417.624 97.167,7418.981 C96.66,7419.082 96.48,7418.762 96.48,7418.489 C96.48,7418.151 96.492,7417.047 96.492,7415.675 C96.492,7414.719 96.172,7414.095 95.813,7413.777 C98.04,7413.523 100.38,7412.656 100.38,7408.718 C100.38,7407.598 99.992,7406.684 99.35,7405.966 C99.454,7405.707 99.797,7404.664 99.252,7403.252 C99.252,7403.252 98.414,7402.977 96.505,7404.303 C95.706,7404.076 94.85,7403.962 94,7403.958 C93.15,7403.962 92.295,7404.076 91.497,7404.303 C89.586,7402.977 88.746,7403.252 88.746,7403.252 C88.203,7404.664 88.546,7405.707 88.649,7405.966 C88.01,7406.684 87.619,7407.598 87.619,7408.718 C87.619,7412.646 89.954,7413.526 92.175,7413.785 C91.889,7414.041 91.63,7414.493 91.54,7415.156 C90.97,7415.418 89.522,7415.871 88.63,7414.304 C88.63,7414.304 88.101,7413.319 87.097,7413.247 C87.097,7413.247 86.122,7413.234 87.029,7413.87 C87.029,7413.87 87.684,7414.185 88.139,7415.37 C88.139,7415.37 88.726,7417.2 91.508,7416.58 C91.513,7417.437 91.522,7418.245 91.522,7418.489 C91.522,7418.76 91.338,7419.077 90.839,7418.982 C86.865,7417.627 84,7413.783 84,7409.253 C84,7403.59 88.478,7399 94,7399"
/>
</g>
</g>
</g>
</svg>
</template>

View File

@ -1,10 +1,10 @@
<template> <template>
<svg viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<path <path
fill-rule="evenodd" fill-rule="evenodd"
clip-rule="evenodd" clip-rule="evenodd"
d="M4.53918 2.40715C4.82145 1.0075 6.06066 0 7.49996 0C8.93926 0 10.1785 1.0075 10.4607 2.40715L10.798 4.07944C10.9743 4.9539 11.3217 5.78562 11.8205 6.52763L12.4009 7.39103C12.7631 7.92978 12.9999 8.5385 13.0979 9.17323C13.6747 9.22167 14.1803 9.58851 14.398 10.1283L14.8897 11.3474C15.1376 11.962 14.9583 12.665 14.4455 13.0887L12.5614 14.6458C12.0128 15.0992 11.2219 15.1193 10.6506 14.6944L9.89192 14.1301C9.88189 14.1227 9.87197 14.1151 9.86216 14.1074C9.48973 14.2075 9.09793 14.261 8.69355 14.261H6.30637C5.90201 14.261 5.51023 14.2076 5.13782 14.1074C5.12802 14.1151 5.11811 14.1227 5.10808 14.1301L4.34942 14.6944C3.77811 15.1193 2.98725 15.0992 2.43863 14.6458L0.55446 13.0887C0.0417175 12.665 -0.1376 11.962 0.110281 11.3474L0.602025 10.1283C0.819715 9.58854 1.32527 9.2217 1.90198 9.17324C2 8.5385 2.2368 7.92978 2.59897 7.39103L3.17938 6.52763C3.67818 5.78562 4.02557 4.9539 4.20193 4.07944L4.53918 2.40715ZM10.8445 9.47585C10.6345 9.63293 10.4642 9.84382 10.3561 10.0938L9.58799 11.8713C9.20026 12.0979 8.75209 12.2237 8.28465 12.2237H6.7153C6.24789 12.2237 5.79975 12.0979 5.41203 11.8714L4.64386 10.0938C4.53581 9.8438 4.36552 9.6329 4.15546 9.47582C4.18121 9.15355 4.2689 8.83503 4.41853 8.53826L5.67678 6.04259L5.68433 6.05007C6.68715 7.04458 8.31304 7.04458 9.31585 6.05007L9.32324 6.04274L10.5814 8.53825C10.7311 8.83504 10.8187 9.15357 10.8445 9.47585ZM9.04068 4.26906V3.05592H8.01353V3.85713C8.23151 3.90123 8.44506 3.97371 8.64848 4.07458L9.04068 4.26906ZM6.98638 3.85718V3.05592H5.95923V4.26919L6.3517 4.07458C6.55504 3.97375 6.7685 3.90129 6.98638 3.85718ZM2.03255 10.1864C1.82255 10.1864 1.6337 10.3132 1.55571 10.5066L1.06397 11.7257C0.981339 11.9306 1.04111 12.1649 1.21203 12.3062L3.0962 13.8633C3.27907 14.0144 3.54269 14.0211 3.73313 13.8795L4.49179 13.3152C4.6813 13.1743 4.74901 12.923 4.6557 12.7071L3.69976 10.4951C3.61884 10.3078 3.43316 10.1864 3.22771 10.1864H2.03255ZM13.4443 10.5066C13.3663 10.3132 13.1775 10.1864 12.9674 10.1864H11.7723C11.5668 10.1864 11.3812 10.3078 11.3002 10.4951L10.3443 12.7071C10.251 12.923 10.3187 13.1743 10.5082 13.3152L11.2669 13.8795C11.4573 14.0211 11.7209 14.0144 11.9038 13.8633L13.788 12.3062C13.9589 12.1649 14.0187 11.9306 13.936 11.7257L13.4443 10.5066ZM6.81106 4.98568C7.24481 4.7706 7.75537 4.7706 8.18912 4.98568L8.68739 5.23275L8.58955 5.32978C7.98786 5.92649 7.01232 5.92649 6.41063 5.32978L6.31279 5.23275L6.81106 4.98568Z" d="M4.53918 2.40715C4.82145 1.0075 6.06066 0 7.49996 0C8.93926 0 10.1785 1.0075 10.4607 2.40715L10.798 4.07944C10.9743 4.9539 11.3217 5.78562 11.8205 6.52763L12.4009 7.39103C12.7631 7.92978 12.9999 8.5385 13.0979 9.17323C13.6747 9.22167 14.1803 9.58851 14.398 10.1283L14.8897 11.3474C15.1376 11.962 14.9583 12.665 14.4455 13.0887L12.5614 14.6458C12.0128 15.0992 11.2219 15.1193 10.6506 14.6944L9.89192 14.1301C9.88189 14.1227 9.87197 14.1151 9.86216 14.1074C9.48973 14.2075 9.09793 14.261 8.69355 14.261H6.30637C5.90201 14.261 5.51023 14.2076 5.13782 14.1074C5.12802 14.1151 5.11811 14.1227 5.10808 14.1301L4.34942 14.6944C3.77811 15.1193 2.98725 15.0992 2.43863 14.6458L0.55446 13.0887C0.0417175 12.665 -0.1376 11.962 0.110281 11.3474L0.602025 10.1283C0.819715 9.58854 1.32527 9.2217 1.90198 9.17324C2 8.5385 2.2368 7.92978 2.59897 7.39103L3.17938 6.52763C3.67818 5.78562 4.02557 4.9539 4.20193 4.07944L4.53918 2.40715ZM10.8445 9.47585C10.6345 9.63293 10.4642 9.84382 10.3561 10.0938L9.58799 11.8713C9.20026 12.0979 8.75209 12.2237 8.28465 12.2237H6.7153C6.24789 12.2237 5.79975 12.0979 5.41203 11.8714L4.64386 10.0938C4.53581 9.8438 4.36552 9.6329 4.15546 9.47582C4.18121 9.15355 4.2689 8.83503 4.41853 8.53826L5.67678 6.04259L5.68433 6.05007C6.68715 7.04458 8.31304 7.04458 9.31585 6.05007L9.32324 6.04274L10.5814 8.53825C10.7311 8.83504 10.8187 9.15357 10.8445 9.47585ZM9.04068 4.26906V3.05592H8.01353V3.85713C8.23151 3.90123 8.44506 3.97371 8.64848 4.07458L9.04068 4.26906ZM6.98638 3.85718V3.05592H5.95923V4.26919L6.3517 4.07458C6.55504 3.97375 6.7685 3.90129 6.98638 3.85718ZM2.03255 10.1864C1.82255 10.1864 1.6337 10.3132 1.55571 10.5066L1.06397 11.7257C0.981339 11.9306 1.04111 12.1649 1.21203 12.3062L3.0962 13.8633C3.27907 14.0144 3.54269 14.0211 3.73313 13.8795L4.49179 13.3152C4.6813 13.1743 4.74901 12.923 4.6557 12.7071L3.69976 10.4951C3.61884 10.3078 3.43316 10.1864 3.22771 10.1864H2.03255ZM13.4443 10.5066C13.3663 10.3132 13.1775 10.1864 12.9674 10.1864H11.7723C11.5668 10.1864 11.3812 10.3078 11.3002 10.4951L10.3443 12.7071C10.251 12.923 10.3187 13.1743 10.5082 13.3152L11.2669 13.8795C11.4573 14.0211 11.7209 14.0144 11.9038 13.8633L13.788 12.3062C13.9589 12.1649 14.0187 11.9306 13.936 11.7257L13.4443 10.5066ZM6.81106 4.98568C7.24481 4.7706 7.75537 4.7706 8.18912 4.98568L8.68739 5.23275L8.58955 5.32978C7.98786 5.92649 7.01232 5.92649 6.41063 5.32978L6.31279 5.23275L6.81106 4.98568Z"
fill="currentColor" fill="currentColor"
/> />
</svg> </svg>
</template> </template>

View File

@ -1,11 +1,11 @@
<template> <template>
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path <path
d="M15 9H15.01M15 15C18.3137 15 21 12.3137 21 9C21 5.68629 18.3137 3 15 3C11.6863 3 9 5.68629 9 9C9 9.27368 9.01832 9.54308 9.05381 9.80704C9.11218 10.2412 9.14136 10.4583 9.12172 10.5956C9.10125 10.7387 9.0752 10.8157 9.00469 10.9419C8.937 11.063 8.81771 11.1823 8.57913 11.4209L3.46863 16.5314C3.29568 16.7043 3.2092 16.7908 3.14736 16.8917C3.09253 16.9812 3.05213 17.0787 3.02763 17.1808C3 17.2959 3 17.4182 3 17.6627V19.4C3 19.9601 3 20.2401 3.10899 20.454C3.20487 20.6422 3.35785 20.7951 3.54601 20.891C3.75992 21 4.03995 21 4.6 21H6.33726C6.58185 21 6.70414 21 6.81923 20.9724C6.92127 20.9479 7.01881 20.9075 7.10828 20.8526C7.2092 20.7908 7.29568 20.7043 7.46863 20.5314L12.5791 15.4209C12.8177 15.1823 12.937 15.063 13.0581 14.9953C13.1843 14.9248 13.2613 14.8987 13.4044 14.8783C13.5417 14.8586 13.7588 14.8878 14.193 14.9462C14.4569 14.9817 14.7263 15 15 15Z" d="M15 9H15.01M15 15C18.3137 15 21 12.3137 21 9C21 5.68629 18.3137 3 15 3C11.6863 3 9 5.68629 9 9C9 9.27368 9.01832 9.54308 9.05381 9.80704C9.11218 10.2412 9.14136 10.4583 9.12172 10.5956C9.10125 10.7387 9.0752 10.8157 9.00469 10.9419C8.937 11.063 8.81771 11.1823 8.57913 11.4209L3.46863 16.5314C3.29568 16.7043 3.2092 16.7908 3.14736 16.8917C3.09253 16.9812 3.05213 17.0787 3.02763 17.1808C3 17.2959 3 17.4182 3 17.6627V19.4C3 19.9601 3 20.2401 3.10899 20.454C3.20487 20.6422 3.35785 20.7951 3.54601 20.891C3.75992 21 4.03995 21 4.6 21H6.33726C6.58185 21 6.70414 21 6.81923 20.9724C6.92127 20.9479 7.01881 20.9075 7.10828 20.8526C7.2092 20.7908 7.29568 20.7043 7.46863 20.5314L12.5791 15.4209C12.8177 15.1823 12.937 15.063 13.0581 14.9953C13.1843 14.9248 13.2613 14.8987 13.4044 14.8783C13.5417 14.8586 13.7588 14.8878 14.193 14.9462C14.4569 14.9817 14.7263 15 15 15Z"
stroke="currentColor" stroke="currentColor"
stroke-width="2" stroke-width="2"
stroke-linecap="round" stroke-linecap="round"
stroke-linejoin="round" stroke-linejoin="round"
/> />
</svg> </svg>
</template> </template>

View File

@ -1,12 +1,12 @@
<template> <template>
<svg <svg
fill="currentColor" fill="currentColor"
viewBox="0 0 1920 1920" viewBox="0 0 1920 1920"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
> >
<path <path
d="M1863.53 1016.437c31.171 0 56.47 25.299 56.47 56.47v790.589c0 16.376-7.115 31.849-19.313 42.465-10.39 9.149-23.605 14.005-37.158 14.005-2.484 0-5.082-.113-7.567-.452l-903.53-123.331c-28.008-3.84-48.903-27.784-48.903-56.02v-667.256c0-31.171 25.3-56.47 56.471-56.47Zm-1129.412 0c31.171 0 56.47 25.299 56.47 56.47v634.504c0 16.376-7.115 31.85-19.426 42.579-10.39 9.035-23.491 13.891-37.044 13.891-2.485 0-5.196-.113-7.68-.564L48.79 1669.35C20.78 1665.51 0 1641.68 0 1613.444v-540.537c0-31.171 25.299-56.47 56.47-56.47Zm-7.726-859.855c16.151-2.372 32.415 2.597 44.725 13.327 12.424 10.73 19.426 26.315 19.426 42.579V846.99c0 31.285-25.186 56.47-56.47 56.47H56.424c-31.171 0-56.47-25.185-56.47-56.47V306.455c0-28.123 20.781-52.066 48.79-55.906ZM1855.974.474c16.15-2.033 32.414 2.71 44.724 13.44 12.198 10.73 19.313 26.203 19.313 42.466v790.588c0 31.285-25.299 56.471-56.47 56.471H960.01c-31.171 0-56.47-25.186-56.47-56.47V179.711c0-28.235 20.78-52.066 48.903-55.906Z" d="M1863.53 1016.437c31.171 0 56.47 25.299 56.47 56.47v790.589c0 16.376-7.115 31.849-19.313 42.465-10.39 9.149-23.605 14.005-37.158 14.005-2.484 0-5.082-.113-7.567-.452l-903.53-123.331c-28.008-3.84-48.903-27.784-48.903-56.02v-667.256c0-31.171 25.3-56.47 56.471-56.47Zm-1129.412 0c31.171 0 56.47 25.299 56.47 56.47v634.504c0 16.376-7.115 31.85-19.426 42.579-10.39 9.035-23.491 13.891-37.044 13.891-2.485 0-5.196-.113-7.68-.564L48.79 1669.35C20.78 1665.51 0 1641.68 0 1613.444v-540.537c0-31.171 25.299-56.47 56.47-56.47Zm-7.726-859.855c16.151-2.372 32.415 2.597 44.725 13.327 12.424 10.73 19.426 26.315 19.426 42.579V846.99c0 31.285-25.186 56.47-56.47 56.47H56.424c-31.171 0-56.47-25.185-56.47-56.47V306.455c0-28.123 20.781-52.066 48.79-55.906ZM1855.974.474c16.15-2.033 32.414 2.71 44.724 13.44 12.198 10.73 19.313 26.203 19.313 42.466v790.588c0 31.285-25.299 56.471-56.47 56.471H960.01c-31.171 0-56.47-25.186-56.47-56.47V179.711c0-28.235 20.78-52.066 48.903-55.906Z"
fill-rule="evenodd" fill-rule="evenodd"
/> />
</svg> </svg>
</template> </template>

View File

@ -15,7 +15,7 @@
> >
<NuxtLink <NuxtLink
v-for="[name, link] in notification.actions.map((e) => v-for="[name, link] in notification.actions.map((e) =>
e.split('|') e.split('|'),
)" )"
:key="name" :key="name"
type="button" type="button"
@ -54,7 +54,7 @@ async function deleteMe() {
}); });
const notifications = useNotifications(); const notifications = useNotifications();
const indexOfMe = notifications.value.findIndex( const indexOfMe = notifications.value.findIndex(
(e) => e.id === props.notification.id (e) => e.id === props.notification.id,
); );
// Delete me // Delete me
notifications.value.splice(indexOfMe, 1); notifications.value.splice(indexOfMe, 1);

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="flex rounded px-2 py-2 bg-zinc-900 text-zinc-600"> <div class="flex rounded px-2 py-2 bg-zinc-900 text-zinc-600">
<slot /> <slot />
</div> </div>
</template> </template>

View File

@ -223,7 +223,7 @@ const currentPageIndex = useCurrentNavigationIndex(navigation);
const notifications = useNotifications(); const notifications = useNotifications();
const unreadNotifications = computed(() => const unreadNotifications = computed(() =>
notifications.value.filter((e) => !e.read) notifications.value.filter((e) => !e.read),
); );
const sidebarOpen = ref(false); const sidebarOpen = ref(false);

View File

@ -1,7 +1,9 @@
import type { RouteLocationNormalized } from "vue-router"; import type { RouteLocationNormalized } from "vue-router";
import type { NavigationItem } from "./types"; import type { NavigationItem } from "./types";
export const useCurrentNavigationIndex = (navigation: Array<NavigationItem>) => { export const useCurrentNavigationIndex = (
navigation: Array<NavigationItem>,
) => {
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();

View File

@ -9,4 +9,4 @@ services:
environment: environment:
- POSTGRES_PASSWORD=drop - POSTGRES_PASSWORD=drop
- POSTGRES_USER=drop - POSTGRES_USER=drop
- POSTGRES_DB=drop - POSTGRES_DB=drop

View File

@ -113,7 +113,7 @@
class="h-[min(152px,40cqw)] object-cover" class="h-[min(152px,40cqw)] object-cover"
src="https://tailwindcss.com/plus-assets/img/component-images/bento-03-security.png" src="https://tailwindcss.com/plus-assets/img/component-images/bento-03-security.png"
alt="" alt=""
> />
</div> </div>
</div> </div>
<div <div

View File

@ -30,7 +30,7 @@
required required
placeholder="AwesomeDropGamer771" placeholder="AwesomeDropGamer771"
class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6" class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
> />
</div> </div>
</div> </div>
@ -59,7 +59,7 @@
:disabled="!!invitation.data.value?.email" :disabled="!!invitation.data.value?.email"
placeholder="me@example.com" placeholder="me@example.com"
class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6" class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
> />
</div> </div>
</div> </div>
@ -90,7 +90,7 @@
:disabled="!!invitation.data.value?.username" :disabled="!!invitation.data.value?.username"
placeholder="myUsername" placeholder="myUsername"
class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6" class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
> />
</div> </div>
</div> </div>
@ -119,7 +119,7 @@
autocomplete="password" autocomplete="password"
required required
class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6" class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
> />
</div> </div>
</div> </div>
@ -146,7 +146,7 @@
autocomplete="confirm-password" autocomplete="confirm-password"
required required
class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6" class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
> />
</div> </div>
</div> </div>
@ -200,7 +200,7 @@ if (!invitationId)
}); });
const invitation = await useFetch( const invitation = await useFetch(
`/api/v1/auth/signup/simple?id=${encodeURIComponent(invitationId)}` `/api/v1/auth/signup/simple?id=${encodeURIComponent(invitationId)}`,
); );
const email = ref(invitation.data.value?.email); const email = ref(invitation.data.value?.email);
@ -211,20 +211,20 @@ const confirmPassword = ref(undefined);
const emailValidator = type("string.email"); const emailValidator = type("string.email");
const validEmail = computed( const validEmail = computed(
() => !(emailValidator(email.value) instanceof type.errors) () => !(emailValidator(email.value) instanceof type.errors),
); );
const usernameValidator = type("string.alphanumeric >= 5").to("string.lower"); const usernameValidator = type("string.alphanumeric >= 5").to("string.lower");
const validUsername = computed( const validUsername = computed(
() => !(usernameValidator(username.value) instanceof type.errors) () => !(usernameValidator(username.value) instanceof type.errors),
); );
const passwordValidator = type("string >= 14"); const passwordValidator = type("string >= 14");
const validPassword = computed( const validPassword = computed(
() => !(passwordValidator(password.value) instanceof type.errors) () => !(passwordValidator(password.value) instanceof type.errors),
); );
const validConfirmPassword = computed( const validConfirmPassword = computed(
() => password.value == confirmPassword.value () => password.value == confirmPassword.value,
); );
const loading = ref(false); const loading = ref(false);

View File

@ -58,15 +58,14 @@
Authorize client? Authorize client?
</h1> </h1>
<p class="mt-6 text-base leading-7 text-zinc-400"> <p class="mt-6 text-base leading-7 text-zinc-400">
"{{ clientData.name }}" has requested access to your Drop "{{ clientData.name }}" has requested access to your Drop account.
account.
</p> </p>
<div <div
action="/api/v1/client/callback" action="/api/v1/client/callback"
method="post" method="post"
class="mt-10 gap-x-6" class="mt-10 gap-x-6"
> >
<input type="text" class="hidden" name="id" :value="clientId" > <input type="text" class="hidden" name="id" :value="clientId" />
<button <button
class="rounded-md bg-blue-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600" class="rounded-md bg-blue-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
@click="() => authorize_wrapper()" @click="() => authorize_wrapper()"
@ -94,8 +93,9 @@
<p <p
class="mt-6 font-semibold font-display text-lg leading-8 text-zinc-100" class="mt-6 font-semibold font-display text-lg leading-8 text-zinc-100"
> >
Accepting this request will allow "{{ clientData.name }}" Accepting this request will allow "{{ clientData.name }}" on "{{
on "{{ clientData.platform }}" to: clientData.platform
}}" to:
</p> </p>
</div> </div>
<div class="mt-8 max-w-2xl sm:mt-12 lg:mt-14"> <div class="mt-8 max-w-2xl sm:mt-12 lg:mt-14">
@ -149,7 +149,7 @@ const route = useRoute();
const clientId = route.params.id; const clientId = route.params.id;
const clientData = await $dropFetch( const clientData = await $dropFetch(
`/api/v1/client/auth/callback?id=${clientId}` `/api/v1/client/auth/callback?id=${clientId}`,
); );
const completed = ref(false); const completed = ref(false);

View File

@ -7,7 +7,7 @@ export default defineEventHandler(async (h3) => {
if (!allowed) throw createError({ statusCode: 403 }); if (!allowed) throw createError({ statusCode: 403 });
const enabledMechanisms: AuthMec[] = await applicationSettings.get( const enabledMechanisms: AuthMec[] = await applicationSettings.get(
"enabledAuthencationMechanisms" "enabledAuthencationMechanisms",
); );
return enabledMechanisms; return enabledMechanisms;

View File

@ -3,9 +3,7 @@ import prisma from "~/server/internal/db/database";
import { handleFileUpload } from "~/server/internal/utils/handlefileupload"; import { handleFileUpload } from "~/server/internal/utils/handlefileupload";
export default defineEventHandler(async (h3) => { export default defineEventHandler(async (h3) => {
const allowed = await aclManager.allowSystemACL(h3, [ const allowed = await aclManager.allowSystemACL(h3, ["game:image:new"]);
"game:image:new",
]);
if (!allowed) throw createError({ statusCode: 403 }); if (!allowed) throw createError({ statusCode: 403 });
const form = await readMultipartFormData(h3); const form = await readMultipartFormData(h3);

View File

@ -3,9 +3,7 @@ import prisma from "~/server/internal/db/database";
import libraryManager from "~/server/internal/library"; import libraryManager from "~/server/internal/library";
export default defineEventHandler(async (h3) => { export default defineEventHandler(async (h3) => {
const allowed = await aclManager.allowSystemACL(h3, [ const allowed = await aclManager.allowSystemACL(h3, ["game:read"]);
"game:read",
]);
if (!allowed) throw createError({ statusCode: 403 }); if (!allowed) throw createError({ statusCode: 403 });
const query = getQuery(h3); const query = getQuery(h3);

View File

@ -2,9 +2,7 @@ import aclManager from "~/server/internal/acls";
import prisma from "~/server/internal/db/database"; import prisma from "~/server/internal/db/database";
export default defineEventHandler(async (h3) => { export default defineEventHandler(async (h3) => {
const allowed = await aclManager.allowSystemACL(h3, [ const allowed = await aclManager.allowSystemACL(h3, ["game:update"]);
"game:update",
]);
if (!allowed) throw createError({ statusCode: 403 }); if (!allowed) throw createError({ statusCode: 403 });
const body = await readBody(h3); const body = await readBody(h3);

View File

@ -3,9 +3,7 @@ import prisma from "~/server/internal/db/database";
import { handleFileUpload } from "~/server/internal/utils/handlefileupload"; import { handleFileUpload } from "~/server/internal/utils/handlefileupload";
export default defineEventHandler(async (h3) => { export default defineEventHandler(async (h3) => {
const allowed = await aclManager.allowSystemACL(h3, [ const allowed = await aclManager.allowSystemACL(h3, ["game:update"]);
"game:update",
]);
if (!allowed) throw createError({ statusCode: 403 }); if (!allowed) throw createError({ statusCode: 403 });
const form = await readMultipartFormData(h3); const form = await readMultipartFormData(h3);

View File

@ -2,9 +2,7 @@ import aclManager from "~/server/internal/acls";
import prisma from "~/server/internal/db/database"; import prisma from "~/server/internal/db/database";
export default defineEventHandler(async (h3) => { export default defineEventHandler(async (h3) => {
const allowed = await aclManager.allowSystemACL(h3, [ const allowed = await aclManager.allowSystemACL(h3, ["game:version:delete"]);
"game:version:delete",
]);
if (!allowed) throw createError({ statusCode: 403 }); if (!allowed) throw createError({ statusCode: 403 });
const body = await readBody(h3); const body = await readBody(h3);

View File

@ -2,9 +2,7 @@ import aclManager from "~/server/internal/acls";
import prisma from "~/server/internal/db/database"; import prisma from "~/server/internal/db/database";
export default defineEventHandler(async (h3) => { export default defineEventHandler(async (h3) => {
const allowed = await aclManager.allowSystemACL(h3, [ const allowed = await aclManager.allowSystemACL(h3, ["game:version:update"]);
"game:version:update",
]);
if (!allowed) throw createError({ statusCode: 403 }); if (!allowed) throw createError({ statusCode: 403 });
const body = await readBody(h3); const body = await readBody(h3);
@ -30,13 +28,13 @@ export default defineEventHandler(async (h3) => {
versionIndex: versionIndex, versionIndex: versionIndex,
}, },
select: { select: {
versionIndex: true, versionIndex: true,
versionName: true, versionName: true,
platform: true, platform: true,
delta: true, delta: true,
} },
}) }),
) ),
); );
return newVersions; return newVersions;

View File

@ -2,9 +2,7 @@ import aclManager from "~/server/internal/acls";
import libraryManager from "~/server/internal/library"; import libraryManager from "~/server/internal/library";
export default defineEventHandler(async (h3) => { export default defineEventHandler(async (h3) => {
const allowed = await aclManager.allowSystemACL(h3, [ const allowed = await aclManager.allowSystemACL(h3, ["import:game:read"]);
"import:game:read",
]);
if (!allowed) throw createError({ statusCode: 403 }); if (!allowed) throw createError({ statusCode: 403 });
const unimportedGames = await libraryManager.fetchAllUnimportedGames(); const unimportedGames = await libraryManager.fetchAllUnimportedGames();

View File

@ -7,9 +7,7 @@ import type {
} from "~/server/internal/metadata/types"; } from "~/server/internal/metadata/types";
export default defineEventHandler(async (h3) => { export default defineEventHandler(async (h3) => {
const allowed = await aclManager.allowSystemACL(h3, [ const allowed = await aclManager.allowSystemACL(h3, ["import:game:new"]);
"import:game:new",
]);
if (!allowed) throw createError({ statusCode: 403 }); if (!allowed) throw createError({ statusCode: 403 });
const body = await readBody(h3); const body = await readBody(h3);
@ -30,7 +28,6 @@ export default defineEventHandler(async (h3) => {
statusMessage: "Invalid unimported game path", statusMessage: "Invalid unimported game path",
}); });
if (!metadata || !metadata.id || !metadata.sourceId) { if (!metadata || !metadata.id || !metadata.sourceId) {
console.log(metadata); console.log(metadata);
return await metadataHandler.createGameWithoutMetadata(path); return await metadataHandler.createGameWithoutMetadata(path);

View File

@ -2,9 +2,7 @@ import aclManager from "~/server/internal/acls";
import metadataHandler from "~/server/internal/metadata"; import metadataHandler from "~/server/internal/metadata";
export default defineEventHandler(async (h3) => { export default defineEventHandler(async (h3) => {
const allowed = await aclManager.allowSystemACL(h3, [ const allowed = await aclManager.allowSystemACL(h3, ["import:game:read"]);
"import:game:read",
]);
if (!allowed) throw createError({ statusCode: 403 }); if (!allowed) throw createError({ statusCode: 403 });
const query = getQuery(h3); const query = getQuery(h3);

View File

@ -2,9 +2,7 @@ import aclManager from "~/server/internal/acls";
import libraryManager from "~/server/internal/library"; import libraryManager from "~/server/internal/library";
export default defineEventHandler(async (h3) => { export default defineEventHandler(async (h3) => {
const allowed = await aclManager.allowSystemACL(h3, [ const allowed = await aclManager.allowSystemACL(h3, ["import:version:read"]);
"import:version:read",
]);
if (!allowed) throw createError({ statusCode: 403 }); if (!allowed) throw createError({ statusCode: 403 });
const query = await getQuery(h3); const query = await getQuery(h3);
@ -15,9 +13,8 @@ export default defineEventHandler(async (h3) => {
statusMessage: "Missing id in request params", statusMessage: "Missing id in request params",
}); });
const unimportedVersions = await libraryManager.fetchUnimportedVersions( const unimportedVersions =
gameId await libraryManager.fetchUnimportedVersions(gameId);
);
if (!unimportedVersions) if (!unimportedVersions)
throw createError({ statusCode: 400, statusMessage: "Invalid game ID" }); throw createError({ statusCode: 400, statusMessage: "Invalid game ID" });

View File

@ -4,9 +4,7 @@ import libraryManager from "~/server/internal/library";
import { parsePlatform } from "~/server/internal/utils/parseplatform"; import { parsePlatform } from "~/server/internal/utils/parseplatform";
export default defineEventHandler(async (h3) => { export default defineEventHandler(async (h3) => {
const allowed = await aclManager.allowSystemACL(h3, [ const allowed = await aclManager.allowSystemACL(h3, ["import:version:new"]);
"import:version:new",
]);
if (!allowed) throw createError({ statusCode: 403 }); if (!allowed) throw createError({ statusCode: 403 });
const body = await readBody(h3); const body = await readBody(h3);

View File

@ -2,9 +2,7 @@ import aclManager from "~/server/internal/acls";
import libraryManager from "~/server/internal/library"; import libraryManager from "~/server/internal/library";
export default defineEventHandler(async (h3) => { export default defineEventHandler(async (h3) => {
const allowed = await aclManager.allowSystemACL(h3, [ const allowed = await aclManager.allowSystemACL(h3, ["import:version:read"]);
"import:version:read",
]);
if (!allowed) throw createError({ statusCode: 403 }); if (!allowed) throw createError({ statusCode: 403 });
const query = await getQuery(h3); const query = await getQuery(h3);
@ -18,7 +16,7 @@ export default defineEventHandler(async (h3) => {
const preload = await libraryManager.fetchUnimportedVersionInformation( const preload = await libraryManager.fetchUnimportedVersionInformation(
gameId, gameId,
versionName versionName,
); );
if (!preload) if (!preload)
throw createError({ throw createError({

View File

@ -19,4 +19,4 @@ export default defineEventHandler(async (h3) => {
await newsManager.delete(id); await newsManager.delete(id);
return { success: true }; return { success: true };
}); });

View File

@ -27,8 +27,7 @@ export default defineEventHandler(async (h3) => {
take: parseInt(query.limit as string), take: parseInt(query.limit as string),
skip: parseInt(query.skip as string), skip: parseInt(query.skip as string),
orderBy: orderBy, orderBy: orderBy,
...(tags && { tags: tags ...(tags && { tags: tags.map((e) => e.toString()) }),
.map((e) => e.toString()) }),
search: query.search as string, search: query.search as string,
}; };

View File

@ -13,9 +13,9 @@ export default defineEventHandler(async (h3) => {
authMecs: { authMecs: {
select: { select: {
mec: true, mec: true,
} },
} },
} },
}); });
return users; return users;

View File

@ -31,7 +31,7 @@ export default defineEventHandler(async (h3) => {
const certificateAuthority = useCertificateAuthority(); const certificateAuthority = useCertificateAuthority();
const bundle = await certificateAuthority.generateClientCertificate( const bundle = await certificateAuthority.generateClientCertificate(
clientId, clientId,
metadata.data.name metadata.data.name,
); );
const client = await clientHandler.finialiseClient(clientId); const client = await clientHandler.finialiseClient(clientId);

View File

@ -1,5 +1,4 @@
import type { import type { InternalClientCapability } from "~/server/internal/clients/capabilities";
InternalClientCapability} from "~/server/internal/clients/capabilities";
import capabilityManager, { import capabilityManager, {
validCapabilities, validCapabilities,
} from "~/server/internal/clients/capabilities"; } from "~/server/internal/clients/capabilities";
@ -34,7 +33,7 @@ export default defineClientEventHandler(
const isValid = await capabilityManager.validateCapabilityConfiguration( const isValid = await capabilityManager.validateCapabilityConfiguration(
capability, capability,
configuration configuration,
); );
if (!isValid) if (!isValid)
throw createError({ throw createError({
@ -45,7 +44,7 @@ export default defineClientEventHandler(
await capabilityManager.upsertClientCapability( await capabilityManager.upsertClientCapability(
capability, capability,
configuration, configuration,
clientId clientId,
); );
const client = await fetchClient(); const client = await fetchClient();
@ -59,5 +58,5 @@ export default defineClientEventHandler(
}); });
return {}; return {};
} },
); );

View File

@ -49,5 +49,5 @@ export default defineClientEventHandler(
}); });
if (!save) if (!save)
throw createError({ statusCode: 404, statusMessage: "Save not found" }); throw createError({ statusCode: 404, statusMessage: "Save not found" });
} },
); );

View File

@ -51,5 +51,5 @@ export default defineClientEventHandler(
throw createError({ statusCode: 404, statusMessage: "Save not found" }); throw createError({ statusCode: 404, statusMessage: "Save not found" });
return save; return save;
} },
); );

View File

@ -44,9 +44,9 @@ export default defineClientEventHandler(
user.id, user.id,
slotIndex, slotIndex,
h3.node.req, h3.node.req,
client.id client.id,
); );
return; return;
} },
); );

View File

@ -33,5 +33,5 @@ export default defineClientEventHandler(
}); });
return saves; return saves;
} },
); );

View File

@ -58,5 +58,5 @@ export default defineClientEventHandler(
}); });
return newSlot; return newSlot;
} },
); );

View File

@ -19,5 +19,5 @@ export default defineClientEventHandler(
}); });
return saves; return saves;
} },
); );

View File

@ -27,5 +27,5 @@ export default defineClientEventHandler(
}); });
return token.token; return token.token;
} },
); );

View File

@ -23,7 +23,7 @@ export default defineEventHandler(async (h3) => {
const successful = await userLibraryManager.collectionRemove( const successful = await userLibraryManager.collectionRemove(
gameId, gameId,
id, id,
userId userId,
); );
if (!successful) if (!successful)
throw createError({ throw createError({

View File

@ -7,7 +7,7 @@ export default defineEventHandler(async (h3) => {
throw createError({ throw createError({
statusCode: 403, statusCode: 403,
}); });
const collections = await userLibraryManager.fetchCollections(userId); const collections = await userLibraryManager.fetchCollections(userId);
return collections; return collections;
}); });

View File

@ -16,7 +16,6 @@ export default defineEventHandler(async (h3) => {
statusCode: 400, statusCode: 400,
message: "Missing news ID", message: "Missing news ID",
}); });
const news = await newsManager.fetchById(id); const news = await newsManager.fetchById(id);
if (!news) if (!news)
@ -25,6 +24,5 @@ export default defineEventHandler(async (h3) => {
message: "News article not found", message: "News article not found",
}); });
return news; return news;
}); });

View File

@ -9,7 +9,7 @@ export default defineEventHandler(async (h3) => {
const hasSystemPerms = await aclManager.allowSystemACL(h3, [ const hasSystemPerms = await aclManager.allowSystemACL(h3, [
"notifications:mark", "notifications:mark",
]); ]);
if(hasSystemPerms){ if (hasSystemPerms) {
userIds.push("system"); userIds.push("system");
} }

View File

@ -30,7 +30,7 @@ export default defineEventHandler(async (h3) => {
setHeader( setHeader(
h3, h3,
"Cache-Control", "Cache-Control",
"private, max-age=31536000, s-maxage=31536000, immutable" "private, max-age=31536000, s-maxage=31536000, immutable",
); );
return object.data; return object.data;
}); });

View File

@ -18,7 +18,7 @@ export default defineEventHandler(async (h3) => {
const result = await objectHandler.writeWithPermissions( const result = await objectHandler.writeWithPermissions(
id, id,
async () => buffer, async () => buffer,
userId userId,
); );
return { success: result }; return { success: result };
}); });

View File

@ -10,7 +10,6 @@ These use public HTTPS certificate, and while are authenticated, are 'public' in
Drop clients use P2P mTLS aided by the P2P co-ordinator to transfer chunks between themselves. This happens over HTTP. Drop clients use P2P mTLS aided by the P2P co-ordinator to transfer chunks between themselves. This happens over HTTP.
## Private mTLS Wireguard tunnels ## Private mTLS Wireguard tunnels
Drop clients can establish P2P Wireguard Drop clients can establish P2P Wireguard

View File

@ -38,7 +38,8 @@ export const userACLDescriptions: ObjectFromList<typeof userACLs> = {
}; };
export const systemACLDescriptions: ObjectFromList<typeof systemACLs> = { export const systemACLDescriptions: ObjectFromList<typeof systemACLs> = {
"auth:read": "Fetch the list of enabled authentication mechanisms configured.", "auth:read":
"Fetch the list of enabled authentication mechanisms configured.",
"auth:simple:invitation:read": "Fetch simple auth invitations.", "auth:simple:invitation:read": "Fetch simple auth invitations.",
"auth:simple:invitation:new": "Create new simple auth invitations.", "auth:simple:invitation:new": "Create new simple auth invitations.",
"auth:simple:invitation:delete": "Delete a simple auth invitation.", "auth:simple:invitation:delete": "Delete a simple auth invitation.",
@ -66,8 +67,8 @@ export const systemACLDescriptions: ObjectFromList<typeof systemACLs> = {
"import:game:new": "Import a game.", "import:game:new": "Import a game.",
"user:read": "Fetch any user's information.", "user:read": "Fetch any user's information.",
"news:read": "Read news articles.", "news:read": "Read news articles.",
"news:create": "Create a new news article.", "news:create": "Create a new news article.",
"news:delete": "Delete a news article." "news:delete": "Delete a news article.",
}; };

View File

@ -1,4 +1,4 @@
import type { ApplicationSettings} from "@prisma/client"; import type { ApplicationSettings } from "@prisma/client";
import { AuthMec } from "@prisma/client"; import { AuthMec } from "@prisma/client";
import prisma from "../db/database"; import prisma from "../db/database";
@ -24,7 +24,7 @@ class ApplicationConfiguration {
private async init() { private async init() {
if (this.currentApplicationSettings === undefined) { if (this.currentApplicationSettings === undefined) {
const applicationSettingsCount = await prisma.applicationSettings.count( const applicationSettingsCount = await prisma.applicationSettings.count(
{} {},
); );
if (applicationSettingsCount > 0) { if (applicationSettingsCount > 0) {
await applicationSettings.pullConfiguration(); await applicationSettings.pullConfiguration();
@ -60,7 +60,7 @@ class ApplicationConfiguration {
async set<T extends keyof ApplicationSettings>( async set<T extends keyof ApplicationSettings>(
key: T, key: T,
value: ApplicationSettings[T] value: ApplicationSettings[T],
) { ) {
await this.init(); await this.init();
if (!this.currentApplicationSettings) if (!this.currentApplicationSettings)
@ -73,7 +73,9 @@ class ApplicationConfiguration {
} }
} }
async get<T extends keyof ApplicationSettings>(key: T): Promise<ApplicationSettings[T]> { async get<T extends keyof ApplicationSettings>(
key: T,
): Promise<ApplicationSettings[T]> {
await this.init(); await this.init();
if (!this.currentApplicationSettings) if (!this.currentApplicationSettings)
throw new Error("Somehow, failed to initialise application settings"); throw new Error("Somehow, failed to initialise application settings");

View File

@ -1,15 +1,15 @@
import { PrismaClient } from '@prisma/client' import { PrismaClient } from "@prisma/client";
const prismaClientSingleton = () => { const prismaClientSingleton = () => {
return new PrismaClient({}); return new PrismaClient({});
} };
declare const globalThis: { declare const globalThis: {
prismaGlobal: ReturnType<typeof prismaClientSingleton>; prismaGlobal: ReturnType<typeof prismaClientSingleton>;
} & typeof global; } & typeof global;
const prisma = globalThis.prismaGlobal ?? prismaClientSingleton() const prisma = globalThis.prismaGlobal ?? prismaClientSingleton();
export default prisma; export default prisma;
if (process.env.NODE_ENV !== 'production') globalThis.prismaGlobal = prisma if (process.env.NODE_ENV !== "production") globalThis.prismaGlobal = prisma;

View File

@ -8,4 +8,4 @@ The game name is only used for initial matching, and doesn't affect actual metad
## /{game name}/{version name} ## /{game name}/{version name}
The version name can be anything. Versions have to manually imported within the web UI. There, you can change the order of the updates and mark them as deltas. Delta updates apply files over the previous versions. The version name can be anything. Versions have to manually imported within the web UI. There, you can change the order of the updates and mark them as deltas. Delta updates apply files over the previous versions.

View File

@ -1,6 +1,6 @@
import type { Developer, Publisher } from "@prisma/client"; import type { Developer, Publisher } from "@prisma/client";
import { MetadataSource } from "@prisma/client"; import { MetadataSource } from "@prisma/client";
import type { MetadataProvider} from "."; import type { MetadataProvider } from ".";
import { MissingMetadataProviderConfig } from "."; import { MissingMetadataProviderConfig } from ".";
import type { import type {
GameMetadataSearchResult, GameMetadataSearchResult,
@ -87,7 +87,7 @@ export class GiantBombProvider implements MetadataProvider {
if (!apikey) if (!apikey)
throw new MissingMetadataProviderConfig( throw new MissingMetadataProviderConfig(
"GIANT_BOMB_API_KEY", "GIANT_BOMB_API_KEY",
this.name() this.name(),
); );
this.apikey = apikey; this.apikey = apikey;
@ -105,7 +105,7 @@ export class GiantBombProvider implements MetadataProvider {
resource: string, resource: string,
url: string, url: string,
query: { [key: string]: string }, query: { [key: string]: string },
options?: AxiosRequestConfig options?: AxiosRequestConfig,
) { ) {
const queryString = new URLSearchParams({ const queryString = new URLSearchParams({
...query, ...query,
@ -120,7 +120,7 @@ export class GiantBombProvider implements MetadataProvider {
baseURL: "", baseURL: "",
}; };
const response = await axios.request<GiantBombResponseType<T>>( const response = await axios.request<GiantBombResponseType<T>>(
Object.assign({}, options, overlay) Object.assign({}, options, overlay),
); );
return response; return response;
} }
@ -198,7 +198,7 @@ export class GiantBombProvider implements MetadataProvider {
: DateTime.fromISO( : DateTime.fromISO(
`${gameData.expected_release_year ?? new Date().getFullYear()}-${ `${gameData.expected_release_year ?? new Date().getFullYear()}-${
gameData.expected_release_month ?? 1 gameData.expected_release_month ?? 1
}-${gameData.expected_release_day ?? 1}` }-${gameData.expected_release_day ?? 1}`,
).toJSDate(); ).toJSDate();
const metadata: GameMetadata = { const metadata: GameMetadata = {
@ -229,7 +229,7 @@ export class GiantBombProvider implements MetadataProvider {
const results = await this.request<Array<CompanySearchResult>>( const results = await this.request<Array<CompanySearchResult>>(
"search", "search",
"", "",
{ query, resources: "company" } { query, resources: "company" },
); );
// Find the right entry // Find the right entry
@ -256,7 +256,7 @@ export class GiantBombProvider implements MetadataProvider {
return metadata; return metadata;
} }
async fetchDeveloper( async fetchDeveloper(
params: _FetchDeveloperMetadataParams params: _FetchDeveloperMetadataParams,
): Promise<DeveloperMetadata> { ): Promise<DeveloperMetadata> {
return await this.fetchPublisher(params); return await this.fetchPublisher(params);
} }

View File

@ -1,6 +1,6 @@
import type { Developer, Publisher } from "@prisma/client"; import type { Developer, Publisher } from "@prisma/client";
import { MetadataSource } from "@prisma/client"; import { MetadataSource } from "@prisma/client";
import type { MetadataProvider} from "."; import type { MetadataProvider } from ".";
import { MissingMetadataProviderConfig } from "."; import { MissingMetadataProviderConfig } from ".";
import type { import type {
GameMetadataSearchResult, GameMetadataSearchResult,
@ -144,7 +144,7 @@ export class IGDBProvider implements MetadataProvider {
if (!client_secret) if (!client_secret)
throw new MissingMetadataProviderConfig( throw new MissingMetadataProviderConfig(
"IGDB_CLIENT_SECRET", "IGDB_CLIENT_SECRET",
this.name() this.name(),
); );
this.clientId = client_id; this.clientId = client_id;
@ -188,14 +188,14 @@ export class IGDBProvider implements MetadataProvider {
private async request<T extends object>( private async request<T extends object>(
resource: string, resource: string,
body: string, body: string,
options?: AxiosRequestConfig options?: AxiosRequestConfig,
) { ) {
await this.refreshCredentials(); await this.refreshCredentials();
// prevent calling api before auth is complete // prevent calling api before auth is complete
if (this.accessToken.length <= 0) if (this.accessToken.length <= 0)
throw new Error( throw new Error(
"IGDB either failed to authenticate, or has not done so yet" "IGDB either failed to authenticate, or has not done so yet",
); );
const finalURL = `https://api.igdb.com/v4/${resource}`; const finalURL = `https://api.igdb.com/v4/${resource}`;
@ -213,7 +213,7 @@ export class IGDBProvider implements MetadataProvider {
}, },
}; };
const response = await axios.request<T[] | IGDBErrorResponse[]>( const response = await axios.request<T[] | IGDBErrorResponse[]>(
Object.assign({}, options, overlay) Object.assign({}, options, overlay),
); );
if (response.status !== 200) { if (response.status !== 200) {
@ -224,7 +224,7 @@ export class IGDBProvider implements MetadataProvider {
}); });
throw new Error( throw new Error(
`Error in igdb \nStatus Code: ${response.status} \nCause: ${cause}` `Error in igdb \nStatus Code: ${response.status} \nCause: ${cause}`,
); );
} }
@ -323,7 +323,7 @@ export class IGDBProvider implements MetadataProvider {
const involved_company_response = const involved_company_response =
await this.request<IGDBInvolvedCompany>( await this.request<IGDBInvolvedCompany>(
"involved_companies", "involved_companies",
`where id = ${involvedCompany}; fields *;` `where id = ${involvedCompany}; fields *;`,
); );
for (const foundInvolved of involved_company_response) { for (const foundInvolved of involved_company_response) {
// now we need to get the actual company so we can get the name // now we need to get the actual company so we can get the name
@ -348,7 +348,7 @@ export class IGDBProvider implements MetadataProvider {
shortDescription: this.trimMessage(response[i].summary, 280), shortDescription: this.trimMessage(response[i].summary, 280),
description: response[i].summary, description: response[i].summary,
released: DateTime.fromSeconds( released: DateTime.fromSeconds(
response[i].first_release_date response[i].first_release_date,
).toJSDate(), ).toJSDate(),
reviewCount: response[i]?.total_rating_count ?? 0, reviewCount: response[i]?.total_rating_count ?? 0,
@ -372,7 +372,7 @@ export class IGDBProvider implements MetadataProvider {
}: _FetchPublisherMetadataParams): Promise<PublisherMetadata> { }: _FetchPublisherMetadataParams): Promise<PublisherMetadata> {
const response = await this.request<IGDBCompany>( const response = await this.request<IGDBCompany>(
"companies", "companies",
`where name = "${query}"; fields *; limit 1;` `where name = "${query}"; fields *; limit 1;`,
); );
for (const company of response) { for (const company of response) {
@ -382,7 +382,7 @@ export class IGDBProvider implements MetadataProvider {
for (const companySite of company.websites) { for (const companySite of company.websites) {
const companySiteRes = await this.request<IGDBCompanyWebsite>( const companySiteRes = await this.request<IGDBCompanyWebsite>(
"company_websites", "company_websites",
`where id = ${companySite}; fields *;` `where id = ${companySite}; fields *;`,
); );
for (const site of companySiteRes) { for (const site of companySiteRes) {
@ -406,7 +406,7 @@ export class IGDBProvider implements MetadataProvider {
throw new Error("No results found"); throw new Error("No results found");
} }
async fetchDeveloper( async fetchDeveloper(
params: _FetchDeveloperMetadataParams params: _FetchDeveloperMetadataParams,
): Promise<DeveloperMetadata> { ): Promise<DeveloperMetadata> {
return await this.fetchPublisher(params); return await this.fetchPublisher(params);
} }

View File

@ -5,8 +5,10 @@ import { ObjectTransactionalHandler } from "../objects/transactional";
export async function handleFileUpload( export async function handleFileUpload(
h3: H3Event<EventHandlerRequest>, h3: H3Event<EventHandlerRequest>,
metadata: { [key: string]: string }, metadata: { [key: string]: string },
permissions: Array<string> permissions: Array<string>,
): Promise<[string | undefined, {[key: string]: string}, Pull, Dump] | undefined> { ): Promise<
[string | undefined, { [key: string]: string }, Pull, Dump] | undefined
> {
const formData = await readMultipartFormData(h3); const formData = await readMultipartFormData(h3);
if (!formData) return undefined; if (!formData) return undefined;
const transactionalHandler = new ObjectTransactionalHandler(); const transactionalHandler = new ObjectTransactionalHandler();