aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Renard 2019-10-04 15:48:18 -0300
committerLibravatar Renard 2019-10-04 15:48:18 -0300
commit2b10f1dbcb4149c0a42982a025d8c31fd1bc0177 (patch)
tree2916111f69a62dcaa05c83d0b3f306190f4ba6ba
parent109467d1a7c00a904d9baac57fdb03c392ec9a1b (diff)
downloadbai-client-2b10f1dbcb4149c0a42982a025d8c31fd1bc0177.tar.gz
bai-client-2b10f1dbcb4149c0a42982a025d8c31fd1bc0177.tar.xz
bai-client-2b10f1dbcb4149c0a42982a025d8c31fd1bc0177.zip
Setting: Colorear IDS
-rw-r--r--src/App.js3
-rw-r--r--src/Post.js9
-rw-r--r--src/Settings.js16
3 files changed, 21 insertions, 7 deletions
diff --git a/src/App.js b/src/App.js
index 04a2726..4301b5c 100644
--- a/src/App.js
+++ b/src/App.js
@@ -72,7 +72,8 @@ class App extends Component {
autoUpdateThreads: true,
showAvatars: true,
postPassword: this.genPassword(),
- embedYoutube: true
+ embedYoutube: true,
+ colorifyIDs: true
};
if (lsSettings === null) {
localStorage.setItem("settings", JSON.stringify(defaultSettings));
diff --git a/src/Post.js b/src/Post.js
index d18f89c..3d75f36 100644
--- a/src/Post.js
+++ b/src/Post.js
@@ -219,6 +219,7 @@ class Post extends Component {
if (user_id === "CAP_USER*") {
starColor = "blue";
icon = "check circle";
+ user_id = "Usuario verificado";
} else if (isMine) {
starColor = "olive";
} else if (user_id === "???T") {
@@ -273,6 +274,8 @@ class Post extends Component {
.showAvatars;
let settingEmbedYoutube = JSON.parse(localStorage.getItem("settings"))
.embedYoutube;
+ let settingColorifyIDs = JSON.parse(localStorage.getItem("settings"))
+ .colorifyIDs;
return (
<Comment inverted={nightMode}>
@@ -304,10 +307,10 @@ class Post extends Component {
</div>
<div>
<Icon name={icon} color={starColor} />
- {user_id === "CAP_USER*" ? (
- "Usuario verificado"
- ) : (
+ {settingColorifyIDs ? (
<span style={{ color: idColor }}>{user_id}</span>
+ ) : (
+ user_id
)}
{isMine ? " (TĂș)" : null}
</div>
diff --git a/src/Settings.js b/src/Settings.js
index 8d187ae..efc8995 100644
--- a/src/Settings.js
+++ b/src/Settings.js
@@ -35,7 +35,8 @@ class SettingsModal extends Component {
autoUpdateThreads: true,
showAvatars: true,
postPassword: "",
- embedYoutube: true
+ embedYoutube: true,
+ colorifyIDs: true
};
this.handleChange = this.handleChange.bind(this);
this.toggleSetting = this.toggleSetting.bind(this);
@@ -52,7 +53,8 @@ class SettingsModal extends Component {
autoUpdateThreads: settings.autoUpdateThreads,
showAvatars: settings.showAvatars,
postPassword: settings.postPassword,
- embedYoutube: settings.embedYoutube
+ embedYoutube: settings.embedYoutube,
+ colorifyIDs: settings.colorifyIDs
});
}
@@ -88,7 +90,8 @@ class SettingsModal extends Component {
notifyOnThread,
postPassword,
showAvatars,
- embedYoutube
+ embedYoutube,
+ colorifyIDs
} = this.state;
return (
<Modal trigger={this.props.trigger} size="tiny" centered={false}>
@@ -112,6 +115,13 @@ class SettingsModal extends Component {
onChange={this.toggleSetting}
className="settingCheckbox"
/>
+ <Checkbox
+ label="Colorear ID's de Posts"
+ checked={colorifyIDs}
+ name="colorifyIDs"
+ onChange={this.toggleSetting}
+ className="settingCheckbox"
+ />
<Header as="h4" dividing>
Comportamiento
</Header>