mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Create space flow (#4957)
* create space flow implementation # Conflicts: # ElementX/Sources/FlowCoordinators/SpacesTabFlowCoordinator.swift * create space flow fully implemented and working * updated tests and updated the create room camera button UI * updated the avatar button in the create room screen, and added power level overrides for spaces * update power level content overrides to behave just as EW, and removed ask to join when creating a space regardless of the FF * updated UI tests snapshots * invite for a public space should always be forced to 50 * pr suggestions + PL override fix * fix a missed code change
This commit is contained in:
@@ -10,18 +10,17 @@ import SwiftUI
|
||||
|
||||
struct ToolbarButton: View {
|
||||
enum Role {
|
||||
case cancel
|
||||
case done
|
||||
case save
|
||||
static let cancel = Role.cancel(title: L10n.actionCancel)
|
||||
static let done = Role.confirm(title: L10n.actionDone)
|
||||
static let save = Role.confirm(title: L10n.actionSave)
|
||||
|
||||
case cancel(title: String)
|
||||
case confirm(title: String)
|
||||
|
||||
var title: String {
|
||||
switch self {
|
||||
case .cancel:
|
||||
L10n.actionCancel
|
||||
case .done:
|
||||
L10n.actionDone
|
||||
case .save:
|
||||
L10n.actionSave
|
||||
case .cancel(let title), .confirm(let title):
|
||||
title
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +30,7 @@ struct ToolbarButton: View {
|
||||
case .cancel:
|
||||
CompoundIcon(\.close)
|
||||
.foregroundStyle(.compound.iconPrimary)
|
||||
case .done, .save:
|
||||
case .confirm:
|
||||
CompoundIcon(\.check)
|
||||
.foregroundStyle(.compound.iconOnSolidPrimary)
|
||||
}
|
||||
@@ -41,7 +40,7 @@ struct ToolbarButton: View {
|
||||
switch self {
|
||||
case .cancel:
|
||||
.compound.bgCanvasDefault
|
||||
case .done, .save:
|
||||
case .confirm:
|
||||
.compound.bgAccentRest
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user