Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display Single Image for Picture #8

Open
0xLeif opened this issue Oct 10, 2023 · 0 comments
Open

Display Single Image for Picture #8

0xLeif opened this issue Oct 10, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@0xLeif
Copy link
Member

0xLeif commented Oct 10, 2023

Currently Picture only shows text for the initial images. We should display an Image if there is only one image. This will be the default behavior for Picture, there will be ways to customize the single or multiple images. This ticket should only focus on displaying a single image. A simple SwiftUI Image view would be fine.

The code is located in the Picture.swift file:

public var body: some View {
    Group {
        if sources.count == 1 {
            Text("Image") // Single Image
        } else {
            // ... 
        }
    }
    .sheet(isPresented: $isFullscreen) {
        fullscreenView
    }
    .onTapGesture {
        isFullscreen = true
    }
}
@0xLeif 0xLeif added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Oct 10, 2023
@0xLeif 0xLeif mentioned this issue Oct 10, 2023
6 tasks
0xLeif added a commit that referenced this issue Oct 12, 2023
0xLeif added a commit that referenced this issue Oct 17, 2023
* P-12: Create file for #9

* P-12: Create file for #8

* P-12: Add PictureViewModel and ability to customize

* P-12: Fix indentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant