grain.social is a photo sharing platform built on atproto. grain.social
atproto photography appview
57
fork

Configure Feed

Select the types of activity you want to include in your feed.

add page titles

+11 -3
+11 -3
main.tsx
··· 118 118 }), 119 119 route("/", (_req, _params, ctx) => { 120 120 const items = getTimeline(ctx); 121 - ctx.state.meta = getPageMeta(""); 121 + ctx.state.meta = [{ title: "Timeline — Grain" }, getPageMeta("")]; 122 122 return ctx.render(<Timeline items={items} />); 123 123 }), 124 124 route("/profile/:handle", (req, params, ctx) => { ··· 131 131 if (!actor) return ctx.next(); 132 132 const profile = getActorProfile(actor.did, ctx); 133 133 if (!profile) return ctx.next(); 134 - ctx.state.meta = getPageMeta(profileLink(handle)); 134 + ctx.state.meta = [ 135 + { 136 + title: profile.displayName 137 + ? `${profile.displayName} (${profile.handle}) — Grain` 138 + : `${profile.handle} — Grain`, 139 + }, 140 + getPageMeta(profileLink(handle)), 141 + ]; 135 142 if (tab) { 136 143 return ctx.html( 137 144 <ProfilePage ··· 160 167 if (!gallery) return ctx.next(); 161 168 favs = getGalleryFavs(gallery.uri, ctx); 162 169 ctx.state.meta = [ 170 + { title: `${(gallery.record as Gallery).title} — Grain` }, 163 171 ...getPageMeta(galleryLink(handle, rkey)), 164 172 ...getGalleryMeta(gallery), 165 173 ]; ··· 171 179 route("/upload", (_req, _params, ctx) => { 172 180 requireAuth(ctx); 173 181 const photos = getActorPhotos(ctx.currentUser.did, ctx); 174 - ctx.state.meta = getPageMeta("/upload"); 182 + ctx.state.meta = [{ title: "Upload — Grain" }, getPageMeta("/upload")]; 175 183 return ctx.render(<UploadPage photos={photos} />); 176 184 }), 177 185 route("/dialogs/gallery/new", (_req, _params, ctx) => {