From c44f87ca90f432421f90c3229d095063658cb754 Mon Sep 17 00:00:00 2001 From: Nikita Galaiko Date: Wed, 10 May 2023 14:31:46 +0200 Subject: [PATCH] fix warnings --- src/lib/components/LinkProjectDialog.svelte | 1 - .../[projectId]/aiplayground/+page.svelte | 68 ------------------- .../projects/[projectId]/commit/+page.svelte | 2 +- .../projects/[projectId]/search/+page.svelte | 2 + 4 files changed, 3 insertions(+), 70 deletions(-) diff --git a/src/lib/components/LinkProjectDialog.svelte b/src/lib/components/LinkProjectDialog.svelte index e3ddcb396..5fb9f911a 100644 --- a/src/lib/components/LinkProjectDialog.svelte +++ b/src/lib/components/LinkProjectDialog.svelte @@ -5,7 +5,6 @@ import { compareDesc, formatDistanceToNow } from 'date-fns'; import { IconBookmark, IconFolder, IconLoading } from './icons'; import { toasts, api } from '$lib'; - import { onMount } from 'svelte'; type Unpromisify = T extends Promise ? U : T; diff --git a/src/routes/projects/[projectId]/aiplayground/+page.svelte b/src/routes/projects/[projectId]/aiplayground/+page.svelte index 8ae352f9e..5746b32be 100644 --- a/src/routes/projects/[projectId]/aiplayground/+page.svelte +++ b/src/routes/projects/[projectId]/aiplayground/+page.svelte @@ -13,19 +13,6 @@ // const chainUrl = 'http://127.0.0.1:8000'; const chainUrl = 'https://zpuszumgur.us-east-1.awsapprunner.com'; - async function createSummary(text: string) { - const response = await fetch(`${chainUrl}/summaries`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ text: text }) - }); - - const data = await response.json(); - return data; - } - async function createChat() { const response = await fetch(`${chainUrl}/chats`, { method: 'POST', @@ -61,19 +48,6 @@ return sequence; } - async function addToSummary(id: string, newText: string) { - const response = await fetch(`${chainUrl}/summaries`, { - method: 'PATCH', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ id, text: newText }) - }); - - const sequence = await response.json(); - return sequence; - } - async function getSummary(id: string) { const response = await fetch(`${chainUrl}/summaries/${id}`, { method: 'GET' @@ -84,16 +58,13 @@ } let summaryId = ''; - let input = ''; let sequence = 0; let processedSeq = 0; - let summary = ''; $: if (summaryId && processedSeq != sequence) { debounce(() => { console.log('polling summary'); getSummary(summaryId).then((data) => { - summary = data.text; processedSeq = data.sequence; }); }, 1000)(); @@ -362,45 +333,6 @@ } } - .breathing-orb { - /* Styling */ - position: absolute; - width: 20px; - height: 20px; - left: 16px; - top: 6px; - animation: breathingOrb 4s ease-in-out infinite; - - background: rgba(154, 115, 221, 1); - filter: blur(6px); - border-radius: 32px; - - /* - * Make the initial position to be the center of the circle you want this - * object follow. - */ - position: absolute; - left: 10px; - top: 10px; - } - - /* - * Set up the keyframes to actually describe the begining and end states of - * the animation. The browser will interpolate all the frames between these - * points. Again, remember your vendor-specific prefixes for now! - */ - @keyframes breathingOrb { - 0% { - opacity: 0.8; - } - 50% { - opacity: 0.4; - } - 100% { - opacity: 0.8; - } - } - .loading-orbit { /* Styling */ position: absolute; diff --git a/src/routes/projects/[projectId]/commit/+page.svelte b/src/routes/projects/[projectId]/commit/+page.svelte index 69e6f99f5..28c2b53ab 100644 --- a/src/routes/projects/[projectId]/commit/+page.svelte +++ b/src/routes/projects/[projectId]/commit/+page.svelte @@ -8,7 +8,7 @@ import { error, success } from '$lib/toasts'; import { fly } from 'svelte/transition'; import { Dialog } from '$lib/components'; - import { log, api } from '$lib'; + import { log } from '$lib'; import IconChevronUp from '$lib/components/icons/IconChevronUp.svelte'; import IconChevronDown from '$lib/components/icons/IconChevronDown.svelte'; import { onMount } from 'svelte'; diff --git a/src/routes/projects/[projectId]/search/+page.svelte b/src/routes/projects/[projectId]/search/+page.svelte index 2d309a2dc..09a5db00a 100644 --- a/src/routes/projects/[projectId]/search/+page.svelte +++ b/src/routes/projects/[projectId]/search/+page.svelte @@ -135,6 +135,8 @@ /* this is trick to make webkit use hardware acceleration */ figure * { -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); -webkit-perspective: 1000; + perspective: 1000; }