Skip to content

Commit

Permalink
chore: add logo and favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
srijanpatel committed Feb 13, 2025
1 parent 83601f7 commit 2f0094d
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 15 deletions.
15 changes: 15 additions & 0 deletions frontend/public/pyspur-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 41 additions & 12 deletions frontend/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ import { useSaveWorkflow } from '../hooks/useSaveWorkflow'
import { useWorkflowExecution } from '../hooks/useWorkflowExecution'
import { setProjectName } from '../store/flowSlice'
import { AlertState } from '../types/alert'
import { getWorkflow, getRunStatus } from '../utils/api'
import { getRunStatus, getWorkflow } from '../utils/api'
import { handleDownloadImage } from './canvas/FlowCanvas'
import DeployModal from './modals/DeployModal'
import HelpModal from './modals/HelpModal'
import RunModal from './modals/RunModal'
import SettingsCard from './modals/SettingsModal'
import { RunResponse } from '../types/api_types/runSchemas'
import { handleDownloadImage } from './canvas/FlowCanvas'

interface HeaderProps {
activePage: 'dashboard' | 'workflow' | 'evals' | 'trace' | 'rag'
Expand Down Expand Up @@ -184,16 +183,16 @@ const Header: React.FC<HeaderProps> = ({ activePage, associatedWorkflowId, runId
end_time: runData.end_time,
initial_inputs: runData.initial_inputs,
outputs: runData.outputs,
tasks: runData.tasks.map(task => ({
tasks: runData.tasks.map((task) => ({
id: task.id,
node_id: task.node_id,
status: task.status,
inputs: task.inputs,
outputs: task.outputs,
error: task.error,
start_time: task.start_time,
end_time: task.end_time
}))
end_time: task.end_time,
})),
}

const blob = new Blob([JSON.stringify(traceData, null, 2)], {
Expand Down Expand Up @@ -249,10 +248,16 @@ const Header: React.FC<HeaderProps> = ({ activePage, associatedWorkflowId, runId
>
<NavbarBrand className="h-full max-w-fit">
{activePage === 'dashboard' ? (
<p className="font-bold text-lg text-default-900 cursor-pointer">PySpur</p>
<div className="flex items-center gap-2 cursor-pointer">
<img src="/pyspur-logo.svg" alt="PySpur Logo" className="h-6 w-6 dark:invert" />
<p className="font-bold text-lg text-default-900">PySpur</p>
</div>
) : (
<Link href="/" className="cursor-pointer">
<p className="font-bold text-default-900">PySpur</p>
<div className="flex items-center gap-2">
<img src="/pyspur-logo.svg" alt="PySpur Logo" className="h-6 w-6 dark:invert" />
<p className="font-bold text-default-900">PySpur</p>
</div>
</Link>
)}
</NavbarBrand>
Expand Down Expand Up @@ -414,14 +419,26 @@ const Header: React.FC<HeaderProps> = ({ activePage, associatedWorkflowId, runId
<DropdownItem
key="download-json-workflow"
onPress={handleDownloadWorkflow}
startContent={<Icon className="text-foreground/60" icon="solar:document-text-linear" width={20} />}
startContent={
<Icon
className="text-foreground/60"
icon="solar:document-text-linear"
width={20}
/>
}
>
Download JSON
</DropdownItem>
<DropdownItem
key="download-image-workflow"
onPress={handleDownloadImage}
startContent={<Icon className="text-foreground/60" icon="solar:gallery-linear" width={20} />}
startContent={
<Icon
className="text-foreground/60"
icon="solar:gallery-linear"
width={20}
/>
}
>
Download Image
</DropdownItem>
Expand Down Expand Up @@ -451,14 +468,26 @@ const Header: React.FC<HeaderProps> = ({ activePage, associatedWorkflowId, runId
<DropdownItem
key="download-json-trace"
onPress={handleDownloadTrace}
startContent={<Icon className="text-foreground/60" icon="solar:document-text-linear" width={20} />}
startContent={
<Icon
className="text-foreground/60"
icon="solar:document-text-linear"
width={20}
/>
}
>
Download JSON
</DropdownItem>
<DropdownItem
key="download-image-trace"
onPress={handleDownloadImage}
startContent={<Icon className="text-foreground/60" icon="solar:gallery-linear" width={20} />}
startContent={
<Icon
className="text-foreground/60"
icon="solar:gallery-linear"
width={20}
/>
}
>
Download Image
</DropdownItem>
Expand Down
10 changes: 7 additions & 3 deletions frontend/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import React from 'react'
import { Provider } from 'react-redux'
import { HeroUIProvider } from '@heroui/react'
import { ThemeProvider as NextThemesProvider } from 'next-themes'
import { AppProps } from 'next/app'
import Head from 'next/head'
import React from 'react'
import { Provider } from 'react-redux'
import store from '../store/store'
import '../styles/globals.css'
import { ThemeProvider as NextThemesProvider } from 'next-themes'

const MyApp: React.FC<AppProps> = ({ Component, pageProps }) => {
return (
<Provider store={store}>
<Head>
<link rel="icon" type="image/svg+xml" href="/pyspur-logo.svg" />
</Head>
<HeroUIProvider>
<NextThemesProvider attribute="class" defaultTheme="light">
<Component {...pageProps} />
Expand Down

0 comments on commit 2f0094d

Please sign in to comment.