This commit is contained in:
fmodf 2024-07-04 10:21:12 +02:00
parent 29f3507986
commit 6818182f66
22 changed files with 86 additions and 86 deletions

View file

@ -26,7 +26,7 @@ struct AddAccountScreen: View {
public var body: some View { public var body: some View {
ZStack { ZStack {
// background // background
Color.Main.backgroundLight Color.Material.Background.light
.ignoresSafeArea() .ignoresSafeArea()
// content // content
@ -41,11 +41,11 @@ struct AddAccountScreen: View {
VStack(spacing: 10) { VStack(spacing: 10) {
Text(L10n.Login.title) Text(L10n.Login.title)
.font(.head1l) .font(.head1l)
.foregroundColor(.Material.tortoiseDark500) .foregroundColor(.Material.Text.main)
.fixedSize(horizontal: true, vertical: false) .fixedSize(horizontal: true, vertical: false)
Text(L10n.Login.subtitle) Text(L10n.Login.subtitle)
.font(.body2) .font(.body2)
.foregroundColor(.Material.tortoiseDark300) .foregroundColor(.Material.Text.sub)
.multilineTextAlignment(.center) .multilineTextAlignment(.center)
.fixedSize(horizontal: false, vertical: true) .fixedSize(horizontal: false, vertical: true)
} }
@ -88,7 +88,7 @@ struct AddAccountScreen: View {
store.dispatch(.changeFlow(.start)) store.dispatch(.changeFlow(.start))
} label: { } label: {
Text("\(Image(systemName: "chevron.left")) \(L10n.Global.back)") Text("\(Image(systemName: "chevron.left")) \(L10n.Global.back)")
.foregroundColor(.Material.tortoiseDark300) .foregroundColor(.Material.Elements.active)
.font(.body2) .font(.body2)
} }
} }

View file

@ -21,7 +21,7 @@ struct AddContactOrChannelScreen: View {
var body: some View { var body: some View {
ZStack { ZStack {
// Background color // Background color
Color.Main.backgroundLight Color.Material.Background.light
.ignoresSafeArea() .ignoresSafeArea()
// Content // Content
@ -34,7 +34,7 @@ struct AddContactOrChannelScreen: View {
Text(L10n.Contacts.Add.explanation) Text(L10n.Contacts.Add.explanation)
.font(.body3) .font(.body3)
.foregroundColor(.Main.gray) .foregroundColor(.Material.Shape.separator)
.multilineTextAlignment(.center) .multilineTextAlignment(.center)
.padding(.top, 16) .padding(.top, 16)
@ -42,7 +42,7 @@ struct AddContactOrChannelScreen: View {
HStack(spacing: 0) { HStack(spacing: 0) {
Text("Use account:") Text("Use account:")
.font(.body2) .font(.body2)
.foregroundColor(.Main.black) .foregroundColor(.Material.Text.main)
.frame(alignment: .leading) .frame(alignment: .leading)
Spacer() Spacer()
} }
@ -58,7 +58,7 @@ struct AddContactOrChannelScreen: View {
HStack(spacing: 0) { HStack(spacing: 0) {
Text("Contact JID:") Text("Contact JID:")
.font(.body2) .font(.body2)
.foregroundColor(.Main.black) .foregroundColor(.Material.Text.main)
.frame(alignment: .leading) .frame(alignment: .leading)
Spacer() Spacer()
} }
@ -103,7 +103,7 @@ struct AddContactOrChannelScreen: View {
) )
} }
.onChange(of: store.state.rostersState.newAddedRosterJid) { jid in .onChange(of: store.state.rostersState.newAddedRosterJid) { jid in
if let _ = jid, isShowingLoader { if jid != nil, isShowingLoader {
isShowingLoader = false isShowingLoader = false
isPresented = false isPresented = false
} }
@ -139,23 +139,23 @@ private struct AddContactsScreenHeader: View {
var body: some View { var body: some View {
ZStack { ZStack {
// bg // bg
Color.Main.backgroundDark Color.Material.Background.dark
.ignoresSafeArea() .ignoresSafeArea()
// title // title
Text(L10n.Contacts.Add.title) Text(L10n.Contacts.Add.title)
.font(.head2) .font(.head2)
.foregroundColor(Color.Main.black) .foregroundColor(.Material.Text.main)
HStack { HStack {
Image(systemName: "chevron.left") Image(systemName: "chevron.left")
.foregroundColor(Color.Material.greenDark500) .foregroundColor(Color.Material.Elements.active)
.tappablePadding(.symmetric(12)) { .tappablePadding(.symmetric(12)) {
isPresented = false isPresented = false
} }
Spacer() Spacer()
Image(systemName: "plus.viewfinder") Image(systemName: "plus.viewfinder")
.foregroundColor(Color.Material.greenDark500) .foregroundColor(Color.Material.Elements.active)
.tappablePadding(.symmetric(12)) { .tappablePadding(.symmetric(12)) {
print("Scan QR-code") print("Scan QR-code")
} }

View file

@ -6,18 +6,18 @@ struct AttachmentHeader: View {
var body: some View { var body: some View {
ZStack { ZStack {
// bg // bg
Color.Main.backgroundDark Color.Material.Background.dark
.ignoresSafeArea() .ignoresSafeArea()
// title // title
Text(L10n.Attachment.Prompt.main) Text(L10n.Attachment.Prompt.main)
.font(.head2) .font(.head2)
.foregroundColor(Color.Main.black) .foregroundColor(Color.Material.Text.main)
HStack { HStack {
Spacer() Spacer()
Image(systemName: "xmark") Image(systemName: "xmark")
.foregroundColor(Color.Tango.orangeMedium) .foregroundColor(Color.Material.Elements.active)
.tappablePadding(.symmetric(12)) { .tappablePadding(.symmetric(12)) {
store.dispatch(.conversationAction(.showAttachmentPicker(false))) store.dispatch(.conversationAction(.showAttachmentPicker(false)))
} }

View file

@ -37,14 +37,14 @@ struct AttachmentMediaPickerView: View {
} label: { } label: {
ZStack { ZStack {
Rectangle() Rectangle()
.fill(Color.Main.backgroundLight) .fill(Color.Material.Background.light)
.overlay { .overlay {
VStack { VStack {
Image(systemName: "camera") Image(systemName: "camera")
.foregroundColor(.Material.tortoiseLight300) .foregroundColor(.Material.Elements.active)
.font(.system(size: 30)) .font(.system(size: 30))
Text("Allow camera access") Text("Allow camera access")
.foregroundColor(.Main.black) .foregroundColor(.Material.Text.main)
.font(.body3) .font(.body3)
} }
} }
@ -64,14 +64,14 @@ struct AttachmentMediaPickerView: View {
} label: { } label: {
ZStack { ZStack {
Rectangle() Rectangle()
.fill(Color.Main.backgroundLight) .fill(Color.Material.Background.light)
.overlay { .overlay {
VStack { VStack {
Image(systemName: "photo") Image(systemName: "photo")
.foregroundColor(.Material.tortoiseLight300) .foregroundColor(.Material.Elements.active)
.font(.system(size: 30)) .font(.system(size: 30))
Text("Allow gallery access") Text("Allow gallery access")
.foregroundColor(.Main.black) .foregroundColor(.Material.Text.main)
.font(.body3) .font(.body3)
} }
} }
@ -194,7 +194,7 @@ private struct PhotoView: Identifiable, View {
} else { } else {
ZStack { ZStack {
Rectangle() Rectangle()
.fill(Color.Main.backgroundLight) .fill(Color.Material.Background.light)
.overlay { .overlay {
ProgressView() ProgressView()
} }

View file

@ -8,7 +8,7 @@ struct AttachmentPickerScreen: View {
var body: some View { var body: some View {
ZStack { ZStack {
// Background color // Background color
Color.Main.backgroundLight Color.Material.Background.light
.ignoresSafeArea() .ignoresSafeArea()
// Content // Content

View file

@ -15,14 +15,14 @@ struct AttachmentTabBar: View {
Rectangle() Rectangle()
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
.frame(height: 0.2) .frame(height: 0.2)
.foregroundColor(.Main.separator) .foregroundColor(.Material.Shape.separator)
HStack(spacing: 0) { HStack(spacing: 0) {
AttachmentTabBarButton(tab: .media, selected: $selectedTab) AttachmentTabBarButton(tab: .media, selected: $selectedTab)
AttachmentTabBarButton(tab: .files, selected: $selectedTab) AttachmentTabBarButton(tab: .files, selected: $selectedTab)
AttachmentTabBarButton(tab: .location, selected: $selectedTab) AttachmentTabBarButton(tab: .location, selected: $selectedTab)
AttachmentTabBarButton(tab: .contacts, selected: $selectedTab) AttachmentTabBarButton(tab: .contacts, selected: $selectedTab)
} }
.background(Color.Main.backgroundDark) .background(Color.Material.Background.dark)
} }
.frame(height: 50) .frame(height: 50)
} }
@ -36,12 +36,12 @@ private struct AttachmentTabBarButton: View {
ZStack { ZStack {
VStack(spacing: 2) { VStack(spacing: 2) {
buttonImg buttonImg
.foregroundColor(selected == tab ? .Material.greenDark500 : .Main.gray) .foregroundColor(selected == tab ? .Material.Elements.active : .Material.Elements.inactive)
.font(.system(size: 24, weight: .light)) .font(.system(size: 24, weight: .light))
.symbolRenderingMode(.hierarchical) .symbolRenderingMode(.hierarchical)
Text(buttonTitle) Text(buttonTitle)
.font(.sub1) .font(.sub1)
.foregroundColor(selected == tab ? .Main.black : .Main.gray) .foregroundColor(selected == tab ? .Material.Text.main : .Material.Elements.inactive)
} }
Rectangle() Rectangle()
.foregroundColor(.white.opacity(0.01)) .foregroundColor(.white.opacity(0.01))

View file

@ -6,7 +6,7 @@ struct ChatsListScreen: View {
var body: some View { var body: some View {
ZStack { ZStack {
// Background color // Background color
Color.Main.backgroundLight Color.Material.Background.light
.ignoresSafeArea() .ignoresSafeArea()
// Content // Content
@ -22,7 +22,7 @@ struct ChatsListScreen: View {
} }
} }
.listStyle(.plain) .listStyle(.plain)
.background(Color.Main.backgroundLight) .background(Color.Material.Background.light)
} else { } else {
Spacer() Spacer()
} }
@ -38,18 +38,18 @@ private struct ChatsScreenHeader: View {
var body: some View { var body: some View {
ZStack { ZStack {
// bg // bg
Color.Main.backgroundDark Color.Material.Background.dark
.ignoresSafeArea() .ignoresSafeArea()
// title // title
Text(L10n.Chats.title) Text(L10n.Chats.title)
.font(.head2) .font(.head2)
.foregroundColor(Color.Main.black) .foregroundColor(Color.Material.Text.main)
HStack { HStack {
Spacer() Spacer()
Image(systemName: "plus") Image(systemName: "plus")
.foregroundColor(.Material.greenDark500) .foregroundColor(.Material.Elements.active)
.tappablePadding(.symmetric(12)) { .tappablePadding(.symmetric(12)) {
print("Add contact") print("Add contact")
} }
@ -77,7 +77,7 @@ private struct ChatsRow: View {
.font(.body1) .font(.body1)
} }
Text(chat.participant) Text(chat.participant)
.foregroundColor(Color.Main.black) .foregroundColor(Color.Material.Text.main)
.font(.body2) .font(.body2)
Spacer() Spacer()
} }
@ -86,7 +86,7 @@ private struct ChatsRow: View {
Rectangle() Rectangle()
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
.frame(height: 1) .frame(height: 1)
.foregroundColor(.Main.backgroundDark) .foregroundColor(.Material.Background.dark)
} }
.sharedListRow() .sharedListRow()
.onTapGesture { .onTapGesture {

View file

@ -11,7 +11,7 @@ struct ContactsScreen: View {
var body: some View { var body: some View {
ZStack { ZStack {
// Background color // Background color
Color.Main.backgroundLight Color.Material.Background.light
.ignoresSafeArea() .ignoresSafeArea()
// Content // Content
@ -33,7 +33,7 @@ struct ContactsScreen: View {
} }
} }
.listStyle(.plain) .listStyle(.plain)
.background(Color.Main.backgroundLight) .background(Color.Material.Background.light)
} else { } else {
Spacer() Spacer()
} }
@ -62,18 +62,18 @@ private struct ContactsScreenHeader: View {
var body: some View { var body: some View {
ZStack { ZStack {
// bg // bg
Color.Main.backgroundDark Color.Material.Background.dark
.ignoresSafeArea() .ignoresSafeArea()
// title // title
Text(L10n.Contacts.title) Text(L10n.Contacts.title)
.font(.head2) .font(.head2)
.foregroundColor(Color.Main.black) .foregroundColor(Color.Material.Text.main)
HStack { HStack {
Spacer() Spacer()
Image(systemName: "plus") Image(systemName: "plus")
.foregroundColor(Color.Material.greenDark500) .foregroundColor(Color.Material.Elements.active)
.tappablePadding(.symmetric(12)) { .tappablePadding(.symmetric(12)) {
addPanelPresented = true addPanelPresented = true
} }
@ -107,7 +107,7 @@ private struct ContactsScreenRow: View {
.font(.body1) .font(.body1)
} }
Text(roster.contactBareJid) Text(roster.contactBareJid)
.foregroundColor(Color.Main.black) .foregroundColor(Color.Material.Text.main)
.font(.body2) .font(.body2)
Spacer() Spacer()
} }
@ -116,7 +116,7 @@ private struct ContactsScreenRow: View {
Rectangle() Rectangle()
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
.frame(height: 1) .frame(height: 1)
.foregroundColor(.Main.backgroundDark) .foregroundColor(.Material.Background.dark)
} }
.sharedListRow() .sharedListRow()
.onTapGesture { .onTapGesture {

View file

@ -6,7 +6,7 @@ struct ConversationHeader: View {
var body: some View { var body: some View {
ZStack { ZStack {
// bg // bg
Color.Main.backgroundDark Color.Material.Background.dark
.ignoresSafeArea() .ignoresSafeArea()
// title // title
@ -16,11 +16,11 @@ struct ConversationHeader: View {
) ?? L10n.Chat.title ) ?? L10n.Chat.title
Text(name) Text(name)
.font(.head2) .font(.head2)
.foregroundColor(Color.Main.black) .foregroundColor(.Material.Text.main)
HStack { HStack {
Image(systemName: "chevron.left") Image(systemName: "chevron.left")
.foregroundColor(Color.Tango.orangeMedium) .foregroundColor(.Material.Elements.active)
.tappablePadding(.symmetric(12)) { .tappablePadding(.symmetric(12)) {
store.dispatch(.changeFlow(store.state.previousFlow)) store.dispatch(.changeFlow(store.state.previousFlow))
} }

View file

@ -7,7 +7,7 @@ struct ConversationMessageContainer: View {
var body: some View { var body: some View {
Text(message.body ?? "...") Text(message.body ?? "...")
.font(.body2) .font(.body2)
.foregroundColor(Color.Main.black) .foregroundColor(.Material.Text.main)
.multilineTextAlignment(.leading) .multilineTextAlignment(.leading)
.padding(10) .padding(10)
} }
@ -20,16 +20,16 @@ struct MessageAttr: View {
VStack(alignment: .leading, spacing: 0) { VStack(alignment: .leading, spacing: 0) {
Text(message.date, style: .time) Text(message.date, style: .time)
.font(.sub2) .font(.sub2)
.foregroundColor(Color.Main.gray) .foregroundColor(.Material.Shape.separator)
Spacer() Spacer()
if message.sentError { if message.sentError {
Image(systemName: "exclamationmark.circle") Image(systemName: "exclamationmark.circle")
.font(.body3) .font(.body3)
.foregroundColor(Color.Tango.redLight) .foregroundColor(.Rainbow.red500)
} else if message.pending { } else if message.pending {
Image(systemName: "clock") Image(systemName: "clock")
.font(.body3) .font(.body3)
.foregroundColor(Color.Main.gray) .foregroundColor(.Material.Shape.separator)
} }
} }
} }

View file

@ -16,7 +16,7 @@ struct ConversationMessageRow: View {
.padding(.trailing, 4) .padding(.trailing, 4)
} }
ConversationMessageContainer(message: message, isOutgoing: isOutgoing()) ConversationMessageContainer(message: message, isOutgoing: isOutgoing())
.background(isOutgoing() ? Color.Material.greenDark100 : Color.Main.white) .background(isOutgoing() ? Color.Material.Shape.alternate : Color.Material.Shape.white)
.clipShape(ConversationMessageBubble(isOutgoing: isOutgoing())) .clipShape(ConversationMessageBubble(isOutgoing: isOutgoing()))
if !isOutgoing() { if !isOutgoing() {
MessageAttr(message: message) MessageAttr(message: message)

View file

@ -12,7 +12,7 @@ struct ConversationScreen: View {
var body: some View { var body: some View {
ZStack { ZStack {
// Background color // Background color
Color.Main.backgroundLight Color.Material.Background.light
.ignoresSafeArea() .ignoresSafeArea()
// Content // Content
@ -45,7 +45,7 @@ struct ConversationScreen: View {
} }
.rotationEffect(.degrees(180)) .rotationEffect(.degrees(180))
.listStyle(.plain) .listStyle(.plain)
.background(Color.Main.backgroundLight) .background(Color.Material.Background.light)
.scrollDismissesKeyboard(.immediately) .scrollDismissesKeyboard(.immediately)
.scrollIndicators(.hidden) .scrollIndicators(.hidden)
.onChange(of: autoScroll) { new in .onChange(of: autoScroll) { new in
@ -75,12 +75,12 @@ struct ConversationScreen: View {
} label: { } label: {
ZStack { ZStack {
Circle() Circle()
.fill(Color.Main.white) .fill(Color.Material.Shape.white)
Image(systemName: "arrow.down") Image(systemName: "arrow.down")
.foregroundColor(.Tango.blueLight) .foregroundColor(.Material.Elements.active)
} }
.frame(width: 40, height: 40) .frame(width: 40, height: 40)
.shadow(color: .Main.black.opacity(0.2), radius: 4) .shadow(color: .black.opacity(0.2), radius: 4)
.padding(.trailing, 8) .padding(.trailing, 8)
.padding(.bottom, 8) .padding(.bottom, 8)
} }

View file

@ -11,7 +11,7 @@ struct ConversationTextInput: View {
var body: some View { var body: some View {
VStack(spacing: 0) { VStack(spacing: 0) {
Rectangle() Rectangle()
.foregroundColor(.Main.separator) .foregroundColor(.Material.Shape.separator)
.frame(height: 0.5) .frame(height: 0.5)
.padding(.bottom, 8) .padding(.bottom, 8)
if !replyText.isEmpty { if !replyText.isEmpty {
@ -19,14 +19,14 @@ struct ConversationTextInput: View {
HStack(alignment: .top) { HStack(alignment: .top) {
Text(replyText) Text(replyText)
.font(.body3) .font(.body3)
.foregroundColor(Color.Main.black) .foregroundColor(Color.Material.Text.main)
.multilineTextAlignment(.leading) .multilineTextAlignment(.leading)
.lineLimit(3) .lineLimit(3)
.padding(8) .padding(8)
Spacer() Spacer()
Image(systemName: "xmark") Image(systemName: "xmark")
.font(.title2) .font(.title2)
.foregroundColor(.Tango.blueLight) .foregroundColor(.Material.Elements.active)
.padding(.leading, 8) .padding(.leading, 8)
.tappablePadding(.symmetric(8)) { .tappablePadding(.symmetric(8)) {
store.dispatch(.conversationAction(.setReplyText(""))) store.dispatch(.conversationAction(.setReplyText("")))
@ -35,7 +35,7 @@ struct ConversationTextInput: View {
} }
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
.background(RoundedRectangle(cornerRadius: 4) .background(RoundedRectangle(cornerRadius: 4)
.foregroundColor(.Main.backgroundLight) .foregroundColor(.Material.Background.light)
.shadow(radius: 0.5) .shadow(radius: 0.5)
) )
.padding(.bottom, 8) .padding(.bottom, 8)
@ -46,7 +46,7 @@ struct ConversationTextInput: View {
HStack { HStack {
Image(systemName: "paperclip") Image(systemName: "paperclip")
.font(.title2) .font(.title2)
.foregroundColor(.Tango.blueLight) .foregroundColor(.Material.Elements.active)
.padding(.leading, 8) .padding(.leading, 8)
.tappablePadding(.symmetric(8)) { .tappablePadding(.symmetric(8)) {
store.dispatch(.conversationAction(.showAttachmentPicker(true))) store.dispatch(.conversationAction(.showAttachmentPicker(true)))
@ -56,13 +56,13 @@ struct ConversationTextInput: View {
.focused($isFocused) .focused($isFocused)
.padding(.horizontal, 8) .padding(.horizontal, 8)
.padding(.vertical, 4) .padding(.vertical, 4)
.background(Color.Main.white) .background(Color.Material.Shape.white)
.clipShape(RoundedRectangle(cornerRadius: 8)) .clipShape(RoundedRectangle(cornerRadius: 8))
.padding(.vertical, 4) .padding(.vertical, 4)
let img = messageStr.isEmpty ? "paperplane" : "paperplane.fill" let img = messageStr.isEmpty ? "paperplane" : "paperplane.fill"
Image(systemName: img) Image(systemName: img)
.font(.title2) .font(.title2)
.foregroundColor(messageStr.isEmpty ? .Main.separator : .Tango.blueLight) .foregroundColor(messageStr.isEmpty ? .Material.Elements.inactive : .Material.Elements.active)
.padding(.trailing, 8) .padding(.trailing, 8)
.tappablePadding(.symmetric(8)) { .tappablePadding(.symmetric(8)) {
if !messageStr.isEmpty { if !messageStr.isEmpty {
@ -82,7 +82,7 @@ struct ConversationTextInput: View {
} }
} }
.padding(.bottom, 8) .padding(.bottom, 8)
.background(Color.Main.backgroundDark) .background(Color.Material.Background.dark)
.onChange(of: store.state.conversationsState.replyText) { new in .onChange(of: store.state.conversationsState.replyText) { new in
if !new.isEmpty { if !new.isEmpty {
isFocused = true isFocused = true

View file

@ -5,7 +5,7 @@ struct RegistrationScreen: View {
public var body: some View { public var body: some View {
ZStack { ZStack {
Color.Main.backgroundLight Color.Material.Background.light
Button { Button {
// state.flow = .welcome // state.flow = .welcome
} label: { } label: {

View file

@ -4,7 +4,7 @@ struct SettingsScreen: View {
var body: some View { var body: some View {
ZStack { ZStack {
// bg // bg
Color.Main.backgroundLight Color.Material.Background.light
.ignoresSafeArea() .ignoresSafeArea()
// content // content

View file

@ -5,7 +5,7 @@ struct StartScreen: View {
var body: some View { var body: some View {
ZStack { ZStack {
Color.Main.backgroundLight Color.Material.Background.light
Image.logo Image.logo
.resizable() .resizable()
.aspectRatio(contentMode: .fit) .aspectRatio(contentMode: .fit)

View file

@ -6,7 +6,7 @@ struct WelcomeScreen: View {
public var body: some View { public var body: some View {
ZStack { ZStack {
// background // background
Color.Main.backgroundLight Color.Material.Background.light
.ignoresSafeArea() .ignoresSafeArea()
// content // content
@ -21,11 +21,11 @@ struct WelcomeScreen: View {
VStack(spacing: 10) { VStack(spacing: 10) {
Text(L10n.Global.name) Text(L10n.Global.name)
.font(.head1r) .font(.head1r)
.foregroundColor(.Material.tortoiseDark500) .foregroundColor(.Material.Text.main)
.fixedSize(horizontal: true, vertical: false) .fixedSize(horizontal: true, vertical: false)
Text(L10n.Start.subtitle) Text(L10n.Start.subtitle)
.font(.body2) .font(.body2)
.foregroundColor(.Material.tortoiseDark300) .foregroundColor(.Material.Text.sub)
.fixedSize(horizontal: false, vertical: true) .fixedSize(horizontal: false, vertical: true)
.multilineTextAlignment(.center) .multilineTextAlignment(.center)
} }

View file

@ -12,6 +12,6 @@ struct SharedListRow: ViewModifier {
.listRowInsets(.zero) .listRowInsets(.zero)
.listRowSeparator(.hidden) .listRowSeparator(.hidden)
.frame(maxWidth: .infinity, maxHeight: .infinity) .frame(maxWidth: .infinity, maxHeight: .infinity)
.background(Color.Main.backgroundLight) .background(Color.Material.Background.light)
} }
} }

View file

@ -6,13 +6,13 @@ struct SharedTabBar: View {
Rectangle() Rectangle()
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
.frame(height: 0.2) .frame(height: 0.2)
.foregroundColor(.Main.separator) .foregroundColor(.Material.Shape.separator)
HStack(spacing: 0) { HStack(spacing: 0) {
SharedTabBarButton(buttonFlow: .contacts) SharedTabBarButton(buttonFlow: .contacts)
SharedTabBarButton(buttonFlow: .chats) SharedTabBarButton(buttonFlow: .chats)
SharedTabBarButton(buttonFlow: .settings) SharedTabBarButton(buttonFlow: .settings)
} }
.background(Color.Main.backgroundDark) .background(Color.Material.Background.dark)
} }
.frame(height: 50) .frame(height: 50)
} }
@ -27,12 +27,12 @@ private struct SharedTabBarButton: View {
ZStack { ZStack {
VStack(spacing: 2) { VStack(spacing: 2) {
buttonImg buttonImg
.foregroundColor(buttonFlow == store.state.currentFlow ? .Material.greenDark500 : .Main.gray) .foregroundColor(buttonFlow == store.state.currentFlow ? .Material.Elements.active : .Material.Elements.inactive)
.font(.system(size: 24, weight: .light)) .font(.system(size: 24, weight: .light))
.symbolRenderingMode(.hierarchical) .symbolRenderingMode(.hierarchical)
Text(buttonTitle) Text(buttonTitle)
.font(.sub1) .font(.sub1)
.foregroundColor(buttonFlow == store.state.currentFlow ? .Main.black : .Main.gray) .foregroundColor(buttonFlow == store.state.currentFlow ? .Material.Text.main : .Material.Elements.inactive)
} }
Rectangle() Rectangle()
.foregroundColor(.white.opacity(0.01)) .foregroundColor(.white.opacity(0.01))

View file

@ -43,7 +43,7 @@ extension UniversalInputCollection.TextField: View {
.padding(.horizontal, 8) .padding(.horizontal, 8)
.focused(focus, equals: fieldType) .focused(focus, equals: fieldType)
.font(.body2) .font(.body2)
.foregroundColor(.Main.black) .foregroundColor(.Material.Text.main)
.autocorrectionDisabled(true) .autocorrectionDisabled(true)
.autocapitalization(.none) .autocapitalization(.none)
.textContentType(contentType) .textContentType(contentType)
@ -72,7 +72,7 @@ extension UniversalInputCollection.SecureField: View {
.padding(.horizontal, 8) .padding(.horizontal, 8)
.focused(focus, equals: fieldType) .focused(focus, equals: fieldType)
.font(.body2) .font(.body2)
.foregroundColor(.Main.black) .foregroundColor(.Material.Text.main)
.autocorrectionDisabled(true) .autocorrectionDisabled(true)
.autocapitalization(.none) .autocapitalization(.none)
.textContentType(.password) .textContentType(.password)
@ -100,7 +100,7 @@ extension UniversalInputCollection.DropDownMenu: View {
HStack { HStack {
Text(text) Text(text)
.font(.body2) .font(.body2)
.foregroundColor(.Main.black) .foregroundColor(.Material.Text.main)
.padding(.leading, 8) .padding(.leading, 8)
Spacer() Spacer()
} }
@ -154,7 +154,7 @@ private struct UniversalInputModifier<T: Hashable>: ViewModifier {
HStack { HStack {
Text(isActive ? "" : prompt) Text(isActive ? "" : prompt)
.font(.body2) .font(.body2)
.foregroundColor(.Main.gray) .foregroundColor(.Material.Shape.separator)
.padding(8) .padding(8)
Spacer() Spacer()
} }
@ -166,9 +166,9 @@ private struct UniversalInputModifier<T: Hashable>: ViewModifier {
.background { .background {
ZStack { ZStack {
RoundedRectangle(cornerRadius: 4) RoundedRectangle(cornerRadius: 4)
.foregroundColor(.Main.white) .foregroundColor(.Material.Shape.white)
RoundedRectangle(cornerRadius: 4) RoundedRectangle(cornerRadius: 4)
.stroke(Color.Main.gray) .stroke(Color.Material.Shape.separator)
} }
} }
.contentShape(Rectangle()) .contentShape(Rectangle())

View file

@ -16,10 +16,10 @@ struct PrimaryButtonStyle: ButtonStyle {
.font(.head2) .font(.head2)
.padding(ButtonSizes.padding) .padding(ButtonSizes.padding)
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
.foregroundColor(.Main.white) .foregroundColor(.Material.Shape.white)
.background { .background {
RoundedRectangle(cornerRadius: ButtonSizes.cornerRadius) RoundedRectangle(cornerRadius: ButtonSizes.cornerRadius)
.foregroundColor(isEnabled ? .Material.greenDark500 : .Main.separator) .foregroundColor(isEnabled ? .Material.Elements.active : .Material.Shape.separator)
} }
.contentShape(Rectangle()) .contentShape(Rectangle())
.scaleEffect(configuration.isPressed ? ButtonSizes.scaleEffect : 1.0) .scaleEffect(configuration.isPressed ? ButtonSizes.scaleEffect : 1.0)
@ -37,10 +37,10 @@ struct SecondaryButtonStyle: ButtonStyle {
.font(.head2) .font(.head2)
.padding(ButtonSizes.padding) .padding(ButtonSizes.padding)
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
.foregroundColor(isEnabled ? .Material.greenDark500 : .Main.separator) .foregroundColor(isEnabled ? .Material.Elements.active : .Material.Shape.separator)
.background { .background {
RoundedRectangle(cornerRadius: ButtonSizes.cornerRadius) RoundedRectangle(cornerRadius: ButtonSizes.cornerRadius)
.stroke(isEnabled ? Color.Material.greenDark500 : Color.Main.separator) .stroke(isEnabled ? Color.Material.Elements.active : Color.Material.Shape.separator)
} }
.contentShape(Rectangle()) .contentShape(Rectangle())
.scaleEffect(configuration.isPressed ? ButtonSizes.scaleEffect : 1.0) .scaleEffect(configuration.isPressed ? ButtonSizes.scaleEffect : 1.0)

View file

@ -22,13 +22,13 @@ struct LoadingIndicator: ViewModifier {
private var loadingView: some View { private var loadingView: some View {
GeometryReader { proxyReader in GeometryReader { proxyReader in
ZStack { ZStack {
Color.Tango.blueLight.opacity(0.3) Color.Material.Elements.active.opacity(0.3)
.frame(maxWidth: .infinity, maxHeight: .infinity) .frame(maxWidth: .infinity, maxHeight: .infinity)
// loader // loader
ProgressView() ProgressView()
.progressViewStyle( .progressViewStyle(
CircularProgressViewStyle(tint: .Material.greenDark800) CircularProgressViewStyle(tint: .Material.Elements.active)
) )
.position(x: proxyReader.size.width / 2, y: proxyReader.size.height / 2) .position(x: proxyReader.size.width / 2, y: proxyReader.size.height / 2)
.controlSize(.large) .controlSize(.large)