Log In or Sign Up
-
- {props.publication
- ? "Log in to Bluesky to subscribe this publication!"
- : "Save your Leaflets and access them on multiple devices!"}
-
+
{props.text}
diff --git a/components/LoginButton.tsx b/components/LoginButton.tsx
index debe4dc3..c3471052 100644
--- a/components/LoginButton.tsx
+++ b/components/LoginButton.tsx
@@ -18,7 +18,7 @@ export function LoginButton() {
}
>
-
+
);
}
@@ -33,7 +33,7 @@ export function LoginActionButton() {
} label="Sign In" />
}
>
-
+
);
}
diff --git a/components/ShareOptions/index.tsx b/components/ShareOptions/index.tsx
index 1f6769ea..48fa6b34 100644
--- a/components/ShareOptions/index.tsx
+++ b/components/ShareOptions/index.tsx
@@ -62,7 +62,7 @@ export function ShareOptions() {
>
{menuState === "login" ? (
-
+
) : menuState === "domain" ? (
diff --git a/lexicons/api/lexicons.ts b/lexicons/api/lexicons.ts
index 5fad6e4f..45ee3b57 100644
--- a/lexicons/api/lexicons.ts
+++ b/lexicons/api/lexicons.ts
@@ -95,6 +95,19 @@ export const schemaDict = {
type: 'ref',
ref: 'lex:pub.leaflet.publication#theme',
},
+ preferences: {
+ type: 'ref',
+ ref: 'lex:pub.leaflet.publication#preferences',
+ },
+ },
+ },
+ },
+ preferences: {
+ type: 'object',
+ properties: {
+ showInDiscover: {
+ type: 'boolean',
+ default: true,
},
},
},
diff --git a/lexicons/api/types/pub/leaflet/publication.ts b/lexicons/api/types/pub/leaflet/publication.ts
index c007101e..4b20e1c0 100644
--- a/lexicons/api/types/pub/leaflet/publication.ts
+++ b/lexicons/api/types/pub/leaflet/publication.ts
@@ -19,6 +19,7 @@ export interface Record {
description?: string
icon?: BlobRef
theme?: Theme
+ preferences?: Preferences
[k: string]: unknown
}
@@ -32,6 +33,21 @@ export function validateRecord
(v: V) {
return validate(v, id, hashRecord, true)
}
+export interface Preferences {
+ $type?: 'pub.leaflet.publication#preferences'
+ showInDiscover: boolean
+}
+
+const hashPreferences = 'preferences'
+
+export function isPreferences(v: V) {
+ return is$typed(v, id, hashPreferences)
+}
+
+export function validatePreferences(v: V) {
+ return validate(v, id, hashPreferences)
+}
+
export interface Theme {
$type?: 'pub.leaflet.publication#theme'
backgroundColor?:
diff --git a/lexicons/pub/leaflet/publication.json b/lexicons/pub/leaflet/publication.json
index 52a32177..43377de5 100644
--- a/lexicons/pub/leaflet/publication.json
+++ b/lexicons/pub/leaflet/publication.json
@@ -34,10 +34,23 @@
"theme": {
"type": "ref",
"ref": "#theme"
+ },
+ "preferences": {
+ "type": "ref",
+ "ref": "#preferences"
}
}
}
},
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "showInDiscover": {
+ "type": "boolean",
+ "default": true
+ }
+ }
+ },
"theme": {
"type": "object",
"properties": {
diff --git a/lexicons/src/publication.ts b/lexicons/src/publication.ts
index 05223551..6b4faa50 100644
--- a/lexicons/src/publication.ts
+++ b/lexicons/src/publication.ts
@@ -18,9 +18,16 @@ export const PubLeafletPublication: LexiconDoc = {
description: { type: "string", maxLength: 2000 },
icon: { type: "blob", accept: ["image/*"], maxSize: 1000000 },
theme: { type: "ref", ref: "#theme" },
+ preferences: { type: "ref", ref: "#preferences" },
},
},
},
+ preferences: {
+ type: "object",
+ properties: {
+ showInDiscover: { type: "boolean", default: true },
+ },
+ },
theme: {
type: "object",
properties: {