Openstatus www.openstatus.dev

chore: feed options only for non-protected pages

authored by

Washington and committed by
Maximilian Kaske
4ccfd939 10aacc25

+29 -22
+1
apps/web/src/app/status-page/[domain]/_components/header.tsx
··· 68 68 plan={plan} 69 69 slug={page.slug} 70 70 customDomain={page.customDomain} 71 + passwordProtected={page.passwordProtected} 71 72 /> 72 73 </div> 73 74 </div>
+28 -22
apps/web/src/app/status-page/[domain]/_components/subscribe-button.tsx
··· 20 20 plan: WorkspacePlan; 21 21 slug: string; 22 22 customDomain?: string; 23 + passwordProtected?: boolean | null; 23 24 isDemo?: boolean; 24 25 } 25 26 ··· 27 28 plan, 28 29 slug, 29 30 customDomain, 31 + passwordProtected = false, 30 32 isDemo = false, 31 33 }: Props) { 32 34 const [showModal, setShowModal] = useState(false); ··· 46 48 </Button> 47 49 </DropdownMenuTrigger> 48 50 <DropdownMenuContent align="end"> 49 - <DropdownMenuItem asChild> 50 - <a 51 - href={`${baseUrl}/feed/rss`} 52 - target="_blank" 53 - rel="noreferrer" 54 - className="flex items-center gap-2" 55 - > 56 - <Rss className="h-4 w-4" /> 57 - RSS 58 - </a> 59 - </DropdownMenuItem> 60 - <DropdownMenuItem asChild> 61 - <a 62 - href={`${baseUrl}/feed/atom`} 63 - target="_blank" 64 - rel="noreferrer" 65 - className="flex items-center gap-2" 66 - > 67 - <Rss className="h-4 w-4" /> 68 - Atom 69 - </a> 70 - </DropdownMenuItem> 51 + {!passwordProtected ? ( 52 + <> 53 + <DropdownMenuItem asChild> 54 + <a 55 + href={`${baseUrl}/feed/rss`} 56 + target="_blank" 57 + rel="noreferrer" 58 + className="flex items-center gap-2" 59 + > 60 + <Rss className="h-4 w-4" /> 61 + RSS 62 + </a> 63 + </DropdownMenuItem> 64 + <DropdownMenuItem asChild> 65 + <a 66 + href={`${baseUrl}/feed/atom`} 67 + target="_blank" 68 + rel="noreferrer" 69 + className="flex items-center gap-2" 70 + > 71 + <Rss className="h-4 w-4" /> 72 + Atom 73 + </a> 74 + </DropdownMenuItem> 75 + </> 76 + ) : null} 71 77 {isSubscribers ? ( 72 78 <DropdownMenuItem onClick={() => setShowModal(true)}> 73 79 <Mail className="h-4 w-4 mr-2" />