Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Derive toast from notification
  • Loading branch information
Theodore Li committed Mar 14, 2026
commit 67011c996ee2294d54c88664db144398b43828f9
21 changes: 0 additions & 21 deletions apps/sim/app/_styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -700,27 +700,6 @@ input[type="search"]::-ms-clear {
}
}

@keyframes toast-enter {
from {
opacity: 0;
transform: translateY(8px) scale(0.97);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}

@keyframes toast-exit {
from {
opacity: 1;
transform: translateY(0) scale(1);
}
to {
opacity: 0;
transform: translateY(8px) scale(0.97);
}
}

/**
* @depricated
Expand Down
5 changes: 3 additions & 2 deletions apps/sim/app/workspace/[workspaceId]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use client'

import { ToastProvider } from '@/components/emcn'
import { GlobalCommandsProvider } from '@/app/workspace/[workspaceId]/providers/global-commands-provider'
import { ProviderModelsLoader } from '@/app/workspace/[workspaceId]/providers/provider-models-loader'
import { SettingsLoader } from '@/app/workspace/[workspaceId]/providers/settings-loader'
Expand All @@ -8,7 +9,7 @@ import { Sidebar } from '@/app/workspace/[workspaceId]/w/components/sidebar/side

export default function WorkspaceLayout({ children }: { children: React.ReactNode }) {
return (
<>
<ToastProvider>
<SettingsLoader />
<ProviderModelsLoader />
<GlobalCommandsProvider>
Expand All @@ -25,6 +26,6 @@ export default function WorkspaceLayout({ children }: { children: React.ReactNod
</WorkspacePermissionsProvider>
</div>
</GlobalCommandsProvider>
</>
</ToastProvider>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import dynamic from 'next/dynamic'
import { useSearchParams } from 'next/navigation'
import { Skeleton, ToastProvider } from '@/components/emcn'
import { Skeleton } from '@/components/emcn'
import { ApiKeysSkeleton } from '@/app/workspace/[workspaceId]/settings/components/api-keys/api-key-skeleton'
import { BYOKSkeleton } from '@/app/workspace/[workspaceId]/settings/components/byok/byok-skeleton'
import { CopilotSkeleton } from '@/app/workspace/[workspaceId]/settings/components/copilot/copilot-skeleton'
Expand Down Expand Up @@ -165,9 +165,8 @@ export function SettingsPage({ section }: SettingsPageProps) {
allNavigationItems.find((item) => item.id === effectiveSection)?.label ?? effectiveSection

return (
<ToastProvider>
<div>
<h2 className='mb-[28px] font-medium text-[22px] text-[var(--text-primary)]'>{label}</h2>
<div>
<h2 className='mb-[28px] font-medium text-[22px] text-[var(--text-primary)]'>{label}</h2>
{effectiveSection === 'general' && <General />}
{effectiveSection === 'integrations' && <Integrations />}
{effectiveSection === 'secrets' && <Credentials />}
Expand All @@ -187,7 +186,6 @@ export function SettingsPage({ section }: SettingsPageProps) {
{effectiveSection === 'inbox' && <Inbox />}
{effectiveSection === 'recently-deleted' && <RecentlyDeleted />}
{effectiveSection === 'debug' && <Debug />}
</div>
</ToastProvider>
</div>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Loader2, Search } from 'lucide-react'
import { useParams, useRouter } from 'next/navigation'
import {
Button,
Check,
SModalTabs,
SModalTabsList,
SModalTabsTrigger,
Expand Down Expand Up @@ -193,6 +194,7 @@ export function RecentlyDeleted() {
const onSuccess = () => {
const href = getResourceHref(resource.workspaceId, resource.type, resource.id)
toast.success(`${resource.name} restored`, {
icon: <Check className='h-[12px] w-[12px]' />,
action: { label: 'View', onClick: () => router.push(href) },
})
}
Expand Down
Loading