Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
ab-smith committed Feb 4, 2025
1 parent aef421c commit bb81d85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion frontend/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@
"no": "No",
"updateAvailable": "Update available",
"showGuidedTour": "Show guided tour",
"loadDummyData": "Load dummy data",
"loadDemoData": "Load demo data",
"firstTimeLoginModalTitle": "Welcome to CISO Assistant!",
"firstTimeLoginModalDescription": "This is your first time logging in. Would you like to take a guided tour to get started?",
"ebiosRadarParameters": "Ebios RM radar parameters",
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/lib/components/SideBar/SideBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@
btnIcon: 'fa-wand-magic-sparkles'
},
{
label: m.loadDummyData(),
action: loadDummyDomain,
label: m.loadDemoData(),
action: loadDemoDomain,
classes: 'variant-filled-secondary',
btnIcon: 'fa-file-import',
async: true
Expand All @@ -216,10 +216,10 @@
modalStore.trigger(modal);
}
async function loadDummyDomain() {
async function loadDemoDomain() {
const response = await fetch('/folders/import-dummy/', { method: 'POST' });
if (!response.ok) {
console.error('Failed to load dummy data');
console.error('Failed to load demo data');
$flash = { type: 'error', message: m.errorOccuredDuringImport() };
return false;
}
Expand All @@ -241,7 +241,7 @@
}
onMount(() => {
if (displayGuidedTour) {
if (displayGuidedTour || user.accessible_domains.length === 0) {
modalFirstLogin();
$firstTimeConnection = false; // This will prevent the tour from showing up again on page reload
}
Expand Down

0 comments on commit bb81d85

Please sign in to comment.