aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(static)
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-10-18 09:08:07 -0700
committerAdam Soltys <[email protected]>2024-10-18 09:09:14 -0700
commit002cd9134d2e23bec34f838f6d6fefba41f2d530 (patch)
tree92fa0e0ab54ce1a715d25f458de8b8ed8cc70bd5 /src/routes/(static)
parentf6bfe889d91bc6e36b0300d7b618f10158efe176 (diff)
downloadcoinos-ui-002cd9134d2e23bec34f838f6d6fefba41f2d530.tar.gz
coinos-ui-002cd9134d2e23bec34f838f6d6fefba41f2d530.zip
biome format
Diffstat (limited to 'src/routes/(static)')
-rw-r--r--src/routes/(static)/+layout.server.ts4
-rw-r--r--src/routes/(static)/login/+page.server.ts6
-rw-r--r--src/routes/(static)/login/+page.svelte23
-rw-r--r--src/routes/(static)/privacy/+page.svelte14
-rw-r--r--src/routes/(static)/register/+page.server.ts2
-rw-r--r--src/routes/(static)/register/+page.svelte2
-rw-r--r--src/routes/(static)/support/+page.svelte9
7 files changed, 28 insertions, 32 deletions
diff --git a/src/routes/(static)/+layout.server.ts b/src/routes/(static)/+layout.server.ts
index c26f8d96..56b8efa1 100644
--- a/src/routes/(static)/+layout.server.ts
+++ b/src/routes/(static)/+layout.server.ts
@@ -1,9 +1,9 @@
-import { get, auth} from "$lib/utils";
+import { get, auth } from "$lib/utils";
export async function load({ cookies }) {
let token = cookies.get("token");
- let user;
+ let user;
if (token) {
try {
user = await get("/me", auth(cookies));
diff --git a/src/routes/(static)/login/+page.server.ts b/src/routes/(static)/login/+page.server.ts
index fd7fec8c..6ba7e033 100644
--- a/src/routes/(static)/login/+page.server.ts
+++ b/src/routes/(static)/login/+page.server.ts
@@ -15,11 +15,7 @@ export const actions = {
if (loginRedirect === "undefined") loginRedirect = undefined;
try {
- await login(
- user,
- cookies,
- request.headers.get("cf-connecting-ip")
- );
+ await login(user, cookies, request.headers.get("cf-connecting-ip"));
} catch (e: any) {
return fail(400, { error: "Login failed", message: e.message, ...form });
}
diff --git a/src/routes/(static)/login/+page.svelte b/src/routes/(static)/login/+page.svelte
index df7db5e6..efaa84b8 100644
--- a/src/routes/(static)/login/+page.svelte
+++ b/src/routes/(static)/login/+page.svelte
@@ -76,7 +76,9 @@
<Pin bind:value={token} title="Enter 2FA Code" {cancel} notify={false} />
{/if}
-<div class="mx-auto md:shadow-xl rounded-3xl max-w-xl w-full md:w-[480px] md:p-8 mb-20">
+<div
+ class="mx-auto md:shadow-xl rounded-3xl max-w-xl w-full md:w-[480px] md:p-8 mb-20"
+>
<h1 class="text-2xl font-bold text-center">{$t("login.signIn")}</h1>
{#if form?.error}
@@ -157,15 +159,14 @@
{/if}
</button>
-
- <p class="text-secondary text-center font-medium">
- {$t("login.noAccount")}
- <a
- href={"/register"}
- class="block md:inline text-black underline underline-offset-4 hover:opacity-80"
- >
- {$t("login.register")}
- </a>
- </p>
+ <p class="text-secondary text-center font-medium">
+ {$t("login.noAccount")}
+ <a
+ href={"/register"}
+ class="block md:inline text-black underline underline-offset-4 hover:opacity-80"
+ >
+ {$t("login.register")}
+ </a>
+ </p>
</form>
</div>
diff --git a/src/routes/(static)/privacy/+page.svelte b/src/routes/(static)/privacy/+page.svelte
index bf8ba78e..7b21a5be 100644
--- a/src/routes/(static)/privacy/+page.svelte
+++ b/src/routes/(static)/privacy/+page.svelte
@@ -2,11 +2,15 @@
<div class="text-2xl font-bold">Privacy Policy</div>
<div>
- The only personal information we require to create an account is a username and password. Some users may provide an email address for notification or password reset purposes. We will not share your email with anyone or use it for anything other than the purposes stated.
- </div>
-
- <div>
+ The only personal information we require to create an account is a username
+ and password. Some users may provide an email address for notification or
+ password reset purposes. We will not share your email with anyone or use it
+ for anything other than the purposes stated.
+ </div>
- We keep records of payment history associated to accounts and may be obligated to share our records with financial authorities. You may request that your account be deleted by visiting https://coinos.io/removal
+ <div>
+ We keep records of payment history associated to accounts and may be
+ obligated to share our records with financial authorities. You may request
+ that your account be deleted by visiting https://coinos.io/removal
</div>
</div>
diff --git a/src/routes/(static)/register/+page.server.ts b/src/routes/(static)/register/+page.server.ts
index 731530c4..0b965507 100644
--- a/src/routes/(static)/register/+page.server.ts
+++ b/src/routes/(static)/register/+page.server.ts
@@ -21,7 +21,7 @@ export const actions = {
let error;
if (loginRedirect === "undefined") loginRedirect = undefined;
-
+
try {
await post("/register", { user }, { "cf-connecting-ip": ip });
} catch (e: any) {
diff --git a/src/routes/(static)/register/+page.svelte b/src/routes/(static)/register/+page.svelte
index 3491bd5d..1749bd16 100644
--- a/src/routes/(static)/register/+page.svelte
+++ b/src/routes/(static)/register/+page.svelte
@@ -98,7 +98,7 @@
if ($avatar) {
try {
let { hash } = JSON.parse(
- await upload($avatar.file, $avatar.type, $avatar.progress, token)
+ await upload($avatar.file, $avatar.type, $avatar.progress, token),
);
data.set("profile", hash);
diff --git a/src/routes/(static)/support/+page.svelte b/src/routes/(static)/support/+page.svelte
index 6b32124e..062f552b 100644
--- a/src/routes/(static)/support/+page.svelte
+++ b/src/routes/(static)/support/+page.svelte
@@ -24,7 +24,7 @@
grecaptcha.execute(recaptchaSiteKey, { action: "submit" }).then((token) =>
post("/support", { username: user?.username, email, message, token })
.then(() => (sent = true))
- .catch(() => fail("problem submitting"))
+ .catch(() => fail("problem submitting")),
);
});
};
@@ -97,12 +97,7 @@
<label for="email" class="font-semibold"
>{$t("user.support.email")}</label
>
- <input
- type="email"
- name="email"
- bind:value={email}
- required
- />
+ <input type="email" name="email" bind:value={email} required />
</div>
<div class="mb-4">