Variable update

This commit is contained in:
ernstmul committed 2025-03-06 09:59:32 +01:00
1 parent 97c8c429a5
commit 1db51a9fa5
6 files changed
+23 -9

No files matched your search

+2 -1
View File
@@ -162,7 +162,8 @@ export enum Click {
OnboardingAuthOauth2Click = 'click_onboarding_auth_oauth2',
OnboardingAuthAllMethodsClick = 'click_onboarding_auth_all_methods',
OnboardingDiscordClick = 'click_onboarding_discord',
VariablesCreate = 'click_variable_create'
VariablesCreateClick = 'click_variable_create',
VariablesUpdateClick = 'click_variable_update'
}
export enum Submit {
@@ -89,7 +89,8 @@
{sdkDeleteVariable}
isGlobal={false}
globalVariableList={data.globalVariables}
variableList={data.variables} />
variableList={data.variables}
analyticsSource="function_settings" />
<UpdateTimeout />
<UpdateScopes />
<DangerZone />
@@ -85,7 +85,8 @@
{sdkUpdateVariable}
{sdkDeleteVariable}
isGlobal={true}
variableList={data.variables} />
variableList={data.variables}
analyticsSource="project_settings" />
<CardGrid>
<svelte:fragment slot="title">Transfer project</svelte:fragment>
Transfer your project to another organization that you own.
@@ -151,7 +151,7 @@
size="s"
on:mousedown={() => {
showCreate = true;
trackEvent(Click.VariablesCreate, {
trackEvent(Click.VariablesCreateClick, {
source: 'site_settings'
});
}}>
@@ -65,7 +65,8 @@
isGlobal={false}
globalVariableList={data.globalVariables}
variableList={data.variables}
product="site" />
product="site"
analyticsSource="site_settings" />
<UpdateRuntimeSettings site={data.site} frameworks={data.frameworks.frameworks} />
<UpdateTimeout site={data.site} />
<DangerZone site={data.site} />
@@ -37,7 +37,7 @@
export let variableList: Models.VariableList;
export let globalVariableList: Models.VariableList | undefined = undefined;
export let analyticsSource = '';
export let isGlobal: boolean;
export let sdkCreateVariable: (
key: string,
@@ -222,10 +222,20 @@
<Layout.Stack gap="l">
<Layout.Stack direction="row">
<Layout.Stack direction="row" gap="s">
<Button secondary on:mousedown={() => (showEditorModal = true)}>
<Button
secondary
on:mousedown={() => {
showEditorModal = true;
trackEvent(Click.VariablesUpdateClick, { source: analyticsSource });
}}>
<Icon slot="start" icon={IconCode} /> Editor
</Button>
<Button secondary on:mousedown={() => (showVariablesUpload = true)}>
<Button
secondary
on:mousedown={() => {
showEditorModal = true;
trackEvent(Click.VariablesUpdateClick, { source: analyticsSource });
}}>
<Icon slot="start" icon={IconUpload} /> Import .env
</Button>
</Layout.Stack>
@@ -234,7 +244,7 @@
secondary
on:mousedown={() => {
showVariablesModal = true;
trackEvent(Click.VariablesCreate, { source: 'project_settings' });
trackEvent(Click.VariablesCreateClick, { source: 'project_settings' });
}}>
<Icon slot="start" icon={IconPlus} /> Create variable
</Button>