-
-
Notifications
You must be signed in to change notification settings - Fork 772
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4446 from wikimedia/talk-page-archives-2
Talk Page Archives - Part 2
- Loading branch information
Showing
28 changed files
with
679 additions
and
131 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
Large diffs are not rendered by default.
Oops, something went wrong.
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 @@ | ||
import Foundation | ||
import SwiftUI | ||
|
||
struct BackgroundHighlightingButtonStyle: ButtonStyle { | ||
|
||
@EnvironmentObject var observableTheme: ObservableTheme | ||
|
||
func makeBody(configuration: SwiftUI.ButtonStyle.Configuration) -> some View { | ||
configuration.label | ||
.background(configuration.isPressed ? Color(observableTheme.theme.colors.midBackground) : Color(observableTheme.theme.colors.paperBackground)) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,31 @@ | ||
import Foundation | ||
import SwiftUI | ||
|
||
struct DisclosureButton<Element: CustomStringConvertible>: View { | ||
|
||
let item: Element | ||
let action: (Element) -> Void | ||
|
||
@EnvironmentObject var observableTheme: ObservableTheme | ||
|
||
var body: some View { | ||
Button(action: { action(item) }) { | ||
VStack(spacing: 0) { | ||
HStack { | ||
Text(item.description) | ||
.foregroundColor(Color(observableTheme.theme.colors.primaryText)) | ||
.font(.callout) | ||
.fontWeight(.semibold) | ||
Spacer(minLength: 12) | ||
Image(systemName: "chevron.right").font(Font.system(.footnote).weight(.semibold)) | ||
.foregroundColor(Color(observableTheme.theme.colors.secondaryText)) | ||
} | ||
.padding(EdgeInsets(top: 12, leading: 16, bottom: 12, trailing: 16)) | ||
Divider() | ||
.frame(height: 1) | ||
.background(Color(observableTheme.theme.colors.midBackground)) | ||
} | ||
} | ||
.buttonStyle(BackgroundHighlightingButtonStyle()) | ||
} | ||
} |
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 @@ | ||
import Foundation | ||
|
||
protocol Loadable { | ||
func startLoading() | ||
func stopLoading() | ||
} |
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
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.