diff --git a/CHANGELOG.md b/CHANGELOG.md index 0415c548..6e9e92bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ ## [Unreleased] +### Added +- Added Pybricks logo when no files open. + ### Changed - Firmware restore for hubs with USB is now done in-app ([pybricks-code#1104]). diff --git a/package.json b/package.json index 6ac3a25a..879ead97 100644 --- a/package.json +++ b/package.json @@ -113,6 +113,7 @@ "style-loader": "^3.3.1", "tailwindcss": "^3.2.4", "terser-webpack-plugin": "^5.3.6", + "two.js": "^0.8.10", "typed-redux-saga": "^1.5.0", "typescript": "~4.9.3", "usehooks-ts": "^2.9.1", diff --git a/src/editor/Editor.tsx b/src/editor/Editor.tsx index ef228688..cf4c3174 100644 --- a/src/editor/Editor.tsx +++ b/src/editor/Editor.tsx @@ -16,6 +16,7 @@ import { Text, } from '@blueprintjs/core'; import { ContextMenu2, ResizeSensor2 } from '@blueprintjs/popover2'; +import classNames from 'classnames'; import * as monaco from 'monaco-editor'; import tomorrowNightEightiesTheme from 'monaco-themes/themes/Tomorrow-Night-Eighties.json'; import xcodeTheme from 'monaco-themes/themes/Xcode_default.json'; @@ -29,6 +30,7 @@ import { compile } from '../mpy/actions'; import { useSelector } from '../reducers'; import { useSettingIsShowDocsEnabled } from '../settings/hooks'; import { isMacOS } from '../utils/os'; +import Welcome from './Welcome'; import { editorActivateFile, editorCloseFile } from './actions'; import { useI18n } from './i18n'; import * as pybricksMicroPython from './pybricksMicroPython'; @@ -465,12 +467,14 @@ const Editor: React.VFC = () => { }; }); + const isEmpty = useSelector((s) => s.editor.openFileUuids.length === 0); + return (