File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -82,10 +82,10 @@ export default class ListMockup extends Component {
82
82
</ h4 >
83
83
: null }
84
84
85
- { name !== 'Default Mockups' ?
85
+ { name !== 'Default Mockups' && items . length > 0 ?
86
86
< 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 >
89
89
: null }
90
90
91
91
< 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)
8
8
const thumbsPath = `${ userDataPath } /templates/thumbs`
9
9
const mockupsPath = `${ userDataPath } /templates/mockups`
10
10
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
+
11
15
function getAllTemplatesFiles ( ) {
12
- if ( ! fs . existsSync ( `${ userDataPath } /templates` ) ) createTemplateDirectory ( )
13
16
return fs
14
17
. readdirSync ( `${ userDataPath } /templates` )
15
18
. filter ( fileName => / \. ( j s o n ) / . test ( fileName ) )
You can’t perform that action at this time.
0 commit comments