feat: temporary remove dark mode :( (#2168)
* remove darkmode * fix progress component background color
This commit is contained in:
parent
45efcad233
commit
222b4ad897
@ -5,11 +5,11 @@
|
|||||||
@apply disabled:pointer-events-none disabled:bg-zinc-100 disabled:text-zinc-400;
|
@apply disabled:pointer-events-none disabled:bg-zinc-100 disabled:text-zinc-400;
|
||||||
|
|
||||||
&-primary {
|
&-primary {
|
||||||
@apply bg-primary hover:bg-primary/90 text-white;
|
@apply bg-blue-600 text-white hover:bg-blue-600/90;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-secondary-blue {
|
&-secondary-blue {
|
||||||
@apply bg-blue-200 text-blue-600 hover:bg-blue-300/50 dark:hover:bg-blue-200/80;
|
@apply bg-blue-200 text-blue-600 hover:bg-blue-300/50;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-danger {
|
&-danger {
|
||||||
@ -17,7 +17,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&-secondary-danger {
|
&-secondary-danger {
|
||||||
@apply bg-red-200 text-red-600 hover:bg-red-300/50 dark:hover:bg-red-200/80;
|
@apply bg-red-200 text-red-600 hover:bg-red-300/50;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-outline {
|
&-outline {
|
||||||
@ -66,7 +66,7 @@
|
|||||||
[type='reset'],
|
[type='reset'],
|
||||||
[type='submit'] {
|
[type='submit'] {
|
||||||
&.btn-primary {
|
&.btn-primary {
|
||||||
@apply bg-primary hover:bg-primary/90;
|
@apply bg-blue-600 hover:bg-blue-600/90;
|
||||||
@apply disabled:pointer-events-none disabled:bg-zinc-100 disabled:text-zinc-400;
|
@apply disabled:pointer-events-none disabled:bg-zinc-100 disabled:text-zinc-400;
|
||||||
}
|
}
|
||||||
&.btn-secondary {
|
&.btn-secondary {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
.checkbox {
|
.checkbox {
|
||||||
@apply border-border data-[state=checked]:bg-primary h-5 w-5 flex-shrink-0 rounded-md border data-[state=checked]:text-white;
|
@apply border-border h-5 w-5 flex-shrink-0 rounded-md border data-[state=checked]:bg-blue-600 data-[state=checked]:text-white;
|
||||||
|
|
||||||
&--icon {
|
&--icon {
|
||||||
@apply h-4 w-4;
|
@apply h-4 w-4;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
.input {
|
.input {
|
||||||
@apply border-border placeholder:text-muted-foreground flex h-9 w-full rounded-lg border bg-transparent px-3 py-1 transition-colors;
|
@apply border-border placeholder:text-muted-foreground flex h-9 w-full rounded-lg border bg-transparent px-3 py-1 transition-colors;
|
||||||
@apply disabled:text-muted-foreground disabled:cursor-not-allowed disabled:bg-zinc-100 disabled:dark:bg-zinc-800 disabled:dark:text-zinc-600;
|
@apply disabled:text-muted-foreground disabled:cursor-not-allowed disabled:bg-zinc-100;
|
||||||
@apply focus-within:outline-none focus-visible:outline-0 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-1;
|
@apply focus-within:outline-none focus-visible:outline-0 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-1;
|
||||||
@apply file:border-0 file:bg-transparent file:font-medium;
|
@apply file:border-0 file:bg-transparent file:font-medium;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
.progress {
|
.progress {
|
||||||
@apply bg-secondary relative h-4 w-full overflow-hidden rounded-full;
|
@apply relative h-4 w-full overflow-hidden rounded-full bg-gray-100;
|
||||||
|
|
||||||
&-indicator {
|
&-indicator {
|
||||||
@apply bg-primary h-full w-full flex-1 transition-all;
|
@apply h-full w-full flex-1 bg-blue-600 transition-all;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
.select {
|
.select {
|
||||||
@apply placeholder:text-muted-foreground border-border flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm disabled:cursor-not-allowed [&>span]:line-clamp-1;
|
@apply placeholder:text-muted-foreground border-border flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm disabled:cursor-not-allowed [&>span]:line-clamp-1;
|
||||||
@apply disabled:text-muted-foreground disabled:cursor-not-allowed disabled:bg-zinc-100 disabled:dark:bg-zinc-800 disabled:dark:text-zinc-600;
|
@apply disabled:text-muted-foreground disabled:cursor-not-allowed disabled:bg-zinc-100;
|
||||||
@apply focus-within:outline-none focus-visible:outline-0 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-1;
|
@apply focus-within:outline-none focus-visible:outline-0 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-1;
|
||||||
|
|
||||||
&-caret {
|
&-caret {
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
@apply relative flex w-full touch-none select-none items-center;
|
@apply relative flex w-full touch-none select-none items-center;
|
||||||
|
|
||||||
&-track {
|
&-track {
|
||||||
@apply relative h-1.5 w-full grow overflow-hidden rounded-full bg-gray-200 dark:bg-gray-800;
|
@apply relative h-1.5 w-full grow overflow-hidden rounded-full bg-gray-200;
|
||||||
[data-disabled] {
|
[data-disabled] {
|
||||||
@apply cursor-not-allowed opacity-50;
|
@apply cursor-not-allowed opacity-50;
|
||||||
}
|
}
|
||||||
@ -13,6 +13,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&-thumb {
|
&-thumb {
|
||||||
@apply border-primary/50 bg-background focus-visible:ring-ring block h-4 w-4 rounded-full border shadow transition-colors focus-visible:outline-none focus-visible:ring-1 disabled:pointer-events-none disabled:opacity-50;
|
@apply bg-background focus-visible:ring-ring block h-4 w-4 rounded-full border border-blue-600/50 shadow transition-colors focus-visible:outline-none focus-visible:ring-1 disabled:pointer-events-none disabled:opacity-50;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
.switch {
|
.switch {
|
||||||
@apply inline-flex h-[20px] w-[36px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent;
|
@apply inline-flex h-[20px] w-[36px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent;
|
||||||
@apply focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2;
|
@apply focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2;
|
||||||
@apply data-[state=checked]:bg-primary data-[state=unchecked]:bg-input;
|
@apply data-[state=unchecked]:bg-input data-[state=checked]:bg-blue-600;
|
||||||
@apply disabled:cursor-not-allowed disabled:opacity-50;
|
@apply disabled:cursor-not-allowed disabled:opacity-50;
|
||||||
|
|
||||||
&-toggle {
|
&-toggle {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
.tooltip {
|
.tooltip {
|
||||||
@apply dark:bg-input dark:text-foreground z-50 overflow-hidden rounded-md bg-gray-950 px-2 py-1.5 text-xs font-medium text-gray-200 shadow-md;
|
@apply z-50 overflow-hidden rounded-md bg-gray-950 px-2 py-1.5 text-xs font-medium text-gray-200 shadow-md;
|
||||||
&-arrow {
|
&-arrow {
|
||||||
@apply dark:fill-input fill-gray-950;
|
@apply fill-gray-950;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,7 @@ export const metadata: Metadata = {
|
|||||||
export default function RootLayout({ children }: PropsWithChildren) {
|
export default function RootLayout({ children }: PropsWithChildren) {
|
||||||
return (
|
return (
|
||||||
<html lang="en" suppressHydrationWarning>
|
<html lang="en" suppressHydrationWarning>
|
||||||
<body className="bg-white font-sans text-sm antialiased dark:bg-background">
|
<body className="bg-white font-sans text-sm antialiased">
|
||||||
<div className="title-bar" />
|
<div className="title-bar" />
|
||||||
<Providers>{children}</Providers>
|
<Providers>{children}</Providers>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@ -45,7 +45,7 @@ export default function CardSidebar({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
'flex w-full flex-col border-t border-border bg-zinc-100 dark:bg-zinc-900',
|
'flex w-full flex-col border-t border-border bg-zinc-100',
|
||||||
asChild ? 'rounded-lg border' : 'border-t'
|
asChild ? 'rounded-lg border' : 'border-t'
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
@ -61,7 +61,7 @@ export default function CardSidebar({
|
|||||||
if (!children) return
|
if (!children) return
|
||||||
setShow(!show)
|
setShow(!show)
|
||||||
}}
|
}}
|
||||||
className="flex w-full flex-1 items-center space-x-2 rounded-lg bg-zinc-100 py-2 pr-2 dark:bg-zinc-900"
|
className="flex w-full flex-1 items-center space-x-2 rounded-lg bg-zinc-100 py-2 pr-2"
|
||||||
>
|
>
|
||||||
<ChevronDownIcon
|
<ChevronDownIcon
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
@ -79,7 +79,7 @@ export default function CardSidebar({
|
|||||||
{!hideMoreVerticalAction && (
|
{!hideMoreVerticalAction && (
|
||||||
<div
|
<div
|
||||||
ref={setToggle}
|
ref={setToggle}
|
||||||
className="cursor-pointer rounded-lg bg-zinc-100 p-2 px-3 dark:bg-zinc-900"
|
className="cursor-pointer rounded-lg bg-zinc-100 p-2 px-3"
|
||||||
onClick={() => setMore(!more)}
|
onClick={() => setMore(!more)}
|
||||||
>
|
>
|
||||||
<MoreVerticalIcon className="h-5 w-5" />
|
<MoreVerticalIcon className="h-5 w-5" />
|
||||||
@ -114,7 +114,7 @@ export default function CardSidebar({
|
|||||||
<>
|
<>
|
||||||
{title === 'Model' ? (
|
{title === 'Model' ? (
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<span className="font-medium text-black dark:text-muted-foreground">
|
<span className="font-medium text-black">
|
||||||
{openFileTitle()}
|
{openFileTitle()}
|
||||||
</span>
|
</span>
|
||||||
<span className="mt-1 text-muted-foreground">
|
<span className="mt-1 text-muted-foreground">
|
||||||
@ -122,7 +122,7 @@ export default function CardSidebar({
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<span className="text-bold text-black dark:text-muted-foreground">
|
<span className="text-bold text-black">
|
||||||
{openFileTitle()}
|
{openFileTitle()}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
@ -141,7 +141,7 @@ export default function CardSidebar({
|
|||||||
/>
|
/>
|
||||||
<>
|
<>
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<span className="line-clamp-1 font-medium text-black dark:text-muted-foreground">
|
<span className="line-clamp-1 font-medium text-black">
|
||||||
Edit Global Defaults for{' '}
|
Edit Global Defaults for{' '}
|
||||||
<span
|
<span
|
||||||
className="font-bold"
|
className="font-bold"
|
||||||
@ -175,7 +175,7 @@ export default function CardSidebar({
|
|||||||
{show && (
|
{show && (
|
||||||
<div
|
<div
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
'flex flex-col gap-2 bg-white px-2 dark:bg-background',
|
'flex flex-col gap-2 bg-white px-2',
|
||||||
asChild && 'rounded-b-lg'
|
asChild && 'rounded-b-lg'
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
|||||||
@ -34,12 +34,10 @@ const Checkbox: React.FC<Props> = ({
|
|||||||
return (
|
return (
|
||||||
<div className="flex justify-between">
|
<div className="flex justify-between">
|
||||||
<div className="mb-1 flex items-center gap-x-2">
|
<div className="mb-1 flex items-center gap-x-2">
|
||||||
<p className="text-sm font-semibold text-zinc-500 dark:text-gray-300">
|
<p className="text-sm font-semibold text-zinc-500">{title}</p>
|
||||||
{title}
|
|
||||||
</p>
|
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<InfoIcon size={16} className="flex-shrink-0 dark:text-gray-500" />
|
<InfoIcon size={16} className="flex-shrink-0" />
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipPortal>
|
<TooltipPortal>
|
||||||
<TooltipContent side="top" className="max-w-[240px]">
|
<TooltipContent side="top" className="max-w-[240px]">
|
||||||
|
|||||||
@ -203,15 +203,14 @@ const DropdownListSidebar = ({
|
|||||||
isTabActive === 1 && '[&_.select-scroll-down-button]:hidden'
|
isTabActive === 1 && '[&_.select-scroll-down-button]:hidden'
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className="relative px-2 py-2 dark:bg-secondary/50">
|
<div className="relative px-2 py-2">
|
||||||
<ul className="inline-flex w-full space-x-2 rounded-lg bg-zinc-100 px-1 dark:bg-secondary">
|
<ul className="inline-flex w-full space-x-2 rounded-lg bg-zinc-100 px-1">
|
||||||
{engineOptions.map((name, i) => {
|
{engineOptions.map((name, i) => {
|
||||||
return (
|
return (
|
||||||
<li
|
<li
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
'relative my-1 flex w-full cursor-pointer items-center justify-center space-x-2 px-2 py-2',
|
'relative my-1 flex w-full cursor-pointer items-center justify-center space-x-2 px-2 py-2',
|
||||||
isTabActive === i &&
|
isTabActive === i && 'rounded-md bg-background'
|
||||||
'rounded-md bg-background dark:bg-white'
|
|
||||||
)}
|
)}
|
||||||
key={i}
|
key={i}
|
||||||
onClick={() => setIsTabActive(i)}
|
onClick={() => setIsTabActive(i)}
|
||||||
@ -230,8 +229,7 @@ const DropdownListSidebar = ({
|
|||||||
<span
|
<span
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
'relative z-50 font-medium text-muted-foreground',
|
'relative z-50 font-medium text-muted-foreground',
|
||||||
isTabActive === i &&
|
isTabActive === i && 'font-bold text-foreground'
|
||||||
'font-bold text-foreground dark:text-black'
|
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{name}
|
{name}
|
||||||
|
|||||||
@ -60,7 +60,7 @@ const GPUDriverPrompt: React.FC = () => {
|
|||||||
id="default-checkbox"
|
id="default-checkbox"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
onChange={onDoNotShowAgainChange}
|
onChange={onDoNotShowAgainChange}
|
||||||
className="h-4 w-4 rounded border-gray-300 bg-gray-100 text-blue-600 focus:ring-2 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:ring-offset-gray-800 dark:focus:ring-blue-600"
|
className="h-4 w-4 rounded border-gray-300 bg-gray-100 text-blue-600 focus:ring-2 focus:ring-blue-500"
|
||||||
/>
|
/>
|
||||||
<span>Don't show again</span>
|
<span>Don't show again</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -47,7 +47,7 @@ export default function DownloadingState() {
|
|||||||
</span>
|
</span>
|
||||||
</Button>
|
</Button>
|
||||||
<span
|
<span
|
||||||
className="absolute left-0 h-full rounded-md rounded-l-md bg-primary/20"
|
className="absolute left-0 h-full rounded-md rounded-l-md bg-blue-500/20"
|
||||||
style={{
|
style={{
|
||||||
width: `${totalPercentage}%`,
|
width: `${totalPercentage}%`,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -48,7 +48,7 @@ const ImportingModelState: React.FC = () => {
|
|||||||
className="h-2 w-24"
|
className="h-2 w-24"
|
||||||
value={transferredSize / totalSize}
|
value={transferredSize / totalSize}
|
||||||
/>
|
/>
|
||||||
<span className="text-xs font-bold text-primary">
|
<span className="text-xs font-bold text-blue-600">
|
||||||
{progress.toFixed(2)}%
|
{progress.toFixed(2)}%
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -45,7 +45,7 @@ export default function RibbonNav() {
|
|||||||
size={20}
|
size={20}
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
'flex-shrink-0 text-muted-foreground',
|
'flex-shrink-0 text-muted-foreground',
|
||||||
serverEnabled && 'text-gray-300 dark:text-gray-700'
|
serverEnabled && 'text-gray-300'
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
@ -114,7 +114,7 @@ export default function RibbonNav() {
|
|||||||
</div>
|
</div>
|
||||||
{isActive && (
|
{isActive && (
|
||||||
<m.div
|
<m.div
|
||||||
className="absolute inset-0 left-0 h-full w-full rounded-md bg-gray-200 dark:bg-secondary"
|
className="absolute inset-0 left-0 h-full w-full rounded-md bg-gray-200"
|
||||||
layoutId="active-state-primary"
|
layoutId="active-state-primary"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@ -166,7 +166,7 @@ export default function RibbonNav() {
|
|||||||
</div>
|
</div>
|
||||||
{isActive && (
|
{isActive && (
|
||||||
<m.div
|
<m.div
|
||||||
className="absolute inset-0 left-0 h-full w-full rounded-md bg-gray-200 dark:bg-secondary"
|
className="absolute inset-0 left-0 h-full w-full rounded-md bg-gray-200"
|
||||||
layoutId="active-state-secondary"
|
layoutId="active-state-secondary"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -159,7 +159,7 @@ const TopBar = () => {
|
|||||||
size={16}
|
size={16}
|
||||||
className="text-muted-foreground"
|
className="text-muted-foreground"
|
||||||
/>
|
/>
|
||||||
<span className="font-medium text-black dark:text-muted-foreground">
|
<span className="font-medium text-black ">
|
||||||
{openFileTitle()}
|
{openFileTitle()}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -175,7 +175,7 @@ const TopBar = () => {
|
|||||||
className="mt-0.5 flex-shrink-0 text-muted-foreground"
|
className="mt-0.5 flex-shrink-0 text-muted-foreground"
|
||||||
/>
|
/>
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<span className="font-medium text-black dark:text-muted-foreground">
|
<span className="font-medium text-black ">
|
||||||
Edit Threads Settings
|
Edit Threads Settings
|
||||||
</span>
|
</span>
|
||||||
<span className="mt-1 text-muted-foreground">
|
<span className="mt-1 text-muted-foreground">
|
||||||
@ -204,7 +204,7 @@ const TopBar = () => {
|
|||||||
className="text-muted-foreground"
|
className="text-muted-foreground"
|
||||||
/>
|
/>
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<span className="font-medium text-black dark:text-muted-foreground">
|
<span className="font-medium text-black ">
|
||||||
{openFileTitle()}
|
{openFileTitle()}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -7,12 +7,12 @@ export default function Loader({ description }: Props) {
|
|||||||
<div className="space-y-16">
|
<div className="space-y-16">
|
||||||
<div className="loader">
|
<div className="loader">
|
||||||
<div className="loader-inner">
|
<div className="loader-inner">
|
||||||
<label className="h-2 w-2 rounded-full bg-primary" />
|
<label className="h-2 w-2 rounded-full bg-blue-500" />
|
||||||
<label className="h-2 w-2 rounded-full bg-primary" />
|
<label className="h-2 w-2 rounded-full bg-blue-500" />
|
||||||
<label className="h-2 w-2 rounded-full bg-primary" />
|
<label className="h-2 w-2 rounded-full bg-blue-500" />
|
||||||
<label className="h-2 w-2 rounded-full bg-primary" />
|
<label className="h-2 w-2 rounded-full bg-blue-500" />
|
||||||
<label className="h-2 w-2 rounded-full bg-primary" />
|
<label className="h-2 w-2 rounded-full bg-blue-500" />
|
||||||
<label className="h-2 w-2 rounded-full bg-primary" />
|
<label className="h-2 w-2 rounded-full bg-blue-500" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p className="font-medium text-muted-foreground">{description}</p>
|
<p className="font-medium text-muted-foreground">{description}</p>
|
||||||
|
|||||||
@ -28,7 +28,7 @@ const AppLogs = () => {
|
|||||||
<div className="absolute -top-11 right-2">
|
<div className="absolute -top-11 right-2">
|
||||||
<Button
|
<Button
|
||||||
themes="outline"
|
themes="outline"
|
||||||
className="bg-white dark:bg-secondary/50"
|
className="bg-white"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
clipboard.copy(logs.slice(-50) ?? '')
|
clipboard.copy(logs.slice(-50) ?? '')
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -16,7 +16,7 @@ const DeviceSpecs = () => {
|
|||||||
<div className="absolute -top-11 right-2">
|
<div className="absolute -top-11 right-2">
|
||||||
<Button
|
<Button
|
||||||
themes="outline"
|
themes="outline"
|
||||||
className="bg-white dark:bg-secondary/50"
|
className="bg-white"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
clipboard.copy(userAgent ?? '')
|
clipboard.copy(userAgent ?? '')
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -38,7 +38,7 @@ const ModalTroubleShooting: React.FC = () => {
|
|||||||
<a
|
<a
|
||||||
href="https://jan.ai/guides/troubleshooting"
|
href="https://jan.ai/guides/troubleshooting"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
className="text-blue-600 hover:underline dark:text-blue-300"
|
className="text-blue-600 hover:underline"
|
||||||
>
|
>
|
||||||
troubleshooting guide
|
troubleshooting guide
|
||||||
</a>
|
</a>
|
||||||
@ -65,7 +65,7 @@ const ModalTroubleShooting: React.FC = () => {
|
|||||||
<a
|
<a
|
||||||
href="https://discord.gg/AsJ8krTT3N"
|
href="https://discord.gg/AsJ8krTT3N"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
className="text-blue-600 hover:underline dark:text-blue-300"
|
className="text-blue-600 hover:underline"
|
||||||
>
|
>
|
||||||
Discord
|
Discord
|
||||||
</a>
|
</a>
|
||||||
@ -77,8 +77,8 @@ const ModalTroubleShooting: React.FC = () => {
|
|||||||
|
|
||||||
<div className="flex flex-col pt-4">
|
<div className="flex flex-col pt-4">
|
||||||
{/* TODO @faisal replace this once we have better tabs component UI */}
|
{/* TODO @faisal replace this once we have better tabs component UI */}
|
||||||
<div className="relative bg-zinc-100 px-4 py-2 dark:bg-secondary/50">
|
<div className="relative bg-zinc-100 px-4 py-2">
|
||||||
<ul className="inline-flex space-x-2 rounded-lg bg-zinc-200 px-1 dark:bg-secondary">
|
<ul className="inline-flex space-x-2 rounded-lg bg-zinc-200 px-1">
|
||||||
{logOption.map((name, i) => {
|
{logOption.map((name, i) => {
|
||||||
return (
|
return (
|
||||||
<li
|
<li
|
||||||
@ -89,15 +89,14 @@ const ModalTroubleShooting: React.FC = () => {
|
|||||||
<span
|
<span
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
'relative z-50 font-medium text-muted-foreground',
|
'relative z-50 font-medium text-muted-foreground',
|
||||||
isTabActive === i &&
|
isTabActive === i && 'font-bold text-foreground'
|
||||||
'font-bold text-foreground dark:text-black'
|
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{name}
|
{name}
|
||||||
</span>
|
</span>
|
||||||
{isTabActive === i && (
|
{isTabActive === i && (
|
||||||
<m.div
|
<m.div
|
||||||
className="absolute left-0 top-1 h-[calc(100%-8px)] w-full rounded-md bg-background dark:bg-white"
|
className="absolute left-0 top-1 h-[calc(100%-8px)] w-full rounded-md bg-background"
|
||||||
layoutId="log-state-active"
|
layoutId="log-state-active"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -30,12 +30,10 @@ const ModelConfigInput: React.FC<Props> = ({
|
|||||||
return (
|
return (
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<div className="mb-2 flex items-center gap-x-2">
|
<div className="mb-2 flex items-center gap-x-2">
|
||||||
<p className="text-sm font-semibold text-zinc-500 dark:text-gray-300">
|
<p className="text-sm font-semibold text-zinc-500">{title}</p>
|
||||||
{title}
|
|
||||||
</p>
|
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<InfoIcon size={16} className="flex-shrink-0 dark:text-gray-500" />
|
<InfoIcon size={16} className="flex-shrink-0" />
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipPortal>
|
<TooltipPortal>
|
||||||
<TooltipContent side="top" className="max-w-[240px]">
|
<TooltipContent side="top" className="max-w-[240px]">
|
||||||
|
|||||||
@ -33,7 +33,7 @@ const OpenAiKeyInput: React.FC = () => {
|
|||||||
<div className="my-4">
|
<div className="my-4">
|
||||||
<label
|
<label
|
||||||
id="thread-title"
|
id="thread-title"
|
||||||
className="mb-2 inline-block font-bold text-gray-600 dark:text-gray-300"
|
className="mb-2 inline-block font-bold text-gray-600"
|
||||||
>
|
>
|
||||||
API Key
|
API Key
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
@ -6,17 +6,9 @@ import { ThemeProvider } from 'next-themes'
|
|||||||
|
|
||||||
import { motion as m } from 'framer-motion'
|
import { motion as m } from 'framer-motion'
|
||||||
|
|
||||||
import { useBodyClass } from '@/hooks/useBodyClass'
|
|
||||||
|
|
||||||
import { useUserConfigs } from '@/hooks/useUserConfigs'
|
|
||||||
|
|
||||||
export default function ThemeWrapper({ children }: PropsWithChildren) {
|
export default function ThemeWrapper({ children }: PropsWithChildren) {
|
||||||
const [config] = useUserConfigs()
|
|
||||||
|
|
||||||
useBodyClass(config.primaryColor || 'primary-yellow')
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ThemeProvider attribute="class" enableSystem>
|
<ThemeProvider attribute="class" forcedTheme="light">
|
||||||
<m.div
|
<m.div
|
||||||
initial={{ opacity: 0, y: -10 }}
|
initial={{ opacity: 0, y: -10 }}
|
||||||
animate={{
|
animate={{
|
||||||
|
|||||||
@ -57,7 +57,7 @@ const ServerLogs = (props: ServerLogsProps) => {
|
|||||||
<div className="absolute -top-11 right-2">
|
<div className="absolute -top-11 right-2">
|
||||||
<Button
|
<Button
|
||||||
themes="outline"
|
themes="outline"
|
||||||
className="bg-white dark:bg-secondary/50"
|
className="bg-white"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
clipboard.copy(logs.slice(-100) ?? '')
|
clipboard.copy(logs.slice(-100) ?? '')
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -42,12 +42,10 @@ const SliderRightPanel: React.FC<Props> = ({
|
|||||||
return (
|
return (
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<div className="mb-3 flex items-center gap-x-2">
|
<div className="mb-3 flex items-center gap-x-2">
|
||||||
<p className="text-sm font-semibold text-zinc-500 dark:text-gray-300">
|
<p className="text-sm font-semibold text-zinc-500">{title}</p>
|
||||||
{title}
|
|
||||||
</p>
|
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<InfoIcon size={16} className="flex-shrink-0 dark:text-gray-500" />
|
<InfoIcon size={16} className="flex-shrink-0" />
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipPortal>
|
<TooltipPortal>
|
||||||
<TooltipContent side="top" className="max-w-[240px]">
|
<TooltipContent side="top" className="max-w-[240px]">
|
||||||
|
|||||||
@ -108,11 +108,11 @@ export function toaster(props: Props) {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
'unset-drag dark:bg-zinc-white relative flex animate-enter items-center gap-x-4 rounded-lg bg-foreground px-4 py-2 text-white dark:border dark:border-border',
|
'unset-drag relative flex animate-enter items-center gap-x-4 rounded-lg bg-foreground px-4 py-2 text-white',
|
||||||
t.visible ? 'animate-enter' : 'animate-leave'
|
t.visible ? 'animate-enter' : 'animate-leave'
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className="flex items-start gap-x-3 dark:text-black">
|
<div className="flex items-start gap-x-3">
|
||||||
<div className="mt-1">{renderIcon(type)}</div>
|
<div className="mt-1">{renderIcon(type)}</div>
|
||||||
<div className="pr-4">
|
<div className="pr-4">
|
||||||
<h1 className="font-bold">{title}</h1>
|
<h1 className="font-bold">{title}</h1>
|
||||||
@ -120,7 +120,7 @@ export function toaster(props: Props) {
|
|||||||
</div>
|
</div>
|
||||||
<XIcon
|
<XIcon
|
||||||
size={24}
|
size={24}
|
||||||
className="absolute right-2 top-2 w-4 cursor-pointer dark:text-black"
|
className="absolute right-2 top-2 w-4 cursor-pointer"
|
||||||
onClick={() => toast.dismiss(t.id)}
|
onClick={() => toast.dismiss(t.id)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -138,16 +138,16 @@ export function snackbar(props: Props) {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
'unset-drag dark:bg-zinc-white relative bottom-2 flex animate-enter items-center gap-x-4 rounded-lg bg-foreground px-4 py-2 text-white dark:border dark:border-border',
|
'unset-drag relative bottom-2 flex animate-enter items-center gap-x-4 rounded-lg bg-foreground px-4 py-2 text-white',
|
||||||
t.visible ? 'animate-enter' : 'animate-leave'
|
t.visible ? 'animate-enter' : 'animate-leave'
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className="flex items-start gap-x-3 dark:text-black">
|
<div className="flex items-start gap-x-3">
|
||||||
<div>{renderIcon(type)}</div>
|
<div>{renderIcon(type)}</div>
|
||||||
<p className="pr-4">{description}</p>
|
<p className="pr-4">{description}</p>
|
||||||
<XIcon
|
<XIcon
|
||||||
size={24}
|
size={24}
|
||||||
className="absolute right-2 top-1/2 w-4 -translate-y-1/2 cursor-pointer dark:text-black"
|
className="absolute right-2 top-1/2 w-4 -translate-y-1/2 cursor-pointer"
|
||||||
onClick={() => toast.dismiss(t.id)}
|
onClick={() => toast.dismiss(t.id)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,11 +0,0 @@
|
|||||||
import { useAtom } from 'jotai'
|
|
||||||
import { atomWithStorage } from 'jotai/utils'
|
|
||||||
|
|
||||||
export const userConfigs = atomWithStorage<UserConfig>('config', {
|
|
||||||
gettingStartedShow: true,
|
|
||||||
primaryColor: 'primary-blue',
|
|
||||||
})
|
|
||||||
|
|
||||||
export function useUserConfigs() {
|
|
||||||
return useAtom(userConfigs)
|
|
||||||
}
|
|
||||||
@ -34,9 +34,7 @@ const CleanThreadModal: React.FC<Props> = ({ threadId }) => {
|
|||||||
<ModalTrigger asChild onClick={(e) => e.stopPropagation()}>
|
<ModalTrigger asChild onClick={(e) => e.stopPropagation()}>
|
||||||
<div className="flex cursor-pointer items-center space-x-2 px-4 py-2 hover:bg-secondary">
|
<div className="flex cursor-pointer items-center space-x-2 px-4 py-2 hover:bg-secondary">
|
||||||
<Paintbrush size={16} className="text-muted-foreground" />
|
<Paintbrush size={16} className="text-muted-foreground" />
|
||||||
<span className="text-bold text-black dark:text-muted-foreground">
|
<span className="text-bold text-black">Clean thread</span>
|
||||||
Clean thread
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</ModalTrigger>
|
</ModalTrigger>
|
||||||
<ModalPortal />
|
<ModalPortal />
|
||||||
|
|||||||
@ -33,10 +33,8 @@ const DeleteThreadModal: React.FC<Props> = ({ threadId }) => {
|
|||||||
<Modal>
|
<Modal>
|
||||||
<ModalTrigger asChild onClick={(e) => e.stopPropagation()}>
|
<ModalTrigger asChild onClick={(e) => e.stopPropagation()}>
|
||||||
<div className="flex cursor-pointer items-center space-x-2 px-4 py-2 hover:bg-secondary">
|
<div className="flex cursor-pointer items-center space-x-2 px-4 py-2 hover:bg-secondary">
|
||||||
<Trash2Icon size={16} className="text-red-600 dark:text-red-300" />
|
<Trash2Icon size={16} className="text-red-600" />
|
||||||
<span className="text-bold text-red-600 dark:text-red-300">
|
<span className="text-bold text-red-600">Delete thread</span>
|
||||||
Delete thread
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</ModalTrigger>
|
</ModalTrigger>
|
||||||
<ModalPortal />
|
<ModalPortal />
|
||||||
|
|||||||
@ -54,7 +54,7 @@ const ErrorMessage = ({ message }: { message: ThreadMessage }) => {
|
|||||||
Port 3928 is currently unavailable. Check for conflicting apps,
|
Port 3928 is currently unavailable. Check for conflicting apps,
|
||||||
or access
|
or access
|
||||||
<span
|
<span
|
||||||
className="cursor-pointer text-primary dark:text-blue-400"
|
className="cursor-pointer text-blue-600"
|
||||||
onClick={() => setModalTroubleShooting(true)}
|
onClick={() => setModalTroubleShooting(true)}
|
||||||
>
|
>
|
||||||
troubleshooting assistance
|
troubleshooting assistance
|
||||||
@ -72,7 +72,7 @@ const ErrorMessage = ({ message }: { message: ThreadMessage }) => {
|
|||||||
<p>
|
<p>
|
||||||
Jan’s in beta. Access
|
Jan’s in beta. Access
|
||||||
<span
|
<span
|
||||||
className="cursor-pointer text-primary dark:text-blue-400"
|
className="cursor-pointer text-blue-600"
|
||||||
onClick={() => setModalTroubleShooting(true)}
|
onClick={() => setModalTroubleShooting(true)}
|
||||||
>
|
>
|
||||||
troubleshooting assistance
|
troubleshooting assistance
|
||||||
|
|||||||
@ -71,7 +71,7 @@ const Sidebar: React.FC = () => {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
'h-full flex-shrink-0 overflow-x-hidden border-l border-border bg-background pb-6 transition-all duration-100 dark:bg-background/20',
|
'h-full flex-shrink-0 overflow-x-hidden border-l border-border bg-background pb-6 transition-all duration-100',
|
||||||
showing
|
showing
|
||||||
? 'w-80 translate-x-0 opacity-100'
|
? 'w-80 translate-x-0 opacity-100'
|
||||||
: 'w-0 translate-x-full opacity-0'
|
: 'w-0 translate-x-full opacity-0'
|
||||||
@ -87,7 +87,7 @@ const Sidebar: React.FC = () => {
|
|||||||
<div>
|
<div>
|
||||||
<label
|
<label
|
||||||
id="thread-title"
|
id="thread-title"
|
||||||
className="mb-2 inline-block font-bold text-gray-600 dark:text-gray-300"
|
className="mb-2 inline-block font-bold text-gray-600"
|
||||||
>
|
>
|
||||||
Title
|
Title
|
||||||
</label>
|
</label>
|
||||||
@ -106,7 +106,7 @@ const Sidebar: React.FC = () => {
|
|||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<label
|
<label
|
||||||
id="thread-title"
|
id="thread-title"
|
||||||
className="mb-2 inline-block font-bold text-zinc-500 dark:text-gray-300"
|
className="mb-2 inline-block font-bold text-zinc-500"
|
||||||
>
|
>
|
||||||
Threads ID
|
Threads ID
|
||||||
</label>
|
</label>
|
||||||
@ -127,7 +127,7 @@ const Sidebar: React.FC = () => {
|
|||||||
<div>
|
<div>
|
||||||
<label
|
<label
|
||||||
id="thread-title"
|
id="thread-title"
|
||||||
className="mb-2 inline-block font-bold text-zinc-500 dark:text-gray-300"
|
className="mb-2 inline-block font-bold text-zinc-500"
|
||||||
>
|
>
|
||||||
Instructions
|
Instructions
|
||||||
</label>
|
</label>
|
||||||
@ -203,14 +203,14 @@ const Sidebar: React.FC = () => {
|
|||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<label
|
<label
|
||||||
id="retrieval"
|
id="retrieval"
|
||||||
className="inline-flex items-center font-bold text-zinc-500 dark:text-gray-300"
|
className="inline-flex items-center font-bold text-zinc-500"
|
||||||
>
|
>
|
||||||
Retrieval
|
Retrieval
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<InfoIcon
|
<InfoIcon
|
||||||
size={16}
|
size={16}
|
||||||
className="ml-2 flex-shrink-0 text-black dark:text-gray-500"
|
className="ml-2 flex-shrink-0 text-black"
|
||||||
/>
|
/>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipPortal>
|
<TooltipPortal>
|
||||||
@ -269,7 +269,7 @@ const Sidebar: React.FC = () => {
|
|||||||
<div className="item-center mb-2 flex">
|
<div className="item-center mb-2 flex">
|
||||||
<label
|
<label
|
||||||
id="embedding-model"
|
id="embedding-model"
|
||||||
className="inline-flex font-bold text-zinc-500 dark:text-gray-300"
|
className="inline-flex font-bold text-zinc-500"
|
||||||
>
|
>
|
||||||
Embedding Model
|
Embedding Model
|
||||||
</label>
|
</label>
|
||||||
@ -277,7 +277,7 @@ const Sidebar: React.FC = () => {
|
|||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<InfoIcon
|
<InfoIcon
|
||||||
size={16}
|
size={16}
|
||||||
className="ml-2 flex-shrink-0 dark:text-gray-500"
|
className="ml-2 flex-shrink-0"
|
||||||
/>
|
/>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipPortal>
|
<TooltipPortal>
|
||||||
@ -309,7 +309,7 @@ const Sidebar: React.FC = () => {
|
|||||||
<div className="mb-2 flex items-center">
|
<div className="mb-2 flex items-center">
|
||||||
<label
|
<label
|
||||||
id="vector-database"
|
id="vector-database"
|
||||||
className="inline-block font-bold text-zinc-500 dark:text-gray-300"
|
className="inline-block font-bold text-zinc-500"
|
||||||
>
|
>
|
||||||
Vector Database
|
Vector Database
|
||||||
</label>
|
</label>
|
||||||
@ -317,7 +317,7 @@ const Sidebar: React.FC = () => {
|
|||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<InfoIcon
|
<InfoIcon
|
||||||
size={16}
|
size={16}
|
||||||
className="ml-2 flex-shrink-0 dark:text-gray-500"
|
className="ml-2 flex-shrink-0"
|
||||||
/>
|
/>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipPortal>
|
<TooltipPortal>
|
||||||
|
|||||||
@ -79,7 +79,7 @@ export default function ThreadList() {
|
|||||||
<div
|
<div
|
||||||
key={thread.id}
|
key={thread.id}
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
`group/message relative mb-1 flex cursor-pointer flex-col transition-all hover:rounded-lg hover:bg-gray-100 hover:dark:bg-secondary/50`
|
`group/message relative mb-1 flex cursor-pointer flex-col transition-all hover:rounded-lg hover:bg-gray-100`
|
||||||
)}
|
)}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
onThreadClick(thread)
|
onThreadClick(thread)
|
||||||
@ -90,7 +90,7 @@ export default function ThreadList() {
|
|||||||
{thread.updated && displayDate(thread.updated)}
|
{thread.updated && displayDate(thread.updated)}
|
||||||
</p>
|
</p>
|
||||||
<h2 className="line-clamp-1 font-bold">{thread.title}</h2>
|
<h2 className="line-clamp-1 font-bold">{thread.title}</h2>
|
||||||
<p className="mt-1 line-clamp-1 text-xs text-gray-700 group-hover/message:max-w-[160px] dark:text-gray-300">
|
<p className="mt-1 line-clamp-1 text-xs text-gray-700 group-hover/message:max-w-[160px]">
|
||||||
{threadStates[thread.id]?.lastMessage
|
{threadStates[thread.id]?.lastMessage
|
||||||
? threadStates[thread.id]?.lastMessage
|
? threadStates[thread.id]?.lastMessage
|
||||||
: 'No new message'}
|
: 'No new message'}
|
||||||
@ -98,7 +98,7 @@ export default function ThreadList() {
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
`group/icon invisible absolute bottom-2 right-2 z-20 rounded-lg p-1 text-muted-foreground hover:bg-gray-200 group-hover/message:visible hover:dark:bg-secondary`
|
`group/icon invisible absolute bottom-2 right-2 z-20 rounded-lg p-1 text-muted-foreground hover:bg-gray-200 group-hover/message:visible`
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<MoreVerticalIcon />
|
<MoreVerticalIcon />
|
||||||
@ -109,7 +109,7 @@ export default function ThreadList() {
|
|||||||
</div>
|
</div>
|
||||||
{activeThreadId === thread.id && (
|
{activeThreadId === thread.id && (
|
||||||
<m.div
|
<m.div
|
||||||
className="absolute inset-0 left-0 h-full w-full rounded-lg bg-gray-100 p-4 dark:bg-secondary/50"
|
className="absolute inset-0 left-0 h-full w-full rounded-lg bg-gray-100 p-4"
|
||||||
layoutId="active-thread"
|
layoutId="active-thread"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -26,7 +26,7 @@ export const HuggingFaceSearchModal = () => {
|
|||||||
</div>
|
</div>
|
||||||
<Input
|
<Input
|
||||||
placeholder="e.g. username/repo-name"
|
placeholder="e.g. username/repo-name"
|
||||||
className="bg-white dark:bg-background"
|
className="bg-white"
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
setRepoID(e.target.value)
|
setRepoID(e.target.value)
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -91,7 +91,7 @@ const ExploreModelsScreen = () => {
|
|||||||
/>
|
/>
|
||||||
<Input
|
<Input
|
||||||
placeholder="Search models"
|
placeholder="Search models"
|
||||||
className="bg-white pl-9 dark:bg-background"
|
className="bg-white pl-9"
|
||||||
onChange={(e) => setsearchValue(e.target.value)}
|
onChange={(e) => setsearchValue(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -181,7 +181,7 @@ const LocalServerScreen = () => {
|
|||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<div className="space-y-4 p-4">
|
<div className="space-y-4 p-4">
|
||||||
<div>
|
<div>
|
||||||
<p className="mb-2 block text-sm font-semibold text-zinc-500 dark:text-gray-300">
|
<p className="mb-2 block text-sm font-semibold text-zinc-500 ">
|
||||||
Server Options
|
Server Options
|
||||||
</p>
|
</p>
|
||||||
<div className="flex w-full flex-shrink-0 items-center gap-x-2">
|
<div className="flex w-full flex-shrink-0 items-center gap-x-2">
|
||||||
@ -231,15 +231,12 @@ const LocalServerScreen = () => {
|
|||||||
<div>
|
<div>
|
||||||
<label
|
<label
|
||||||
id="cors"
|
id="cors"
|
||||||
className="mb-2 inline-flex items-start gap-x-2 font-bold text-zinc-500 dark:text-gray-300"
|
className="mb-2 inline-flex items-start gap-x-2 font-bold text-zinc-500"
|
||||||
>
|
>
|
||||||
Cross-Origin-Resource-Sharing (CORS)
|
Cross-Origin-Resource-Sharing (CORS)
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<InfoIcon
|
<InfoIcon size={16} className="mt-0.5 flex-shrink-0" />
|
||||||
size={16}
|
|
||||||
className="mt-0.5 flex-shrink-0 dark:text-gray-500"
|
|
||||||
/>
|
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipPortal>
|
<TooltipPortal>
|
||||||
<TooltipContent side="top" className="max-w-[240px]">
|
<TooltipContent side="top" className="max-w-[240px]">
|
||||||
@ -266,15 +263,12 @@ const LocalServerScreen = () => {
|
|||||||
<div>
|
<div>
|
||||||
<label
|
<label
|
||||||
id="verbose"
|
id="verbose"
|
||||||
className="mb-2 inline-flex items-start gap-x-2 font-bold text-zinc-500 dark:text-gray-300"
|
className="mb-2 inline-flex items-start gap-x-2 font-bold text-zinc-500"
|
||||||
>
|
>
|
||||||
Verbose Server Logs
|
Verbose Server Logs
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<InfoIcon
|
<InfoIcon size={16} className="mt-0.5 flex-shrink-0" />
|
||||||
size={16}
|
|
||||||
className="mt-0.5 flex-shrink-0 dark:text-gray-500"
|
|
||||||
/>
|
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipPortal>
|
<TooltipPortal>
|
||||||
<TooltipContent side="top" className="max-w-[240px]">
|
<TooltipContent side="top" className="max-w-[240px]">
|
||||||
@ -315,13 +309,13 @@ const LocalServerScreen = () => {
|
|||||||
|
|
||||||
{/* Middle Bar */}
|
{/* Middle Bar */}
|
||||||
<ScrollToBottom className="relative flex h-full w-full flex-col overflow-auto bg-background">
|
<ScrollToBottom className="relative flex h-full w-full flex-col overflow-auto bg-background">
|
||||||
<div className="sticky top-0 flex items-center justify-between bg-zinc-100 px-4 py-2 dark:bg-zinc-600">
|
<div className="sticky top-0 flex items-center justify-between bg-zinc-100 px-4 py-2">
|
||||||
<h2 className="font-bold">Server Logs</h2>
|
<h2 className="font-bold">Server Logs</h2>
|
||||||
<div className="space-x-2">
|
<div className="space-x-2">
|
||||||
<Button
|
<Button
|
||||||
size="sm"
|
size="sm"
|
||||||
themes="outline"
|
themes="outline"
|
||||||
className="bg-white dark:bg-secondary"
|
className="bg-white"
|
||||||
onClick={() => openServerLog()}
|
onClick={() => openServerLog()}
|
||||||
>
|
>
|
||||||
<CodeIcon size={16} className="mr-2" />
|
<CodeIcon size={16} className="mr-2" />
|
||||||
@ -330,7 +324,7 @@ const LocalServerScreen = () => {
|
|||||||
<Button
|
<Button
|
||||||
size="sm"
|
size="sm"
|
||||||
themes="outline"
|
themes="outline"
|
||||||
className="bg-white dark:bg-secondary"
|
className="bg-white"
|
||||||
onClick={() => clearServerLog()}
|
onClick={() => clearServerLog()}
|
||||||
>
|
>
|
||||||
<Paintbrush size={16} className="mr-2" />
|
<Paintbrush size={16} className="mr-2" />
|
||||||
@ -386,7 +380,7 @@ const LocalServerScreen = () => {
|
|||||||
{/* Right bar */}
|
{/* Right bar */}
|
||||||
<div
|
<div
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
'h-full flex-shrink-0 overflow-x-hidden border-l border-border bg-background transition-all duration-100 dark:bg-background/20',
|
'h-full flex-shrink-0 overflow-x-hidden border-l border-border bg-background transition-all duration-100',
|
||||||
showRightSideBar
|
showRightSideBar
|
||||||
? 'w-80 translate-x-0 opacity-100'
|
? 'w-80 translate-x-0 opacity-100'
|
||||||
: 'w-0 translate-x-full opacity-0'
|
: 'w-0 translate-x-full opacity-0'
|
||||||
@ -422,7 +416,7 @@ const LocalServerScreen = () => {
|
|||||||
<span>
|
<span>
|
||||||
Model failed to start. Access{' '}
|
Model failed to start. Access{' '}
|
||||||
<span
|
<span
|
||||||
className="cursor-pointer text-primary dark:text-blue-400"
|
className="cursor-pointer text-blue-600"
|
||||||
onClick={() => setModalTroubleShooting(true)}
|
onClick={() => setModalTroubleShooting(true)}
|
||||||
>
|
>
|
||||||
troubleshooting assistance
|
troubleshooting assistance
|
||||||
|
|||||||
@ -282,7 +282,7 @@ const Advanced = () => {
|
|||||||
disabled={gpuList.length === 0 || !gpuEnabled}
|
disabled={gpuList.length === 0 || !gpuEnabled}
|
||||||
value={selectedGpu.join()}
|
value={selectedGpu.join()}
|
||||||
>
|
>
|
||||||
<SelectTrigger className="w-[340px] bg-white dark:bg-gray-500">
|
<SelectTrigger className="w-[340px] bg-white">
|
||||||
<SelectValue placeholder={gpuSelectionPlaceHolder}>
|
<SelectValue placeholder={gpuSelectionPlaceHolder}>
|
||||||
<span className="line-clamp-1 w-full pr-8">
|
<span className="line-clamp-1 w-full pr-8">
|
||||||
{selectedGpu.join()}
|
{selectedGpu.join()}
|
||||||
|
|||||||
@ -1,57 +0,0 @@
|
|||||||
import { motion as m } from 'framer-motion'
|
|
||||||
import { twMerge } from 'tailwind-merge'
|
|
||||||
|
|
||||||
import { useUserConfigs } from '@/hooks/useUserConfigs'
|
|
||||||
|
|
||||||
type PrimaryColorOption = {
|
|
||||||
value: PrimaryColor
|
|
||||||
class: string
|
|
||||||
}
|
|
||||||
|
|
||||||
const primaryColorOptions: PrimaryColorOption[] = [
|
|
||||||
{
|
|
||||||
value: 'primary-blue',
|
|
||||||
class: 'bg-blue-500',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 'primary-purple',
|
|
||||||
class: 'bg-purple-500',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 'primary-green',
|
|
||||||
class: 'bg-green-500',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
export default function TogglePrimary() {
|
|
||||||
const [config, setUserConfig] = useUserConfigs()
|
|
||||||
|
|
||||||
const handleChangeAccent = (primaryColor: PrimaryColor) => {
|
|
||||||
setUserConfig({ ...config, primaryColor })
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="flex items-center">
|
|
||||||
{primaryColorOptions.map((option, i) => {
|
|
||||||
const isActive = config.primaryColor === option.value
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className="relative flex h-6 w-6 items-center justify-center"
|
|
||||||
key={i}
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
className={twMerge('h-3.5 w-3.5 rounded-full', option.class)}
|
|
||||||
onClick={() => handleChangeAccent(option.value)}
|
|
||||||
/>
|
|
||||||
{isActive ? (
|
|
||||||
<m.div
|
|
||||||
className="absolute inset-0 h-full w-full rounded-full border border-primary/50 bg-primary/20"
|
|
||||||
layoutId="active-primary-menu"
|
|
||||||
/>
|
|
||||||
) : null}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@ -28,7 +28,7 @@ export default function ToggleTheme() {
|
|||||||
</button>
|
</button>
|
||||||
{isActive ? (
|
{isActive ? (
|
||||||
<m.div
|
<m.div
|
||||||
className="absolute inset-0 h-full w-full rounded-md border border-primary/50 bg-primary/20"
|
className="absolute inset-0 h-full w-full rounded-md border border-primary/50 bg-blue-500/20"
|
||||||
layoutId="active-theme-menu"
|
layoutId="active-theme-menu"
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import ToggleAccent from '@/screens/Settings/Appearance/TogglePrimary'
|
|
||||||
import ToggleTheme from '@/screens/Settings/Appearance/ToggleTheme'
|
import ToggleTheme from '@/screens/Settings/Appearance/ToggleTheme'
|
||||||
|
|
||||||
export default function AppearanceOptions() {
|
export default function AppearanceOptions() {
|
||||||
@ -22,7 +21,6 @@ export default function AppearanceOptions() {
|
|||||||
Choose the primary accent color used throughout the app.
|
Choose the primary accent color used throughout the app.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<ToggleAccent />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -16,7 +16,7 @@ const ImportModelOptionSelection: React.FC<Props> = ({
|
|||||||
onClick={() => setSelectedOptionType(option.type)}
|
onClick={() => setSelectedOptionType(option.type)}
|
||||||
>
|
>
|
||||||
<div className="flex h-5 w-5 items-center justify-center rounded-full border border-[#2563EB]">
|
<div className="flex h-5 w-5 items-center justify-center rounded-full border border-[#2563EB]">
|
||||||
{checked && <div className="h-2 w-2 rounded-full bg-primary" />}
|
{checked && <div className="h-2 w-2 rounded-full bg-blue-500" />}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="ml-2 flex-1">
|
<div className="ml-2 flex-1">
|
||||||
|
|||||||
@ -29,7 +29,7 @@ const ImportSuccessIcon: React.FC<Props> = ({ onEditModelClick }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const SuccessIcon: React.FC = React.memo(() => (
|
const SuccessIcon: React.FC = React.memo(() => (
|
||||||
<div className="flex h-8 w-8 items-center justify-center rounded-full bg-primary">
|
<div className="flex h-8 w-8 items-center justify-center rounded-full bg-blue-500">
|
||||||
<Check color="#FFF" />
|
<Check color="#FFF" />
|
||||||
</div>
|
</div>
|
||||||
))
|
))
|
||||||
|
|||||||
@ -152,7 +152,7 @@ export default function RowModel(props: RowModelProps) {
|
|||||||
) : (
|
) : (
|
||||||
<PlayIcon size={16} className="text-muted-foreground" />
|
<PlayIcon size={16} className="text-muted-foreground" />
|
||||||
)}
|
)}
|
||||||
<span className="text-bold capitalize text-black dark:text-muted-foreground">
|
<span className="text-bold capitalize text-black">
|
||||||
{isActiveModel ? stateModel.state : 'Start'}
|
{isActiveModel ? stateModel.state : 'Start'}
|
||||||
Model
|
Model
|
||||||
</span>
|
</span>
|
||||||
@ -189,9 +189,7 @@ export default function RowModel(props: RowModelProps) {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Trash2Icon size={16} className="text-muted-foreground" />
|
<Trash2Icon size={16} className="text-muted-foreground" />
|
||||||
<span className="text-bold text-black dark:text-muted-foreground">
|
<span className="text-bold text-black">Delete Model</span>
|
||||||
Delete Model
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -97,7 +97,7 @@ const SelectingModelModal: React.FC = () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const borderColor = isDragActive ? 'border-primary' : 'border-[#F4F4F5]'
|
const borderColor = isDragActive ? 'border-primary' : 'border-[#F4F4F5]'
|
||||||
const textColor = isDragActive ? 'text-primary' : 'text-[#71717A]'
|
const textColor = isDragActive ? 'text-blue-600' : 'text-[#71717A]'
|
||||||
const dragAndDropBgColor = isDragActive ? 'bg-[#EFF6FF]' : 'bg-white'
|
const dragAndDropBgColor = isDragActive ? 'bg-[#EFF6FF]' : 'bg-white'
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -128,7 +128,7 @@ const SelectingModelModal: React.FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mt-4">
|
<div className="mt-4">
|
||||||
<span className="text-sm font-bold text-primary">
|
<span className="text-sm font-bold text-blue-600">
|
||||||
Click to upload
|
Click to upload
|
||||||
</span>
|
</span>
|
||||||
<span className={`text-sm ${textColor} font-medium`}>
|
<span className={`text-sm ${textColor} font-medium`}>
|
||||||
|
|||||||
@ -15,7 +15,6 @@ const SettingMenu: React.FC<Props> = ({ activeMenu, onMenuClick }) => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setMenus([
|
setMenus([
|
||||||
'My Models',
|
'My Models',
|
||||||
'My Settings',
|
|
||||||
'Advanced Settings',
|
'Advanced Settings',
|
||||||
...(window.electronAPI ? ['Extensions'] : []),
|
...(window.electronAPI ? ['Extensions'] : []),
|
||||||
])
|
])
|
||||||
@ -39,7 +38,7 @@ const SettingMenu: React.FC<Props> = ({ activeMenu, onMenuClick }) => {
|
|||||||
|
|
||||||
{isActive && (
|
{isActive && (
|
||||||
<m.div
|
<m.div
|
||||||
className="absolute inset-0 -left-3 h-full w-[calc(100%+24px)] rounded-md bg-primary/50"
|
className="absolute inset-0 -left-3 h-full w-[calc(100%+24px)] rounded-md bg-gray-200"
|
||||||
layoutId="active-static-menu"
|
layoutId="active-static-menu"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
|
|
||||||
import Advanced from '@/screens/Settings/Advanced'
|
import Advanced from '@/screens/Settings/Advanced'
|
||||||
import AppearanceOptions from '@/screens/Settings/Appearance'
|
|
||||||
import ExtensionCatalog from '@/screens/Settings/CoreExtensions'
|
import ExtensionCatalog from '@/screens/Settings/CoreExtensions'
|
||||||
|
|
||||||
import Models from '@/screens/Settings/Models'
|
import Models from '@/screens/Settings/Models'
|
||||||
@ -14,9 +14,6 @@ const handleShowOptions = (menu: string) => {
|
|||||||
case 'Extensions':
|
case 'Extensions':
|
||||||
return <ExtensionCatalog />
|
return <ExtensionCatalog />
|
||||||
|
|
||||||
case 'My Settings':
|
|
||||||
return <AppearanceOptions />
|
|
||||||
|
|
||||||
case 'Advanced Settings':
|
case 'Advanced Settings':
|
||||||
return <Advanced />
|
return <Advanced />
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
.message {
|
.message {
|
||||||
@apply text-black dark:text-gray-300;
|
@apply text-black;
|
||||||
white-space: pre-line;
|
white-space: pre-line;
|
||||||
|
|
||||||
ul,
|
ul,
|
||||||
@ -10,7 +10,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
@apply text-blue-600 dark:text-blue-300;
|
@apply text-blue-600;
|
||||||
&:hover {
|
&:hover {
|
||||||
@apply underline;
|
@apply underline;
|
||||||
}
|
}
|
||||||
|
|||||||
6
web/types/appearance.d.ts
vendored
6
web/types/appearance.d.ts
vendored
@ -1,6 +0,0 @@
|
|||||||
type PrimaryColor = 'primary-blue' | 'primary-green' | 'primary-purple'
|
|
||||||
|
|
||||||
type UserConfig = {
|
|
||||||
gettingStartedShow?: boolean
|
|
||||||
primaryColor?: PrimaryColor
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user