Skip to content
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

Move login form to a new page #2290

Closed
wants to merge 15 commits into from
Closed

Move login form to a new page #2290

wants to merge 15 commits into from

Conversation

rdwebdesign
Copy link
Member

Please make sure you

  1. Base your code and PRs against the repositories developmental branch.
  2. Sign Off all commits as we enforce the DCO for all contributions

  • What does this PR aim to accomplish?:

This PR creates a new login page, with its own layout.

newloginpage

  • How does this PR accomplish the above?:

Removing the old login page and creating a new one.

  • What documentation changes (if any) are needed to support this PR?:

Maybe a few screenshots.


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code and I have tested my changes.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)

  • I have read the above and my PR is ready for review. Check this box to confirm

Copy link
Member

@yubiuser yubiuser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume scripts/php/loginpage.phpcan go as well?

@rdwebdesign rdwebdesign requested a review from yubiuser August 10, 2022 18:49
login.php Outdated

<div class="card">
<div class="card-body login-card-body">
<p class="login-box-msg">Sign in to start your session</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this text at all? If so, maybe

Suggested change
<p class="login-box-msg">Sign in to start your session</p>
<p class="login-box-msg">Sign in to access Pi-hole's dashboard</p>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a strong opinion about this, but I would follow one of this ideas:

  1. remove the text;
  2. use "Sign in to access the dashboard"
    I don't think we need to use "Pi-hole" again. The name and logo are is already above this line.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I would remove the text. What else should happen after you clicked "log in" on a login page other than being logged in?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree.

scripts/pi-hole/php/header.php Outdated Show resolved Hide resolved
<link rel="stylesheet" href="style/vendor/bootstrap/css/bootstrap.min.css?v=<?php echo $cacheVer; ?>">
<?php if ($auth) { ?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to leave this here or move it to header_authenticated.php? It won't be used on the login page.

Copy link
Member Author

@rdwebdesign rdwebdesign Aug 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.
This file (header.php) is included in both cases.

This if is needed to only use this block when authenticated.

Copy link
Member

@yubiuser yubiuser Aug 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is exactly my point. header.php is used for login.php and header_authenthicated.php. But this part is never used on the login.php because $auth is not set when the login is shown. Therefore it makes sense to me to move it to header_authenticated and remove the if clause.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No.

header_authenticated.php is used ONLY for authenticated pages.
header.php is used in both cases (it is included in header_authenticated.php).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to put all <head> stuff in one place to make it easy to maintain.
I'm also trying to group all <scripts> and all <link> tags together in just one place.

We can remove the ifs and separate these tags in 2 files, but I think its more logical to put them together.

scripts/pi-hole/php/header.php Show resolved Hide resolved
scripts/pi-hole/php/header.php Show resolved Hide resolved
login.php Show resolved Hide resolved
@yubiuser yubiuser mentioned this pull request Aug 12, 2022
1 task
dependabot bot and others added 15 commits August 12, 2022 16:59
Bumps [actions-ecosystem/action-add-labels](https://github.com/actions-ecosystem/action-add-labels) from 1.1.0 to 1.1.3.
- [Release notes](https://github.com/actions-ecosystem/action-add-labels/releases)
- [Commits](actions-ecosystem/action-add-labels@v1.1.0...v1.1.3)

---
updated-dependencies:
- dependency-name: actions-ecosystem/action-add-labels
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Co-authored-by: yubiuser <ckoenig@posteo.de>
Signed-off-by: DL6ER <DL6ER@users.noreply.github.com>
Co-authored-by: yubiuser <ckoenig@posteo.de>
Signed-off-by: DL6ER <DL6ER@users.noreply.github.com>
Signed-off-by: DL6ER <dl6er@dl6er.de>
…xer to Symfony

Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
- Remove unnecessary "Sign in to start" text;
- Adjust LCARS colors: login error message;
- Fix javascript error in `footer.js`.

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
@rdwebdesign
Copy link
Member Author

Superseded by #2294

@rdwebdesign rdwebdesign deleted the newloginpage2 branch August 12, 2022 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants