Skip to content
This repository has been archived by the owner on May 25, 2019. It is now read-only.

Commit

Permalink
Merge branch 'hotfix-1.1.3' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
sean0x42 committed Oct 27, 2018
2 parents 0d41202 + 985c463 commit 596c100
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 11 deletions.
2 changes: 2 additions & 0 deletions app/assets/stylesheets/components/_flash-messages.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@

h3 {
font-size: $font-size;
font-weight: 500;
letter-spacing: 0;
line-height: $body-line-height;
margin: 0.5rem 0 -0.25rem;
}
Expand Down
8 changes: 5 additions & 3 deletions app/controllers/players/passwords_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# Players password controller
class Players::PasswordsController < Devise::PasswordsController
respond_to :html, :js

# GET /resource/password/new
# def new
# super
Expand Down Expand Up @@ -29,7 +31,7 @@ class Players::PasswordsController < Devise::PasswordsController
# end

# The path used after sending reset password instructions
# def after_sending_reset_password_instructions_path_for(resource_name)
# super(resource_name)
# end
def after_sending_reset_password_instructions_path_for(*)
root_path
end
end
11 changes: 9 additions & 2 deletions app/javascript/packs/components/modals/modal_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ let state = State.NONE;
const queue = [];

/**
* Checks if there is a new modal in the queue to display. If there is, the state is updated appropriately and the new
* modal is displayed.
* Checks if there is a new modal in the queue to display. If there is, the
* state is updated appropriately and the new modal is displayed.
*/
const updateModalQueue = () => {
if (state === State.DISPLAYING_MODAL || queue.length === 0) return;
Expand Down Expand Up @@ -94,6 +94,13 @@ window.constructModal = (title, subheading, html) => {
checkForSelects();
};

/**
* Closes any currently open modal window.
*/
window.closeModal = () => {
closeCurrentModal();
};

// Listen to ajax before event
addEventListener("ajax:before", (event) => {
const { target } = event;
Expand Down
13 changes: 12 additions & 1 deletion app/views/landing/release_notes.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,24 @@
<h1><%= t('landing.release_notes.title') %></h1>

<div class="release-notes">
<!-- 1.1.3 -->
<div class="release">
<h2><span class="version">1.1.3</span>October 27th, 2018</h2>
<ul>
<li>
<div class="change change-fixed">fixed</div>
<p>Fixed an issue preventing players from resetting their passwords <a href="https://github.com/sean0x42/riverrats.com.au/issues/105" class="anchor">#105</a>.</p>
</li>
</ul>
</div>

<!-- 1.1.2 -->
<div class="release">
<h2><span class="version">1.1.2</span>October 26th, 2018</h2>
<ul>
<li>
<div class="change change-fixed">fixed</div>
<p>Fixed a mail misconfiguration</p>
<p>Fixed a mail misconfiguration.</p>
</li>
</ul>
</div>
Expand Down
5 changes: 2 additions & 3 deletions app/views/players/passwords/_new_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<%= form_with model: resource, url: player_password_path, class: 'modal-form' do |form| %>
<%= devise_error_messages! %>

<div class="field">
<%= form.label :email %><br/>
<%= field_errors resource, :email %>
<%= form.email_field :email, autofocus: true, placeholder: '[email protected]' %>
</div>

Expand All @@ -12,4 +11,4 @@
<p><%= link_to 'Sign in', new_player_session_path, class: 'anchor', remote: true, data: { expects_modal: true, disable: true } %>
or <%= link_to 'sign up!', new_player_registration_path, class: 'anchor', remote: true, data: { expects_modal: true, disable: true } %></p>
</div>
<% end -%>
<% end -%>
2 changes: 2 additions & 0 deletions app/views/players/passwords/create.js.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
createFlash("Password reset sent.", "Please check your email.");
closeModal();
2 changes: 1 addition & 1 deletion config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class
# with default "from" parameter.
config.mailer_sender = 'no-reply@riverrats.com.au'
config.mailer_sender = 'riverratspl@gmail.com'

# Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# available at http://guides.rubyonrails.org/i18n.html.

en:
version: "version 1.1.2"
version: "version 1.1.3"
achievement:
wins:
title: "Winner Winner Chicken Dinner %{level}"
Expand Down

0 comments on commit 596c100

Please sign in to comment.