mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-06 03:00:16 -04:00
Lint
This commit is contained in:
@@ -666,8 +666,6 @@ input[type="search"]::-ms-clear {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @depricated
|
||||
* Legacy globals (light/dark) kept for backward-compat with old classes.
|
||||
|
||||
@@ -10,10 +10,7 @@ import { getUserEntityPermissions } from '@/lib/workspaces/permissions/utils'
|
||||
|
||||
const logger = createLogger('RestoreKnowledgeBaseAPI')
|
||||
|
||||
export async function POST(
|
||||
request: NextRequest,
|
||||
{ params }: { params: Promise<{ id: string }> }
|
||||
) {
|
||||
export async function POST(request: NextRequest, { params }: { params: Promise<{ id: string }> }) {
|
||||
const requestId = generateRequestId()
|
||||
const { id } = await params
|
||||
|
||||
|
||||
@@ -167,25 +167,25 @@ export function SettingsPage({ section }: SettingsPageProps) {
|
||||
return (
|
||||
<div>
|
||||
<h2 className='mb-[28px] font-medium text-[22px] text-[var(--text-primary)]'>{label}</h2>
|
||||
{effectiveSection === 'general' && <General />}
|
||||
{effectiveSection === 'integrations' && <Integrations />}
|
||||
{effectiveSection === 'secrets' && <Credentials />}
|
||||
{effectiveSection === 'template-profile' && <TemplateProfile />}
|
||||
{effectiveSection === 'credential-sets' && <CredentialSets />}
|
||||
{effectiveSection === 'access-control' && <AccessControl />}
|
||||
{effectiveSection === 'apikeys' && <ApiKeys />}
|
||||
{isBillingEnabled && effectiveSection === 'subscription' && <Subscription />}
|
||||
{isBillingEnabled && effectiveSection === 'team' && <TeamManagement />}
|
||||
{effectiveSection === 'sso' && <SSO />}
|
||||
{effectiveSection === 'byok' && <BYOK />}
|
||||
{effectiveSection === 'copilot' && <Copilot />}
|
||||
{effectiveSection === 'mcp' && <MCP initialServerId={mcpServerId} />}
|
||||
{effectiveSection === 'custom-tools' && <CustomTools />}
|
||||
{effectiveSection === 'skills' && <Skills />}
|
||||
{effectiveSection === 'workflow-mcp-servers' && <WorkflowMcpServers />}
|
||||
{effectiveSection === 'inbox' && <Inbox />}
|
||||
{effectiveSection === 'recently-deleted' && <RecentlyDeleted />}
|
||||
{effectiveSection === 'debug' && <Debug />}
|
||||
{effectiveSection === 'general' && <General />}
|
||||
{effectiveSection === 'integrations' && <Integrations />}
|
||||
{effectiveSection === 'secrets' && <Credentials />}
|
||||
{effectiveSection === 'template-profile' && <TemplateProfile />}
|
||||
{effectiveSection === 'credential-sets' && <CredentialSets />}
|
||||
{effectiveSection === 'access-control' && <AccessControl />}
|
||||
{effectiveSection === 'apikeys' && <ApiKeys />}
|
||||
{isBillingEnabled && effectiveSection === 'subscription' && <Subscription />}
|
||||
{isBillingEnabled && effectiveSection === 'team' && <TeamManagement />}
|
||||
{effectiveSection === 'sso' && <SSO />}
|
||||
{effectiveSection === 'byok' && <BYOK />}
|
||||
{effectiveSection === 'copilot' && <Copilot />}
|
||||
{effectiveSection === 'mcp' && <MCP initialServerId={mcpServerId} />}
|
||||
{effectiveSection === 'custom-tools' && <CustomTools />}
|
||||
{effectiveSection === 'skills' && <Skills />}
|
||||
{effectiveSection === 'workflow-mcp-servers' && <WorkflowMcpServers />}
|
||||
{effectiveSection === 'inbox' && <Inbox />}
|
||||
{effectiveSection === 'recently-deleted' && <RecentlyDeleted />}
|
||||
{effectiveSection === 'debug' && <Debug />}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -13,14 +13,18 @@ import {
|
||||
} from '@/components/emcn'
|
||||
import { Input } from '@/components/ui'
|
||||
import { formatDate } from '@/lib/core/utils/formatting'
|
||||
import type { MothershipResourceType } from '@/app/workspace/[workspaceId]/home/types'
|
||||
import { RESOURCE_REGISTRY } from '@/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-registry'
|
||||
import type { MothershipResourceType } from '@/app/workspace/[workspaceId]/home/types'
|
||||
import { useKnowledgeBasesQuery, useRestoreKnowledgeBase } from '@/hooks/queries/kb/knowledge'
|
||||
import { useRestoreTable, useTablesList } from '@/hooks/queries/tables'
|
||||
import { useRestoreWorkspaceFile, useWorkspaceFiles } from '@/hooks/queries/workspace-files'
|
||||
import { useRestoreWorkflow, useWorkflows } from '@/hooks/queries/workflows'
|
||||
import { useRestoreWorkspaceFile, useWorkspaceFiles } from '@/hooks/queries/workspace-files'
|
||||
|
||||
function getResourceHref(workspaceId: string, type: Exclude<ResourceType, 'all'>, id: string): string {
|
||||
function getResourceHref(
|
||||
workspaceId: string,
|
||||
type: Exclude<ResourceType, 'all'>,
|
||||
id: string
|
||||
): string {
|
||||
const base = `/workspace/${workspaceId}`
|
||||
switch (type) {
|
||||
case 'workflow':
|
||||
@@ -241,11 +245,8 @@ export function RecentlyDeleted() {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<SModalTabs
|
||||
value={activeTab}
|
||||
onValueChange={(v) => setActiveTab(v as ResourceType)}
|
||||
>
|
||||
<SModalTabsList activeValue={activeTab} className='border-b border-[var(--border)]'>
|
||||
<SModalTabs value={activeTab} onValueChange={(v) => setActiveTab(v as ResourceType)}>
|
||||
<SModalTabsList activeValue={activeTab} className='border-[var(--border)] border-b'>
|
||||
{TABS.map((tab) => (
|
||||
<SModalTabsTrigger key={tab.id} value={tab.id}>
|
||||
{tab.label}
|
||||
@@ -278,8 +279,8 @@ export function RecentlyDeleted() {
|
||||
>
|
||||
<ResourceIcon resource={resource} />
|
||||
|
||||
<div className='flex flex-col min-w-0 flex-1'>
|
||||
<span className='text-[13px] font-medium text-[var(--text-primary)] truncate'>
|
||||
<div className='flex min-w-0 flex-1 flex-col'>
|
||||
<span className='truncate font-medium text-[13px] text-[var(--text-primary)]'>
|
||||
{resource.name}
|
||||
</span>
|
||||
<span className='text-[12px] text-[var(--text-tertiary)]'>
|
||||
@@ -296,11 +297,7 @@ export function RecentlyDeleted() {
|
||||
onClick={() => handleRestore(resource)}
|
||||
className='shrink-0'
|
||||
>
|
||||
{isRestoring ? (
|
||||
<Loader2 className='h-3.5 w-3.5 animate-spin' />
|
||||
) : (
|
||||
'Restore'
|
||||
)}
|
||||
{isRestoring ? <Loader2 className='h-3.5 w-3.5 animate-spin' /> : 'Restore'}
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -141,6 +141,6 @@ export {
|
||||
tagVariants,
|
||||
} from './tag-input/tag-input'
|
||||
export { Textarea } from './textarea/textarea'
|
||||
export { toast, ToastProvider, useToast } from './toast/toast'
|
||||
export { TimePicker, type TimePickerProps, timePickerVariants } from './time-picker/time-picker'
|
||||
export { ToastProvider, toast, useToast } from './toast/toast'
|
||||
export { Tooltip } from './tooltip/tooltip'
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
'use client'
|
||||
|
||||
import {
|
||||
type ReactElement,
|
||||
type ReactNode,
|
||||
createContext,
|
||||
memo,
|
||||
type ReactElement,
|
||||
type ReactNode,
|
||||
useCallback,
|
||||
useContext,
|
||||
useEffect,
|
||||
@@ -12,8 +12,8 @@ import {
|
||||
useRef,
|
||||
useState,
|
||||
} from 'react'
|
||||
import { createPortal } from 'react-dom'
|
||||
import { X } from 'lucide-react'
|
||||
import { createPortal } from 'react-dom'
|
||||
import { Button } from '@/components/emcn/components/button/button'
|
||||
import { Tooltip } from '@/components/emcn/components/tooltip/tooltip'
|
||||
|
||||
@@ -189,7 +189,9 @@ const ToastItem = memo(function ToastItem({
|
||||
<div className='flex flex-col gap-[8px] p-[8px]'>
|
||||
<div className='flex items-start gap-[8px]'>
|
||||
{data.icon && (
|
||||
<span className='flex h-[16px] shrink-0 items-center text-[var(--text-icon)]'>{data.icon}</span>
|
||||
<span className='flex h-[16px] shrink-0 items-center text-[var(--text-icon)]'>
|
||||
{data.icon}
|
||||
</span>
|
||||
)}
|
||||
<div className='line-clamp-2 min-w-0 flex-1 font-medium text-[12px] text-[var(--text-body)]'>
|
||||
{data.variant === 'error' && (
|
||||
@@ -356,7 +358,11 @@ export function ToastProvider({ children }: { children?: ReactNode }) {
|
||||
createPortal(
|
||||
<>
|
||||
<style>{TOAST_KEYFRAMES}</style>
|
||||
<div aria-live='polite' aria-label='Toasts' className='fixed right-[16px] bottom-[16px] z-[10000400] grid'>
|
||||
<div
|
||||
aria-live='polite'
|
||||
aria-label='Toasts'
|
||||
className='fixed right-[16px] bottom-[16px] z-[10000400] grid'
|
||||
>
|
||||
{[...visibleToasts].reverse().map((t, index, stacked) => {
|
||||
const depth = stacked.length - index - 1
|
||||
const showCountdown = !isPaused && t.duration > 0
|
||||
|
||||
@@ -71,8 +71,8 @@ export { TableX } from './table-x'
|
||||
export { TagIcon } from './tag'
|
||||
export { TerminalWindow } from './terminal-window'
|
||||
export { Trash } from './trash'
|
||||
export { Trash2 } from './trash2'
|
||||
export { TrashOutline } from './trash-outline'
|
||||
export { Trash2 } from './trash2'
|
||||
export { TypeBoolean } from './type-boolean'
|
||||
export { TypeJson } from './type-json'
|
||||
export { TypeNumber } from './type-number'
|
||||
|
||||
Reference in New Issue
Block a user