mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Add a Developer Options button to the AuthenticationStartScreen on Nightly builds. (#5472)
* Add a Developer Options button to the AuthenticationStartScreen on Nightly builds. * Make sure the Developer Options are actually shown in the settings screen on Nightlies.
This commit is contained in:
+16
-2
@@ -123,12 +123,15 @@ struct AuthenticationStartScreen: View {
|
||||
versionText
|
||||
.font(.compound.bodySM)
|
||||
.foregroundColor(.compound.textSecondary)
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.top, 16)
|
||||
.onTapGesture(count: 7) {
|
||||
context.send(viewAction: .reportProblem)
|
||||
}
|
||||
.accessibilityIdentifier(A11yIdentifiers.authenticationStartScreen.appVersion)
|
||||
.overlay(alignment: .trailing) {
|
||||
developerOptionsButton
|
||||
.scaledOffset(x: 32, y: -0.5, relativeTo: .compound.bodySM)
|
||||
}
|
||||
.padding(.top, 16)
|
||||
}
|
||||
.padding(.horizontal, verticalSizeClass == .compact ? 128 : 24)
|
||||
.readableFrame()
|
||||
@@ -140,6 +143,17 @@ struct AuthenticationStartScreen: View {
|
||||
return Text(L10n.screenOnboardingAppVersion(shortVersionString))
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
var developerOptionsButton: some View {
|
||||
if AppSettings.appBuildType != .release, !ProcessInfo.isRunningTests {
|
||||
Button { context.send(viewAction: .developerOptions) } label: {
|
||||
CompoundIcon(\.code)
|
||||
.foregroundStyle(.compound.iconSecondary)
|
||||
}
|
||||
.accessibilityLabel(L10n.commonDeveloperOptions)
|
||||
}
|
||||
}
|
||||
|
||||
@ToolbarContentBuilder
|
||||
var toolbar: some ToolbarContent {
|
||||
ToolbarItem(placement: .primaryAction) {
|
||||
|
||||
Reference in New Issue
Block a user