Remove unnecessary console.log statements across multiple files to clean up the codebase and improve performance. This includes updates in appupdate.js, macappupdate.js, mainWindow.js, and various components in the Dashboard context.
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
This commit is contained in:
parent
634be89698
commit
83f5b20168
@ -184,7 +184,6 @@ const downloadArtifact = async (artifact, destinationPath, webContents) => {
|
||||
}
|
||||
|
||||
const restartApp = (app) => {
|
||||
console.log('[app-update] restarting app')
|
||||
app.relaunch()
|
||||
app.exit(0)
|
||||
}
|
||||
|
||||
@ -111,13 +111,6 @@ export const launchMacInstaller = (
|
||||
const installScript = buildMacInstallScript(installerPath, logPath)
|
||||
const promptName = 'farmcontrol'
|
||||
|
||||
console.log('[app-update] launching macOS installer:', {
|
||||
installerPath,
|
||||
installScript,
|
||||
logPath,
|
||||
promptName
|
||||
})
|
||||
|
||||
sendProgress(webContents, {
|
||||
phase: 'installing',
|
||||
percent: 0,
|
||||
@ -140,7 +133,6 @@ export const launchMacInstaller = (
|
||||
|
||||
await fs.unlink(logPath).catch(() => {})
|
||||
|
||||
if (stdout) console.log('[app-update] installer stdout:', stdout)
|
||||
if (stderr) console.error('[app-update] installer stderr:', stderr)
|
||||
|
||||
if (error) {
|
||||
@ -174,7 +166,6 @@ export const launchMacInstaller = (
|
||||
message: message || 'Installation complete. Restarting Farm Control...'
|
||||
})
|
||||
|
||||
console.log('[app-update] installer completed successfully')
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
|
||||
@ -157,7 +157,6 @@ function setupWindowEvents() {
|
||||
})
|
||||
})
|
||||
win.on('enter-full-screen', () => {
|
||||
console.log('Entered fullscreen')
|
||||
win.webContents.send('window-state', {
|
||||
isFullScreen: true
|
||||
})
|
||||
@ -293,7 +292,6 @@ export function setupMainWindowAppEvents(app) {
|
||||
export function setupDevAuthServer() {
|
||||
const env = (process.env.NODE_ENV || 'development').trim()
|
||||
if (env == 'development') {
|
||||
console.log('Starting development auth web server...')
|
||||
import('express').then(({ default: express }) => {
|
||||
const app = express()
|
||||
const port = 3500
|
||||
@ -310,11 +308,7 @@ export function setupDevAuthServer() {
|
||||
}
|
||||
})
|
||||
|
||||
app.listen(port, () => {
|
||||
console.log(`Dev auth server running on http://localhost:${port}`)
|
||||
})
|
||||
app.listen(port, () => {})
|
||||
})
|
||||
} else {
|
||||
console.log('Will use url scheme instead of auth server.')
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,14 +9,7 @@ const DEBUG_PREFIX = '[app-update][win-progress]'
|
||||
|
||||
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
|
||||
|
||||
const debugLog = (message, details) => {
|
||||
if (details === undefined) {
|
||||
console.log(`${DEBUG_PREFIX} ${message}`)
|
||||
return
|
||||
}
|
||||
|
||||
console.log(`${DEBUG_PREFIX} ${message}`, details)
|
||||
}
|
||||
const debugLog = () => {}
|
||||
|
||||
const decodeMsiLogBuffer = (buffer) => {
|
||||
if (!buffer?.length) return ''
|
||||
|
||||
@ -66,8 +66,6 @@ const DeployJob = ({
|
||||
}
|
||||
}, [objectData])
|
||||
|
||||
console.log(objectData)
|
||||
|
||||
const steps = [
|
||||
{
|
||||
title: 'Confirm',
|
||||
|
||||
@ -19,7 +19,6 @@ const FilePreview = ({ file, style = {} }) => {
|
||||
return
|
||||
}
|
||||
setLoading(true)
|
||||
console.log('fetching file content', file)
|
||||
const objectUrl = await fetchFileContent(file, false)
|
||||
if (objectUrl == null) {
|
||||
setLoading(false)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
import { useState } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { Typography, Button, Tag, Badge, Flex, Card, Divider } from 'antd'
|
||||
import {
|
||||
@ -31,10 +31,6 @@ const Notification = ({
|
||||
}) => {
|
||||
const [deleting, setDeleting] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
console.log('notificationData', JSON.stringify(notification))
|
||||
}, [notification])
|
||||
|
||||
const getNotificationIcon = (type) => {
|
||||
switch (type) {
|
||||
case 'info':
|
||||
|
||||
@ -376,7 +376,6 @@ const ObjectChildTable = ({
|
||||
const currentItems = Array.isArray(itemsSource) ? itemsSource : []
|
||||
const newItems = [...currentItems, newItem]
|
||||
|
||||
console.log('newItems', newItems)
|
||||
if (typeof onChange === 'function') {
|
||||
onChange(newItems)
|
||||
}
|
||||
|
||||
@ -1770,8 +1770,6 @@ const ApiServerProvider = ({ children }) => {
|
||||
'launchSession'
|
||||
)
|
||||
|
||||
console.log(new URLSearchParams(location.search))
|
||||
|
||||
if (
|
||||
authenticated !== true ||
|
||||
!token ||
|
||||
|
||||
@ -303,8 +303,6 @@ const AuthProvider = ({ children }) => {
|
||||
profileImage?._id ??
|
||||
(typeof profileImage === 'string' ? profileImage : null)
|
||||
|
||||
console.log('Fetching profile image:', profileImageId)
|
||||
|
||||
if (!token) {
|
||||
if (profileImageUrlRef.current) {
|
||||
URL.revokeObjectURL(profileImageUrlRef.current)
|
||||
@ -372,10 +370,6 @@ const AuthProvider = ({ children }) => {
|
||||
}
|
||||
}, [userProfile?.profileImage, token])
|
||||
|
||||
useEffect(() => {
|
||||
console.log('userProfile', userProfile)
|
||||
}, [userProfile])
|
||||
|
||||
const logout = useCallback(
|
||||
(redirectUri = '/login') => {
|
||||
setAuthenticated(false)
|
||||
|
||||
@ -57,7 +57,6 @@ const EmailNotificationTemplate = () => {
|
||||
)
|
||||
}
|
||||
case 'newNote': {
|
||||
console.log('newNote metadata', JSON.stringify(metadata, null, 2))
|
||||
const model = getModelByName(metadata?.note?.parentType)
|
||||
const infoAction =
|
||||
model.actions?.find((action) => action.name === 'info') ?? null
|
||||
|
||||
@ -161,7 +161,6 @@ export const ListingVarient = {
|
||||
showHyperlink: true,
|
||||
readOnly: true,
|
||||
value: (objectData) => {
|
||||
console.log('listing product id', objectData?.listing?.product?._id)
|
||||
return objectData?.listing?.product
|
||||
},
|
||||
required: true,
|
||||
|
||||
@ -244,7 +244,6 @@ export const OrderItem = {
|
||||
showHyperlink: true,
|
||||
columnWidth: 300,
|
||||
masterFilter: (objectData) => {
|
||||
console.log(objectData)
|
||||
if (objectData?.itemType === 'filament' && objectData?.item?._id) {
|
||||
return { filament: objectData.item._id }
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user