support email

This commit is contained in:
ntr 2019-08-13 14:44:44 +10:00
parent f0166a1779
commit 143b0e92cb
4 changed files with 38 additions and 17 deletions

View File

@ -1,6 +1,15 @@
# WORK WORK
## NOW
*PRODUCTION*
* ACP
* essential
* error log
* account lookup w/ pw reset
* nice to have
* bot game grind
* serde serialize privatise
* stripe prod
* mobile styles

View File

@ -121,7 +121,19 @@ button, input {
a {
color: whitesmoke;
font-size: 150%;
text-decoration: none;
&:hover {
color: whitesmoke;
border-color: @gray-hover;
}
&:focus {
/*colour necesary to bash skellington*/
color: @gray-focus;
border-color: @gray-focus;
}
}
svg {

View File

@ -84,17 +84,17 @@ class AccountStatus extends Component {
<dt>Subscription</dt>
<dd>{account.subscribed ? 'some date' : 'unsubscribed'}</dd>
</dl>
<button><a href={`mailto:support@mnml.gg?subject=Account%20Support:%20${account.name}`}> support</a></button>
<button onClick={() => logout()}>Logout</button>
</div>
<div>
<label for="email">Update Email:</label>
<input
class="login-input"
disabled
type="email"
name="current"
placeholder={account.email || 'no email set'}
/>
<label for="email">Email:</label>
<dl>
<dt>Current Email</dt>
<dd>{account.email ? account.email : 'No email set'}</dd>
<dt>Status</dt>
<dd>{account.email_confirmed ? 'Confirmed' : 'Unconfirmed'}</dd>
</dl>
<input
class="login-input"
type="email"
@ -104,7 +104,7 @@ class AccountStatus extends Component {
<button>Update</button>
</div>
<div>
<label for="current">Change Password:</label>
<label for="current">Password:</label>
<input
class="login-input"
type="password"

View File

@ -72,16 +72,16 @@ struct JsonResponse {
}
impl JsonResponse {
fn success(response: String) -> Self {
JsonResponse { response: Some(response), success: true, error_message: None }
}
fn success(response: String) -> Self {
JsonResponse { response: Some(response), success: true, error_message: None }
}
fn error(msg: String) -> Self {
JsonResponse { response: None, success: false, error_message: Some(msg) }
}
fn error(msg: String) -> Self {
JsonResponse { response: None, success: false, error_message: Some(msg) }
}
}
fn iron_response (status: status::Status, message: String) -> Response {
fn iron_response(status: status::Status, message: String) -> Response {
let content_type = "application/json".parse::<Mime>().unwrap();
let msg = match status {
status::Ok => JsonResponse::success(message),