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: web app dark mode #14732

Merged
merged 20 commits into from
Mar 3, 2025
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
5 changes: 4 additions & 1 deletion web/app/(shareLayout)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react'
import type { FC } from 'react'
import type { Metadata } from 'next'
import { SharePageContextProvider } from '@/context/share-page-context'

export const metadata: Metadata = {
icons: 'data:,', // prevent browser from using default favicon
Expand All @@ -11,7 +12,9 @@ const Layout: FC<{
}> = ({ children }) => {
return (
<div className="min-w-[300px] h-full pb-[env(safe-area-inset-bottom)]">
{children}
<SharePageContextProvider>
{children}
</SharePageContextProvider>
</div>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const CSVDownload: FC = () => {
<td className='h-9 pl-3 pr-2 border-b border-divider-regular'>{t('appAnnotation.batchModal.answer')}</td>
</tr>
</thead>
<tbody className='text-gray-700'>
<tbody className='text-text-secondary'>
<tr>
<td className='h-9 pl-3 pr-2 border-b border-divider-subtle text-[13px]'>{t('appAnnotation.batchModal.question')} 1</td>
<td className='h-9 pl-3 pr-2 border-b border-divider-subtle text-[13px]'>{t('appAnnotation.batchModal.answer')} 1</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,18 +124,9 @@ const TextGenerationItem: FC<TextGenerationItemProps> = ({
doSend(v.payload.message, v.payload.files)
})

const varList = modelConfig.configs.prompt_variables.map((item: any) => {
return {
label: item.key,
value: inputs[item.key],
}
})

return (
<TextGeneration
className='flex flex-col h-full overflow-y-auto border-none'
innerClassName='grow flex flex-col'
contentClassName='grow'
content={completion}
isLoading={!completion && isResponding}
isResponding={isResponding}
Expand All @@ -144,8 +135,7 @@ const TextGenerationItem: FC<TextGenerationItemProps> = ({
messageId={messageId}
isError={false}
onRetry={() => { }}
appId={appId}
varList={varList}
inSidePanel
/>
)
}
Expand Down
3 changes: 0 additions & 3 deletions web/app/components/app/configuration/debug/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,6 @@ const Debug: FC<IDebug> = ({
messageId={messageId}
isError={false}
onRetry={() => { }}
supportAnnotation
appId={appId}
varList={varList}
siteInfo={null}
/>
</div>
Expand Down
3 changes: 0 additions & 3 deletions web/app/components/app/log/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,7 @@ function DetailPanel({ detail, onFeedback }: IDetailPanel) {
supportFeedback
feedback={detail.message.feedbacks.find((item: any) => item.from_source === 'admin')}
onFeedback={feedback => onFeedback(detail.message.id, feedback)}
supportAnnotation
isShowTextToSpeech
appId={appDetail?.id}
varList={varList}
siteInfo={null}
/>
</div>
Expand Down
26 changes: 0 additions & 26 deletions web/app/components/app/text-generate/index.tsx

This file was deleted.

Loading
Loading