fix: audio set progress error

This commit is contained in:
jialin
2024-12-03 16:17:54 +08:00
parent 605d6f0f9b
commit 687dabc777
9 changed files with 52 additions and 55 deletions
+26 -25
View File
@@ -13,33 +13,34 @@ interface AlertInfoProps {
const AlertInfo: React.FC<AlertInfoProps> = (props) => {
const { message, type, rows = 1, ellipsis, style } = props;
if (!message) {
return null;
}
return (
<Typography.Paragraph
type={type}
ellipsis={
ellipsis !== undefined
? ellipsis
: {
rows: rows,
tooltip: message
}
}
style={{
textAlign: 'center',
padding: '2px 5px',
borderRadius: 'var(--border-radius-base)',
margin: 0,
backgroundColor: 'var(--ant-color-error-bg)',
...style
}}
>
<WarningOutlined className="m-r-8" />
{message}
</Typography.Paragraph>
<>
{message ? (
<Typography.Paragraph
type={type}
ellipsis={
ellipsis !== undefined
? ellipsis
: {
rows: rows,
tooltip: message
}
}
style={{
textAlign: 'center',
padding: '2px 5px',
borderRadius: 'var(--border-radius-base)',
margin: 0,
backgroundColor: 'var(--ant-color-error-bg)',
...style
}}
>
<WarningOutlined className="m-r-8" />
{message}
</Typography.Paragraph>
) : null}
</>
);
};
+3 -3
View File
@@ -88,11 +88,11 @@ const ListInput: React.FC<ListInputProps> = (props) => {
<div className="flex justify-center">
<Button
ref={buttonRef}
type="text"
variant="filled"
color="default"
block
style={{
marginTop: 16,
backgroundColor: 'var(--ant-color-fill-secondary)'
marginTop: 16
}}
onClick={handleOnAdd}
>
-5
View File
@@ -67,11 +67,6 @@ const useParseAnsi = () => {
const n = parseInt(match[1], 10) || 1;
const m = parseInt(match[2], 10) || 1;
const command = match[3];
console.log('command', {
command,
cursorRow,
n
});
// handle ANSI control characters
switch (command) {
@@ -73,11 +73,6 @@ const parseAnsi = (input: string, setId: () => number) => {
const n = parseInt(match[1], 10) || 1;
const m = parseInt(match[2], 10) || 1;
const command = match[3];
console.log('command', {
command,
cursorRow,
n
});
// handle ANSI control characters
switch (command) {