Skip to content

Commit

Permalink
improve theme selection (why the fuck tizu)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcat101 committed Jan 28, 2024
1 parent 7a72e22 commit 4504dfe
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
2 changes: 1 addition & 1 deletion src/app.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ body {
@apply select-none;
}
:root.color-animated * {
@apply transition-colors duration-[2500ms] ease-in-out;
@apply transition-colors duration-[750ms] ease-in-out;
}

/* ------------------------------------------------------------------------------------- */
Expand Down
12 changes: 0 additions & 12 deletions src/lib/HeaderBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
}
let searched = getQuery();
let allowSettingsClick = true;
let inputElement: HTMLInputElement;
Expand All @@ -44,17 +43,7 @@
label,
icon: $userPreferencesStore.theme == name ? IconCheck : IconBlank,
action: () => {
allowSettingsClick = false;
document.documentElement.classList.add('color-animated');
setTimeout(
() => (
document.documentElement.classList.remove('color-animated'),
(allowSettingsClick = true)
),
2500
);
$userPreferencesStore.theme = name;
document.body.dataset.theme = $userPreferencesStore.theme ?? 'kjspkg';
// location.reload();
Expand Down Expand Up @@ -146,7 +135,6 @@
<svelte:fragment slot="trail">
<button
class="btn-icon hover:variant-soft-primary"
disabled={!allowSettingsClick}
use:contextMenu={settingsContextMenu}
>
<IconColorSwatch />
Expand Down

0 comments on commit 4504dfe

Please sign in to comment.