File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -567,9 +567,18 @@ state.core = (function () {
567567 let m = String ( checkTime ( nowdate . getMinutes ( ) ) )
568568 let s = String ( checkTime ( nowdate . getSeconds ( ) ) )
569569 let time_str = year + month + day + h + m + s
570- state . utils . saveFile ( 'flow-' + time_str , stored_config ) ;
571570
572- } ) . catch ( error => console . error ( '[state]: Error getting JSON file:' , error ) ) ;
571+ filename = 'flow-' + time_str + '.flow'
572+ filename = prompt ( "Export workflow as:" , filename ) ;
573+ if ( ! filename ) return ;
574+ if ( ! filename . toLowerCase ( ) . endsWith ( ".flow" ) ) {
575+ filename += ".flow" ;
576+ }
577+ if ( filename != ".flow" ) {
578+ state . utils . saveFile ( filename , stored_config ) ;
579+ }
580+
581+ } ) . catch ( error => console . error ( '[state]: Error getting Flow file:' , error ) ) ;
573582
574583 //config = JSON.stringify(store.getAll(), null, 4);
575584 //fetch(`/lightdiffusionflow/local/ExportLightDiffusionFlow?config=${config}`)
Original file line number Diff line number Diff line change @@ -550,7 +550,7 @@ state.utils = {
550550 console . log ( url )
551551 const link = document . createElement ( 'a' ) ;
552552 link . href = url ;
553- link . download = fileName + '.flow' ;
553+ link . download = fileName ;
554554 document . body . appendChild ( link ) ;
555555 link . click ( ) ;
556556 link . parentNode . removeChild ( link ) ;
You can’t perform that action at this time.
0 commit comments