Files
Felitendo 0c38693f05 feat: merge ftstore-manager into the monorepo
the manager lands in manager/, next to ios/ and web/. it is a fork of
this repo's own app, not of feather, so scripts/apply-rebrand.sh
excludes it the same way it excludes web/ — the generic feather-to-
ftstore rule would rewrite its app.ftstore.manager identity and mangle
the lineage notes in its docs.

zsign and idevicekitten were vendored copies in the old repo. they are
registered as submodules here instead, pinned to the same commits ios/
uses and verified byte-identical to what was vendored. that keeps 71 MB
of duplicated source out of the tree and leaves the xcode project's
relative paths intact, so project.pbxproj needed no edits.

the server moves to ftstore.app in both apps: managerrepoclient, the
seeded default source and managerconfig's fallback. downloadmanager
keeps the old admin host in its user-agent allowlist — that check is permissive,
not identifying, and dropping it would stop sending the header to
installs whose stored override still names the old host.

the rest of the admin rename lands too: the client id, the base-url
environment variable, the info.plist key, and user-facing errors. the
userdefaults override key is renamed with a
one-time migration read, so an existing install keeps the address its
owner configured instead of falling back to the default.

tags gain a third namespace: manager-v* for releases, manager-dev for
the rolling prerelease. both repos published to a tag called `dev`
before; sharing it here would make each build overwrite the other's
release assets.
2026-08-03 13:21:48 +02:00

97 lines
2.3 KiB
Swift

//
// SectionProminentHeaderWrapper.swift
// Feather
//
// Created by samara on 11.04.2025.
//
import SwiftUI
public struct NBSection<Content, Footer>: View
where Content: View,
Footer: View
{
private var _headerText: String
private var _headerTextSecondary: String?
private var _systemName: String?
private var _content: Content
private var _footer: Footer
public init(_ headerText: String,
secondary headerTextSecondary: String? = nil,
systemName: String? = nil,
@ViewBuilder content: () -> Content,
@ViewBuilder footer: () -> Footer
) {
self._headerText = headerText
self._headerTextSecondary = headerTextSecondary
self._systemName = systemName
self._content = content()
self._footer = footer()
}
public init(_ headerText: String,
secondary headerTextSecondary: String? = nil,
systemName: String? = nil,
@ViewBuilder content: () -> Content
) where Footer == EmptyView {
self._headerText = headerText
self._headerTextSecondary = headerTextSecondary
self._systemName = systemName
self._content = content()
self._footer = EmptyView()
}
public var body: some View {
Section(
header:
HStack(alignment: .center, spacing: 4) {
if let _systemName {
Image(systemName: _systemName)
.font(.system(size: 12))
.offset(y: -2)
}
Text(_headerText)
.fontWeight(.bold)
.font(.title2)
.foregroundStyle(.primary)
Spacer()
if let _headerTextSecondary {
if #available(iOS 26.0, *) {
Text(_headerTextSecondary)
.font(.caption)
.foregroundStyle(.secondary)
.contentTransition(.numericText())
.padding(.horizontal, 8)
.padding(.vertical, 4.4)
.background(Color(uiColor: .quaternarySystemFill))
.clipShape(Capsule())
.glassEffect()
} else {
Text(_headerTextSecondary)
.font(.caption)
.foregroundStyle(.secondary)
.contentTransition(.numericText())
.padding(.horizontal, 8)
.padding(.vertical, 4.4)
.background(Color(uiColor: .quaternarySystemFill))
.clipShape(Capsule())
}
}
}
.offset(y: 2)
,
footer: _footer
.font(.caption)
.foregroundColor(.secondary)
) {
_content
}
.headerProminence(.increased)
}
}