-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[iOS] Implement Timetable essentials UI (#303)
* implement essentials * use common component for section header * add strings * add detail summary component * add detail header component * add detail content component * add timetable item property * call contents from detail screen * use 4 spacing, common protocol * fix parameter name * format --------- Co-authored-by: swimmy-reo <[email protected]> Co-authored-by: Swimmy <[email protected]>
- Loading branch information
1 parent
95c37d6
commit c7bd153
Showing
78 changed files
with
1,366 additions
and
112 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,28 @@ | ||
// Workaround: https://developer.apple.com/forums/thread/664295 | ||
import Foundation | ||
|
||
private class CurrentBundleFinder {} | ||
|
||
public extension Bundle { | ||
static var myModule: Bundle = { | ||
/* The name of your local package, prepended by "LocalPackages_" */ | ||
let bundleName = "Modules_Assets" | ||
let candidates = [ | ||
/* Bundle should be present here when the package is linked into an App. */ | ||
Bundle.main.resourceURL, | ||
/* Bundle should be present here when the package is linked into a framework. */ | ||
Bundle(for: CurrentBundleFinder.self).resourceURL, | ||
/* For command-line tools. */ | ||
Bundle.main.bundleURL, | ||
/* Bundle should be present here when running previews from a different package (this is the path to "…/Debug-iphonesimulator/"). */ | ||
Bundle(for: CurrentBundleFinder.self).resourceURL?.deletingLastPathComponent().deletingLastPathComponent(), | ||
] | ||
for candidate in candidates { | ||
let bundlePath = candidate?.appendingPathComponent(bundleName + ".bundle") | ||
if let bundle = bundlePath.flatMap(Bundle.init(url:)) { | ||
return bundle | ||
} | ||
} | ||
fatalError("unable to find bundle named \(bundleName)") | ||
}() | ||
} |
6 changes: 6 additions & 0 deletions
6
app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/Contents.json
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,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/badge.imageset/Contents.json
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,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "badge.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+2.78 KB
app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/badge.imageset/badge.pdf
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/bookmark.imageset/Contents.json
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,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "bookmark.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+1013 Bytes
app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/bookmark.imageset/bookmark.pdf
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
...os/Modules/Sources/Assets/Resources/Icons.xcassets/bookmark_border.imageset/Contents.json
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,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "bookmark.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+1.11 KB
...ios/Modules/Sources/Assets/Resources/Icons.xcassets/bookmark_border.imageset/bookmark.pdf
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/droidkaigi.imageset/Contents.json
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,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "leading-icon.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+3.07 KB
app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/droidkaigi.imageset/leading-icon.pdf
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/error.imageset/Contents.json
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,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "error.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+1.2 KB
app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/error.imageset/error.pdf
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/grid_view.imageset/Contents.json
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,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "trailing-icon 3.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+4.81 KB
...os/Modules/Sources/Assets/Resources/Icons.xcassets/grid_view.imageset/trailing-icon 3.pdf
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/info.imageset/Contents.json
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,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "info.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+3.2 KB
app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/info.imageset/info.pdf
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/map.imageset/Contents.json
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,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "map.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+1.71 KB
app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/map.imageset/map.pdf
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/search.imageset/Contents.json
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,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "trailing-icon 1.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+2.75 KB
app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/search.imageset/trailing-icon 1.pdf
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/timetable.imageset/Contents.json
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,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "timetable.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+4.83 KB
app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/timetable.imageset/timetable.pdf
Binary file not shown.
6 changes: 6 additions & 0 deletions
6
app-ios/Modules/Sources/Assets/Resources/Images.xcassets/Contents.json
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,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+25.6 KB
...Modules/Sources/Assets/Resources/Images.xcassets/DroidHotSpring.imageset/02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+85 KB
...ules/Sources/Assets/Resources/Images.xcassets/DroidHotSpring.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+177 KB
...ules/Sources/Assets/Resources/Images.xcassets/DroidHotSpring.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
...os/Modules/Sources/Assets/Resources/Images.xcassets/DroidHotSpring.imageset/Contents.json
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,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "02.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
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,14 @@ | ||
input_dir: Resources/ | ||
output_dir: ${DERIVED_SOURCES_DIR}/ | ||
|
||
xcassets: | ||
inputs: | ||
- Icons.xcassets | ||
- Images.xcassets | ||
outputs: | ||
templateName: swift5 | ||
output: Assets.generated.swift | ||
params: | ||
enumName: Assets | ||
publicAccess: true | ||
bundle: Bundle.myModule |
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,9 @@ | ||
import shared | ||
|
||
public extension Array where Element: NSObject { | ||
static func fromKotlinArray(_ kotlinArray: KotlinArray<Element>) -> Self { | ||
(0..<kotlinArray.size).compactMap { index in | ||
kotlinArray.get(index: index) | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -5,4 +5,3 @@ extension Kotlinx_datetimeInstant { | |
return Date(timeIntervalSince1970: TimeInterval(toEpochMilliseconds())) | ||
} | ||
} | ||
|
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 |
---|---|---|
@@ -1,6 +1,20 @@ | ||
public enum LoadingState<State> { | ||
public enum LoadingState<State: Equatable>: Equatable { | ||
case initial | ||
case loading | ||
case loaded(State) | ||
case failed(Error) | ||
|
||
public static func == (lhs: LoadingState<State>, rhs: LoadingState<State>) -> Bool { | ||
switch (lhs, rhs) { | ||
case (.initial, .initial), | ||
(.loading, .loading): | ||
return true | ||
case (.loaded(let lState), .loaded(let rState)): | ||
return lState == rState | ||
case (.failed(let lError), .failed(let rError)): | ||
return lError.localizedDescription == rError.localizedDescription | ||
default: | ||
return false | ||
} | ||
} | ||
} |
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 @@ | ||
public protocol ViewModelState: Equatable {} |
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.