Skip to content

Commit

Permalink
Drag and drop a picture here to start.
Browse files Browse the repository at this point in the history
  • Loading branch information
livid committed Jun 24, 2023
1 parent d40a032 commit d15b246
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Planet/versioning.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CURRENT_PROJECT_VERSION = 1418
CURRENT_PROJECT_VERSION = 1419
12 changes: 9 additions & 3 deletions PlanetLite/AppContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,23 @@ struct AppContentView: View {
} else {
switch planetStore.selectedView {
case .myPlanet(let planet):
planetContentGridView(planet)
if planet.articles.count == 0 {
// TODO: Add an illustration here
Text("Drag and drop a picture here to start.")
.foregroundColor(.secondary)
} else {
planetContentGridView(planet)
}
default:
Text("No content ...")
Text("No Content")
.foregroundColor(.secondary)
}
}
}
.onDrop(of: [.image], delegate: dropDelegate)
.padding(0)
.frame(minWidth: PlanetUI.WINDOW_CONTENT_WIDTH_MIN, idealWidth: PlanetUI.WINDOW_CONTENT_WIDTH_MIN, maxWidth: .infinity, minHeight: PlanetUI.WINDOW_CONTENT_HEIGHT_MIN, idealHeight: PlanetUI.WINDOW_CONTENT_HEIGHT_MIN, maxHeight: .infinity, alignment: .center)
.background(Color(NSColor.textBackgroundColor))
.onDrop(of: [.image], delegate: dropDelegate) // TODO: Video and Audio support
}

@ViewBuilder
Expand Down

0 comments on commit d15b246

Please sign in to comment.