Skip to content

Commit

Permalink
feat(clean): lint and improve spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
jamie-brannan committed Oct 25, 2020
1 parent 5b0ea20 commit e0e5752
Showing 1 changed file with 39 additions and 16 deletions.
55 changes: 39 additions & 16 deletions Pipeliner/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,45 @@ struct ContentView: View {
Color(colorScheme == .dark ? windowBackground.dark: windowBackground.light).opacity(0.15).edgesIgnoringSafeArea(/*@START_MENU_TOKEN@*/.all/*@END_MENU_TOKEN@*/)
HStack(content: {
VStack(alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/, content: {
Image(systemName: "gear").font(.system(size: 40)).foregroundColor(colorScheme == .dark ? headerIcon.dark: headerIcon.light).padding(.bottom, 6)
Text("Add Configuration").font(.title2).multilineTextAlignment(.center).foregroundColor(colorScheme == .dark ? headerText.dark: headerText.light)
Image(systemName: "gear")
.font(.system(size: 40))
.foregroundColor(colorScheme == .dark ? headerIcon.dark: headerIcon.light)
.padding(.bottom, 6)
Text("Add Configuration")
.font(.title2)
.multilineTextAlignment(.center)
.foregroundColor(colorScheme == .dark ? headerText.dark: headerText.light)
Divider()
Form {
Section{
Text("Base Url").font(.title3).padding(.horizontal)
TextField("http://gitlab.com",text: $baseUrl).cornerRadius(5).padding(.horizontal)
Text("Project ID").font(.title3).padding(.horizontal)
TextField("1234",text: $projectId).cornerRadius(5).padding(.horizontal)
HStack {
Text("Private Acces Token").font(.title3).cornerRadius(15).padding(.leading)
Link(destination: URL(string: "https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#creating-a-personal-access-token")!) {
Image(systemName: "questionmark.circle").font(.title3).foregroundColor(colorScheme == .dark ? miniIcon.dark: miniIcon.light)
}
Section{
Text("Base Url")
.font(.title3)
.padding(.horizontal)
TextField("http://gitlab.com",text: $baseUrl)
.cornerRadius(5)
.padding(.horizontal)
}.padding(.bottom, 2)
Section{
Text("Project ID")
.font(.title3)
.padding(.horizontal)
TextField("1234",text: $projectId)
.cornerRadius(5)
.padding(.horizontal)
}.padding(.bottom, 2)
HStack {
Text("Private Access Token")
.font(.title3)
.cornerRadius(15)
.padding(.leading)
Link(destination: URL(string: "https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#creating-a-personal-access-token")!) {
Image(systemName: "questionmark.circle").font(.title3).foregroundColor(colorScheme == .dark ? miniIcon.dark: miniIcon.light)
}
}
TextField("your-secret-token",text: $token).cornerRadius(5).padding(.horizontal)
TextField("your-secret-token",text: $token)
.cornerRadius(5)
.padding(.horizontal)
}
}
Button(action: {
Expand All @@ -93,14 +116,14 @@ struct ContentView: View {
.cornerRadius(/*@START_MENU_TOKEN@*/3.0/*@END_MENU_TOKEN@*/)
.padding()
VStack {
Image(systemName: "square.and.arrow.down.on.square").font(.system(size: 40)).foregroundColor(colorScheme == .dark ? headerIcon.dark: headerIcon.light).padding(.bottom, 6)
Image(systemName: "square.and.arrow.down.on.square").font(.system(size: 40)).foregroundColor(colorScheme == .dark ? headerIcon.dark: headerIcon.light).padding(.bottom, 6)
Text("Saved Configuration").font(.title2).multilineTextAlignment(.center).foregroundColor(colorScheme == .dark ? headerText.dark: headerText.light)
Divider()
VStack {
ForEach(configurations, id: \.self){ configuration in
HStack(content: {
VStack(alignment: .leading, content: {
Text(configuration.repositoryName.uppercased())
Text(configuration.repositoryName.uppercased())
Text(configuration.baseUrl).foregroundColor(projectSubtitle)
})
Spacer()
Expand All @@ -116,9 +139,9 @@ struct ContentView: View {
}).foregroundColor(projectTitle.dark).padding(.horizontal).buttonStyle(BorderlessButtonStyle())
}
}.padding(.bottom)
}.padding(.bottom)
}.padding(.top)
Spacer()
}).padding(.bottom)
}).padding()
Divider()
VStack {
Image(systemName: "waveform.path.ecg").font(.system(size: 40)).foregroundColor(colorScheme == .dark ? headerIcon.dark: headerIcon.light).padding(.bottom, 6)
Expand Down

0 comments on commit e0e5752

Please sign in to comment.