Skip to content
Snippets Groups Projects
Commit 2aa6ed34 authored by cpilaszewicz's avatar cpilaszewicz
Browse files

Small UI imporvements

parent 937cfe2c
Branches
Tags
2 merge requests!58Onboarding screens swift ui merge dev,!56Create badge case screen
......@@ -11,41 +11,39 @@ import SwiftUI
struct BadgeCaseView: View {
init() {
UITableView.appearance().separatorStyle = .none
// UINavigationBar.size
}
let badges: [Badge] = GamificationData.sharedInstance.badges.map { Badge(type: $0.type, description: $0.displayName, imageOn: $0.onName, imageOff: $0.offName) }
var body: some View {
NavigationView {
VStack {
titleBar
Divider()
NavigationView {
Spacer()
List {
ForEach(badges) { badge in
NavigationLink(destination: BadgeProgressView(badge: badge)) {
BadgeItem(badgeType: badge.type, badgeImageSrcOn: badge.imageOn, badgeImageSrcOff: badge.imageOff, badgeTitle: badge.description)
}.buttonStyle(PlainButtonStyle())
}
}
}
}.navigationBarTitle(Text(NSLocalizedString("Gamification.Overview.HeaderTitle", comment:"Badge Case Navigation Title" )), displayMode: .inline).navigationBarItems(leading: titleIcon)
}
}
}
private var titleBar: some View {
private var titleIcon: some View {
HStack{
Image("verschluesseltOn")
.resizable()
.scaledToFit()
.frame(width: 50,height: 50)
.frame(width: 40,height: 40)
.padding(10)
Text(NSLocalizedString("Gamification.Overview.HeaderTitle", comment:"Badge Case Navigation Title" ))
Spacer()
}
}
struct Badge: Identifiable {
var id = UUID()
var type: BadgeType
......
......@@ -23,21 +23,22 @@ struct BadgeProgressView: View {
}
}
}
}
private var titleBar: some View {
HStack{
Image("verschluesseltOn")
Image(badge.imageOn)
.resizable()
.scaledToFit()
.frame(width: 50,height: 50)
.padding(10)
.padding(5)
Text(NSLocalizedString("Gamification.Overview.HeaderTitle", comment:"Badge Case Navigation Title" ))
Text(badge.description)
Spacer()
}
}
}
struct Quest: View {
let isLast: Bool
......
// MARK: - Mocks generated from file: enzevalos_iphone/AuthenticationModel.swift at 2020-03-18 15:11:52 +0000
// MARK: - Mocks generated from file: enzevalos_iphone/AuthenticationModel.swift at 2020-03-24 10:15:44 +0000
//
// AuthenticationModel.swift
......@@ -653,7 +653,7 @@ import Foundation
}
// MARK: - Mocks generated from file: enzevalos_iphone/AuthenticationViewModel.swift at 2020-03-18 15:11:52 +0000
// MARK: - Mocks generated from file: enzevalos_iphone/AuthenticationViewModel.swift at 2020-03-24 10:15:44 +0000
//
// AuthenticationViewModel.swift
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment