added the toast notifications center (#19)

This commit was merged in pull request #19.
This commit is contained in:
2024-12-24 13:36:11 +00:00
parent a231263825
commit 1052dcc8d5
4 changed files with 114 additions and 3 deletions

View File

@@ -9,9 +9,10 @@
import Show from './components/Show/Show.svelte';
import GeneralConsole from './components/Console/GeneralConsole.svelte';
import RoundIconButton from './components/General/RoundIconButton.svelte';
import { currentProject, needProjectSave } from './stores';
import { generateToast, currentProject, needProjectSave } from './stores';
import { SaveProject } from '../wailsjs/go/main/App.js';
import { construct_svelte_component } from 'svelte/internal';
import ToastNotification from './components/General/ToastNotification.svelte';
let selectedMenu = "settings"
// When the navigation menu changed, update the selected menu
@@ -26,8 +27,10 @@
$currentProject.SaveFile = saveFile
needProjectSave.set(false)
console.log("Project has been saved")
generateToast('info', 'bxs-save', 'The project has been saved')
}).catch((error) => {
console.error(`Unable to save the project: ${error}`)
generateToast('danger', 'bx-error', 'Unable to save the project: ' + error)
})
}
@@ -73,6 +76,7 @@
{:else if selectedMenu === "console"}
<GeneralConsole />
{/if}
<ToastNotification/>
</main>
<style>