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

Improve login buttons (README) #166

Open
select opened this issue Feb 18, 2024 · 2 comments
Open

Improve login buttons (README) #166

select opened this issue Feb 18, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@select
Copy link

select commented Feb 18, 2024

Is your feature request related to a problem? Please describe.
The login button design could be a bit nicer.
In addition to that the code that was in the readme did not work for me

Describe the solution you'd like
You can toggle showing the login user/pw form with this code

Disclaimer

<form action="http://localhost:8096/sso/OID/start/keycloak">
  <button class="raised block emby-button button-submit">
    Sign in with SSO
  </button>
</form>
<input type="checkbox" id="show-login-form" /> 
<label for="show-login-form" class="raised block emby-button">Login with username and password</label>

Custom CSS

a.raised.emby-button {
  padding: 0.9em 1em;
  color: inherit !important;
  margin-top: 0.5rem;
}

.disclaimerContainer {
  display: block !important;
  width: auto !important;
  height: auto !important;
}
.manualLoginForm, .btnForgotPassword.btnForgotPassword, 
#show-login-form {
  display: none;
}
.readOnlyContent {
  display: flex;
  flex-direction: column-reverse;
}

.manualLoginForm:has(~ .readOnlyContent input[type=checkbox]:checked),
.btnForgotPassword:has(~ .disclaimerContainer input[type=checkbox]:checked) {
  display: block; 
}
.readOnlyContent:has(> .disclaimerContainer input[type=checkbox]:checked) {
  flex-direction: column;
}
.readOnlyContent input[type=checkbox]:checked ~ label {
  display: none;
}

Please consider that I had to add width and height to actually show the disclaimer

.disclaimerContainer {
  display: block !important;
  width: auto !important;
  height: auto !important;
}
@select select added the enhancement New feature or request label Feb 18, 2024
@9p4 9p4 added the documentation Improvements or additions to documentation label Feb 18, 2024
@9p4
Copy link
Owner

9p4 commented Feb 21, 2024

I think it might be best to move this to a discussion? I may put together a document that details all the different methods of the custom login buttons.

@cybik
Copy link

cybik commented Mar 5, 2024

For the record: I've wasted about an hour debugging this button, only to discover that adding it through the Disclaimer field trips uBlock Origin's "Cosmetic Filtering" detection. Either disabling Cosmetics, or adding your Jellyfin instance as a Trusted Site, is enough to clear this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants