Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

chore: polish UI for detail projects

Faisal Amir588c1d147c59
diff --git a/web-app/src/containers/ProjectFiles.tsx b/web-app/src/containers/ProjectFiles.tsx
index 0e3f5ab2d..0f70d182b 100644
--- a/web-app/src/containers/ProjectFiles.tsx
+++ b/web-app/src/containers/ProjectFiles.tsx
@@ -1,6 +1,6 @@
import { useCallback, useEffect, useState } from 'react'
import { useTranslation } from '@/i18n/react-i18next-compat'
-import { FileText, Trash2, PlusIcon } from 'lucide-react'
+import { FileText, Trash2, UploadIcon } from 'lucide-react'
import { Button } from '@/components/ui/button'
import {
Tooltip,
@@ -372,16 +372,17 @@ export default function ProjectFiles({ projectId, lng }: ProjectFilesProps) {
<div className="flex items-center justify-between mb-3">
<h3 className="text-sm font-medium">{t('common:projects.files')}</h3>
<Button
- variant="ghost"
- size="icon-xs"
+ variant="outline"
+ size="sm"
onClick={handleUpload}
disabled={uploading}
>
{uploading ? (
<IconLoader2 className="size-4 animate-spin" />
) : (
- <PlusIcon className="size-4" />
+ <UploadIcon className="size-4" />
)}
+ <span>Upload</span>
</Button>
</div>
@@ -395,7 +396,7 @@ export default function ProjectFiles({ projectId, lng }: ProjectFilesProps) {
'flex flex-col items-center justify-center py-8 px-4 rounded-lg border border-dashed cursor-pointer transition-colors',
isDragging
? 'bg-primary/10 border-primary'
- : 'bg-secondary/30 border-border hover:bg-secondary/50 hover:border-primary/50'
+ : 'bg-secondary/30 border-border hover:bg-secondary/50'
)}
onClick={handleUpload}
onDragOver={handleDragOver}
@@ -410,7 +411,7 @@ export default function ProjectFiles({ projectId, lng }: ProjectFilesProps) {
) : (
<div
className={cn(
- 'space-y-2 max-h-60 overflow-y-auto rounded-lg p-1 -m-1 transition-colors',
+ 'space-y-2 rounded-lg p-1 -m-1 transition-colors',
isDragging && 'bg-primary/10 ring-2 ring-primary ring-dashed'
)}
onDragOver={handleDragOver}
@@ -460,7 +461,7 @@ export default function ProjectFiles({ projectId, lng }: ProjectFilesProps) {
'flex mt-2 flex-col items-center justify-center py-8 px-4 rounded-lg border border-dashed cursor-pointer transition-colors',
isDragging
? 'bg-primary/10 border-primary'
- : 'bg-secondary/30 border-border hover:bg-secondary/50 hover:border-primary/50'
+ : 'bg-secondary/30 border-border hover:bg-secondary/50'
)}
onClick={handleUpload}
onDragOver={handleDragOver}
diff --git a/web-app/src/routes/project/$projectId.tsx b/web-app/src/routes/project/$projectId.tsx
index 536f0cef1..5151dd88a 100644
--- a/web-app/src/routes/project/$projectId.tsx
+++ b/web-app/src/routes/project/$projectId.tsx
@@ -143,7 +143,7 @@ function ProjectPageContent() {
{/* Empty State */}
{projectThreads.length === 0 && (
- <div className="flex flex-col items-center justify-center pt-6 pb-12 text-center">
+ <div className="flex flex-col items-center justify-center pt-6 pb-12 text-center bg-card rounded-xl border mb-6">
<MessageCircle className="size-8 text-muted-foreground/50 mb-3" />
<h3 className="text-base font-medium text-foreground mb-1">
{t('projects.noConversationsIn', { projectName: project.name })}
@@ -155,7 +155,7 @@ function ProjectPageContent() {
)}
{/* Project Settings Card */}
- <div className="rounded-xl border border-border overflow-hidden mb-6">
+ <div className="rounded-xl border border-border overflow-hidden mb-6 bg-card">
{/* Assistant Section */}
<div className="flex items-center justify-between p-4 border-b border-border">
<div className="flex flex-col gap-1">
@@ -178,11 +178,12 @@ function ProjectPageContent() {
)}
</div>
<Button
- variant="ghost"
- size="icon-xs"
+ variant="outline"
+ size="sm"
onClick={() => setEditDialogOpen(true)}
>
<PencilIcon className="size-3" />
+ <span>{t('common:edit')}</span>
</Button>
</div>