chore: format

This commit is contained in:
sam 2023-12-30 15:14:01 +01:00
parent ac603ac18e
commit ebc10d9558
No known key found for this signature in database
GPG key ID: B4EF20DDE721CAA1
10 changed files with 52 additions and 16 deletions

View file

@ -6,12 +6,12 @@
type User, type User,
type CustomPreferences, type CustomPreferences,
} from "$lib/api/entities"; } from "$lib/api/entities";
import { Icon, Tooltip } from "@sveltestrap/sveltestrap"; import { Icon, Tooltip } from "@sveltestrap/sveltestrap";
import FallbackImage from "./FallbackImage.svelte"; import FallbackImage from "./FallbackImage.svelte";
export let user: User; export let user: User;
export let member: PartialMember & { export let member: PartialMember & {
unlisted?: boolean unlisted?: boolean;
}; };
let pronouns: string | undefined; let pronouns: string | undefined;
@ -52,7 +52,7 @@
<a class="text-reset fs-5 text-break" href="/@{user.name}/{member.name}"> <a class="text-reset fs-5 text-break" href="/@{user.name}/{member.name}">
{member.display_name ?? member.name} {member.display_name ?? member.name}
{#if member.unlisted === true} {#if member.unlisted === true}
<span bind:this={iconElement} tabindex={0}><Icon name="lock"/></span> <span bind:this={iconElement} tabindex={0}><Icon name="lock" /></span>
<Tooltip target={iconElement} placement="top">This member is hidden</Tooltip> <Tooltip target={iconElement} placement="top">This member is hidden</Tooltip>
{/if} {/if}
</a> </a>

View file

@ -190,14 +190,15 @@
{/if} {/if}
{#if data.utc_offset} {#if data.utc_offset}
<Tooltip target="user-clock" placement="top">Current time</Tooltip> <Tooltip target="user-clock" placement="top">Current time</Tooltip>
<Icon id="user-clock" name="clock" aria-label="This user's current time" /> {currentTime} <span class="text-body-secondary">(UTC{timezone})</span> <Icon id="user-clock" name="clock" aria-label="This user's current time" />
{currentTime} <span class="text-body-secondary">(UTC{timezone})</span>
{/if} {/if}
{#if profileEmpty && $userStore?.id === data.id} {#if profileEmpty && $userStore?.id === data.id}
<hr /> <hr />
<p> <p>
<em> <em>
Your profile is empty! You can customize it by going to the <a href="/@{data.name}/edit" Your profile is empty! You can customize it by going to the <a
>edit profile</a href="/@{data.name}/edit">edit profile</a
> page.</em > page.</em
> <span class="text-muted">(only you can see this)</span> > <span class="text-muted">(only you can see this)</span>
</p> </p>

View file

@ -5,7 +5,15 @@
import type { LayoutData } from "./$types"; import type { LayoutData } from "./$types";
import { addToast, delToast } from "$lib/toast"; import { addToast, delToast } from "$lib/toast";
import { apiFetchClient, fastFetchClient } from "$lib/api/fetch"; import { apiFetchClient, fastFetchClient } from "$lib/api/fetch";
import { Button, ButtonGroup, Modal, ModalBody, ModalFooter, Nav, NavItem } from "@sveltestrap/sveltestrap"; import {
Button,
ButtonGroup,
Modal,
ModalBody,
ModalFooter,
Nav,
NavItem,
} from "@sveltestrap/sveltestrap";
import { goto } from "$app/navigation"; import { goto } from "$app/navigation";
import ErrorAlert from "$lib/components/ErrorAlert.svelte"; import ErrorAlert from "$lib/components/ErrorAlert.svelte";
import IconButton from "$lib/components/IconButton.svelte"; import IconButton from "$lib/components/IconButton.svelte";

View file

@ -41,7 +41,7 @@ export const load = (async ({ params }) => {
pronouns: pronouns.autocomplete, pronouns: pronouns.autocomplete,
flags, flags,
}; };
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (e: any) { } catch (e: any) {
if ("code" in e) error(500, e as App.Error); if ("code" in e) error(500, e as App.Error);
throw e; throw e;

View file

@ -45,9 +45,7 @@
</div> </div>
</div> </div>
<div> <div>
<Button <Button on:click={() => ($member.fields = [...$member.fields, { name: null, entries: [] }])}>
on:click={() => ($member.fields = [...$member.fields, { name: null, entries: [] }])}
>
<Icon name="plus" aria-hidden /> Add new field <Icon name="plus" aria-hidden /> Add new field
</Button> </Button>
</div> </div>

View file

@ -21,7 +21,7 @@ export const load = async ({ params }) => {
pronouns: pronouns.autocomplete, pronouns: pronouns.autocomplete,
flags, flags,
}; };
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (e: any) { } catch (e: any) {
if ("code" in e) error(500, e as App.Error); if ("code" in e) error(500, e as App.Error);
throw e; throw e;

View file

@ -4,7 +4,14 @@
import { PreferenceSize, type APIError, type MeUser } from "$lib/api/entities"; import { PreferenceSize, type APIError, type MeUser } from "$lib/api/entities";
import IconButton from "$lib/components/IconButton.svelte"; import IconButton from "$lib/components/IconButton.svelte";
import { Button, ButtonGroup, FormGroup, Icon, Input, InputGroup } from "@sveltestrap/sveltestrap"; import {
Button,
ButtonGroup,
FormGroup,
Icon,
Input,
InputGroup,
} from "@sveltestrap/sveltestrap";
import { PUBLIC_SHORT_BASE } from "$env/static/public"; import { PUBLIC_SHORT_BASE } from "$env/static/public";
import CustomPreference from "./CustomPreference.svelte"; import CustomPreference from "./CustomPreference.svelte";
import { DateTime, FixedOffsetZone } from "luxon"; import { DateTime, FixedOffsetZone } from "luxon";

View file

@ -3,7 +3,14 @@
import { fastFetchClient } from "$lib/api/fetch"; import { fastFetchClient } from "$lib/api/fetch";
import ErrorAlert from "$lib/components/ErrorAlert.svelte"; import ErrorAlert from "$lib/components/ErrorAlert.svelte";
import { addToast } from "$lib/toast"; import { addToast } from "$lib/toast";
import { Button, ButtonGroup, FormGroup, Modal, ModalBody, ModalFooter } from "@sveltestrap/sveltestrap"; import {
Button,
ButtonGroup,
FormGroup,
Modal,
ModalBody,
ModalFooter,
} from "@sveltestrap/sveltestrap";
import type { PageData } from "./$types"; import type { PageData } from "./$types";
import ReportCard from "./ReportCard.svelte"; import ReportCard from "./ReportCard.svelte";

View file

@ -1,6 +1,14 @@
<script lang="ts"> <script lang="ts">
import { MAX_FLAGS, type APIError, type PrideFlag } from "$lib/api/entities"; import { MAX_FLAGS, type APIError, type PrideFlag } from "$lib/api/entities";
import { Button, Icon, Input, Modal, ModalBody, ModalFooter, ModalHeader } from "@sveltestrap/sveltestrap"; import {
Button,
Icon,
Input,
Modal,
ModalBody,
ModalFooter,
ModalHeader,
} from "@sveltestrap/sveltestrap";
import type { PageData } from "./$types"; import type { PageData } from "./$types";
import Flag from "./Flag.svelte"; import Flag from "./Flag.svelte";
import prettyBytes from "pretty-bytes"; import prettyBytes from "pretty-bytes";

View file

@ -2,7 +2,14 @@
import { flagURL, type APIError, type PrideFlag } from "$lib/api/entities"; import { flagURL, type APIError, type PrideFlag } from "$lib/api/entities";
import { apiFetchClient } from "$lib/api/fetch"; import { apiFetchClient } from "$lib/api/fetch";
import { addToast } from "$lib/toast"; import { addToast } from "$lib/toast";
import { Button, Input, Modal, ModalBody, ModalFooter, ModalHeader } from "@sveltestrap/sveltestrap"; import {
Button,
Input,
Modal,
ModalBody,
ModalFooter,
ModalHeader,
} from "@sveltestrap/sveltestrap";
export let flag: PrideFlag; export let flag: PrideFlag;
export let deleteFlag: (id: string) => Promise<void>; export let deleteFlag: (id: string) => Promise<void>;