fix: audio set progress error
This commit is contained in:
@@ -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}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -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}
|
||||
>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user