-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 1401-hide-wss-in-relay-list
- Loading branch information
Showing
12 changed files
with
318 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
Nos/Assets/Colors.xcassets/button-close-background.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"color" : { | ||
"color-space" : "srgb", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "0x24", | ||
"green" : "0x0E", | ||
"red" : "0x16" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
Nos/Assets/Colors.xcassets/button-close-foreground.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"color" : { | ||
"color-space" : "srgb", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "0xC6", | ||
"green" : "0x81", | ||
"red" : "0x9A" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
Nos/Assets/Colors.xcassets/image-viewer-background.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"color" : { | ||
"color-space" : "srgb", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "0x00", | ||
"green" : "0x00", | ||
"red" : "0x00" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import SDWebImageSwiftUI | ||
import SwiftUI | ||
|
||
/// A viewer for images. Supports full-screen zoom and panning. | ||
struct ImageViewer: View { | ||
/// The URL of the image to display. | ||
let url: URL | ||
|
||
@Environment(\.dismiss) private var dismiss | ||
|
||
var body: some View { | ||
ZStack { | ||
Color.imageViewerBackground | ||
|
||
ZoomableContainer { | ||
WebImage(url: url) | ||
.resizable() | ||
.aspectRatio(contentMode: .fit) | ||
} | ||
|
||
ZStack(alignment: .topLeading) { | ||
Color.clear | ||
|
||
Button { | ||
dismiss() | ||
} label: { | ||
Image(systemName: "xmark") | ||
.symbolVariant(.fill.circle) | ||
.symbolRenderingMode(.palette) | ||
.foregroundStyle(Color.buttonCloseForeground, Color.buttonCloseBackground) | ||
.font(.largeTitle) | ||
} | ||
.padding() | ||
} | ||
} | ||
.ignoresSafeArea() | ||
} | ||
} | ||
|
||
#Preview { | ||
ImageViewer( | ||
url: URL( | ||
string: "https://image.nostr.build/92d0ed5e3c53fa33e379f0982d52058f0dde98f0c287669fd1e7c5b4b86b5dbb.jpg" | ||
)! | ||
) | ||
} | ||
|
||
#Preview { | ||
ImageViewer( | ||
url: URL( | ||
string: "https://images.unsplash.com/photo-1715686529501-e097bd9caea7" | ||
)! | ||
) | ||
} | ||
|
||
#Preview { | ||
ImageViewer( | ||
url: URL( | ||
string: "https://images.unsplash.com/photo-1723160004469-1b34c81272f3" | ||
)! | ||
) | ||
} | ||
|
||
#Preview { | ||
ImageViewer( | ||
url: URL( | ||
string: "https://image.nostr.build/9640e78f03afc4927d80a15fd1c4bd1404dc654a8663efb92cc9ee1b8b0719a3.jpg" | ||
)! | ||
) | ||
} | ||
|
||
#Preview { | ||
ImageViewer( | ||
url: URL( | ||
string: "https://images.unsplash.com/photo-1716783841007-7de314270444" | ||
)! | ||
) | ||
} |
File renamed without changes.
Oops, something went wrong.