Skip to content

Commit

Permalink
Fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Jan 14, 2025
1 parent 166b06d commit d19d766
Show file tree
Hide file tree
Showing 31 changed files with 47 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React, { createContext, useEffect, useState } from 'react';

import { type AdminConnection, I18n } from '@iobroker/adapter-react-v5';

import {registerRemotes, loadRemote} from '@module-federation/runtime';
import { registerRemotes, loadRemote } from '@module-federation/runtime';

import ActionSayText from '../Blocks/ActionSayText';
import ActionSendEmail from '../Blocks/ActionSendEmail';
import ActionTelegram from '../Blocks/ActionTelegram';
// import ActionTelegram from '../Blocks/ActionTelegram';
import ActionPushover from '../Blocks/ActionPushover';
import ActionWhatsappcmb from '../Blocks/ActionWhatsappcmb';
import ActionPushsafer from '../Blocks/ActionPushsafer';
Expand Down Expand Up @@ -135,16 +135,18 @@ export const ContextWrapper = ({ children, socket }: { socket: AdminConnection;
try {
registerRemotes(
[
{
name: obj.common.javascriptRules!.name,
entry: url,
type: (obj.common.javascriptRules! as any).type
}
{
name: obj.common.javascriptRules!.name,
entry: url,
type: (obj.common.javascriptRules! as any).type,
},
],
// force: true // may be needed to sideload remotes after the fact.
)
);
const Component = (
await loadRemote(obj.common.javascriptRules!.name + '/' + obj.common.javascriptRules!.name) as any
(await loadRemote(
obj.common.javascriptRules!.name + '/' + obj.common.javascriptRules!.name,
)) as any
).default;

if (Component) {
Expand Down
8 changes: 4 additions & 4 deletions src-editor/src/Dialogs/AddNewScript.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import { Cancel as IconCancel } from '@mui/icons-material';
import { I18n } from '@iobroker/adapter-react-v5';

import type { ScriptType } from '@/types';
const ImgJS = './assets/tileJS.png';
const ImgTS = './assets/tileTS.png';
const ImgBlockly = './assets/tileBlockly.png';
const ImgRules = './assets/tileRules.png';
import ImgJS from '../assets/tileJS.png';
import ImgTS from '../assets/tileTS.png';
import ImgBlockly from '../assets/tileBlockly.png';
import ImgRules from '../assets/tileRules.png';

const styles: Record<string, React.CSSProperties> = {
card: {
Expand Down
12 changes: 6 additions & 6 deletions src-editor/src/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ import {
FaFlagCheckered as IconCheck,
} from 'react-icons/fa';

const ImgJS = './assets/js.svg';
const ImgBlockly = './assets/blockly.svg';
const ImgTypeScript = './assets/typescript.svg';
const ImgBlockly2Js = './assets/blockly2js.svg';
const ImgRules2Js = './assets/rules2js.svg';
const ImgRules = './assets/rules.svg';
import ImgJS from './assets/js.svg';
import ImgBlockly from './assets/blockly.svg';
import ImgTypeScript from './assets/typescript.svg';
import ImgBlockly2Js from './assets/blockly2js.svg';
import ImgRules2Js from './assets/rules2js.svg';
import ImgRules from './assets/rules.svg';

import {
I18n,
Expand Down
8 changes: 4 additions & 4 deletions src-editor/src/SideMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ import {
IconExpert,
} from '@iobroker/adapter-react-v5';

const ImgJS = './assets/js.svg';
const ImgBlockly = './assets/blockly.svg';
const ImgTypeScript = './assets/typescript.svg';
const ImgRules = './assets/rules.svg';
import ImgJS from './assets/js.svg';
import ImgBlockly from './assets/blockly.svg';
import ImgTypeScript from './assets/typescript.svg';
import ImgRules from './assets/rules.svg';

import DialogRename from './Dialogs/Rename';
import DialogDelete from './Dialogs/Delete';
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 2 additions & 0 deletions src-editor/src/i18n/de.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"%s not found": "%s nicht gefunden",
"()": "()",
"(optional)": "(optional)",
"-": "-",
".": ".",
"AI code generator": "KI-Codegenerator",
"Ack": "Bestätigt",
"Actions": "Aktionen",
"Actual time of day": "Tatsächliche Tageszeit",
Expand Down
2 changes: 2 additions & 0 deletions src-editor/src/i18n/en.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"%s not found": "%s not found",
"()": "()",
"(optional)": "(optional)",
"-": "-",
".": ".",
"AI code generator": "AI code generator",
"Ack": "Acknowledged",
"Actions": "Actions",
"Actual time of day": "Actual time of day",
Expand Down
2 changes: 2 additions & 0 deletions src-editor/src/i18n/es.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"%s not found": "%s no encontrado",
"()": "()",
"(optional)": "(Opcional)",
"-": "-",
".": ".",
"AI code generator": "Generador de código de IA",
"Ack": "Admitido",
"Actions": "Comportamiento",
"Actual time of day": "Hora real del día",
Expand Down
2 changes: 2 additions & 0 deletions src-editor/src/i18n/fr.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"%s not found": "%s non trouvé",
"()": "()",
"(optional)": "(optionnel)",
"-": "-",
".": ".",
"AI code generator": "Générateur de code IA",
"Ack": "Reconnu",
"Actions": "Actions",
"Actual time of day": "Heure réelle de la journée",
Expand Down
2 changes: 2 additions & 0 deletions src-editor/src/i18n/it.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"%s not found": "%s non trovato",
"()": "()",
"(optional)": "(opzionale)",
"-": "-",
".": ".",
"AI code generator": "Generatore di codice AI",
"Ack": "Riconosciuto",
"Actions": "Azioni",
"Actual time of day": "Ora effettiva della giornata",
Expand Down
2 changes: 2 additions & 0 deletions src-editor/src/i18n/nl.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"%s not found": "%s niet gevonden",
"()": "()",
"(optional)": "(optioneel)",
"-": "-",
".": ".",
"AI code generator": "AI-codegenerator",
"Ack": "Erkend",
"Actions": "Acties",
"Actual time of day": "Werkelijke tijd van de dag",
Expand Down
2 changes: 2 additions & 0 deletions src-editor/src/i18n/pl.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"%s not found": "%s nie znaleziono",
"()": "()",
"(optional)": "(opcjonalny)",
"-": "-",
".": ".",
"AI code generator": "Generator kodu AI",
"Ack": "Potwierdzony",
"Actions": "Działania",
"Actual time of day": "Aktualna pora dnia",
Expand Down
2 changes: 2 additions & 0 deletions src-editor/src/i18n/pt.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"%s not found": "%s não encontrado",
"()": "()",
"(optional)": "(opcional)",
"-": "-",
".": ".",
"AI code generator": "Gerador de código de IA",
"Ack": "Reconhecido",
"Actions": "Ações",
"Actual time of day": "Hora real do dia",
Expand Down
2 changes: 2 additions & 0 deletions src-editor/src/i18n/ru.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"%s not found": "%s не найден",
"()": "()",
"(optional)": "(необязательный)",
"-": "-",
".": ".",
"AI code generator": "ИИ Генератор кода",
"Ack": "Подтверждение",
"Actions": "Действия",
"Actual time of day": "Фактическое время суток",
Expand Down
2 changes: 2 additions & 0 deletions src-editor/src/i18n/uk.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"%s not found": "%s не знайдено",
"()": "()",
"(optional)": "(необов'язково)",
"-": "-",
".": ".",
"AI code generator": "Генератор коду ШІ",
"Ack": "Визнано",
"Actions": "Дії",
"Actual time of day": "Фактичний час доби",
Expand Down
2 changes: 2 additions & 0 deletions src-editor/src/i18n/zh-cn.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"%s not found": "%s 未找到",
"()": "()",
"(optional)": "(选修的)",
"-": "-",
".": ".",
"AI code generator": "AI代码生成器",
"Ack": "确认",
"Actions": "动作",
"Actual time of day": "一天中的实际时间",
Expand Down
6 changes: 0 additions & 6 deletions src-editor/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ export default defineConfig({
'react',
'react-dom',
'@mui/material',
//'@mui/styles',
//'@mui/icons-material',
'prop-types',
'@iobroker/adapter-react-v5',
'react-ace',
]),
exposes: {},
remotes: {},
Expand All @@ -38,9 +35,6 @@ export default defineConfig({
react(),
vitetsConfigPaths(),
commonjs(),
svgr({
include: ['src/**/*.svg'],
}),
],
server: {
port: 3000,
Expand Down

0 comments on commit d19d766

Please sign in to comment.