fix: fixing linter and ts issues

This commit is contained in:
Kevin
2025-06-17 16:24:15 -05:00
parent d25ecfc480
commit c7c3d4b055
7 changed files with 20 additions and 20 deletions

1
package-lock.json generated
View File

@ -2496,7 +2496,6 @@
},
"node_modules/@clack/prompts/node_modules/is-unicode-supported": {
"version": "1.3.0",
"extraneous": true,
"inBundle": true,
"license": "MIT",
"engines": {

View File

@ -7,8 +7,7 @@ import {
type FileExplorerRowContextMenuProps,
} from '@src/components/Explorer/utils'
import { ContextMenu, ContextMenuItem } from '@src/components/ContextMenu'
import { useRef, useState } from 'react'
import usePlatform from '@src/hooks/usePlatform'
import { useRef } from 'react'
export const StatusDot = () => {
return <span></span>
@ -99,7 +98,6 @@ function FileExplorerRowContextMenu({
onOpenInNewWindow,
callback,
}: FileExplorerRowContextMenuProps) {
const platform = usePlatform()
return (
<ContextMenu
menuTargetElement={itemRef}
@ -210,6 +208,7 @@ export const FileExplorerRowElement = ({
const isContextMenuRow = contextMenuRow?.key === row.key
const isMyRowRenaming = isContextMenuRow && isRenaming
/* eslint-disable */
return (
<div
ref={rowElementRef}
@ -271,7 +270,9 @@ export const FileExplorerRowElement = ({
row.rowDelete()
}}
onClone={() => {}}
onOpenInNewWindow={() => {row.rowOpenInNewWindow()}}
onOpenInNewWindow={() => {
row.rowOpenInNewWindow()
}}
callback={row.rowContextMenu}
/>
</div>

View File

@ -124,8 +124,12 @@ export const ProjectExplorer = ({
* If any parent is closed, keep the history of open children
*/
let isAnyParentClosed = false
// Not a real path
/* eslint-disable */
const pathIterator = child.parentPath.split('/')
while (pathIterator.length > 0) {
// Not a real path
/* eslint-disable */
const key = pathIterator.join('/')
const isOpened = openedRows[key] || project.name === key
isAnyParentClosed = isAnyParentClosed || !isOpened

View File

@ -2,7 +2,6 @@ import type { ReactNode } from 'react'
import type { CustomIconName } from '@src/components/CustomIcon'
import { sortFilesAndDirectories } from '@src/lib/desktopFS'
import type { FileEntry } from '@src/lib/project'
import { DEFAULT_FILE_NAME } from '@src/lib/constants'
export interface FileExplorerEntry extends FileEntry {
parentPath: string

View File

@ -515,6 +515,7 @@ export const systemIOMachineDesktop = systemIOMachine.provide({
}: {
input: {
context: SystemIOContext
rootContext: AppMachineContext
requestedPath: string
}
}) => {

View File

@ -39,11 +39,6 @@ import {
enableMenu,
} from '@src/menu'
import fs from 'fs'
import {
installExtension,
REDUX_DEVTOOLS,
REACT_DEVELOPER_TOOLS,
} from 'electron-devtools-installer'
// If we're on Windows, pull the local system TLS CAs in
require('win-ca')
@ -85,14 +80,6 @@ process.env.VITE_KC_CONNECTION_TIMEOUT_MS ??=
console.log('Environment vars', process.env)
console.log('Parsed CLI args', args)
app.whenReady().then(() => {
installExtension([REDUX_DEVTOOLS, REACT_DEVELOPER_TOOLS])
.then(([redux, react]) =>
console.log(`Added Extensions: ${redux.name}, ${react.name}`)
)
.catch((err) => console.log('An error occurred: ', err))
})
/// Register our application to handle all "zoo-studio:" protocols.
const singleInstanceLock = app.requestSingleInstanceLock()
if (process.defaultApp) {

View File

@ -213,7 +213,16 @@ const Home = () => {
const kclSamples = projects.find((p) => {
return p.name === 'level1'
})
}) || {
metadata: null,
kcl_file_count: 0,
directory_count: 0,
default_file: '',
path: '',
name: '',
children: [],
readWriteAccess: true,
}
return (
<div className="relative flex flex-col items-stretch h-screen w-screen overflow-hidden">
<AppHeader