diff options
author | Renard | 2019-09-30 22:11:19 -0300 |
---|---|---|
committer | Renard | 2019-09-30 22:11:19 -0300 |
commit | 1f0bf371094010f751f903937a600931ef7ea205 (patch) | |
tree | a8535d7f24e9e569a83e977a9d6bb368803fc1e5 /src/Post.js | |
parent | 00177c2fb08c41aac4ca645c5658f5ad83598d59 (diff) | |
download | bai-client-1f0bf371094010f751f903937a600931ef7ea205.tar.gz bai-client-1f0bf371094010f751f903937a600931ef7ea205.tar.xz bai-client-1f0bf371094010f751f903937a600931ef7ea205.zip |
Añadidos: Settings ✨
Diffstat (limited to 'src/Post.js')
-rw-r--r-- | src/Post.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/Post.js b/src/Post.js index 18d81e0..68ba36e 100644 --- a/src/Post.js +++ b/src/Post.js @@ -91,7 +91,7 @@ class Post extends Component { handleConfirm() { this.setState({ deleteDialog: false }); const { post, currentBoard } = this.props; - let password = localStorage.getItem("password"); + let password = JSON.parse(localStorage.getItem("settings")).postPassword; fetch( `https://bienvenidoainternet.org/cgi/api/delete?dir=${currentBoard.dir}&id=${post.id}&password=${password}` ) @@ -251,12 +251,17 @@ class Post extends Component { isDeleteable = false; } + let settingRenderAvatar = JSON.parse(localStorage.getItem("settings")) + .showAvatars; + return ( <Comment inverted={nightMode}> - <Comment.Avatar - src={`https://bienvenidoainternet.org/static/ico/${rndAvatar}.gif`} - style={{ filter: `hue-rotate(${hue}deg)` }} - /> + {settingRenderAvatar && ( + <Comment.Avatar + src={`https://bienvenidoainternet.org/static/ico/${rndAvatar}.gif`} + style={{ filter: `hue-rotate(${hue}deg)` }} + /> + )} <Comment.Content> <Comment.Author as="a" |