slight design changes and finally added an app icon woo!
This commit is contained in:
parent
47bc5d1b47
commit
6ec348841c
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"images" : [
|
"images" : [
|
||||||
{
|
{
|
||||||
|
"filename" : "icon_dark2.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"platform" : "ios",
|
"platform" : "ios",
|
||||||
"size" : "1024x1024"
|
"size" : "1024x1024"
|
||||||
|
BIN
JustScanIt/Assets.xcassets/AppIcon.appiconset/icon_dark2.png
Normal file
BIN
JustScanIt/Assets.xcassets/AppIcon.appiconset/icon_dark2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 118 KiB |
@ -19,6 +19,9 @@ struct ScanItemView: View {
|
|||||||
|
|
||||||
private let translucentColour = Color(red: 0.6, green: 0.8, blue: 1, opacity: 0.4)
|
private let translucentColour = Color(red: 0.6, green: 0.8, blue: 1, opacity: 0.4)
|
||||||
|
|
||||||
|
private let bgBottomColour = Color(red: 33/255, green: 90/255, blue: 1, opacity: 1)
|
||||||
|
private let bgTopColour = Color(red: 0/255, green: 130/255, blue: 1, opacity: 1)
|
||||||
|
|
||||||
init(_ scan: Scan) {
|
init(_ scan: Scan) {
|
||||||
self.scan = scan
|
self.scan = scan
|
||||||
self.images = scan.toSwiftUIImages()
|
self.images = scan.toSwiftUIImages()
|
||||||
@ -53,27 +56,31 @@ struct ScanItemView: View {
|
|||||||
.foregroundStyle(.white)
|
.foregroundStyle(.white)
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
Button { scan.copyImages() } label: {
|
HStack {
|
||||||
Image(systemName: "doc.on.doc.fill").tint(.white)
|
Button { scan.copyImages() } label: {
|
||||||
.padding(8)
|
Image(systemName: "doc.on.doc.fill").tint(.white)
|
||||||
.background(translucentColour)
|
.padding(8)
|
||||||
.clipShape(Circle())
|
.background(translucentColour)
|
||||||
}
|
.clipShape(Circle())
|
||||||
|
}
|
||||||
|
|
||||||
ShareLink(items: self.images, preview: { _ in SharePreview("Scan", image: self.images.first!)} ) {
|
ShareLink(items: self.images, preview: { _ in SharePreview("Scan", image: self.images.first!)} ) {
|
||||||
Image(systemName: "square.and.arrow.up").tint(.white)
|
Image(systemName: "square.and.arrow.up").tint(.white)
|
||||||
.padding(8)
|
.padding(8)
|
||||||
.background(translucentColour)
|
.background(translucentColour)
|
||||||
.offset(y: -2)
|
.offset(y: -2)
|
||||||
.clipShape(Circle())
|
.clipShape(Circle())
|
||||||
}
|
}
|
||||||
|
|
||||||
Button { delete() } label: {
|
Button { delete() } label: {
|
||||||
Image(systemName: "xmark").bold().tint(.red)
|
Image(systemName: "xmark").bold().tint(.red)
|
||||||
.padding(8)
|
.padding(8)
|
||||||
.background(translucentColour)
|
.background(translucentColour)
|
||||||
.clipShape(Circle())
|
.clipShape(Circle())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
.shadow(radius: 6, y: 0)
|
||||||
|
|
||||||
.contextMenu(menuItems: {
|
.contextMenu(menuItems: {
|
||||||
Button("Delete All Scans", role: .destructive) {
|
Button("Delete All Scans", role: .destructive) {
|
||||||
deleteAll()
|
deleteAll()
|
||||||
@ -103,13 +110,14 @@ struct ScanItemView: View {
|
|||||||
|
|
||||||
}
|
}
|
||||||
.padding()
|
.padding()
|
||||||
.background(Color(red: 0.4, green: 0.6, blue: 0.9, opacity: 0.8))
|
// .background(Color(red: 0.4, green: 0.6, blue: 0.9, opacity: 0.8))
|
||||||
|
.background(Gradient(colors: [bgTopColour, bgBottomColour]))
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 35))
|
.clipShape(RoundedRectangle(cornerRadius: 35))
|
||||||
.padding(.horizontal, 12)
|
.padding(.horizontal, 12)
|
||||||
}
|
}
|
||||||
|
|
||||||
func delete() {
|
func delete() {
|
||||||
withAnimation(.easeOut) {
|
withAnimation(.spring) {
|
||||||
ctx.delete(scan)
|
ctx.delete(scan)
|
||||||
try? ctx.save()
|
try? ctx.save()
|
||||||
}
|
}
|
||||||
|
BIN
icon_dark.png
Normal file
BIN
icon_dark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 76 KiB |
BIN
icon_dark2.png
Normal file
BIN
icon_dark2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 118 KiB |
Loading…
x
Reference in New Issue
Block a user