Skip to content

Commit

Permalink
Fixes found after user testing
Browse files Browse the repository at this point in the history
  • Loading branch information
franknoirot committed Jan 9, 2024
1 parent b4b3e2e commit 06dd1fa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"test": "npm run test:integration && npm run test:unit",
"test": "npm run test:integration && npm run test:unit run",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
Expand Down
8 changes: 6 additions & 2 deletions src/components/GenerationListItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,13 @@
<span class="text">{data.prompt.trim()}</span>
<div class="group-hover:hidden group-focus:hidden">
{#if data.status === 'completed'}
<Checkmark class={'w-5 h-5 rounded-full' + (isUnread ? ' bg-green' : '')} />
<Checkmark
class={'w-5 h-5 rounded-full' + (isUnread ? ' bg-green text-chalkboard-120' : '')}
/>
{:else if data.status === 'failed' || error}
<Close class={'w-5 h-5 rounded-full' + (isUnread ? ' bg-destroy-10' : '')} />
<Close
class={'w-5 h-5 rounded-full' + (isUnread ? ' bg-destroy-10 text-chalkboard-120' : '')}
/>
{:else}
<Spinner class="w-5 h-5 animate-spin" />
{/if}
Expand Down
4 changes: 1 addition & 3 deletions src/hooks.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { users, Client } from '@kittycad/lib'
import { SIGN_OUT_PARAM } from '$lib/paths'
const unProtectedRoutes = ['/']

const domain = import.meta.env.DEV ? 'localhost' : '.zoo.dev'

export const handle = async ({ event, resolve }) => {
const token = event.cookies.get(AUTH_COOKIE_NAME)
if (!token && !unProtectedRoutes.includes(event.url.pathname)) {
Expand Down Expand Up @@ -37,7 +35,7 @@ export const handle = async ({ event, resolve }) => {
const query = event.url.searchParams.get(SIGN_OUT_PARAM)

if (Boolean(query) == true) {
event.cookies.delete(AUTH_COOKIE_NAME, { domain, path: '/' })
event.cookies.delete(AUTH_COOKIE_NAME, { domain: event.url.hostname, path: '/' })
event.url.searchParams.delete(SIGN_OUT_PARAM)
throw redirect(303, '/')
}
Expand Down

0 comments on commit 06dd1fa

Please sign in to comment.