Skip to content

Add public user listing option to networking settings #6672

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
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mateuszdrab
Copy link

Changes
Add public user listing option to networking settings
image

This is to provide web client control of the feature added in jellyfin/jellyfin#13776

@mateuszdrab mateuszdrab requested a review from a team as a code owner March 27, 2025 21:16
@jellyfin-bot
Copy link
Collaborator

jellyfin-bot commented Mar 27, 2025

Cloudflare Pages deployment

Latest commit bd98a82
Status ✅ Deployed!
Preview URL https://56e9e814.jellyfin-web.pages.dev
Type 🔀 Preview

View build logs

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

ESLint doesn't pass. Please fix all ESLint issues.

@viown viown added the backend Requires work on the server to finish label Mar 27, 2025
Comment on lines 149 to 155
if (config.PublicUserListingLocalOnly && config.PublicUserListing) {
page.querySelector('#selectPublicUserListing').value = 'local';
} else if (config.PublicUserListing) {
page.querySelector('#selectPublicUserListing').value = 'always';
} else {
page.querySelector('#selectPublicUserListing').value = 'never';
}
Copy link
Contributor

Choose a reason for hiding this comment

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

For maintainability: fewer places with the identifier.

Suggested change
if (config.PublicUserListingLocalOnly && config.PublicUserListing) {
page.querySelector('#selectPublicUserListing').value = 'local';
} else if (config.PublicUserListing) {
page.querySelector('#selectPublicUserListing').value = 'always';
} else {
page.querySelector('#selectPublicUserListing').value = 'never';
}
const selectPublicUserListing = page.querySelector('#selectPublicUserListing');
if (config.PublicUserListingLocalOnly && config.PublicUserListing) {
selectPublicUserListing.value = 'local';
} else if (config.PublicUserListing) {
selectPublicUserListing.value = 'always';
} else {
selectPublicUserListing.value = 'never';
}

Copy link
Author

Choose a reason for hiding this comment

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

that should be done, thanks for the feedback!

@@ -46,6 +46,8 @@ function onSubmit(e) {
return s.length > 0;
});

const publicUserListing = form.querySelector('#selectPublicUserListing');
Copy link
Contributor

Choose a reason for hiding this comment

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

I think .value was fine.
Otherwise, it would be better to rename publicUserListing to selectPublicUserListing to match the other function. Or vice versa.

Copy link
Author

Choose a reason for hiding this comment

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

Great, renamed the variable and extra spacing added

Copy link

sonarqubecloud bot commented Apr 6, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Requires work on the server to finish
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants