-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add module to package * style refactoring
- Loading branch information
Showing
2 changed files
with
49 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,42 +42,55 @@ export default class ClipContainer extends React.Component { | |
checkedClips: update(this.state.checkedClips, {$splice: [[clipIndex, 1]]}) | ||
}); | ||
} | ||
|
||
renderDeleteBar() { | ||
return ( | ||
<div style={{flexBasis: 47, display: 'flex', flexDirection: 'column'}}> | ||
<div style={{flexBasis: 20}}/> | ||
<div style={{display: 'flex', flexBasis: 15}}> | ||
<div style={{flexBasis: 8}}/> | ||
<div style={{flexBasis: 14}}> | ||
<img src={this.state.clips.length === this.state.checkedClips.length ? | ||
'../resources/delete_checked/[email protected]' : | ||
'../resources/delete_unchecked/[email protected]'} | ||
style={{height: 14, width: 14}} | ||
onClick={()=> { | ||
if (this.state.clips.length === this.state.checkedClips.length) { | ||
this.setState({checkedClips: []}); | ||
return; | ||
} | ||
this.setState({checkedClips: this.state.clips.map(clip=>clip.source)}); | ||
}}/> | ||
</div> | ||
<div style={{flexBasis: 25}}/> | ||
<div style={{ | ||
flexBasis: 13, | ||
fontFamiliy: 'AppleSDGothicNeo-Regular', | ||
color: '#9b9b9b', | ||
fontSize: 12 | ||
}}>All | ||
</div> | ||
<div style={{flexGrow: 263}}/> | ||
<div style={{ | ||
flexBasis: 51, | ||
ontFamiliy: 'AppleSDGothicNeo-Regular', | ||
color: this.state.checkedClips.length === 0 ? '#9b9b9b' : '#ff5555', | ||
fontSize: 12 | ||
}} | ||
onClick={()=>this.deleteClips()}>Delete ({this.state.checkedClips.length}) | ||
</div> | ||
</div> | ||
<div style={{flex: 12, flexShrink: 0}}/> | ||
</div> | ||
); | ||
} | ||
// TODO : refactoring component | ||
render() { | ||
return ( | ||
<div style={{display: 'flex', height: 400}}> | ||
<div style={{flexBasis: 14}}/> | ||
<div style={{flexBasis: 372, display: 'flex', flexDirection: 'column'}}> | ||
{this.props.enableDelete && | ||
<div style={{flexBasis: 47, display: 'flex', flexDirection: 'column'}}> | ||
<div style={{flexBasis: 20}}/> | ||
<div style={{display: 'flex', flexBasis: 15}}> | ||
<div style={{flexBasis: 6}}/> | ||
<div style={{flexBasis: 14}}> | ||
<img src={'../resources/delete_unchecked/[email protected]'} | ||
style={{height: 14, width: 14}}/> | ||
</div> | ||
<div style={{flexBasis: 25}}/> | ||
<div style={{ | ||
flexBasis: 13, | ||
fontFamiliy: 'AppleSDGothicNeo-Regular', | ||
color: '#9b9b9b', | ||
fontSize: 12 | ||
}}>All | ||
</div> | ||
<div style={{flexBasis: 263}}/> | ||
<div style={{ | ||
flexBasis: 51, | ||
ontFamiliy: 'AppleSDGothicNeo-Regular', | ||
color: this.state.checkedClips.length === 0 ? '#9b9b9b' : '#ff5555', | ||
fontSize: 12 | ||
}} | ||
onClick={()=>this.deleteClips()}>Delete ({this.state.checkedClips.length}) | ||
</div> | ||
</div> | ||
<div style={{flexBasis: 12}}/> | ||
</div> | ||
} | ||
<div style={{display: 'flex', flex: 1}}> | ||
<div style={{flexBasis: 14, flexShrink: 0}}/> | ||
<div style={{flex: 1, display: 'flex', flexDirection: 'column'}}> | ||
{this.props.enableDelete && this.renderDeleteBar() } | ||
{this.state.clips.map((content, i) => | ||
<Clip | ||
source={content.source} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,14 +8,14 @@ export default class header extends React.Component { | |
return ( | ||
<div style={{display: 'flex', flexDirection: 'column', height: 40, background: '#1c92f0'}}> | ||
<div style={{flexBasis: 12}}/> | ||
<div style={{flexBasis: 16, display: 'flex'}}> | ||
<div style={{display: 'flex'}}> | ||
<div style={{flexBasis: 16}}/> | ||
<div style={{flexBasis: 20}}> | ||
<img src={'../resources/app-icon-retina-white/[email protected]'} | ||
style={{height: 12, width: 12}}/> | ||
</div> | ||
<div style={{flexBasis: 13}}/> | ||
<div style={{flexBasis: 285, color: '#ffffff', fontFamily: 'SanFranciscoText-Regular'}}> | ||
<div style={{flexBasis: 13, flexShrink: 0}}/> | ||
<div style={{flexGrow: 285, color: '#ffffff', fontFamily: 'SanFranciscoText-Regular'}}> | ||
Text Logger | Beta version | ||
</div> | ||
<div style={{flexBasis: 18}}/> | ||
|