File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 376376 setTimeout (() => copiedId = ' ' , 2000 );
377377 }
378378
379+ function shareConfig(config : Config ) {
380+ const url = ` https://${getInstallUrl (config )} ` ;
381+ const text = ` Set up my entire Mac dev environment in 5 minutes instead of 5 hours with OpenBoot ` ;
382+ const hashtags = ' OpenBoot,macOS,DevTools' ;
383+ const tweetUrl = ` https://twitter.com/intent/tweet?text=${encodeURIComponent (text )}&url=${encodeURIComponent (url )}&hashtags=${encodeURIComponent (hashtags )} ` ;
384+ window .open (tweetUrl , ' _blank' , ' width=550,height=420' );
385+ }
386+
379387 function formatDate(dateStr ? : string ): string {
380388 if (! dateStr ) return ' ' ;
381389 const date = new Date (dateStr + ' Z' );
519527 <div class ="config-actions" onclick ={(e ) => e .stopPropagation ()}>
520528 <Button variant ="secondary" onclick ={() => editConfig (config .slug )}>Edit</Button >
521529 <Button variant ="secondary" onclick ={() => duplicateConfig (config .slug )}>Duplicate</Button >
530+ <Button variant ="secondary" onclick ={() => shareConfig (config )}>Share</Button >
522531 <Button variant ="danger" onclick ={() => deleteConfig (config .slug )}>Delete</Button >
523532 </div >
524533 </div >
You can’t perform that action at this time.
0 commit comments