dev-preprod-prod logic

This commit is contained in:
2026-03-01 14:39:25 +03:00
parent 165f91b399
commit b7960344e0
13 changed files with 754 additions and 70 deletions

View File

@@ -75,7 +75,9 @@
$: globalEnvironments = $environmentContextStore?.environments || [];
$: globalSelectedEnvId = $environmentContextStore?.selectedEnvId || "";
$: globalSelectedEnv = $selectedEnvironmentStore;
$: isProdContext = Boolean(globalSelectedEnv?.is_production);
$: isProdContext =
String(globalSelectedEnv?.stage || "").toUpperCase() === "PROD" ||
Boolean(globalSelectedEnv?.is_production);
function toggleUserMenu(event) {
event.stopPropagation();
@@ -431,7 +433,7 @@
>
{#each globalEnvironments as env}
<option value={env.id}>
{env.name}{env.is_production ? " [PROD]" : ""}
{env.name}{(String(env.stage || "").toUpperCase() === "PROD" || env.is_production) ? " [PROD]" : ""}
</option>
{/each}
</select>