1- import { faSpinner } from '@fortawesome/free-solid-svg-icons' ;
1+ import { faDownload , faSpinner } from '@fortawesome/free-solid-svg-icons' ;
22import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' ;
33import { ReactWidget } from '@jupyterlab/apputils' ;
44import { Button , SidePanel , UseSignal } from '@jupyterlab/ui-components' ;
@@ -75,6 +75,12 @@ const LeftSidebarComponent = ({ modelList, modelRegistry }: IModelInfoList) => {
7575 handleCloseAddModelModal ( ) ;
7676 } ;
7777
78+ const handleDownload = ( ) => {
79+ const url =
80+ 'https://raw.githubusercontent.com/QuantStack/jupyterlab-gather/main/resources/ar-cubes/cube1.pdf' ;
81+ window . open ( url , '_blank' , 'noopener,noreferrer' ) ;
82+ } ;
83+
7884 return (
7985 < div className = "jlab-gather-sidebar-container" >
8086 < div className = "jlab-gather-sidebar-description" >
@@ -97,21 +103,15 @@ const LeftSidebarComponent = ({ modelList, modelRegistry }: IModelInfoList) => {
97103 </ div >
98104 < div style = { { display : 'flex' , flexDirection : 'column' } } >
99105 < div className = "jlab-gather-sidebar-buttons" >
100- < Button
101- className = "jlab-gather-sidebar-button"
102- onClick = { ( ) => handleModelSelectClick ( 0 ) }
103- >
106+ < Button onClick = { ( ) => handleModelSelectClick ( 0 ) } >
104107 Set as first model
105108 </ Button >
106- < Button
107- className = "jlab-gather-sidebar-button"
108- onClick = { ( ) => handleModelSelectClick ( 1 ) }
109- >
109+ < Button onClick = { ( ) => handleModelSelectClick ( 1 ) } >
110110 Set as second model
111111 </ Button >
112112 </ div >
113113 < Button
114- className = "jlab-gather-sidebar-load- button"
114+ className = "jlab-gather-sidebar-button"
115115 onClick = { handleOpenAddUrlModal }
116116 disabled = { isDisabled }
117117 >
@@ -123,7 +123,7 @@ const LeftSidebarComponent = ({ modelList, modelRegistry }: IModelInfoList) => {
123123 onClose = { handleCloseAddModelModal }
124124 />
125125 < Button
126- className = "jlab-gather-sidebar-load- button"
126+ className = "jlab-gather-sidebar-button"
127127 onClick = { handleOpenAddFileModal }
128128 disabled = { isDisabled }
129129 >
@@ -135,7 +135,7 @@ const LeftSidebarComponent = ({ modelList, modelRegistry }: IModelInfoList) => {
135135 onClose = { handleCloseAddModelModal }
136136 />
137137 < Button
138- className = "jlab-gather-sidebar-load- button"
138+ className = "jlab-gather-sidebar-button"
139139 onClick = { handleLoadSecondScene }
140140 disabled = { isDisabled }
141141 >
@@ -147,6 +147,16 @@ const LeftSidebarComponent = ({ modelList, modelRegistry }: IModelInfoList) => {
147147 'Load Second Model'
148148 ) }
149149 </ Button >
150+ < Button
151+ className = "jlab-gather-sidebar-button jlab-gather-btn-with-icon"
152+ onClick = { handleDownload }
153+ >
154+ < FontAwesomeIcon
155+ icon = { faDownload }
156+ className = "jlab-gather-icon-small"
157+ />
158+ Download AR Cube
159+ </ Button >
150160 </ div >
151161 </ div >
152162 ) ;
0 commit comments