File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -327,6 +327,12 @@ <h1 id="website-title">Augmenta Designer (beta)</h1>
327
327
< div id ="share-modal-content " class ="column center-x center-y modal-content ">
328
328
< span id ="close-share-modal " class ="close "> ×</ span >
329
329
< p id ="copy-feedback-text " class ="main-text "> An URL of your scene has been copied to clipboard.</ p >
330
+ < div class ="center-x space-y ">
331
+ < div id ="copy-scene-link " class ="button main-button ">
332
+ < span class ="iconify main-icon " data-icon ="ph:copy "> </ span >
333
+ < p > Copy to clipboard </ p >
334
+ </ div >
335
+ </ div >
330
336
< p class ="main-text "> You can also download a file for your scene below:</ p >
331
337
< div class ="row center-x space-y ">
332
338
< input type ="text " id ="scene-file-name-input " placeholder ="Your file name ">
Original file line number Diff line number Diff line change @@ -42,10 +42,15 @@ class UIManager{
42
42
if ( deleteAllDummiesButton ) deleteAllDummiesButton . addEventListener ( 'click' , ( ) => viewportManager . sceneManager . objects . removeDummies ( ) ) ;
43
43
44
44
sceneManager = viewportManager . sceneManager
45
+ //Share button click
45
46
const copyUrlModal = document . getElementById ( "share-modal" ) ;
46
47
document . getElementById ( 'generate-link' ) . addEventListener ( 'click' , ( ) => {
47
48
copyLink ( sceneManager . objects . generateLink ( ) ) ;
48
49
} ) ;
50
+ //Copy to clipboard click
51
+ document . getElementById ( 'copy-scene-link' ) . addEventListener ( 'click' , ( ) => {
52
+ copyLink ( sceneManager . objects . generateLink ( ) ) ;
53
+ } ) ;
49
54
//CLOSE MODAL CHEN CLICKING THE CROSS
50
55
document . getElementById ( 'close-share-modal' ) . addEventListener ( 'click' , ( ) => copyUrlModal . classList . add ( 'hidden' ) ) ;
51
56
//CLOSE MODAL WHEN CLICKING OUTSIDE
@@ -158,12 +163,12 @@ class UIManager{
158
163
if ( ! file ) {
159
164
return ;
160
165
}
161
- if ( file . type !== 'application/json' )
166
+ console . log ( file ) ;
167
+ if ( file . type !== 'application/json' && file . name . split ( "." ) [ 1 ] != "builder" )
162
168
{
163
169
alert ( `Invalid file. Your file must end with ".json"` ) ;
164
170
return ;
165
171
}
166
- console . log ( file ) ;
167
172
const reader = new FileReader ( ) ;
168
173
reader . onload = function ( e ) {
169
174
const contents = e . target . result ;
You can’t perform that action at this time.
0 commit comments