feat(core,app,android,ios): add a first share without a detour or a name to invent

The empty library said to add a link "under Shares, then refresh" with
nothing to press on the phones, and on the desktop only switched page.
All three now open the add form from there, the desktop with the caret
in the link field; and adding already crawls, so there is nothing to
refresh.

A share's name was required before the viewer had seen anything to name.
It is optional now: without one, ShareStore::add_verified takes the
shared folder's own name from the link it has just opened. The link
comes first in each form. The desktop form submits on Enter, and the
Android link field has an eye to check what was pasted.
This commit is contained in:
nvrl committed 2026-10-12 22:37:17 +02:00
1 parent 5807493a4a
commit 603cc0c1a9
14 files changed
+153 -50

No files matched your search

+7 -2
View File
@@ -79,17 +79,22 @@ struct IconButton: View {
struct EmptyState: View {
let title: String
let body_: String
let action: (label: String, run: () -> Void)?
@Environment(\.scheme) private var scheme
init(_ title: String, _ body: String) {
init(_ title: String, _ body: String, action: (label: String, run: () -> Void)? = nil) {
self.title = title
body_ = body
self.action = action
}
var body: some View {
VStack(spacing: 2) {
Text(title).textStyle(.titleMedium).foregroundStyle(scheme.onSurface)
Text(body_).textStyle(.bodyMedium).foregroundStyle(scheme.onSurface)
Text(body_).textStyle(.bodyMedium).foregroundStyle(scheme.onSurfaceVariant)
if let action {
Button(action.label, action: action.run).buttonStyle(.accent).padding(.top, 16)
}
}
.multilineTextAlignment(.center)
.padding(24)