-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
[iOS] Admin Dashboard - User Device & TV Access #1342
Conversation
I set up Live TV on Jellyfin only to find that none of the 'Channel' settings are related. I'm not able to find a web equivalent so I think I'm safe to skip those. This is for items like: enabledChannels So, I am treating this PR as wrapping up the User Details 'Access' section. I'm very close to the end for this. I left TODOs for my last items in the Admin Dashboard which are: PR 1
I just need to figure out the PFP caching/refreshing the cache on change PR 2
I am going to make 1 view to be shared between both. Will likely reuse the tag searching from #1336 for the add screen. PR 3
I need the listView and an add screen. Should roughly mirror the EditServerTasksView & AddServerTaskView. PR 4
I already have this done but I don't like how it works. I don't like how it looks on web either but I'm not sure what is a good route to do this cleaner. See below. |
Swiftfin/Views/AdminDashboardView/ServerUserDeviceAccessView/ServerUserDeviceAccessView.swift
Outdated
Show resolved
Hide resolved
Swiftfin/Views/AdminDashboardView/ServerUserDeviceAccessView/ServerUserDeviceAccessView.swift
Outdated
Show resolved
Hide resolved
Swiftfin/Views/AdminDashboardView/ServerUserDetailsView/ServerUserDetailsView.swift
Show resolved
Hide resolved
…irror in ServerUserRow
I've made the changes. The padding was getting weird when I tried using the DevicesView.DeviceRow and, in fixing that, I made the same changes to ServerUsersView.ServerUserRow since I made those at the same time and they mirrored eachother. I had the RowInsets in the row instead of from the view. So, it looked good in a plain list and cramped in a non-plain list. I've moved to just using those from the Views above them so it would be reusable for both Device Access and Device List. Users mirrors that just for parity sake + if we ever need a user row somewhere in the future. Last change I made was I make onDelete optional but I kept the onSelect (mostly because the button still allowed selecting it just didn't do anything). onSelect for ServerUserDeviceAccess also toggles the toggle. |
For consistency's sake, EditItemElementRow needed the same thing... The downside of doing this all in such quick succession is, any weird decision I made for 1 listRow, I made for all of them. Just checked though all the ItemEditing & AdminDashboard and we should be consistent now! |
…is whole folder needs a cleanup which I'll move to another PR.
ugh, one more item. Should we separate out the Checkbox logic? We have 3 locations that use this so it might be nice to centralize this:
I've got a branch with these changes created if we want them but this might be better on another PR. See below:
|
That sounds like a good addition. |
Swiftfin/Views/AdminDashboardView/ServerUserDeviceAccessView/ServerUserDeviceAccessView.swift
Outdated
Show resolved
Hide resolved
Swiftfin/Views/AdminDashboardView/ServerUsersView/Components/ServerUsersRow.swift
Outdated
Show resolved
Hide resolved
Swiftfin/Views/AdminDashboardView/DevicesView/Components/DeviceRow.swift
Outdated
Show resolved
Hide resolved
Swiftfin/Views/AdminDashboardView/ServerUserDeviceAccessView/ServerUserDeviceAccessView.swift
Outdated
Show resolved
Hide resolved
I made the toggle mimic the inset grouped list style like we do for the header, which allows the list to be plain and give more room for the device rows like we have elsewhere. How do you think that looks? |
Oh that looks way better! I was hesitant to try and figure out mixing standard & plain lists but I'm very happy with how that looks! Only change I made was resetting the development team back to None & org.jellyfin.swiftfin Edit: I also got rid of the "Run Time" string in favor of "runtime" since that was there first, I created the Run Time, and I don't personally know why I did it lol. Should resolve that random strings.swift change that shows up in commits moving runtime up and down 3 lines. |
Summary
Adds a new section to the ServerUserDetailsView to limit device access. On web, this is in the Access section. This should roughly mirror our media access section but I've added some additional device details like the latest user on that device, when was it last seen, and the device icon to spruce it up a little.
I also re-odered the ServerUserDetailsView so the Media Access and Device Access options are both just in their own 'Access' section. Permissions are now in the 'Advanced' section where the last two sections will be added as well. So this will be: Permissions, Parental controls, & Live TV.
I've added LiveTV as well. The reason I did this was because it's just 2 toggles. The enabledChannels is NOT LiveTV Channels. So, this is a lot smaller and an easy implementation. This can probably just get rolled up into the Permissions section but it also makes sense for it to be in its own Access section as well 🤷♂️
Screenshots
User Details
Enable All Devices
Enable Individual Devices
Live TV Access