Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nsarrazin committed Jan 9, 2025
1 parent 9de7304 commit bc046b6
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 81 deletions.
48 changes: 24 additions & 24 deletions src/lib/components/animations/LoadingAnimation.svelte
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
<script lang="ts">
export let classNames = "";
export let classNames = "";
</script>

<div class={"loading-animation " + classNames}>
<div class="spinner"></div>
<div class="spinner" />
</div>

<style>
.loading-animation {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
.loading-animation {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
.spinner {
border: 4px solid rgba(0, 0, 0, 0.1);
border-left-color: #000;
border-radius: 50%;
width: 36px;
height: 36px;
animation: spin 1s linear infinite;
}
.spinner {
border: 4px solid rgba(0, 0, 0, 0.1);
border-left-color: #000;
border-radius: 50%;
width: 36px;
height: 36px;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style>
64 changes: 33 additions & 31 deletions src/lib/components/animations/TranscriptionAnimation.svelte
Original file line number Diff line number Diff line change
@@ -1,43 +1,45 @@
<script lang="ts">
export let classNames = "";
export let classNames = "";
</script>

<div class={"transcription-animation " + classNames}>
<div class="wave"></div>
<div class="wave"></div>
<div class="wave"></div>
<div class="wave" />
<div class="wave" />
<div class="wave" />
</div>

<style>
.transcription-animation {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
.transcription-animation {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
.wave {
background: #000;
width: 5px;
height: 20px;
margin: 0 2px;
animation: wave 1.2s linear infinite;
}
.wave {
background: #000;
width: 5px;
height: 20px;
margin: 0 2px;
animation: wave 1.2s linear infinite;
}
.wave:nth-child(2) {
animation-delay: -1.1s;
}
.wave:nth-child(2) {
animation-delay: -1.1s;
}
.wave:nth-child(3) {
animation-delay: -1s;
}
.wave:nth-child(3) {
animation-delay: -1s;
}
@keyframes wave {
0%, 40%, 100% {
transform: scaleY(0.4);
}
20% {
transform: scaleY(1);
}
}
@keyframes wave {
0%,
40%,
100% {
transform: scaleY(0.4);
}
20% {
transform: scaleY(1);
}
}
</style>
20 changes: 10 additions & 10 deletions src/lib/components/chat/ChatWindow.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -530,16 +530,16 @@
>
<CarbonSendAltFilled />
</button>
{#if webgpuSupported}
<button
bind:this={microphoneButton}
class="btn mx-1 my-1 h-[2.4rem] self-end rounded-lg bg-transparent p-1 px-[0.7rem] text-gray-400 enabled:hover:text-gray-700 disabled:opacity-60 enabled:dark:hover:text-gray-100 dark:disabled:opacity-40"
on:click={isRecording ? stopRecording : startRecording}
type="button"
>
<CarbonMicrophone />
</button>
{/if}
{#if webgpuSupported}
<button
bind:this={microphoneButton}
class="btn mx-1 my-1 h-[2.4rem] self-end rounded-lg bg-transparent p-1 px-[0.7rem] text-gray-400 enabled:hover:text-gray-700 disabled:opacity-60 enabled:dark:hover:text-gray-100 dark:disabled:opacity-40"
on:click={isRecording ? stopRecording : startRecording}
type="button"
>
<CarbonMicrophone />
</button>
{/if}
{/if}
</div>
{/if}
Expand Down
32 changes: 16 additions & 16 deletions src/lib/components/icons/IconMicrophone.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
</script>

{#if webgpuSupported}
<svg
class={classNames}
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
focusable="false"
role="img"
width="1em"
height="1em"
fill="currentColor"
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 24 24"
>
<path
d="M12 14a3.5 3.5 0 0 0 3.5-3.5V5.5A3.5 3.5 0 0 0 12 2a3.5 3.5 0 0 0-3.5 3.5v5A3.5 3.5 0 0 0 12 14zm6.5-3.5a6.5 6.5 0 0 1-13 0h-2a8.5 8.5 0 0 0 17 0h-2zM11 18v4h2v-4h-2z"
/>
</svg>
<svg
class={classNames}
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
focusable="false"
role="img"
width="1em"
height="1em"
fill="currentColor"
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 24 24"
>
<path
d="M12 14a3.5 3.5 0 0 0 3.5-3.5V5.5A3.5 3.5 0 0 0 12 2a3.5 3.5 0 0 0-3.5 3.5v5A3.5 3.5 0 0 0 12 14zm6.5-3.5a6.5 6.5 0 0 1-13 0h-2a8.5 8.5 0 0 0 17 0h-2zM11 18v4h2v-4h-2z"
/>
</svg>
{/if}

0 comments on commit bc046b6

Please sign in to comment.