Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Dekstop Revamp #2877

Merged
merged 47 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift click to select a range
98bc86b
feat: desktop revamp
urmauur May 6, 2024
f73f4e4
feat: refactor system monitor
urmauur May 7, 2024
78d2621
fix linter CI
urmauur May 8, 2024
27a5838
remove unused import component
urmauur May 8, 2024
c140c5f
added responsive and resizeable component
urmauur May 10, 2024
023dd9d
responsive and resizeable local server page
urmauur May 10, 2024
0091c3b
finalize responsive and resizeable component
urmauur May 10, 2024
1a3ceab
fix scroll custom ui
urmauur May 10, 2024
22c4470
remove react scroll to bottom from modal troubleshoot
urmauur May 10, 2024
a19ecfe
fix modal troubleshoot ui
urmauur May 12, 2024
0b59e38
fix setting gpu list
urmauur May 12, 2024
3efd394
text area custom scroll bar
urmauur May 12, 2024
a59b82d
fix padding message input
urmauur May 12, 2024
f923ba8
cleanup classname
urmauur May 13, 2024
e1c76d1
update inference engine model dropdown
urmauur May 13, 2024
49ef1f5
update loader style
urmauur May 13, 2024
aff17bb
update quick ask ui
urmauur May 13, 2024
a5c9a29
prepare theme provider
urmauur May 13, 2024
c979f5c
update dark theme
urmauur May 13, 2024
ced890a
remove update hotkey list model and navigation
urmauur May 13, 2024
aaaf184
fix: cleanup hardcode classname
urmauur May 13, 2024
3e5b709
fix: update feedback
urmauur May 14, 2024
87b4bce
Set native theme electron
urmauur May 14, 2024
a1a8445
update destop ui revamp from feedback
urmauur May 15, 2024
68c12c9
update button icon component insider icon chat input message
urmauur May 16, 2024
d13d4a2
update model dropdown ui
urmauur May 16, 2024
cf89c39
update tranaparent baclground
urmauur May 20, 2024
b332d3a
update logo model provider
urmauur May 20, 2024
04c8740
fix: set background material acrylic support to blur background windows
urmauur May 21, 2024
aaecf70
fix: update tranparent left and right panel
urmauur May 22, 2024
45e9ee2
fix: linter CI
urmauur May 22, 2024
d7fdb5c
update app using frameless window
urmauur May 22, 2024
df9a010
styling custom style minimize, maximize and close app
urmauur May 23, 2024
9be000d
temporary hidden maximize window
urmauur May 23, 2024
89b88f0
fix: responsive left and right panel
urmauur May 23, 2024
287c364
fix: enable click outside when leftpanel responsive
urmauur May 23, 2024
20019e6
fix: remove unused import
urmauur May 23, 2024
a84f195
update transparent variable css windows
urmauur May 24, 2024
2d4fc4e
fix: ui import model
urmauur May 24, 2024
d653ea2
feat: Support Theme system (#2946)
urmauur May 27, 2024
5fa8bb6
fix: update feedback missing state when refrash app
urmauur May 27, 2024
d95930a
fix: error test CI
urmauur May 27, 2024
062ac6b
chore: refactor useLoadThemes
urmauur May 28, 2024
aa6b9a5
chore: cleanup unused vars
urmauur May 28, 2024
1f240bf
fix: revert back menubar windows
urmauur May 28, 2024
f7d1b80
fix minor ui
urmauur May 28, 2024
331c1ba
fix: minor ui
urmauur May 28, 2024
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
Prev Previous commit
Next Next commit
fix scroll custom ui
  • Loading branch information
urmauur committed May 27, 2024
commit 1a3ceab4b92ea0cd92238dcfe36356b0422021b1
2 changes: 1 addition & 1 deletion web/containers/LeftPanelContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 43,7 @@ const LeftPanelContainer = ({ children }: Props) => {
if (
mouseMoveEvent.clientX -
leftPanelRef?.current.getBoundingClientRect().left <
195
170
) {
setIsResizing(false)
setLeftPanelWidth(DEFAULT_LEFT_PANEL_WIDTH)
Expand Down
2 changes: 1 addition & 1 deletion web/containers/ListContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 43,7 @@ const ListContainer = ({ children }: Props) => {

return (
<ScrollArea
className="flex h-full w-full flex-col"
className="flex h-full w-full flex-col overflow-x-hidden"
ref={listRef}
onScroll={handleScroll}
>
Expand Down
294 changes: 145 additions & 149 deletions web/containers/ServerLogs/index.tsx

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions web/screens/LocalServer/LocalServerCenterPanel/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
import { useEffect, useState } from 'react'

import { Button } from '@janhq/joi'
import { Button, ScrollArea } from '@janhq/joi'
import { CodeIcon, Paintbrush } from 'lucide-react'

import { InfoIcon } from 'lucide-react'
Expand All @@ -24,7 24,7 @@ const LocalServerCenterPanel = () => {
}, [firstTimeVisitAPIServer])

return (
<div className="flex h-full w-full flex-col overflow-x-hidden bg-[hsla(var(--app-bg))]">
<div className="flex h-full w-full flex-col overflow-hidden bg-[hsla(var(--app-bg))]">
<div className="sticky top-0 flex items-center justify-between border-b border-[hsla(var(--app-border))] px-4 py-2">
<h2 className="font-bold">Server Logs</h2>
<div className="space-x-2">
Expand Down Expand Up @@ -70,9 70,9 @@ const LocalServerCenterPanel = () => {
</div>
</div>
) : (
<div className="flex w-full">
<ScrollArea className="flex h-full w-full">
<ServerLogs />
</div>
</ScrollArea>
)}
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 76,7 @@ const SimpleTextMessage: React.FC<ThreadMessage> = (props) => {
},
code(code, lang) {
return `
<div class="relative code-block group/item">
<div class="relative code-block group/item overflow-auto">
<button class='text-xs copy-action hidden group-hover/item:block bg-gray-950 hover:bg-gray-950/90 text-gray-200 p-2 rounded-lg absolute top-6 right-2' >
${
clipboard.copied
Expand Down Expand Up @@ -268,7 268,7 @@ const SimpleTextMessage: React.FC<ThreadMessage> = (props) => {
) : (
<div
className={twMerge(
'message flex flex-grow flex-col gap-y-2 font-normal leading-relaxed',
'message flex flex-col gap-y-2 font-normal leading-relaxed',
isUser
? 'whitespace-pre-wrap break-words'
: 'bg-secondary rounded-xl p-4'
Expand All @@ -281,7 281,7 @@ const SimpleTextMessage: React.FC<ThreadMessage> = (props) => {
) : (
<div
className={twMerge(
'message max-width-[100%] flex flex-grow flex-col gap-y-2 overflow-auto font-normal leading-relaxed',
'message max-width-[100%] flex flex-col gap-y-2 overflow-auto font-normal leading-relaxed',
isUser
? 'whitespace-pre-wrap break-words'
: 'bg-secondary rounded-xl'
Expand Down
2 changes: 1 addition & 1 deletion web/screens/Thread/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 5,7 @@ import ThreadRightPanel from './ThreadRightPanel'

const ThreadScreen = () => {
return (
<div className="relative flex h-full w-full overflow-x-hidden">
<div className="relative flex h-full w-full flex-1 overflow-x-hidden">
<ThreadLeftPanel />
<ThreadCenterPanel />
<ThreadRightPanel />
Expand Down
1 change: 1 addition & 0 deletions web/styles/components/code-block.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 70,7 @@ pre > code {
display: block;
text-indent: 0;
white-space: pre;
max-width: 40vw;
}

.hljs-emphasis {
Expand Down
10 changes: 7 additions & 3 deletions web/styles/components/message.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 16,14 @@
}
}

button[class*='react-scroll-to-bottom--'] {
display: none;
}
// button[class*='react-scroll-to-bottom--'] {
// display: none;
// }

.code-block {
white-space: normal;
}

pre {
max-width: 95vw;
}