File tree Expand file tree Collapse file tree
ui/src/components/editor/panel/Timeline Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,7 +74,11 @@ export const SingleItem = () => (
7474 backgroundColor : 'var(--vscode-sideBar-background)'
7575 } }
7676 >
77- < Timeline items = { [ initialItems [ 0 ] ] } />
77+ < Timeline
78+ items = { [ initialItems [ 0 ] ] }
79+ on_toggle_starred = { ( ) => { } }
80+ on_label_click = { ( id ) => alert ( `Restore checkpoint: ${ id } ` ) }
81+ />
7882 </ div >
7983)
8084
@@ -94,6 +98,8 @@ export const NoDescription = () => (
9498 is_starred : false
9599 }
96100 ] }
101+ on_toggle_starred = { ( ) => { } }
102+ on_label_click = { ( id ) => alert ( `Restore checkpoint: ${ id } ` ) }
97103 />
98104 </ div >
99105)
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ export type TimelineItemProps = {
1717
1818type Props = {
1919 items : TimelineItemProps [ ]
20- on_toggle_starred ? : ( id : string | number ) => void
21- on_label_click ? : ( id : string | number ) => void
20+ on_toggle_starred : ( id : string | number ) => void
21+ on_label_click : ( id : string | number ) => void
2222}
2323
2424export const Timeline : React . FC < Props > = ( {
@@ -61,7 +61,8 @@ export const Timeline: React.FC<Props> = ({
6161 < div className = { styles . item__content } >
6262 < div
6363 className = { styles . item__content__label }
64- onClick = { ( ) => on_label_click ?.( item . id ) }
64+ onClick = { ( ) => on_label_click ( item . id ) }
65+ title = "Restore checkpoint"
6566 >
6667 { item . label }
6768 </ div >
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ export const Home: React.FC<Props> = (props) => {
8585 on_click = { props . on_api_calls_click }
8686 />
8787 </ div >
88- < Separator height = { 12 } />
88+ < Separator height = { 16 } />
8989 < div className = { styles . inner__timeline } >
9090 < Timeline
9191 items = { props . checkpoints . map ( ( c ) => ( {
Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ export const Home: React.FC<Props> = (props) => {
172172
173173 const nav_item_ids = NAV_ITEMS_CONFIG . filter (
174174 ( item ) : item is Extract < NavConfigItem , { type : 'item' } > =>
175- item . type === 'item'
175+ item . type == 'item'
176176 ) . map ( ( item ) => item . id )
177177 const active_nav_item_id =
178178 nav_item_ids . filter ( ( id ) => stuck_sections . has ( id ) ) . pop ( ) || nav_item_ids [ 0 ]
You can’t perform that action at this time.
0 commit comments