mirror of
https://github.com/djdevin/recflare.git
synced 2026-10-27 16:08:58 -07:00
[www] remove subrooms from public template
This commit is contained in:
@@ -2045,9 +2045,9 @@ function RoomPage({
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A room as anyone sees it: the same hero the owner's page draws, with the creator linked
|
* A room as anyone sees it: the same hero the owner's page draws, with the creator linked
|
||||||
* to their profile in place of the upload control, then the room's public facts, the
|
* to their profile in place of the upload control, then the room's public facts and the
|
||||||
* photos players took in it, and its subrooms — read-only, since nothing here is the
|
* photos players took in it — read-only, since nothing here is the viewer's to change.
|
||||||
* viewer's to change.
|
* Staff also see its subrooms; the owner gets them on their own page instead.
|
||||||
*/
|
*/
|
||||||
function PublicRoomView({
|
function PublicRoomView({
|
||||||
room,
|
room,
|
||||||
@@ -2131,6 +2131,9 @@ function PublicRoomView({
|
|||||||
)}
|
)}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
{/* Staff only: a visitor has no use for the room's internals. The owner sees them on
|
||||||
|
their own page (RoomDetail), never this one. */}
|
||||||
|
{isAdmin() && (
|
||||||
<section className="card">
|
<section className="card">
|
||||||
<h2>Subrooms</h2>
|
<h2>Subrooms</h2>
|
||||||
{subRooms.length === 0 ? (
|
{subRooms.length === 0 ? (
|
||||||
@@ -2152,6 +2155,7 @@ function PublicRoomView({
|
|||||||
</ul>
|
</ul>
|
||||||
)}
|
)}
|
||||||
</section>
|
</section>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* Staff only, and cosmetic: hidden for everyone else, but `rooms` checks the token's
|
{/* Staff only, and cosmetic: hidden for everyone else, but `rooms` checks the token's
|
||||||
role itself on the DELETE. */}
|
role itself on the DELETE. */}
|
||||||
|
|||||||
Reference in New Issue
Block a user