[iOS] Create public space #143

- Update after design review
This commit is contained in:
Gil Eluard
2021-12-01 23:56:59 +01:00
parent 1217be55ab
commit 4890ce2108
109 changed files with 1122 additions and 529 deletions
@@ -19,5 +19,6 @@ import Foundation
enum SpaceCreationEmailInvitesCoordinatorAction {
case done
case cancel
case back
case inviteByUsername
}
@@ -1,44 +0,0 @@
// File created from SimpleUserProfileExample
// $ createScreen.sh Spaces/SpaceCreation/SpaceCreationEmailInvites SpaceCreationEmailInvites
//
// Copyright 2021 New Vector Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
import Foundation
enum SpaceCreationEmailInvitesPresence {
case online
case idle
case offline
}
extension SpaceCreationEmailInvitesPresence {
var title: String {
switch self {
case .online:
return VectorL10n.roomParticipantsOnline
case .idle:
return VectorL10n.roomParticipantsIdle
case .offline:
return VectorL10n.roomParticipantsOffline
}
}
}
extension SpaceCreationEmailInvitesPresence: CaseIterable { }
extension SpaceCreationEmailInvitesPresence: Identifiable {
var id: Self { self }
}
@@ -20,4 +20,5 @@ import Foundation
enum SpaceCreationEmailInvitesStateAction {
case updateEmailValidity(_ validity: [Bool])
case updateLoading(_ loading: Bool)
}
@@ -20,6 +20,7 @@ import Foundation
enum SpaceCreationEmailInvitesViewAction {
case cancel
case back
case done
case inviteByUsername
}
@@ -20,6 +20,9 @@ import Foundation
enum SpaceCreationEmailInvitesViewModelResult {
case cancel
case back
case done
case needIdentityServiceTerms(_ baseUrl: String?, _ accessToken: String?)
case identityServiceFailure(_ error: Error?)
case inviteByUsername
}
@@ -21,5 +21,6 @@ import Foundation
struct SpaceCreationEmailInvitesViewState: BindableState {
var title: String
var emailAddressesValid: [Bool]
var loading: Bool
var bindings: SpaceCreationEmailInvitesViewModelBindings
}