diff --git a/frontend/src/routes/flows/add.svelte b/frontend/src/routes/flows/add.svelte index d6d29f0ab8..2a646a853a 100644 --- a/frontend/src/routes/flows/add.svelte +++ b/frontend/src/routes/flows/add.svelte @@ -14,7 +14,7 @@ import { initFlow } from '$lib/components/flows/flowStore' import { FlowService, type Flow } from '$lib/gen' import { workspaceStore } from '$lib/stores' - import { decodeState, emptySchema, sendUserToast } from '$lib/utils' + import { decodeState, emptySchema } from '$lib/utils' const initialState = $page.url.searchParams.get('state') const hubId = $page.url.searchParams.get('hub') @@ -44,13 +44,11 @@ Object.assign(flow, template) flow = flow $page.url.searchParams.delete('template') - sendUserToast('Code & arguments have been loaded from template.') } else if (hubId) { const hub = (await FlowService.getHubFlowById({ id: Number(hubId) })).flow Object.assign(flow, hub) flow = flow $page.url.searchParams.delete('hub') - sendUserToast(`Flow has been loaded from hub flow id ${hubId}.`) } initFlow(flow) } diff --git a/frontend/src/routes/scripts/add.svelte b/frontend/src/routes/scripts/add.svelte index 0279e1adc7..8e3407d8a2 100644 --- a/frontend/src/routes/scripts/add.svelte +++ b/frontend/src/routes/scripts/add.svelte @@ -13,7 +13,7 @@ import { workspaceStore } from '$lib/stores' import ScriptBuilder from '$lib/components/ScriptBuilder.svelte' import type { Schema } from '$lib/common' - import { decodeState, emptySchema, getScriptByPath, sendUserToast } from '$lib/utils' + import { decodeState, emptySchema } from '$lib/utils' import { dirtyStore } from '$lib/components/common/confirmationModal/dirtyStore' // Default @@ -54,17 +54,15 @@ script.content = template.content script.schema = template.schema script.language = template.language - sendUserToast('Code & arguments have been loaded from template.') } } async function loadHub(): Promise { if (hubPath) { - const template = await getScriptByPath(hubPath) + const { content, language } = await ScriptService.getHubScriptByPath({ path: hubPath }) script.description = `Fork of ${hubPath}` - script.content = template.content - script.language = template.language as Script.language - sendUserToast(`Code has been loaded from hub script ${hubPath}.`) + script.content = content + script.language = language as Script.language } } diff --git a/frontend/src/routes/user/accept_invite@user.svelte b/frontend/src/routes/user/accept_invite@user.svelte index f8a6926cd1..fbac272edf 100644 --- a/frontend/src/routes/user/accept_invite@user.svelte +++ b/frontend/src/routes/user/accept_invite@user.svelte @@ -20,7 +20,6 @@ workspace_id } }) - sendUserToast(`Invitation to ${workspace_id} accepted as ${username}`) usersWorkspaceStore.set(await WorkspaceService.listUserWorkspaces()) workspaceStore.set(workspace_id) goto($page.url.searchParams.get('rd') ?? '/scripts')