Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
3d91d032
Commit
3d91d032
authored
Jul 03, 2023
by
StyleZhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix ui
parent
fe0cb6f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
index.tsx
web/app/components/base/voice-input/index.tsx
+4
-3
No files found.
web/app/components/base/voice-input/index.tsx
View file @
3d91d032
...
@@ -55,6 +55,9 @@ const VoiceInput = ({
...
@@ -55,6 +55,9 @@ const VoiceInput = ({
recorder
.
current
.
stop
()
recorder
.
current
.
stop
()
drawRecordId
.
current
&&
cancelAnimationFrame
(
drawRecordId
.
current
)
drawRecordId
.
current
&&
cancelAnimationFrame
(
drawRecordId
.
current
)
drawRecordId
.
current
=
null
drawRecordId
.
current
=
null
const
canvas
=
canvasRef
.
current
!
const
ctx
=
ctxRef
.
current
!
ctx
.
clearRect
(
0
,
0
,
canvas
.
width
,
canvas
.
height
)
// const wavBlob = recorder.current.getWAVBlob()
// const wavBlob = recorder.current.getWAVBlob()
// const wavFile = new File([wavBlob], 'audio.wav', { type: 'audio/wav' })
// const wavFile = new File([wavBlob], 'audio.wav', { type: 'audio/wav' })
// onConverted('')
// onConverted('')
...
@@ -104,9 +107,7 @@ const VoiceInput = ({
...
@@ -104,9 +107,7 @@ const VoiceInput = ({
return
(
return
(
<
div
className=
{
cn
(
s
.
wrapper
,
'absolute inset-0 rounded-xl'
)
}
>
<
div
className=
{
cn
(
s
.
wrapper
,
'absolute inset-0 rounded-xl'
)
}
>
<
div
className=
'absolute inset-[1.5px] flex items-center pl-[14.5px] pr-[6.5px] py-[14px] bg-primary-25 rounded-[10.5px] overflow-hidden'
>
<
div
className=
'absolute inset-[1.5px] flex items-center pl-[14.5px] pr-[6.5px] py-[14px] bg-primary-25 rounded-[10.5px] overflow-hidden'
>
{
<
canvas
id=
'voice-input-record'
className=
'absolute left-0 bottom-0 w-full h-4'
/>
startRecord
&&
<
canvas
id=
'voice-input-record'
className=
'absolute left-0 bottom-0 w-full h-4'
/>
}
{
{
startConvert
&&
<
Loading02
className=
'animate-spin mr-2 w-4 h-4 text-primary-700'
/>
startConvert
&&
<
Loading02
className=
'animate-spin mr-2 w-4 h-4 text-primary-700'
/>
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment