Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions explore/src/main/scala/explore/TopBar.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ import lucuma.ui.syntax.all.given
import org.scalajs.dom.window
import typings.loglevel.mod.LogLevelDesc

import scala.scalajs.LinkingInfo

case class TopBar(
vault: View[UserVault],
programId: Option[Program.Id],
Expand Down Expand Up @@ -117,7 +119,7 @@ object TopBar:
)
else List.empty)

val lastItems = List(
val lastCommonItems = List(
MenuItem.Separator.some,
MenuItem
.Item(
Expand Down Expand Up @@ -156,21 +158,21 @@ object TopBar:
icon = Icons.Pencil
)
)
.some,
if (ctx.environment === ExecutionEnvironment.Development)
ThemeSubMenu(props.theme).some
else
None,
MenuItem
.Item(
label = "Toggle Reusability",
icon = Icons.CrystalBall,
command = utils.toggleReusabilityOverlay[CallbackTo](),
visible = ctx.environment === ExecutionEnvironment.Development
)
.some
).flattenOption

val lastItems =

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use this much anymore. Maybe we want to just remove it?

if (LinkingInfo.developmentMode)
val reusabilityItem = MenuItem
.Item(
label = "Toggle Reusability",
icon = Icons.CrystalBall,
command = utils.toggleReusabilityOverlay[CallbackTo](),
visible = ctx.environment === ExecutionEnvironment.Development
)
lastCommonItems ++ List(ThemeSubMenu(props.theme), reusabilityItem)
else lastCommonItems

val menuItems =
if (role =!= GuestRole) {
firstItems :::
Expand Down
Loading