Skip to content

Commit

Permalink
fix toggle behavior and tweak Gizmo
Browse files Browse the repository at this point in the history
  • Loading branch information
MattFerraro committed Jun 14, 2024
1 parent 63a1830 commit 7be7c0e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion applications/web/src/components/AppBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
export let newFileContent: string | null = null
let isDarkMode = localStorage.getItem("theme") === "dark"
$: project,
(() => {
// log("[project]", project)
Expand Down Expand Up @@ -120,13 +122,15 @@
if (localStorage.getItem("theme") === "light") {
document.documentElement.classList.add("dark")
localStorage.setItem("theme", "dark")
isDarkMode = true
} else {
document.documentElement.classList.remove("dark")
localStorage.setItem("theme", "light")
isDarkMode = false
}
}}
>
{#if document.documentElement.classList.contains("dark")}
{#if isDarkMode}
<Moon class="h-6 w-6" />
{:else}
<Sun class="h-6 w-6" />
Expand Down
2 changes: 1 addition & 1 deletion applications/web/src/components/ToolBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
{/each}
{:else}
{#each actions as action}
<button class="inline-flex items-center {action.text === 'Solve' && solving ? 'bg-gray-400' : ''} hover:bg-gray-200 p-1" on:click={action.handler}>
<button class="inline-flex items-center hover:bg-gray-200 p-1 rounded dark:hover:bg-gray-600 dark:hover:text-gray-300" on:click={action.handler}>
<img class="h-8 w-8" src={action.src} alt={action.alt} />{action.text ? action.text : ""}
</button>
{/each}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
const origin = new Vector3(0, 0, 0)
const textureSize = 64
const gray = 0xdde6ed
const gray = 0xa1a8ad
const black = 0x000000
const {autoRenderTask, renderer, camera, invalidate} = useThrelte()
Expand Down

0 comments on commit 7be7c0e

Please sign in to comment.