Skip to content

Commit

Permalink
Fidgets (#150)
Browse files Browse the repository at this point in the history
* miss a couple of ai things

* close config on tour
  • Loading branch information
mcnuttandrew authored Oct 16, 2024
1 parent 93a51c8 commit 39d3c0a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
6 changes: 5 additions & 1 deletion apps/color-buddy/src/content-modules/Manage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
import GenerateNewNames from "../components/GenerateNewNames.svelte";
import Modal from "../components/Modal.svelte";
import PreviewSelector from "../example/PreviewSelector.svelte";
import colorStore from "../stores/color-store";
import configStore from "../stores/config-store";
import examplePalStore from "../stores/example-palette-store";
import exampleStore from "../stores/example-store";
import focusStore from "../stores/focus-store";
import { convertPalToSpace, newVersionName } from "../lib/utils";
import { suggestNameForPalette } from "../lib/api-calls";
import Nav from "../components/Nav.svelte";
Expand Down Expand Up @@ -240,7 +242,9 @@
<div class="flex flex-col items-start">
<span class="whitespace-nowrap text-sm">Thumbnail</span>
<PreviewSelector exampleName={example?.name || "Discs"} />
<GenerateNewNames />
{#if $configStore.engine !== "none"}
<GenerateNewNames />
{/if}
</div>
</div>
</div>
Expand Down
25 changes: 14 additions & 11 deletions apps/color-buddy/src/controls/Config.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,11 @@
<QuestionIcon />
<ChevDown class="ml-2" />
</button>
<div slot="content" class="w-96">
<!-- <div class="flex mb-4">
<button class={buttonStyle} on:click={() => importPals()}>
Import Palettes
</button>
</div> -->

<div slot="content" class="w-96" let:onClick>
<div class="font-bold">About</div>
<div class="text-sm my-2">
Color buddy is an application that helps you build excellent color
palettes. It was originally written at the
Color buddy is a tool for building color palettes. It was originally
written at the

<a
class="underline text-cyan-800"
Expand Down Expand Up @@ -140,10 +134,19 @@
is collected to help improve the application.
</div>

<div>
<button class={buttonStyle} on:click={() => configStore.setTour(true)}>
<div class="flex">
<button
class={buttonStyle}
on:click={() => {
configStore.setTour(true);
onClick();
}}
>
Show Tour
</button>
<!-- <button class={buttonStyle} on:click={() => importPals()}>
Import Palettes
</button> -->
</div>

<div class="font-bold mt-4">Short cuts</div>
Expand Down
9 changes: 6 additions & 3 deletions apps/color-buddy/src/controls/NewPal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import type { Palette } from "color-buddy-palette";
import colorStore from "../stores/color-store";
import configStore from "../stores/config-store";
import { processBodyTextToColors, newGenericPal } from "../lib/utils";
import { buttonStyle, denseButtonStyle } from "../lib/styles";
Expand Down Expand Up @@ -108,9 +109,11 @@
inputString = "";
}}
/>
<div class="mt-5 border-t border-black"></div>
<div class="font-bold">Generate a new palette using AI</div>
<SuggestColorPal />
{#if $configStore.engine !== "none"}
<div class="mt-5 border-t border-black"></div>
<div class="font-bold">Generate a new palette using AI</div>
<SuggestColorPal />
{/if}
</div>
<button
slot="target"
Expand Down

0 comments on commit 39d3c0a

Please sign in to comment.