feat(bskyweb): drop logoText + DID, match Pass Designer field structure
This commit is contained in:
@@ -108,10 +108,14 @@ func BuildPassJSON(did, handle, displayName, pdsHost, theme, teamID string, crea
|
|||||||
createdAtISO = createdAt.UTC().Format(time.RFC3339)
|
createdAtISO = createdAt.UTC().Format(time.RFC3339)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// avoid an unused variable when displayName is empty - we keep memberName
|
||||||
|
// computed for a possible future design, but the current layout uses
|
||||||
|
// handle directly.
|
||||||
|
_ = memberName
|
||||||
|
|
||||||
pdsField := passField{Key: "pds", Label: "PDS", Value: pdsHost}
|
pdsField := passField{Key: "pds", Label: "PDS", Value: pdsHost}
|
||||||
nameField := passField{Key: "name", Label: "NAME", Value: memberName}
|
handleField := passField{Key: "handle", Label: "Handle", Value: handle}
|
||||||
didField := passField{Key: "did", Label: "DID", Value: did}
|
sinceField := passField{Key: "since", Label: "Member Since", Value: createdAtISO, DateStyle: "PKDateStyleShort"}
|
||||||
sinceField := passField{Key: "since", Label: "MEMBER SINCE", Value: createdAtISO, DateStyle: "PKDateStyleShort"}
|
|
||||||
backFields := []passField{
|
backFields := []passField{
|
||||||
{Key: "about", Label: "About", Value: "Scan the QR code to view this Bluesky profile."},
|
{Key: "about", Label: "About", Value: "Scan the QR code to view this Bluesky profile."},
|
||||||
{Key: "url", Label: "Profile URL", Value: profileURL},
|
{Key: "url", Label: "Profile URL", Value: profileURL},
|
||||||
@@ -124,20 +128,25 @@ func BuildPassJSON(did, handle, displayName, pdsHost, theme, teamID string, crea
|
|||||||
TeamIdentifier: teamID,
|
TeamIdentifier: teamID,
|
||||||
OrganizationName: "Bluesky",
|
OrganizationName: "Bluesky",
|
||||||
Description: "Bluesky profile - " + atHandle,
|
Description: "Bluesky profile - " + atHandle,
|
||||||
LogoText: "Bluesky",
|
// logoText omitted - the logo image already carries the "Bluesky"
|
||||||
ForegroundColor: "rgb(255, 255, 255)",
|
// wordmark; setting both would render the brand name twice.
|
||||||
LabelColor: "rgb(255, 255, 255)",
|
LogoText: "",
|
||||||
BackgroundColor: ThemeBackgroundRGB(theme),
|
ForegroundColor: "rgb(255, 255, 255)",
|
||||||
|
LabelColor: "rgb(255, 255, 255)",
|
||||||
|
BackgroundColor: ThemeBackgroundRGB(theme),
|
||||||
|
// iOS <= 26 fallback: handle as primary, since as secondary (stacked).
|
||||||
Generic: passFields{
|
Generic: passFields{
|
||||||
HeaderFields: []passField{pdsField},
|
HeaderFields: []passField{pdsField},
|
||||||
PrimaryFields: []passField{nameField},
|
PrimaryFields: []passField{handleField},
|
||||||
SecondaryFields: []passField{didField, sinceField},
|
SecondaryFields: []passField{sinceField},
|
||||||
BackFields: backFields,
|
BackFields: backFields,
|
||||||
},
|
},
|
||||||
|
// iOS 27+: handle and since side-by-side in primaryFields, matching
|
||||||
|
// what Pass Designer exports.
|
||||||
PosterGeneric: posterFields{
|
PosterGeneric: posterFields{
|
||||||
HeaderFields: []passField{pdsField},
|
HeaderFields: []passField{pdsField},
|
||||||
PrimaryFields: []passField{nameField},
|
PrimaryFields: []passField{handleField, sinceField},
|
||||||
SecondaryFields: []passField{didField, sinceField},
|
SecondaryFields: []passField{},
|
||||||
AuxiliaryFields: []passField{},
|
AuxiliaryFields: []passField{},
|
||||||
FooterFields: []passField{},
|
FooterFields: []passField{},
|
||||||
BackFields: backFields,
|
BackFields: backFields,
|
||||||
|
|||||||
+10
-21
@@ -5,7 +5,7 @@
|
|||||||
"teamIdentifier": "TEAMID00",
|
"teamIdentifier": "TEAMID00",
|
||||||
"organizationName": "Bluesky",
|
"organizationName": "Bluesky",
|
||||||
"description": "Bluesky profile - @alice.bsky.social",
|
"description": "Bluesky profile - @alice.bsky.social",
|
||||||
"logoText": "Bluesky",
|
"logoText": "",
|
||||||
"foregroundColor": "rgb(255, 255, 255)",
|
"foregroundColor": "rgb(255, 255, 255)",
|
||||||
"labelColor": "rgb(255, 255, 255)",
|
"labelColor": "rgb(255, 255, 255)",
|
||||||
"backgroundColor": "rgb(255, 109, 190)",
|
"backgroundColor": "rgb(255, 109, 190)",
|
||||||
@@ -19,20 +19,15 @@
|
|||||||
],
|
],
|
||||||
"primaryFields": [
|
"primaryFields": [
|
||||||
{
|
{
|
||||||
"key": "name",
|
"key": "handle",
|
||||||
"label": "NAME",
|
"label": "Handle",
|
||||||
"value": "Alice"
|
"value": "alice.bsky.social"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"secondaryFields": [
|
"secondaryFields": [
|
||||||
{
|
|
||||||
"key": "did",
|
|
||||||
"label": "DID",
|
|
||||||
"value": "did:plc:abc123"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "since",
|
"key": "since",
|
||||||
"label": "MEMBER SINCE",
|
"label": "Member Since",
|
||||||
"value": "2026-01-25T23:59:05Z",
|
"value": "2026-01-25T23:59:05Z",
|
||||||
"dateStyle": "PKDateStyleShort"
|
"dateStyle": "PKDateStyleShort"
|
||||||
}
|
}
|
||||||
@@ -60,24 +55,18 @@
|
|||||||
],
|
],
|
||||||
"primaryFields": [
|
"primaryFields": [
|
||||||
{
|
{
|
||||||
"key": "name",
|
"key": "handle",
|
||||||
"label": "NAME",
|
"label": "Handle",
|
||||||
"value": "Alice"
|
"value": "alice.bsky.social"
|
||||||
}
|
|
||||||
],
|
|
||||||
"secondaryFields": [
|
|
||||||
{
|
|
||||||
"key": "did",
|
|
||||||
"label": "DID",
|
|
||||||
"value": "did:plc:abc123"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "since",
|
"key": "since",
|
||||||
"label": "MEMBER SINCE",
|
"label": "Member Since",
|
||||||
"value": "2026-01-25T23:59:05Z",
|
"value": "2026-01-25T23:59:05Z",
|
||||||
"dateStyle": "PKDateStyleShort"
|
"dateStyle": "PKDateStyleShort"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"secondaryFields": [],
|
||||||
"auxiliaryFields": [],
|
"auxiliaryFields": [],
|
||||||
"footerFields": [],
|
"footerFields": [],
|
||||||
"backFields": [
|
"backFields": [
|
||||||
|
|||||||
+10
-21
@@ -5,7 +5,7 @@
|
|||||||
"teamIdentifier": "TEAMID00",
|
"teamIdentifier": "TEAMID00",
|
||||||
"organizationName": "Bluesky",
|
"organizationName": "Bluesky",
|
||||||
"description": "Bluesky profile - @alice.bsky.social",
|
"description": "Bluesky profile - @alice.bsky.social",
|
||||||
"logoText": "Bluesky",
|
"logoText": "",
|
||||||
"foregroundColor": "rgb(255, 255, 255)",
|
"foregroundColor": "rgb(255, 255, 255)",
|
||||||
"labelColor": "rgb(255, 255, 255)",
|
"labelColor": "rgb(255, 255, 255)",
|
||||||
"backgroundColor": "rgb(117, 175, 255)",
|
"backgroundColor": "rgb(117, 175, 255)",
|
||||||
@@ -19,20 +19,15 @@
|
|||||||
],
|
],
|
||||||
"primaryFields": [
|
"primaryFields": [
|
||||||
{
|
{
|
||||||
"key": "name",
|
"key": "handle",
|
||||||
"label": "NAME",
|
"label": "Handle",
|
||||||
"value": "Alice"
|
"value": "alice.bsky.social"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"secondaryFields": [
|
"secondaryFields": [
|
||||||
{
|
|
||||||
"key": "did",
|
|
||||||
"label": "DID",
|
|
||||||
"value": "did:plc:abc123"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "since",
|
"key": "since",
|
||||||
"label": "MEMBER SINCE",
|
"label": "Member Since",
|
||||||
"value": "2026-01-25T23:59:05Z",
|
"value": "2026-01-25T23:59:05Z",
|
||||||
"dateStyle": "PKDateStyleShort"
|
"dateStyle": "PKDateStyleShort"
|
||||||
}
|
}
|
||||||
@@ -60,24 +55,18 @@
|
|||||||
],
|
],
|
||||||
"primaryFields": [
|
"primaryFields": [
|
||||||
{
|
{
|
||||||
"key": "name",
|
"key": "handle",
|
||||||
"label": "NAME",
|
"label": "Handle",
|
||||||
"value": "Alice"
|
"value": "alice.bsky.social"
|
||||||
}
|
|
||||||
],
|
|
||||||
"secondaryFields": [
|
|
||||||
{
|
|
||||||
"key": "did",
|
|
||||||
"label": "DID",
|
|
||||||
"value": "did:plc:abc123"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "since",
|
"key": "since",
|
||||||
"label": "MEMBER SINCE",
|
"label": "Member Since",
|
||||||
"value": "2026-01-25T23:59:05Z",
|
"value": "2026-01-25T23:59:05Z",
|
||||||
"dateStyle": "PKDateStyleShort"
|
"dateStyle": "PKDateStyleShort"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"secondaryFields": [],
|
||||||
"auxiliaryFields": [],
|
"auxiliaryFields": [],
|
||||||
"footerFields": [],
|
"footerFields": [],
|
||||||
"backFields": [
|
"backFields": [
|
||||||
|
|||||||
+10
-21
@@ -5,7 +5,7 @@
|
|||||||
"teamIdentifier": "TEAMID00",
|
"teamIdentifier": "TEAMID00",
|
||||||
"organizationName": "Bluesky",
|
"organizationName": "Bluesky",
|
||||||
"description": "Bluesky profile - @alice.bsky.social",
|
"description": "Bluesky profile - @alice.bsky.social",
|
||||||
"logoText": "Bluesky",
|
"logoText": "",
|
||||||
"foregroundColor": "rgb(255, 255, 255)",
|
"foregroundColor": "rgb(255, 255, 255)",
|
||||||
"labelColor": "rgb(255, 255, 255)",
|
"labelColor": "rgb(255, 255, 255)",
|
||||||
"backgroundColor": "rgb(177, 90, 162)",
|
"backgroundColor": "rgb(177, 90, 162)",
|
||||||
@@ -19,20 +19,15 @@
|
|||||||
],
|
],
|
||||||
"primaryFields": [
|
"primaryFields": [
|
||||||
{
|
{
|
||||||
"key": "name",
|
"key": "handle",
|
||||||
"label": "NAME",
|
"label": "Handle",
|
||||||
"value": "Alice"
|
"value": "alice.bsky.social"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"secondaryFields": [
|
"secondaryFields": [
|
||||||
{
|
|
||||||
"key": "did",
|
|
||||||
"label": "DID",
|
|
||||||
"value": "did:plc:abc123"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "since",
|
"key": "since",
|
||||||
"label": "MEMBER SINCE",
|
"label": "Member Since",
|
||||||
"value": "2026-01-25T23:59:05Z",
|
"value": "2026-01-25T23:59:05Z",
|
||||||
"dateStyle": "PKDateStyleShort"
|
"dateStyle": "PKDateStyleShort"
|
||||||
}
|
}
|
||||||
@@ -60,24 +55,18 @@
|
|||||||
],
|
],
|
||||||
"primaryFields": [
|
"primaryFields": [
|
||||||
{
|
{
|
||||||
"key": "name",
|
"key": "handle",
|
||||||
"label": "NAME",
|
"label": "Handle",
|
||||||
"value": "Alice"
|
"value": "alice.bsky.social"
|
||||||
}
|
|
||||||
],
|
|
||||||
"secondaryFields": [
|
|
||||||
{
|
|
||||||
"key": "did",
|
|
||||||
"label": "DID",
|
|
||||||
"value": "did:plc:abc123"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "since",
|
"key": "since",
|
||||||
"label": "MEMBER SINCE",
|
"label": "Member Since",
|
||||||
"value": "2026-01-25T23:59:05Z",
|
"value": "2026-01-25T23:59:05Z",
|
||||||
"dateStyle": "PKDateStyleShort"
|
"dateStyle": "PKDateStyleShort"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"secondaryFields": [],
|
||||||
"auxiliaryFields": [],
|
"auxiliaryFields": [],
|
||||||
"footerFields": [],
|
"footerFields": [],
|
||||||
"backFields": [
|
"backFields": [
|
||||||
|
|||||||
+10
-21
@@ -5,7 +5,7 @@
|
|||||||
"teamIdentifier": "TEAMID00",
|
"teamIdentifier": "TEAMID00",
|
||||||
"organizationName": "Bluesky",
|
"organizationName": "Bluesky",
|
||||||
"description": "Bluesky profile - @alice.bsky.social",
|
"description": "Bluesky profile - @alice.bsky.social",
|
||||||
"logoText": "Bluesky",
|
"logoText": "",
|
||||||
"foregroundColor": "rgb(255, 255, 255)",
|
"foregroundColor": "rgb(255, 255, 255)",
|
||||||
"labelColor": "rgb(255, 255, 255)",
|
"labelColor": "rgb(255, 255, 255)",
|
||||||
"backgroundColor": "rgb(0, 21, 51)",
|
"backgroundColor": "rgb(0, 21, 51)",
|
||||||
@@ -19,20 +19,15 @@
|
|||||||
],
|
],
|
||||||
"primaryFields": [
|
"primaryFields": [
|
||||||
{
|
{
|
||||||
"key": "name",
|
"key": "handle",
|
||||||
"label": "NAME",
|
"label": "Handle",
|
||||||
"value": "Alice"
|
"value": "alice.bsky.social"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"secondaryFields": [
|
"secondaryFields": [
|
||||||
{
|
|
||||||
"key": "did",
|
|
||||||
"label": "DID",
|
|
||||||
"value": "did:plc:abc123"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "since",
|
"key": "since",
|
||||||
"label": "MEMBER SINCE",
|
"label": "Member Since",
|
||||||
"value": "2026-01-25T23:59:05Z",
|
"value": "2026-01-25T23:59:05Z",
|
||||||
"dateStyle": "PKDateStyleShort"
|
"dateStyle": "PKDateStyleShort"
|
||||||
}
|
}
|
||||||
@@ -60,24 +55,18 @@
|
|||||||
],
|
],
|
||||||
"primaryFields": [
|
"primaryFields": [
|
||||||
{
|
{
|
||||||
"key": "name",
|
"key": "handle",
|
||||||
"label": "NAME",
|
"label": "Handle",
|
||||||
"value": "Alice"
|
"value": "alice.bsky.social"
|
||||||
}
|
|
||||||
],
|
|
||||||
"secondaryFields": [
|
|
||||||
{
|
|
||||||
"key": "did",
|
|
||||||
"label": "DID",
|
|
||||||
"value": "did:plc:abc123"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "since",
|
"key": "since",
|
||||||
"label": "MEMBER SINCE",
|
"label": "Member Since",
|
||||||
"value": "2026-01-25T23:59:05Z",
|
"value": "2026-01-25T23:59:05Z",
|
||||||
"dateStyle": "PKDateStyleShort"
|
"dateStyle": "PKDateStyleShort"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"secondaryFields": [],
|
||||||
"auxiliaryFields": [],
|
"auxiliaryFields": [],
|
||||||
"footerFields": [],
|
"footerFields": [],
|
||||||
"backFields": [
|
"backFields": [
|
||||||
|
|||||||
Reference in New Issue
Block a user