generated from thinkode/modelRepository
fixed: create peripheral
This commit is contained in:
@@ -4,13 +4,13 @@
|
||||
import { t, _ } from 'svelte-i18n'
|
||||
import { generateToast, needProjectSave, peripherals, colors } from "../../stores";
|
||||
import { get } from "svelte/store"
|
||||
import { UpdatePeripheralSettings, GetPeripheralSettings, RemovePeripheral, AddPeripheral, CreatePeripheral } from "../../../wailsjs/go/main/App";
|
||||
import { UpdatePeripheralSettings, GetPeripheralSettings, RemovePeripheral, AddPeripheral } from "../../../wailsjs/go/main/App";
|
||||
import RoundedButton from "../General/RoundedButton.svelte";
|
||||
|
||||
// Create the peripheral to the project
|
||||
function createPeripheral(peripheral){
|
||||
// Create the peripheral to the project (backend)
|
||||
CreatePeripheral(peripheral)
|
||||
AddPeripheral(peripheral)
|
||||
.catch((error) => {
|
||||
console.log("Unable to create the peripheral: " + error)
|
||||
generateToast('danger', 'bx-error', $_("addPeripheralErrorToast"))
|
||||
|
||||
Reference in New Issue
Block a user