Skip to content

Commit

Permalink
File chunk upload
Browse files Browse the repository at this point in the history
  • Loading branch information
moysa committed Jan 31, 2024
1 parent 8592161 commit 7cdbce9
Show file tree
Hide file tree
Showing 8 changed files with 611 additions and 46 deletions.
3 changes: 2 additions & 1 deletion src/components/Buttons/ButtonGhost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ const ButtonGhost: Component<{
children?: JSXElement,
disabled?: boolean,
highlight?: boolean,
class?: string,
}> = (props) => {
return (
<Button.Root
id={props.id}
class={`${styles.ghost} ${props.highlight ? styles.highlight : ''}`}
class={`${styles.ghost} ${props.highlight ? styles.highlight : ''} ${props.class || ''}`}
onClick={props.onClick}
disabled={props.disabled}
>
Expand Down
81 changes: 81 additions & 0 deletions src/components/NewNote/EditBox/EditBox.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,87 @@

}

.uploadProgress {
display: flex;
flex-direction: column;
gap: 2px;
width: 484px;

.progressLabelContainer {
display: flex;
justify-content: space-between;
}
.progressLabel,
.progressValue {
color: var(--text-tertiary-2);
font-size: 14px;
font-weight: 400;
line-height: 14px;
}

.progressTrackContainer {
display: flex;
justify-content: space-between;
align-items: center;

.iconClose {
width: 8px;
height: 8px;
display: inline-block;
margin: 0px 0px;
background-color: var(--text-secondary);
-webkit-mask: url(../../../assets/icons/close.svg) no-repeat center;
mask: url(../../../assets/icons/close.svg) no-repeat center;
}

.iconCheck {
width: 8px;
height: 8px;
display: inline-block;
margin: 0px 0px;
background-color: var(--success-bright);
-webkit-mask: url(../../../assets/icons/check.svg) no-repeat center;
mask: url(../../../assets/icons/check.svg) no-repeat center;
}
}
.progressTrack {
width: 460px;
height: 2px;
background-color: var(--background-input);
border-radius: 1px;
overflow: hidden;
}
.progressFill {
background-color: var(--accent);
height: 2px;
border-radius: 1px;
width: var(--kb-progress-fill-width);
transition: width var(--progress-rate) linear;

// &.huge {
// transition: width 400ms linear;
// }

// &.large {
// transition: width 1500ms linear;
// }

// &.medium {
// transition: width 500ms linear;
// }

// &.small {
// transition: width 250ms linear;
// }


}
.progressFill[data-progress="complete"] {
background-color: var(--success-bright);
}
}


.controls {
position: absolute;
bottom: 4px;
Expand Down
Loading

0 comments on commit 7cdbce9

Please sign in to comment.