-
Notifications
You must be signed in to change notification settings - Fork 174
Misc admin QoL #1409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ScuffedNewt
wants to merge
2
commits into
lk-arpg:develop
Choose a base branch
from
ScuffedNewt:feature/email-qol
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Misc admin QoL #1409
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| @extends('layouts.app') | ||
|
|
||
| @section('title') | ||
| Update Email Address | ||
| @endsection | ||
|
|
||
| @section('content') | ||
| <h1>Update Email Address</h1> | ||
| <p class="mb-1"> | ||
| The currently linked email to your account is: | ||
| </p> | ||
| <div class="alert alert-secondary mb-2" role="alert"> | ||
| {{ Auth::user()->email }} | ||
| </div> | ||
| <p> | ||
| If this email address is incorrect, please enter the correct email address below to update it. | ||
| </p> | ||
|
|
||
|
|
||
| {!! Form::open(['url' => 'email/update', 'method' => 'POST']) !!} | ||
|
|
||
| <div class="form-group row"> | ||
| {!! Form::label('email', 'Email Address', ['class' => 'col-md-4 col-form-label text-md-right']) !!} | ||
| <div class="col-md-6"> | ||
| {!! Form::email('email', old('email'), ['class' => 'form-control' . ($errors->has('email') ? ' is-invalid' : ''), 'required']) !!} | ||
| @if ($errors->has('email')) | ||
| <span class="invalid-feedback" role="alert"> | ||
| <strong>{{ $errors->first('email') }}</strong> | ||
| </span> | ||
| @endif | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="form-group row"> | ||
| <div class="col-md-6 offset-md-4"> | ||
| {!! Form::submit('Update Email Address', ['class' => 'btn btn-primary']) !!} | ||
| </div> | ||
| </div> | ||
|
|
||
| {!! Form::close() !!} | ||
| @endsection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,13 @@ | |
|
|
||
| Route::feeds('feeds'); | ||
|
|
||
| // Updating email from verification notice | ||
| Route::middleware('auth')->group(function () { | ||
| Route::get('/email/update', 'HomeController@getEmail'); | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is 100% a nitpick- wondering why there's an empty line in between is all :) |
||
| Route::post('/email/update', 'HomeController@postEmail'); | ||
| }); | ||
|
|
||
| /************************************************************************************************** | ||
| Routes that require login | ||
| **************************************************************************************************/ | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See, I understand why you've done this. But you've put back the query that's going to be everywhere...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you prefer another attribute?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsure what the ideal solution is (brainfog's been bad lately), beyond wanting to avoid a query if possible for performance reasons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a bit redundant and roundabout, but why not add a column 'fauxAdmin' with a bool.. that way you only need to pull that attribute..?
Does mean you'd have to slightly rewrite the rank controller, so that it actually gets set or unset depending on whether the power is there..
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was actually thinking on this morning and I agree that's probably the best approach, even if it's technically data duplication. Alternatively, would always eager loading powers alongside Rank solve the issue? aka setting the $with on the Rank model. To some degree I'm surprised it doesn't do that already
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly? re the latter