fix: env var text for create, update or upload.

This commit is contained in:
Darshan
2024-12-30 17:54:50 +05:30
parent 751be60b32
commit 8caab5d974
3 changed files with 11 additions and 9 deletions
@@ -44,9 +44,9 @@
title={`${selectedVar ? 'Update' : 'Create'} ${isGlobal ? 'global' : 'environment'} variable`}>
<svelte:fragment slot="description">
<span>
Set the environment variables or secret keys that will be passed to {isGlobal
? `all ${product}s within your project`
: `your ${product}s`}.
Set the environment variables or secret keys that will be passed to {!isGlobal
? `your ${product}s`
: `all functions and sites within your project`}.
</span>
</svelte:fragment>
<Layout.Stack>
@@ -191,12 +191,12 @@
</Heading>
{#if isGlobal}
<p>
Set the environment variables or secret keys that will be passed to all functions within
your project.
Set the environment variables or secret keys that will be passed to all functions and
sites within your project.
</p>
{:else}
<p>
Set the environment variables or secret keys that will be passed to your function.
Set the environment variables or secret keys that will be passed to your {product}.
Global variables can be found in <Link
href={`${base}/project-${$project.$id}/settings#variables`}>
project settings</Link
@@ -375,6 +375,7 @@
{#if showVariablesUpload}
<UploadVariables
{product}
{isGlobal}
{sdkCreateVariable}
{sdkUpdateVariable}
@@ -18,6 +18,7 @@
let files: FileList;
let error: string;
export let product: 'function' | 'site' = 'function';
async function handleSubmit() {
try {
@@ -72,9 +73,9 @@
<p>
Import new {isGlobal ? 'global' : 'environment'} variables from
<span class="inline-code">.env</span>
file that will be passed to {isGlobal
? 'all functions within your project'
: 'your function'}.
file that will be passed to {!isGlobal
? `your ${product}`
: 'all functions and sites within your project'}.
</p>
{#if variableList.total > 0}