-
-
Notifications
You must be signed in to change notification settings - Fork 291
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[iOS] Admin Dashboard - User Access Schedules (#1358)
* Initial layout. No Add functionality yet. * Cleanup ServerTasks. Get Access Schedules Fixed * duplicate schedule warning, cleanup * localize * cleanup * don't move to Title Case --------- Co-authored-by: Ethan Pippin <[email protected]>
- Loading branch information
Showing
31 changed files
with
781 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// Swiftfin is subject to the terms of the Mozilla Public | ||
// License, v2.0. If a copy of the MPL was not distributed with this | ||
// file, you can obtain one at https://mozilla.org/MPL/2.0/. | ||
// | ||
// Copyright (c) 2024 Jellyfin & Jellyfin Contributors | ||
// | ||
|
||
import Foundation | ||
import JellyfinAPI | ||
|
||
extension DynamicDayOfWeek { | ||
|
||
var displayTitle: String { | ||
switch self { | ||
case .sunday: | ||
DayOfWeek.sunday.displayTitle ?? self.rawValue | ||
case .monday: | ||
DayOfWeek.monday.displayTitle ?? self.rawValue | ||
case .tuesday: | ||
DayOfWeek.tuesday.displayTitle ?? self.rawValue | ||
case .wednesday: | ||
DayOfWeek.wednesday.displayTitle ?? self.rawValue | ||
case .thursday: | ||
DayOfWeek.thursday.displayTitle ?? self.rawValue | ||
case .friday: | ||
DayOfWeek.friday.displayTitle ?? self.rawValue | ||
case .saturday: | ||
DayOfWeek.saturday.displayTitle ?? self.rawValue | ||
case .everyday: | ||
L10n.everyday | ||
case .weekday: | ||
L10n.weekday | ||
case .weekend: | ||
L10n.weekend | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// Swiftfin is subject to the terms of the Mozilla Public | ||
// License, v2.0. If a copy of the MPL was not distributed with this | ||
// file, you can obtain one at https://mozilla.org/MPL/2.0/. | ||
// | ||
// Copyright (c) 2024 Jellyfin & Jellyfin Contributors | ||
// | ||
|
||
import Foundation | ||
|
||
extension Optional where Wrapped: Collection { | ||
|
||
mutating func appendedOrInit(_ element: Wrapped.Element) -> [Wrapped.Element] { | ||
if let self { | ||
return self + [element] | ||
} else { | ||
return [element] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.