Commit eba8aea07b
Unsigned
Layout: unified · split
gitbay/Views/Repos/RepoView.swift +12 −12
| @@ -66,18 +66,6 @@ struct RepoView: View { | |||
| 66 | .listRowInsets(EdgeInsets()) | 66 | .listRowInsets(EdgeInsets()) |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | if let readme = model.readme { | ||
| 70 | Section("README") { | ||
| 71 | ReadmeView( | ||
| 72 | name: model.readmeName ?? "README.md", | ||
| 73 | content: readme, | ||
| 74 | host: host, | ||
| 75 | repoPath: path | ||
| 76 | ) | ||
| 77 | .padding(.vertical, 4) | ||
| 78 | } | ||
| 79 | } | ||
| 80 | |||
| 81 | Section { | 69 | Section { |
| 82 | DisclosureGroup("More", isExpanded: $showingMore) { | 70 | DisclosureGroup("More", isExpanded: $showingMore) { |
| 83 | NavigationLink(value: RepoRoute.log(repo: path, ref: nil, path: nil)) { | 71 | NavigationLink(value: RepoRoute.log(repo: path, ref: nil, path: nil)) { |
| @@ -104,6 +92,18 @@ struct RepoView: View { | |||
| 104 | } | 92 | } |
| 105 | .accessibilityIdentifier("repo-more") | 93 | .accessibilityIdentifier("repo-more") |
| 106 | } | 94 | } |
| 95 | |||
| 96 | if let readme = model.readme { | ||
| 97 | Section("README") { | ||
| 98 | ReadmeView( | ||
| 99 | name: model.readmeName ?? "README.md", | ||
| 100 | content: readme, | ||
| 101 | host: host, | ||
| 102 | repoPath: path | ||
| 103 | ) | ||
| 104 | .padding(.vertical, 4) | ||
| 105 | } | ||
| 106 | } | ||
| 107 | } | 107 | } |
| 108 | } | 108 | } |
| 109 | .overlay { LoadStateOverlay(state: model.state) } | 109 | .overlay { LoadStateOverlay(state: model.state) } |
gitbayUITests/LiveSmokeUITests.swift +1 −1
| @@ -447,7 +447,7 @@ final class LiveSmokeUITests: XCTestCase { | |||
| 447 | app.descendants(matching: .any).matching(identifier: "repo-link-\(id)").firstMatch | 447 | app.descendants(matching: .any).matching(identifier: "repo-link-\(id)").firstMatch |
| 448 | } | 448 | } |
| 449 | 449 | ||
| 450 | /// A link in the repo screen's More section, below the README. | 450 | /// A link in the repo screen's More section, above the README. |
| 451 | /// Expands the section when it is still collapsed. | 451 | /// Expands the section when it is still collapsed. |
| 452 | private func moreLink(_ title: String) -> XCUIElement { | 452 | private func moreLink(_ title: String) -> XCUIElement { |
| 453 | let link = app.staticTexts[title].firstMatch | 453 | let link = app.staticTexts[title].firstMatch |