mirror of
https://github.com/Matte23/circolapp.git
synced 2025-12-06 07:29:10 +00:00
Increase button size, use filled icons
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
{
|
{
|
||||||
"colors" : [
|
"colors" : [
|
||||||
{
|
{
|
||||||
|
"color" : {
|
||||||
|
"platform" : "ios",
|
||||||
|
"reference" : "systemIndigoColor"
|
||||||
|
},
|
||||||
"idiom" : "universal"
|
"idiom" : "universal"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -36,12 +36,13 @@ struct AttachmentView: View {
|
|||||||
guard let url = URL(string: attachmentUrl.addingPercentEncoding(withAllowedCharacters: .urlFragmentAllowed)!) else { return }
|
guard let url = URL(string: attachmentUrl.addingPercentEncoding(withAllowedCharacters: .urlFragmentAllowed)!) else { return }
|
||||||
UIApplication.shared.open(url)
|
UIApplication.shared.open(url)
|
||||||
}) {
|
}) {
|
||||||
Image(systemName: "envelope.open")
|
Image(systemName: "envelope.open.fill")
|
||||||
.foregroundColor(.blue)
|
.resizable()
|
||||||
.font(.body)
|
.scaledToFit()
|
||||||
.padding()
|
.frame(width: 20.0, height: 20.0)
|
||||||
|
.padding(8.0)
|
||||||
}
|
}
|
||||||
.buttonStyle(PlainButtonStyle())
|
.buttonStyle(BorderlessButtonStyle())
|
||||||
|
|
||||||
Button(action: {
|
Button(action: {
|
||||||
guard let url = URL(string: attachmentUrl) else { return }
|
guard let url = URL(string: attachmentUrl) else { return }
|
||||||
@@ -65,12 +66,13 @@ struct AttachmentView: View {
|
|||||||
|
|
||||||
downloadTask.resume()
|
downloadTask.resume()
|
||||||
}) {
|
}) {
|
||||||
Image(systemName: "square.and.arrow.down")
|
Image(systemName: "square.and.arrow.down.fill")
|
||||||
.foregroundColor(.blue)
|
.resizable()
|
||||||
.font(.body)
|
.scaledToFit()
|
||||||
.padding()
|
.frame(width: 20.0, height: 20.0)
|
||||||
|
.padding(8.0)
|
||||||
}
|
}
|
||||||
.buttonStyle(PlainButtonStyle())
|
.buttonStyle(BorderlessButtonStyle())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ struct CircularView: View {
|
|||||||
self.showDetail.toggle()
|
self.showDetail.toggle()
|
||||||
}) {
|
}) {
|
||||||
Image(systemName: "chevron.right.circle")
|
Image(systemName: "chevron.right.circle")
|
||||||
|
.foregroundColor(Color("AccentColor"))
|
||||||
.imageScale(.large)
|
.imageScale(.large)
|
||||||
.rotationEffect(.degrees(showDetail ? 90 : 0))
|
.rotationEffect(.degrees(showDetail ? 90 : 0))
|
||||||
}
|
}
|
||||||
@@ -51,12 +52,15 @@ struct CircularView: View {
|
|||||||
guard let url = URL(string: circular.url.addingPercentEncoding(withAllowedCharacters: .urlFragmentAllowed)!) else { return }
|
guard let url = URL(string: circular.url.addingPercentEncoding(withAllowedCharacters: .urlFragmentAllowed)!) else { return }
|
||||||
UIApplication.shared.open(url)
|
UIApplication.shared.open(url)
|
||||||
}) {
|
}) {
|
||||||
Image(systemName: "envelope.open")
|
Image(systemName: "envelope.open.fill")
|
||||||
.foregroundColor(.blue)
|
.resizable()
|
||||||
.font(.body)
|
.scaledToFit()
|
||||||
.padding()
|
.frame(width: 20.0, height: 20.0)
|
||||||
|
.padding(.leading, 32.0)
|
||||||
}
|
}
|
||||||
.buttonStyle(PlainButtonStyle())
|
.buttonStyle(BorderlessButtonStyle())
|
||||||
|
|
||||||
|
Spacer()
|
||||||
|
|
||||||
Button(action: {
|
Button(action: {
|
||||||
guard let url = URL(string: circular.url) else { return }
|
guard let url = URL(string: circular.url) else { return }
|
||||||
@@ -80,22 +84,26 @@ struct CircularView: View {
|
|||||||
|
|
||||||
downloadTask.resume()
|
downloadTask.resume()
|
||||||
}) {
|
}) {
|
||||||
Image(systemName: "square.and.arrow.down")
|
Image(systemName: "square.and.arrow.down.fill")
|
||||||
.foregroundColor(.blue)
|
.resizable()
|
||||||
.font(.body)
|
.scaledToFit()
|
||||||
.padding()
|
.frame(width: 20.0, height: 20.0)
|
||||||
}
|
}
|
||||||
.buttonStyle(PlainButtonStyle())
|
.buttonStyle(BorderlessButtonStyle())
|
||||||
|
|
||||||
|
Spacer()
|
||||||
|
|
||||||
Button(action: {
|
Button(action: {
|
||||||
iOSRepository.getCircularDao().update(id: circular.id, school: circular.school, favourite: !circular.favourite, reminder: circular.reminder, completionHandler: {_,_ in })
|
iOSRepository.getCircularDao().update(id: circular.id, school: circular.school, favourite: !circular.favourite, reminder: circular.reminder, completionHandler: {_,_ in })
|
||||||
}) {
|
}) {
|
||||||
Image(systemName: circular.favourite ? "bookmark.fill" : "bookmark")
|
Image(systemName: circular.favourite ? "bookmark.fill" : "bookmark")
|
||||||
.foregroundColor(.blue)
|
.resizable()
|
||||||
.font(.body)
|
.scaledToFit()
|
||||||
.padding()
|
.frame(width: 20.0, height: 20.0)
|
||||||
}
|
}
|
||||||
.buttonStyle(PlainButtonStyle())
|
.buttonStyle(BorderlessButtonStyle())
|
||||||
|
|
||||||
|
Spacer()
|
||||||
|
|
||||||
Button(action: {
|
Button(action: {
|
||||||
if circular.reminder {
|
if circular.reminder {
|
||||||
@@ -110,15 +118,18 @@ struct CircularView: View {
|
|||||||
self.creatingReminder = true
|
self.creatingReminder = true
|
||||||
}) {
|
}) {
|
||||||
Image(systemName: circular.reminder ? "alarm.fill" : "alarm")
|
Image(systemName: circular.reminder ? "alarm.fill" : "alarm")
|
||||||
.foregroundColor(.blue)
|
.resizable()
|
||||||
.font(.body)
|
.scaledToFit()
|
||||||
.padding()
|
.frame(width: 20.0, height: 20.0)
|
||||||
|
.padding(.trailing, 32.0)
|
||||||
}
|
}
|
||||||
.buttonStyle(PlainButtonStyle())
|
.buttonStyle(BorderlessButtonStyle())
|
||||||
.sheet(isPresented: self.$creatingReminder) {
|
.sheet(isPresented: self.$creatingReminder) {
|
||||||
NewReminderView(circular: circular)
|
NewReminderView(circular: circular)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.padding(.vertical, 8.0)
|
||||||
|
|
||||||
|
|
||||||
ForEach(0..<circular.attachmentsNames.count, id: \.self) { index in
|
ForEach(0..<circular.attachmentsNames.count, id: \.self) { index in
|
||||||
AttachmentView(attachmentName: circular.attachmentsNames[index] as! String, attachmentUrl: circular.attachmentsUrls[index] as! String)
|
AttachmentView(attachmentName: circular.attachmentsNames[index] as! String, attachmentUrl: circular.attachmentsUrls[index] as! String)
|
||||||
|
|||||||
Reference in New Issue
Block a user