Skip to content

Commit

Permalink
fix: copy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
th0rgall committed May 23, 2023
1 parent 3d23dda commit 930372d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

<div>
<Button href={routes.BECOME_SUPERFAN} medium uppercase orange
>{capitalize($_('map.superfan-notice.linkText'))}</Button
>{capitalize($_('generics.become-superfan'))}</Button
>
</div>
</div>
Expand Down
3 changes: 3 additions & 0 deletions src/lib/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@
.mt-m {
margin-top: 1rem;
}
.mt-l {
margin-top: 2rem;
}

html,
body,
Expand Down
18 changes: 9 additions & 9 deletions src/routes/account/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@
};
let updatingListedStatus = false;
const changeGardenListed = async (event) => {
const newStatus = event.target.checked;
const hideGardenTemporarily = async (event: Event) => {
// "checked" means "take off the map" (opposite of listed)
const newListedStatus = !(event.target as HTMLInputElement)?.checked;
updatingListedStatus = true;
try {
await changeListedStatus(newStatus);
if (!newStatus) notify.success($_('account.notify.garden-no-show'), 7000);
await changeListedStatus(newListedStatus);
if (!newListedStatus) notify.success($_('account.notify.garden-no-show'), 7000);
else notify.success($_('account.notify.garden-show'), 7000);
} catch (ex) {
console.log(ex);
Expand Down Expand Up @@ -171,15 +172,14 @@
{$_('account.garden.unlisted.button')}
</Button>
{:else if $user.emailVerified && $user.garden}
<p class="mb-m">{$_('account.garden.listed.text')}</p>
<LabeledCheckbox
disabled={updatingListedStatus}
name="listed"
checked={$user.garden.listed}
label="Shown on the map"
on:input={changeGardenListed}
checked={!$user.garden.listed}
label={$_('account.garden.listed.text')}
on:input={hideGardenTemporarily}
/>
<div class="mt-m">
<div class="mt-l">
<Button href={routes.MANAGE_GARDEN} medium uppercase>
{$_('account.garden.listed.button')}
</Button>
Expand Down

0 comments on commit 930372d

Please sign in to comment.