Skip to content

Commit

Permalink
Merge branch 'main' into upgrade/webpack_5
Browse files Browse the repository at this point in the history
  • Loading branch information
GiviMAD committed Jan 26, 2024
2 parents f753718 + 63613c1 commit c2f4843
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 21 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/mainui.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Main UI

on:
push:
branches: [ main ]
paths: bundles/org.openhab.ui/web/**
pull_request:
branches: [ main ]
paths: bundles/org.openhab.ui/web/**

workflow_dispatch:

defaults:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ ui.config.basic.inlineSvg.label = SVG Incorporato
ui.config.basic.inlineSvg.description = Se abilitata, qualsiasi icona SVG fornita dal server delle icone openHAB verrà automaticamente convertita in SVG incorporato nella pagina WEB, permettendo il controllo del suo colore con la proprietà "iconcolor" del sitemap nel caso in cui l'icona SVG ha impostato "currentColor" come colore di riempimento. Si noti che questo funzionerà con icone SVG personalizzate ma non con tutte le icone confezionate dall'iconset classico poiché sono definite con una tavolozza di colori precodificata. Questa funzione è disabilitata per impostazione predefinita.
ui.config.basic.inlineSvg.option.true = Abilita
ui.config.basic.inlineSvg.option.false = Disabilita
ui.config.basic.nbColumns.label = Numero di Colonne
ui.config.basic.nbColumns.description = Il numero di colonne da considerare per riempire la griglia in larghezza su schermo grande (desktop) e su schermo medio (tablet).
ui.config.basic.nbColumns.option.1-1 = 1 colonna su desktop e tablet
ui.config.basic.nbColumns.option.2-1 = 2 colonne su desktop ma solo 1 su tablet
ui.config.basic.nbColumns.option.2-2 = 2 colonne su desktop e tablet
ui.config.basic.nbColumns.option.3-1 = 3 colonne su desktop ma solo 1 su tablet
ui.config.basic.nbColumns.option.3-2 = 3 colonne su desktop ma solo 2 su tablet
ui.config.basic.theme.label = Tema
ui.config.basic.theme.description = Definisce il tema dell'interfaccia utente.
ui.config.basic.theme.option.bright = Luminoso
Expand All @@ -41,6 +48,6 @@ main.long-polling-mode-msg = Sottoscrizione SSE non riuscita ({error})\: esecuzi

# sitemaps

sitemaps-list-empty.info = Sembra che non ci sia alcuna mappa del sito definita. Per crearne una, fare riferimento alla documentazione.
sitemaps-list-empty.info = Sembra che non ci sia alcuna sitemap definita. Per crearne una, fare riferimento alla documentazione.
sitemaps-list.welcome = Benvenuto\!
sitemaps-list.available-sitemaps = Mappe del sito disponibili
sitemaps-list.available-sitemaps = Sitemap disponibili
27 changes: 16 additions & 11 deletions bundles/org.openhab.ui.basic/web-src/smarthome.js
Original file line number Diff line number Diff line change
Expand Up @@ -2677,7 +2677,7 @@
_t.navigate = function(){};
_t.source = new EventSource(subscribeLocation);

_t.source.addEventListener("event", function(payload) {
function handleEventSourceEvent(payload) {
if (_t.paused) {
return;
}
Expand Down Expand Up @@ -2749,10 +2749,17 @@
};
_t.updateWidget(smarthome.dataModel[data.widgetId], update);
}
});
}

_t.source.onerror = function() {
_t.source.addEventListener("event", handleEventSourceEvent);

_t.closeConnection = function() {
_t.source.removeEventListener("event", handleEventSourceEvent);
_t.source.close();
};

_t.source.onerror = function() {
_t.closeConnection();
_t.connectionError();
};
}
Expand Down Expand Up @@ -2955,9 +2962,7 @@
responseJSON,
subscribeLocation,
subscribeLocationArray,
sitemap,
subscriptionId,
page;
subscriptionId;

try {
responseJSON = JSON.parse(response.responseText);
Expand All @@ -2978,14 +2983,11 @@
subscribeLocationArray = subscribeLocation.split("/");
subscriptionId = subscribeLocationArray[subscribeLocationArray.length - 1];

sitemap = document.body.getAttribute("data-sitemap");
page = document.body.getAttribute("data-page-id");

smarthome.subscriptionId = subscriptionId;

initSubscription(subscribeLocation +
"?sitemap=" + sitemap +
"&pageid=" + page);
"?sitemap=" + smarthome.UI.sitemap +
"&pageid=" + smarthome.UI.page);
};

_t.subscriberError = function(xhr) {
Expand All @@ -2999,6 +3001,8 @@
initSubscription(null);
};

_t.closeConnection = function(){};

ajax({
url: _t.subscribeRequestURL,
type: "POST",
Expand Down Expand Up @@ -3061,6 +3065,7 @@

window.addEventListener("beforeunload", function() {
smarthome.changeListener.suppressErrors();
smarthome.changeListener.closeConnection();
});
});
})({
Expand Down
1 change: 1 addition & 0 deletions bundles/org.openhab.ui/web/src/assets/i18n/common/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"home.overview.tab": "Panoramica",
"home.overview.button.documentation": "Documentazione",
"home.overview.button.tutorial": "Panoramica",
"home.overview.button.quickstart": "Apri Assistente Avvio Rapido",
"home.locations.title": "Ambienti",
"home.locations.tab": "Ambienti",
"home.equipment.title": "Dispositivi",
Expand Down
11 changes: 10 additions & 1 deletion bundles/org.openhab.ui/web/src/assets/i18n/common/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"dialogs.close": "Zamknij",
"dialogs.copy": "Kopiuj",
"dialogs.delete": "Usuń",
"dialogs.reload": "Przeładuj",
"dialogs.retry": "Spróbuj ponownie",
"dialogs.showAll": "Pokaż wszystko",
"dialogs.search": "Szukaj",
"dialogs.search.items": "Szukaj elementów",
"dialogs.search.things": "Szukaj rzeczy",
Expand All @@ -16,6 +19,7 @@
"home.overview.tab": "Przegląd",
"home.overview.button.documentation": "Dokumentacja",
"home.overview.button.tutorial": "Instrukcja",
"home.overview.button.quickstart": "Otwórz Asystenta szybkiego startu",
"home.locations.title": "Lokalizacje",
"home.locations.tab": "Lokalizacje",
"home.equipment.title": "Urządzenia",
Expand All @@ -33,11 +37,16 @@
"sidebar.noPages": "Brak stron",
"sidebar.administration": "Administracja",
"sidebar.settings": "Ustawienia",
"sidebar.addOnStore": "Sklep z Dodatkami",
"sidebar.developerTools": "Narzędzia deweloperskie",
"sidebar.helpAbout": "Pomoc i informacje",
"sidebar.unlockAdmin": "Odblokuj administrację",
"sidebar.tip.signIn": "Zaloguj się jako administrator aby uzyskać dostęp do ustawień",
"page.navbar.back": "Wstecz",
"page.navbar.edit": "Edytuj",
"admin.notTranslatedYet": "Obszar administracyjny nie jest jeszcze przetłumaczony."
"admin.notTranslatedYet": "Obszar administracyjny nie jest jeszcze przetłumaczony.",
"error.communicationFailure": "Błąd w komunikacji",
"error.itemNotFound": "%s nie znaleziono",
"error.notReachable.title": "openHAB jest rozłączony",
"error.notReachable.msg": "W tej chwili nie można uzyskać dostępu do serwera openHAB. Sprawdź połączenie sieciowe i twój serwer."
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"setupwizard.location.configureLater": "Skonfiguruj później w Ustawieniach",
"setupwizard.addons.title": "Zainstaluj dodatki",
"setupwizard.addons.header1": "Większość funkcji openHAB jest dostarczana przez dodatki.",
"setupwizard.addons.header2": "Wybierz te, które chcesz zainstalować od razu.",
"setupwizard.addons.header2": "Wybierz dodatki, które chcesz teraz zainstalować.",
"setupwizard.addons.header3": "Zalecany zestaw dodatków został wstępnie wybrany.",
"setupwizard.addons.browseAddonsOnWebsite": "Przeglądaj dodatki na openhab.org",
"setupwizard.addons.selectAddons": "Wybierz dodatki do instalacji",
"setupwizard.addons.selectAddons.placeholder": "Wypróbuj: astro, mqtt, hue, knx...",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
"CONFIGURATION_ERROR": "BŁĄD: KONFIGURACJA",
"BRIDGE_OFFLINE": "BŁĄD: BRIDGE",
"FIRMWARE_UPDATING": "AKTUALIZACJA OPROGRAMOWANIA",
"GONE": "GONE"
"GONE": "GONE",
"NOT_YET_READY": "NIE JEST GOTOWY"
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<f7-list-input label="Label" type="text" :disabled="!ready || readOnly" placeholder="e.g. My Thing" :value="thing.label"
@input="thing.label = $event.target.value; $emit('updated')" required validate />
<f7-list-input label="Location" type="text" :disabled="!ready || readOnly" placeholder="e.g. Kitchen" :value="thing.location"
@input="thing.location = $event.target.value; $emit('updated')" clear-button />
@input="thing.location = $event.target.value; $emit('updated')" :clear-button="ready && !readOnly" />
</f7-list>
<f7-block-title v-if="ready && thingType.supportedBridgeTypeUIDs.length">
Parent Bridge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ export default {
things: 'Manage the physical layer',
model: 'The semantic model of your home',
items: 'Manage the functional layer',
pages: 'Design displays for user control & monitoring',
pages: 'Design displays for user interaction',
transform: 'Make raw data human-readable',
persistence: 'Persist data for future use',
persistence: 'How to keep data for future use',
rules: 'Automate with triggers and actions',
scenes: 'Store a set of desired states as a scene',
scenes: 'Store a set of desired states to recall',
scripts: 'Rules dedicated to running code',
schedule: 'View upcoming time-based rules'
},
Expand Down

0 comments on commit c2f4843

Please sign in to comment.