format code using prettier
This commit is contained in:
parent
91999a6303
commit
abde6817f0
27 changed files with 326 additions and 260 deletions
|
@ -44,12 +44,12 @@ const MastodonOAuth2Callback: Component = () => {
|
|||
setDocumentTitle(`Back from ${ins.title}...`);
|
||||
setSiteTitle(ins.title);
|
||||
|
||||
const srcset = []
|
||||
const srcset = [];
|
||||
if (ins.thumbnail.versions["@1x"]) {
|
||||
srcset.push(`${ins.thumbnail.versions["@1x"]} 1x`)
|
||||
srcset.push(`${ins.thumbnail.versions["@1x"]} 1x`);
|
||||
}
|
||||
if (ins.thumbnail.versions["@2x"]) {
|
||||
srcset.push(`${ins.thumbnail.versions["@2x"]} 2x`)
|
||||
srcset.push(`${ins.thumbnail.versions["@2x"]} 2x`);
|
||||
}
|
||||
|
||||
setSiteImg({
|
||||
|
@ -66,8 +66,8 @@ const MastodonOAuth2Callback: Component = () => {
|
|||
onGoingOAuth2Process,
|
||||
params.code,
|
||||
);
|
||||
$settings.setKey('onGoingOAuth2Process', undefined)
|
||||
navigate('/', {replace: true})
|
||||
$settings.setKey("onGoingOAuth2Process", undefined);
|
||||
navigate("/", { replace: true });
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -95,18 +95,27 @@ const MastodonOAuth2Callback: Component = () => {
|
|||
<div class={cards.layoutCentered}>
|
||||
<div class={cards.card} aria-busy="true" aria-describedby={progressId}>
|
||||
<LinearProgress
|
||||
class={[cards.cardNoPad, cards.cardGutSkip].join(' ')}
|
||||
class={[cards.cardNoPad, cards.cardGutSkip].join(" ")}
|
||||
id={progressId}
|
||||
aria-labelledby={titleId}
|
||||
/>
|
||||
<Show when={siteImg()} fallback={<i aria-busy="true" aria-label="Preparing image..." style={{"height": "235px", display: "block"}}></i>}>
|
||||
<Show
|
||||
when={siteImg()}
|
||||
fallback={
|
||||
<i
|
||||
aria-busy="true"
|
||||
aria-label="Preparing image..."
|
||||
style={{ height: "235px", display: "block" }}
|
||||
></i>
|
||||
}
|
||||
>
|
||||
<Img
|
||||
src={siteImg()?.src}
|
||||
srcset={siteImg()?.srcset}
|
||||
blurhash={siteImg()?.blurhash}
|
||||
class={[cards.cardNoPad, cards.cardGutSkip].join(' ')}
|
||||
class={[cards.cardNoPad, cards.cardGutSkip].join(" ")}
|
||||
alt={`Banner image for ${siteTitle()}`}
|
||||
style={{"height": "235px", "display": "block"}}
|
||||
style={{ height: "235px", display: "block" }}
|
||||
/>
|
||||
</Show>
|
||||
|
||||
|
@ -114,7 +123,8 @@ const MastodonOAuth2Callback: Component = () => {
|
|||
Contracting {siteTitle}...
|
||||
</Title>
|
||||
<p>
|
||||
If this page stays too long, you can close this page and sign in again.
|
||||
If this page stays too long, you can close this page and sign in
|
||||
again.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -69,8 +69,8 @@ const SignIn: Component = () => {
|
|||
});
|
||||
|
||||
onMount(() => {
|
||||
$settings.setKey('onGoingOAuth2Process', undefined)
|
||||
})
|
||||
$settings.setKey("onGoingOAuth2Process", undefined);
|
||||
});
|
||||
|
||||
const onStartOAuth2 = async (e: Event) => {
|
||||
e.preventDefault();
|
||||
|
@ -107,7 +107,7 @@ const SignIn: Component = () => {
|
|||
for (const [k, v] of Object.entries(args)) {
|
||||
searches.set(k, v);
|
||||
}
|
||||
$settings.setKey("onGoingOAuth2Process", url)
|
||||
$settings.setKey("onGoingOAuth2Process", url);
|
||||
window.location.href = authStart.toString();
|
||||
} catch (e) {
|
||||
setServerUrlHelperText(
|
||||
|
|
|
@ -95,9 +95,13 @@ export const updateAcctInf = action(
|
|||
},
|
||||
);
|
||||
|
||||
export const signOut = action($accounts, "signOut", ($store, predicate: (acct: Account) => boolean) => {
|
||||
$store.set($store.get().filter(a => !predicate(a)));
|
||||
});
|
||||
export const signOut = action(
|
||||
$accounts,
|
||||
"signOut",
|
||||
($store, predicate: (acct: Account) => boolean) => {
|
||||
$store.set($store.get().filter((a) => !predicate(a)));
|
||||
},
|
||||
);
|
||||
|
||||
export type RegisteredApp = {
|
||||
site: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue