mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
refactor: simplify mode scope badge display logic
Replace ternary conditionals with `|| "global"` pattern to match MCP server badge implementation. This is cleaner and more idiomatic.
This commit is contained in:
parent
ab017dbb2f
commit
2cd6fe0f10
2 changed files with 3 additions and 3 deletions
|
|
@ -272,7 +272,7 @@ export const ModeSelector = ({
|
|||
<div className="flex items-center gap-1.5">
|
||||
<span className="font-bold truncate">{mode.name}</span>
|
||||
<span className="text-[10px] px-1 py-0.5 rounded bg-vscode-badge-background text-vscode-badge-foreground">
|
||||
{mode.source === "project" ? "project" : "global"}
|
||||
{mode.source || "global"}
|
||||
</span>
|
||||
</div>
|
||||
{mode.description && (
|
||||
|
|
|
|||
|
|
@ -625,7 +625,7 @@ const ModesView = ({ onDone }: ModesViewProps) => {
|
|||
</span>
|
||||
{getCurrentMode() && (
|
||||
<span className="text-[10px] px-1 py-0.5 rounded bg-vscode-badge-background text-vscode-badge-foreground">
|
||||
{getCurrentMode()?.source === "project" ? "project" : "global"}
|
||||
{getCurrentMode()?.source || "global"}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
|
@ -690,7 +690,7 @@ const ModesView = ({ onDone }: ModesViewProps) => {
|
|||
{modeConfig.name}
|
||||
</span>
|
||||
<span className="text-[10px] px-1 py-0.5 rounded bg-vscode-badge-background text-vscode-badge-foreground">
|
||||
{modeConfig.source === "project" ? "project" : "global"}
|
||||
{modeConfig.source || "global"}
|
||||
</span>
|
||||
</div>
|
||||
<span
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue