Skip to content

Commit c4597d2

Browse files
committed
fix: stores issue, again in some places.
1 parent 0b3b556 commit c4597d2

4 files changed

Lines changed: 22 additions & 8 deletions

File tree

src/routes/(console)/project-[region]-[project]/functions/function-[function]/settings/+page.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
isGlobal={false}
106106
globalVariableList={data.globalVariables}
107107
variableList={data.variables}
108+
project={data.project}
108109
analyticsSource="function_settings" />
109110
<UpdateBuildCommand func={data.function} />
110111

src/routes/(console)/project-[region]-[project]/settings/+page.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,9 @@
9494
{sdkCreateVariable}
9595
{sdkUpdateVariable}
9696
{sdkDeleteVariable}
97-
isGlobal={true}
97+
isGlobal
9898
variableList={data.variables}
99+
project={data.project}
99100
analyticsSource="project_settings" />
100101
<ChangeOrganization />
101102
<DeleteProject />

src/routes/(console)/project-[region]-[project]/sites/site-[site]/settings/+page.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
isGlobal={false}
7676
globalVariableList={data.globalVariables}
7777
variableList={data.variables}
78+
project={data.project}
7879
product="site"
7980
analyticsSource="site_settings" />
8081
{#if isCloud}

src/routes/(console)/project-[region]-[project]/updateVariables.svelte

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import { Click, Submit, trackError, trackEvent } from '$lib/actions/analytics';
99
import { Dependencies } from '$lib/constants';
1010
import { addNotification } from '$lib/stores/notifications';
11-
import { project } from '$routes/(console)/project-[region]-[project]/store';
1211
import PromoteVariableModal from './promoteVariableModal.svelte';
1312
import CreateVariable from './createVariableModal.svelte';
1413
import RawVariableEditor from './rawVariableEditor.svelte';
@@ -39,7 +38,9 @@
3938
import UpdateVariablesModal from './updateVariablesModal.svelte';
4039
import SecretVariableModal from './secretVariableModal.svelte';
4140
import { Confirm } from '$lib/components';
41+
import { resolveRoute, withPath } from '$lib/stores/navigation';
4242
43+
export let project: Models.Project;
4344
export let variableList: Models.VariableList;
4445
export let globalVariableList: Models.VariableList | undefined = undefined;
4546
export let analyticsSource = '';
@@ -80,7 +81,7 @@
8081
showVariablesModal = false;
8182
addNotification({
8283
type: 'success',
83-
message: `${$project.name} ${
84+
message: `${project.name} ${
8485
isGlobal ? 'global variable' : 'variable'
8586
} has been created.`
8687
});
@@ -102,7 +103,7 @@
102103
showVariablesModal = false;
103104
addNotification({
104105
type: 'success',
105-
message: `${$project.name} ${
106+
message: `${project.name} ${
106107
isGlobal ? 'global variable' : 'variable'
107108
} has been updated.`
108109
});
@@ -123,7 +124,7 @@
123124
showVariablesModal = false;
124125
addNotification({
125126
type: 'success',
126-
message: `${$project.name} ${
127+
message: `${project.name} ${
127128
isGlobal ? 'global variable' : 'variable'
128129
} has been marked as secret.`
129130
});
@@ -144,7 +145,7 @@
144145
selectedVar = null;
145146
addNotification({
146147
type: 'success',
147-
message: `${$project.name} ${
148+
message: `${project.name} ${
148149
isGlobal ? 'global variable' : 'variable'
149150
} has been deleted.`
150151
});
@@ -274,7 +275,12 @@
274275
{:else}
275276
Set the environment variables or secret keys that will be passed to your {product}. Global
276277
variables can be found in <Link
277-
href={`${base}/project-${$project.region}-${$project.$id}/settings#variables`}>
278+
href={withPath(
279+
resolveRoute('/(console)/project-[region]-[project]/settings', {
280+
...page.params
281+
}),
282+
'#variables'
283+
)}>
278284
project settings</Link
279285
>.
280286
{/if}
@@ -324,7 +330,12 @@
324330
{/if}
325331
a naming conflict with a global variable. View global variables in
326332
<a
327-
href={`${base}/project-${$project.region}-${$project.$id}/settings`}
333+
href={resolveRoute(
334+
'/(console)/project-[region]-[project]/settings',
335+
{
336+
...page.params
337+
}
338+
)}
328339
title="Project settings"
329340
class="link">
330341
project settings</a

0 commit comments

Comments
 (0)