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

89 lines
1.8 KiB
Swift

//
// CertificatesPillView.swift
// Feather
//
// Created by samara on 16.04.2025.
//
import SwiftUI
public struct NBPillView: View {
public var title: String
public var icon: String
public var color: Color
public var index: Int
public var count: Int
public init(
title: String,
icon: String,
color: Color,
index: Int,
count: Int
) {
self.title = title
self.icon = icon
self.color = color
self.index = index
self.count = count
}
public var body: some View {
let position = PillPosition.position(for: index, in: count)
let radii = position.cornerRadii
HStack(spacing: 4) {
Image(systemName: icon)
.font(.caption)
.foregroundStyle(color.opacity(0.9))
Text(title)
.font(.caption.bold())
}
.frame(maxWidth: .infinity)
.padding(.vertical, 10)
.background(
UnevenRoundedRectangle(
cornerRadii: .init(
topLeading: radii.topLeading,
bottomLeading: radii.bottomLeading,
bottomTrailing: radii.bottomTrailing,
topTrailing: radii.topTrailing
),
style: .continuous
)
.fill(color.opacity(0.15))
)
}
public enum PillPosition {
case single, first, middle, last
static public func position(for index: Int, in count: Int) -> PillPosition {
switch count {
case 1: return .single
case _ where index == 0: return .first
case _ where index == count - 1: return .last
default: return .middle
}
}
public var cornerRadii: (topLeading: CGFloat, bottomLeading: CGFloat, bottomTrailing: CGFloat, topTrailing: CGFloat) {
if #available(iOS 26.0, *) {
return (16, 16, 16, 16)
}
else {
switch self {
case .single:
return (10, 10, 10, 10)
case .first:
return (10, 10, 5, 5)
case .middle:
return (5, 5, 5, 5)
case .last:
return (5, 5, 10, 10)
}
}
}
}
}