mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
proper warning
This commit is contained in:
parent
037f9f38e5
commit
4968452003
2 changed files with 4 additions and 4 deletions
|
|
@ -90,7 +90,7 @@ const MemoizedModelSelectBox = ({ featureName }: { featureName: FeatureName }) =
|
|||
|
||||
}
|
||||
|
||||
const WarningBox = ({ text, className }: { text: string, className?: string }) => {
|
||||
export const WarningBox = ({ text, className }: { text: string, className?: string }) => {
|
||||
|
||||
const accessor = useAccessor()
|
||||
const commandService = accessor.get('ICommandService')
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import { useScrollbarStyles } from '../util/useScrollbarStyles.js'
|
|||
import { isWindows, isLinux, isMacintosh } from '../../../../../../../base/common/platform.js'
|
||||
import { URI } from '../../../../../../../base/common/uri.js'
|
||||
import { env } from '../../../../../../../base/common/process.js'
|
||||
import { WarningBox } from './ModelDropdown.js'
|
||||
|
||||
const SubtleButton = ({ onClick, text, icon, disabled }: { onClick: () => void, text: string, icon: React.ReactNode, disabled: boolean }) => {
|
||||
|
||||
|
|
@ -486,7 +487,7 @@ const transferTheseFilesOfOS = (os: 'mac' | 'windows' | 'linux' | null): Transfe
|
|||
throw new Error(`os '${os}' not recognized`)
|
||||
}
|
||||
|
||||
const os = null//isWindows ? 'windows' : isMacintosh ? 'mac' : isLinux ? 'linux' : null
|
||||
const os = isWindows ? 'windows' : isMacintosh ? 'mac' : isLinux ? 'linux' : null
|
||||
let transferTheseFiles: TransferFilesInfo = []
|
||||
let transferError: string | null = null
|
||||
|
||||
|
|
@ -499,8 +500,7 @@ const OneClickSwitch = () => {
|
|||
|
||||
if (transferTheseFiles.length === 0)
|
||||
return <>
|
||||
<div>One-click transfer not available.</div>
|
||||
<div>{transferError}</div>
|
||||
<WarningBox text={transferError ?? `One-click transfer not available.`} />
|
||||
</>
|
||||
|
||||
const onClick = async () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue