@@ -664,25 +664,26 @@ export default {
664
664
this .autoExport = parsed .autoExport ?? true ;
665
665
}
666
666
},
667
-
668
667
handleExport (task ) {
668
+ const data = {
669
+ ... task,
670
+ developer: ' createskyblue'
671
+ };
672
+ const dataStr = JSON .stringify (data, null , 2 );
673
+ const timestamp = new Date ().toISOString ().replace (/ T/ , ' _' ).replace (/ \. . + / , ' ' ).replace (/ :/ g , ' -' );
674
+ this .downloadFile (dataStr, ` task_${ task .name } _${ timestamp} .json` , ' application/json' );
675
+ },
676
+ handleGlobalExport (format ) {
677
+ if (format === ' json' ) {
669
678
const data = {
670
- ... task,
671
- developer: ' createskyblue'
679
+ tasks: this .tasks ,
680
+ taskDescriptions: this .taskDescriptions ,
681
+ developer: ' createskyblue'
672
682
};
673
683
const dataStr = JSON .stringify (data, null , 2 );
674
- this .downloadFile (dataStr, ` task_${ task .id } .json` , ' application/json' );
675
- },
676
- handleGlobalExport (format ) {
677
- if (format === ' json' ) {
678
- const data = {
679
- tasks: this .tasks ,
680
- taskDescriptions: this .taskDescriptions ,
681
- developer: ' createskyblue'
682
- };
683
- const dataStr = JSON .stringify (data, null , 2 );
684
- this .downloadFile (dataStr, ' all_tasks.json' , ' application/json' );
685
- }
684
+ const timestamp = new Date ().toISOString ().replace (/ T/ , ' _' ).replace (/ \. . + / , ' ' ).replace (/ :/ g , ' -' );
685
+ this .downloadFile (dataStr, ` all_tasks_${ timestamp} .json` , ' application/json' );
686
+ }
686
687
},
687
688
downloadFile (content , filename , type ) {
688
689
const blob = new Blob ([content], { type });
0 commit comments