File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -56,8 +56,10 @@ export default function FileMenu() {
56
56
}
57
57
58
58
const downloadActiveNotebook = async ( ) => {
59
+ dispatch ( setNotebookSavingStatus ( "downloading" ) )
59
60
const currentNotebook = { ...notebooks [ activeNotebookName ] }
60
61
await downloadAsNewNotebook ( currentNotebook )
62
+ dispatch ( setNotebookSavingStatus ( "downloaded" ) )
61
63
}
62
64
63
65
Original file line number Diff line number Diff line change 1
1
import { NotebookSaveStatus } from "../../lib/typings/types" ;
2
2
import { Chip } from "@mui/material" ;
3
3
import CheckIcon from '@mui/icons-material/Check' ;
4
+ import { FileDownload } from "@mui/icons-material" ;
4
5
5
6
export default function SaveStatusLabel ( { notebookStatus } : { notebookStatus : NotebookSaveStatus } ) {
6
7
switch ( notebookStatus ) {
@@ -23,6 +24,26 @@ export default function SaveStatusLabel({ notebookStatus }: { notebookStatus: No
23
24
label = { "* Not Saved" }
24
25
color = 'secondary'
25
26
/>
27
+ case "error" :
28
+ return < Chip
29
+ size = 'small'
30
+ label = { "Error" }
31
+ color = 'error'
32
+ />
33
+ case "downloading" :
34
+ return < Chip
35
+ size = 'small'
36
+ label = { "Downloading..." }
37
+ color = 'info'
38
+ icon = { < FileDownload /> }
39
+ />
40
+ case "downloaded" :
41
+ return < Chip
42
+ size = 'small'
43
+ label = { "Downloaded" }
44
+ color = 'success'
45
+ icon = { < CheckIcon /> }
46
+ />
26
47
default :
27
48
return < div > </ div >
28
49
}
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ export type CellLanguages = {
59
59
}
60
60
}
61
61
62
- export type NotebookSaveStatus = "unsaved" | "saving" | "saved" ;
62
+ export type NotebookSaveStatus = "unsaved" | "saving" | "saved" | "error" | "downloading" | "downloaded"
63
63
64
64
export type AppState = {
65
65
interpreterMode : string ;
You can’t perform that action at this time.
0 commit comments