Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,6 @@
</head>
<body>
<div id="root"></div>
<div id="app-loader" style="
position: absolute;
top: 0;
left: 0;
width: 100%;
min-height: calc(100% + env(safe-area-inset-top));
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 24px;
background: #000;
z-index: 9999;
">
<img src="/opencode-wordmark-dark.svg" alt="OpenCode" style="height: 42px; width: auto;" />
<div style="
width: 24px;
height: 24px;
border: 2px solid rgba(255,255,255,0.1);
border-top-color: rgba(255,255,255,0.8);
border-radius: 50%;
animation: app-loader-spin 0.8s linear infinite;
"></div>
</div>
<style>
@keyframes app-loader-spin {
to { transform: rotate(360deg); }
}
</style>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
11 changes: 1 addition & 10 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect } from 'react'

import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { createBrowserRouter, RouterProvider, Outlet } from 'react-router-dom'
import { Toaster } from 'sonner'
Expand Down Expand Up @@ -63,15 +63,6 @@ function PermissionDialogWrapper() {
function AppShell() {
useTheme()

useEffect(() => {
const loader = document.getElementById('app-loader')
if (loader) {
loader.style.transition = 'opacity 0.2s ease-out'
loader.style.opacity = '0'
setTimeout(() => loader.remove(), 200)
}
}, [])

return (
<AuthProvider>
<EventProvider>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/file-browser/FileTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function TreeNode({ file, level, onFileSelect, onDirectoryClick, selectedFile, o
return (
<div>
<div
className={`flex items-center gap-1 px-2 py-1 hover:bg-muted rounded cursor-pointer group ${
className={`flex items-center gap-1 px-2 py-1 mb-4 hover:bg-muted rounded cursor-pointer group ${
selectedFile?.path === file.path ? 'bg-muted' : ''
}`}
style={{ paddingLeft: `${level * 16 + 8}px` }}
Expand Down Expand Up @@ -285,4 +285,4 @@ export const FileTree = memo(function FileTree({ files, onFileSelect, onDirector
)}
</div>
)
})
})
12 changes: 8 additions & 4 deletions frontend/src/contexts/AuthContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,14 @@ export function AuthProvider({ children }: AuthProviderProps) {
}, [])

const logout = useCallback(async () => {
await signOut()
await refetch()
navigate('/login', { replace: true })
}, [refetch, navigate])
await signOut({
fetchOptions: {
onSuccess: () => {
window.location.href = '/login'
},
},
})
}, [])

const refreshSession = useCallback(async () => {
await refetch()
Expand Down