mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
fix(branching): allow gitless branches to be set as peristent (#36794)
This commit is contained in:
1 parent
4e17ec6632
commit
46d3de728f
1 file changed
+26
-30
@@ -293,36 +293,32 @@ export const BranchRow = ({
|
||||
</TooltipContent>
|
||||
)}
|
||||
</Tooltip>
|
||||
|
||||
{branch.git_branch && (
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild={isBranchActiveHealthy} className="w-full">
|
||||
<DropdownMenuItem
|
||||
className="gap-x-2"
|
||||
onSelect={() => setShowBranchModeSwitch(true)}
|
||||
onClick={() => setShowBranchModeSwitch(true)}
|
||||
disabled={!isBranchActiveHealthy}
|
||||
>
|
||||
{branch.persistent ? (
|
||||
<>
|
||||
<Clock size={14} /> Switch to ephemeral
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Infinity size={14} className="scale-110" /> Switch to persistent
|
||||
</>
|
||||
)}
|
||||
</DropdownMenuItem>
|
||||
</TooltipTrigger>
|
||||
{!isBranchActiveHealthy && (
|
||||
<TooltipContent side="left">
|
||||
Branch is still initializing. Please wait for the branch to become healthy
|
||||
before switching modes
|
||||
</TooltipContent>
|
||||
)}
|
||||
</Tooltip>
|
||||
)}
|
||||
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild={isBranchActiveHealthy} className="w-full">
|
||||
<DropdownMenuItem
|
||||
className="gap-x-2"
|
||||
onSelect={() => setShowBranchModeSwitch(true)}
|
||||
onClick={() => setShowBranchModeSwitch(true)}
|
||||
disabled={!isBranchActiveHealthy}
|
||||
>
|
||||
{branch.persistent ? (
|
||||
<>
|
||||
<Clock size={14} /> Switch to ephemeral
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Infinity size={14} className="scale-110" /> Switch to persistent
|
||||
</>
|
||||
)}
|
||||
</DropdownMenuItem>
|
||||
</TooltipTrigger>
|
||||
{!isBranchActiveHealthy && (
|
||||
<TooltipContent side="left">
|
||||
Branch is still initializing. Please wait for the branch to become healthy
|
||||
before switching modes
|
||||
</TooltipContent>
|
||||
)}
|
||||
</Tooltip>
|
||||
{gitlessBranching && (
|
||||
<Tooltip>
|
||||
<TooltipTrigger
|
||||
|
||||
Reference in new issue
Block a user