-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(interface): add options to minimize overlay in auto-hide setting
- Loading branch information
1 parent
e734d6f
commit ffd3fca
Showing
15 changed files
with
271 additions
and
55 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
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
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
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
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
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 |
---|---|---|
@@ -1,25 +1,26 @@ | ||
import React from "react"; | ||
import $ from "jquery"; | ||
import { connect } from "react-redux"; | ||
import { updateToggle } from "../../../redux/actions"; | ||
|
||
class Toggle extends React.Component { | ||
togglePlaceholders() { | ||
const $container = $(document).find("#container"); | ||
const self = this; | ||
|
||
$(document).find(".placeholder").each(function() { | ||
const hidden = (!$(this).hasClass(self.props.type)); | ||
|
||
$(this).toggleClass("hidden", hidden); | ||
}); | ||
|
||
$container.toggleClass("hidden", true); | ||
} | ||
|
||
render() { | ||
return ( | ||
<div className={"toggle " + this.props.type} onClick={this.togglePlaceholders.bind(this)}></div> | ||
<div | ||
className={"toggle " + this.props.location.replace("_", " ")} | ||
onClick={() => this.props.toggle(this.props.location)}> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default Toggle; | ||
const mapDispatchToProps = dispatch => ({ | ||
toggle(location) { | ||
dispatch(updateToggle({ location, enabled : true })); | ||
}, | ||
}); | ||
|
||
const mapStateToProps = state => ({ | ||
toggles : state.internal.toggles, | ||
}); | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(Toggle); |
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
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
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
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
Oops, something went wrong.