Skip to content

Commit

Permalink
feat: 🎸 remove user selection + reset choice when cancel set
Browse files Browse the repository at this point in the history
  • Loading branch information
FabienBounoir committed Nov 17, 2024
1 parent a5f502a commit e0a585b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
13 changes: 13 additions & 0 deletions src/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,17 @@ button {
pointer-events: none;
opacity: 0.5;
}
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
button,
img {
user-select: none;
}
8 changes: 6 additions & 2 deletions src/routes/create/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,19 @@
type = `custom-${customCard.name}`.toLocaleUpperCase();
goToCreate();
goToCreate(false);
};
const goToCreate = () => {
const goToCreate = (resetChoice = true) => {
customCard = {
name: 'My Custom Deck',
cards: []
};
if (resetChoice) {
type = 'TSHIRT';
}
status = 'create';
};
Expand Down

0 comments on commit e0a585b

Please sign in to comment.