-
-
Notifications
You must be signed in to change notification settings - Fork 281
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 - Active Devices Icons #1275
Conversation
I think the only weird part from this is that other clients are just parsing the DeviceName and ClientName to get the DeviceType and, if needed, browser type. I've recreated this logic in my DeviceType enum but I don't love how complicated it is. I'd much prefer fuzzier match where instead of "Swiftfin iOS, Swiftfin iPadOS, Swiftfin tvOS, Jellyfin iOS..." We could get apple with just "\bi(?:OS|PadOS)\b|\btvOS\b" + "Infuse" to capture all of these. I wasn't sure what the best route was so I went for the static route but I'd love to change this to be less maintenance. |
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.
All SVGs need to be changed to Single Scale
.
Swiftfin/Resources/Assets.xcassets/DeviceIcons/Clients/Device-android.imageset/android.svg
Outdated
Show resolved
Hide resolved
...in/Views/SettingsView/UserDashboardView/ActiveSessionsView/Components/ActiveSessionRow.swift
Outdated
Show resolved
Hide resolved
...in/Views/SettingsView/UserDashboardView/ActiveSessionsView/Components/ActiveSessionRow.swift
Outdated
Show resolved
Hide resolved
...in/Views/SettingsView/UserDashboardView/ActiveSessionsView/Components/ActiveSessionRow.swift
Outdated
Show resolved
Hide resolved
…e the correct format
I did see your comment on the fuzzy matching and that sounds like a good general idea. Since that's just a nice-to-have I would want to keep it simple with natural regex matching, however a consensus wasn't made on its design. https://forums.swift.org/t/se-0357-regex-string-processing-algorithms/57225/2 |
I tried to keep simple. Nothing crazy. I've tested on the following devices with no missed matches:
Let me know if you want to make any changes. My REGEX is functional but I'm not offended at all if there is any critique since I'm sure there are more efficient uses |
My wife was able to help me get this into the same all-white format as the other logos. This should be good to go now: |
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 haven't tested with all of the types but looks good to me. Thank your wife for helping with the webos logo!
This adds client icons when there they are active devices but have no NowPlayingItem. Also maps colors to the client to use as the background for the icons. Lastly, this forces the spacing & poster sizes. This prevents square posters from overflowing into the text when there are no other posters. This also makes sure the spacing between rows doesn't get weird when a square poster is present and all of the other posters shift up. See screenshots for details:
New Icon Examples
Spacing Changes
Force Albums into Size