console.log and colors
diff --git a/pages/api/rsmv/complete.js b/pages/api/rsmv/complete.js
index 50e66dc..b9a8919 100644
--- a/pages/api/rsmv/complete.js
+++ b/pages/api/rsmv/complete.js
@@ -2,21 +2,17 @@
const Complete = async (req, res) => {
let code = await Axios.post('http://localhost:3000/api/rsmv/validate', {code:req.body.code});
- console.log("1")
if (code.status != 200) {
return res.send(404);
}
- console.log("2")
if (code.data.user != req.body.uid) return res.send(401)
if (code.data.guild != req.body.gid) return res.send(401)
if (code.data.role != req.body.rid) return res.send(401)
- console.log("3")
let secret = "slwu0rZV5W6WdmGtgI16du8Ar2tQGMr3Q9dE6u3poKiVODNV9SweaA3buawgkTmTuITXDWOUpBcTFA0qWrUvoshi1JB180WOFwA7"
let resp = await Axios.get(
`http://192.168.102.7:10000/role/gid/${req.body.gid}/rid/${req.body.rid}/user/${req.body.uid}/secret/${secret}/code/${req.body.code}`
)
- console.log("4")
return res.send(resp.status);
}
diff --git a/pages/rsmv/index.js b/pages/rsmv/index.js
index b314a34..b05f581 100644
--- a/pages/rsmv/index.js
+++ b/pages/rsmv/index.js
@@ -12,13 +12,16 @@
super(props);
this.v = false;
this.state = {
-
+ captchaComplete: false
}
}
async handleVerificationSuccess(cls, token) {
const chk = await Axios.put('/api/rsmv/verifyTkn', { tkn: token.toString() })
if(chk.data.success == true) {
+ this.setState({
+ captchaComplete: true
+ })
return cls.v = true;
} else {
return;
@@ -68,7 +71,7 @@
sitekey="85074411-fa13-4d9b-b901-53095c6d1fc6"
onVerify={token => this.handleVerificationSuccess(this, token)}
/>
- <button type="button" className={Styles.button} onClick={(success) => this.submitForm(this)}>Proceed</button>
+ <button type="button" className={Styles.button + " " + (this.state.captchaComplete ? Styles.buttonComplete : null)} onClick={(success) => this.submitForm(this)}>Proceed</button>
<p className={Styles.text}>
This is an automatic check performed by RSM.
By clicking Proceed, you will be given the <code>{this.props.role_name}</code> role in <code>{this.props.guild_name}</code>.
diff --git a/styles/rsmv/rsmv.module.css b/styles/rsmv/rsmv.module.css
index ccb5606..0650881 100644
--- a/styles/rsmv/rsmv.module.css
+++ b/styles/rsmv/rsmv.module.css
@@ -20,10 +20,24 @@
.button {
border-radius: 5px;
- background-color: transparent;
+ background-color: var(--card-background-color);
+ color: var(--card-text-color);
border: 3px solid #F27878;
font-size: 20px;
padding-left: 10px;
padding-right: 10px;
margin-top: -40px;
-}
\ No newline at end of file
+ transition: 0.3s;
+}
+
+.buttonComplete {
+ border: 3px solid #65CC76;
+}
+
+.button:active {
+ color: #F27878
+}
+
+.buttonComplete:active {
+ color: #65CC76
+}