Commit 8d40b9bb authored by Joel's avatar Joel

feat: ui

parent 05ea8e01
...@@ -10,6 +10,7 @@ import Button from '../../base/button' ...@@ -10,6 +10,7 @@ import Button from '../../base/button'
import { checkOrSetAccessToken } from '../utils' import { checkOrSetAccessToken } from '../utils'
import s from './style.module.css' import s from './style.module.css'
import RunBatch from './run-batch' import RunBatch from './run-batch'
import ResDownload from './run-batch/res-download'
import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints' import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'
import RunOnce from '@/app/components/share/text-generation/run-once' import RunOnce from '@/app/components/share/text-generation/run-once'
import { fetchSavedMessage as doFetchSavedMessage, fetchAppInfo, fetchAppParams, removeMessage, saveMessage } from '@/service/share' import { fetchSavedMessage as doFetchSavedMessage, fetchAppInfo, fetchAppParams, removeMessage, saveMessage } from '@/service/share'
...@@ -24,7 +25,6 @@ import SavedItems from '@/app/components/app/text-generate/saved-items' ...@@ -24,7 +25,6 @@ import SavedItems from '@/app/components/app/text-generate/saved-items'
import type { InstalledApp } from '@/models/explore' import type { InstalledApp } from '@/models/explore'
import { appDefaultIconBackground } from '@/config' import { appDefaultIconBackground } from '@/config'
import Toast from '@/app/components/base/toast' import Toast from '@/app/components/base/toast'
const PARALLEL_LIMIT = 5 const PARALLEL_LIMIT = 5
enum TaskStatus { enum TaskStatus {
pending = 'pending', pending = 'pending',
...@@ -340,9 +340,13 @@ const TextGeneration: FC<IMainProps> = ({ ...@@ -340,9 +340,13 @@ const TextGeneration: FC<IMainProps> = ({
<div className='text-lg text-gray-800 font-semibold'>{t('share.generation.title')}</div> <div className='text-lg text-gray-800 font-semibold'>{t('share.generation.title')}</div>
</div> </div>
<div className='flex items-center space-x-1'> <div className='flex items-center space-x-1'>
<Button className='h-8' > {(allTaskFinished || true) && (
Download <ResDownload
</Button> isMobile={isMobile}
vars={promptConfig?.prompt_variables || []}
values={[['a', 'b', 'c']]}
/>
)}
{!isPC && ( {!isPC && (
<div <div
className='flex items-center justify-center cursor-pointer' className='flex items-center justify-center cursor-pointer'
......
...@@ -21,6 +21,7 @@ const translation = { ...@@ -21,6 +21,7 @@ const translation = {
copy: 'Copy', copy: 'Copy',
lineBreak: 'Line break', lineBreak: 'Line break',
sure: 'I\'m sure', sure: 'I\'m sure',
download: 'Download',
}, },
placeholder: { placeholder: {
input: 'Please enter', input: 'Please enter',
......
...@@ -21,6 +21,7 @@ const translation = { ...@@ -21,6 +21,7 @@ const translation = {
copy: '复制', copy: '复制',
lineBreak: '换行', lineBreak: '换行',
sure: '我确定', sure: '我确定',
download: '下载',
}, },
placeholder: { placeholder: {
input: '请输入', input: '请输入',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment