File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,10 +82,10 @@ export default class ListMockup extends Component {
8282 </ h4 >
8383 : null }
8484
85- { name !== 'Default Mockups' ?
85+ { name !== 'Default Mockups' && items . length > 0 ?
8686 < a onClick = { this . handleEditMode } className = "f5 link absolute right-0 pr3 dim pointer" style = "color: #A7A7A7; top:15.5px;" >
87- { this . state . edit ? 'cancel editing' : 'edit mode' }
88- </ a >
87+ { this . state . edit ? 'cancel editing' : 'edit mode' }
88+ </ a >
8989 : null }
9090
9191 < ul className = "pa0 ma0 list w-100 cf relative" >
Original file line number Diff line number Diff line change @@ -8,8 +8,11 @@ const userDataPath = (electron.app || electron.remote.app)
88const thumbsPath = `${ userDataPath } /templates/thumbs`
99const mockupsPath = `${ userDataPath } /templates/mockups`
1010
11+ if ( ! fs . existsSync ( `${ userDataPath } /templates` ) ) fs . mkdirSync ( `${ userDataPath } /templates` )
12+ if ( ! fs . existsSync ( `${ mockupsPath } ` ) ) fs . mkdirSync ( mockupsPath )
13+ if ( ! fs . existsSync ( `${ thumbsPath } ` ) ) fs . mkdirSync ( thumbsPath )
14+
1115function getAllTemplatesFiles ( ) {
12- if ( ! fs . existsSync ( `${ userDataPath } /templates` ) ) createTemplateDirectory ( )
1316 return fs
1417 . readdirSync ( `${ userDataPath } /templates` )
1518 . filter ( fileName => / \. ( j s o n ) / . test ( fileName ) )
You can’t perform that action at this time.
0 commit comments