Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"dependencies": {
"body-parser": "^1.19.0",
"cors": "^2.8.5",
"dotenv": "^16.4.1",
"express": "^4.17.1",
"node-hue-api": "^5.0.0-beta.2",
"sequelize": "^6.6.4",
Expand Down
2 changes: 2 additions & 0 deletions server/src/Environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export default class Environment {
const username = process.env.HUE_BRIDGE_USER || '';
const ipAddress = process.env.HUE_BRIDGE_IP_ADDRESS || '';

//console.log('username',username, 'ipAddress',ipAddress )

this.client =
await NodeHueApi
.api
Expand Down
6 changes: 5 additions & 1 deletion server/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import installProgramRoutes from './api/programs';
import installInterpreterRoutes from './api/interpreter';
import logger from './logger';

import 'dotenv/config'

const REQUIRED_ENV_VARS = [
'HUE_BRIDGE_IP_ADDRESS',
'HUE_BRIDGE_CLIENT_KEY',
Expand Down Expand Up @@ -54,7 +56,9 @@ installInterpreterRoutes(app, interpreter);

async function run() {
await connectToDB();
await environment.initialize();
// Da error porque no se conecta a las luces Philips HUE, aunque no se conecte tendria que arrancar el servidor, ya que hay mas environment...
// It gives an error because it does not connect to the Philips HUE lights, even if it does not connect, it would have to start the server, since there is more environment...
// await environment.initialize();

server.listen(port, () => {
logger.info(`Server listening on port ${port}`);
Expand Down
94 changes: 92 additions & 2 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
"eject": "react-scripts eject"
},
"dependencies": {
"@blockly/theme-dark": "^6.0.5",
"@blockly/theme-deuteranopia": "^5.0.5",
"@blockly/theme-highcontrast": "^5.0.5",
"@blockly/theme-modern": "^5.0.5",
"@blockly/theme-tritanopia": "^5.0.5",
"@emotion/react": "^11.4.0",
"@emotion/styled": "^11.3.0",
"react": "^17.0.2",
Expand Down
16 changes: 15 additions & 1 deletion ui/src/Editor/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ import LightBlocksTheme from './theme';
import FieldColorComponents from './FieldColorComponents';
import useDebounce from './useDebounce';

// @ts-ignore
import ThemeDarkTheme from '@blockly/theme-dark';
// @ts-ignore
import ThemeDeuteranopia from '@blockly/theme-deuteranopia';
// // @ts-ignore
// import ThemeHackermode from '@blockly/theme-hackermode';
// @ts-ignore
import ThemeHighcontrast from '@blockly/theme-highcontrast';
// @ts-ignore
import ThemeModern from '@blockly/theme-modern';
// @ts-ignore
import ThemeTritanopia from '@blockly/theme-tritanopia';

interface Props {
programs: ProgramMeta[]
runningProgramId: number | null
Expand Down Expand Up @@ -47,7 +60,8 @@ const Editor: React.FC<Props> = ({ programs, runningProgramId, currentBlockId, o
colour: '#ccc',
snap: true,
},
theme: LightBlocksTheme,
// theme: LightBlocksTheme,
theme: ThemeDarkTheme,
renderer: 'zelos'
},
toolboxConfiguration: TOOLBOX,
Expand Down