File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
frontend/src/js/ui/views/generators/generator Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,13 @@ export default function () {
123123 updateRender ( ) . then ( m . redraw ) ;
124124 } ;
125125
126+ let screenshot = ( ) => {
127+ openFolderDialog ( ) . then ( ( folder ) => {
128+ let file = folder + '/' + state . config . seed + '.png' ;
129+ api . screenshot ( state . rendered , folder + '/' + state . config . seed + '.png' ) . then ( ( ) => success ( `Screenshot '${ file } ' created` ) , error ) ;
130+ } ) ;
131+ } ;
132+
126133 let body = ( vnode ) => {
127134 if ( ! state . gen || ! store . data . settings ) {
128135 return < Loading /> ;
@@ -146,9 +153,14 @@ export default function () {
146153 < div className = 'flex-grow-1 mr2' >
147154 < Input value = { state . amount } oninput = { binder . inputNumber ( state , 'amount' ) } />
148155 </ div >
149- < div className = 'w-80 btn btn-success' onclick = { print } >
156+ < div className = 'w-70 btn btn-success mr2 ' onclick = { print } >
150157 < i className = 'ion ion-md-print mr1' /> Print
151158 </ div >
159+ < Tooltip content = 'Screenshot the currently generated template.' >
160+ < div className = 'w-10 btn btn-primary' onclick = { screenshot } >
161+ < i className = 'ion ion-md-camera' />
162+ </ div >
163+ </ Tooltip >
152164 </ div >
153165 </ div >
154166 </ div >
You can’t perform that action at this time.
0 commit comments