Skip to content

Commit

Permalink
Showed the version which is in repository by update of adapter to spe…
Browse files Browse the repository at this point in the history
…cific version
  • Loading branch information
GermanBluefox committed Dec 1, 2024
1 parent cb39347 commit e5d741b
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/adapter-react-v5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If you want to create the configuration page with ReactJS:
- Change `name` from `src` to `ADAPTERNAME-admin` (Of course replace `ADAPTERNAME` with yours)
- Add to devDependencies:
```json
"@iobroker/adapter-react-v5": "^7.4.2",
"@iobroker/adapter-react-v5": "^7.4.3",
```
Versions can be higher.
So your `src/package.json` should look like:
Expand All @@ -24,7 +24,7 @@ If you want to create the configuration page with ReactJS:
"version": "0.1.0",
"private": true,
"dependencies": {
"@iobroker/adapter-react-v5": "^7.4.2",
"@iobroker/adapter-react-v5": "^7.4.3",
"@iobroker/build-tools": "^1.0.0",
"babel-eslint": "^10.1.0",
"react-scripts": "^5.0.1"
Expand Down
4 changes: 2 additions & 2 deletions packages/admin/src-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,5 @@
}
]
],
"version": "7.4.2"
}
"version": "7.4.3"
}
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ export const genericStyles: Record<string, any> = {
currentVersionText: (theme: IobTheme) => ({
color: theme.palette.mode === 'dark' ? '#a3ffa3' : '#009800',
fontWeight: 'bold',
marginLeft: '4px',
}),
repoVersionText: (theme: IobTheme) => ({
color: theme.palette.mode === 'dark' ? '#a3fcff' : '#005498',
fontWeight: 'bold',
marginLeft: '4px',
}),
rating: {},
containerVersion: {},
Expand Down Expand Up @@ -719,6 +725,8 @@ export default abstract class AdapterGeneric<
return null;
}

const repoVersion = this.props.context.repository[this.props.adapterName]?.version;

return (
<CustomModal
title={this.props.context.t('Please select specific version of %s', this.props.adapterName)}
Expand Down Expand Up @@ -829,9 +837,13 @@ export default abstract class AdapterGeneric<
component="span"
sx={this.styles.currentVersionText}
>{`(${this.props.context.t('current')})`}</Box>
) : (
''
)}
) : null}
{repoVersion === version ? (
<Box
component="span"
sx={this.styles.repoVersionText}
>{`(${this.props.context.t('repository')})`}</Box>
) : null}
</Typography>
<Typography
variant="body2"
Expand Down
2 changes: 2 additions & 0 deletions packages/admin/src-admin/src/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,7 @@
"copy": "Kopie",
"copy note": "Strg+A gefolgt von Strg+C drücken, um den Inhalt in die Zwischenablage zu kopieren. Irgendwo klicken, um das Fenster zu schliessen.",
"create operation": "erzeugen",
"current": "aktuelle",
"custom enum": "Benutzerdefiniert",
"custom group": "Benutzerdefinierte Gruppe",
"custom range": "Benutzerdefinierter Bereich",
Expand Down Expand Up @@ -1515,6 +1516,7 @@
"reload instance": "Instanz neu starten",
"repeat": "wiederholen",
"repo_update_hint": "Sie haben die Ausführung automatischer Upgrades für das „Beta“-Repository konfiguriert.\nBeachten Sie, dass dieser Adapter, wenn das Beta-Repository aktiv ist, Beta-Updates entsprechend dieser Konfiguration automatisch einbindet!",
"repository": "Repository",
"rest": "Weitere (nur lesend)",
"restart": "Automatisch neu starten",
"restart script": "Skript neu starten",
Expand Down
2 changes: 2 additions & 0 deletions packages/admin/src-admin/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,7 @@
"copy": "copy",
"copy note": "Press Ctrl+A and Ctrl+C to copy the log to the clipboard and click with the mouse anywhere to close.",
"create operation": "create",
"current": "current",
"custom enum": "?ustom enum",
"custom group": "Custom group",
"custom range": "custom range",
Expand Down Expand Up @@ -1515,6 +1516,7 @@
"reload instance": "reload instance",
"repeat": "repeat",
"repo_update_hint": "You have configured to run automatic upgrades for the \"beta\" repository, be aware that if the beta repository is active this adapter will pull in beta updates automatically according to this configuration!",
"repository": "repository",
"rest": "rest (read only)",
"restart": "auto restart",
"restart script": "restart script",
Expand Down
2 changes: 2 additions & 0 deletions packages/admin/src-admin/src/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,7 @@
"copy": "copiar",
"copy note": "Presione Ctrl + A y luego Ctrl + C para copiar el contenido al portapapeles. Haga clic en algún lugar para cerrar la ventana.",
"create operation": "producir",
"current": "actual",
"custom enum": "Enum personalizado",
"custom group": "Grupo personalizado",
"custom range": "rango personalizado",
Expand Down Expand Up @@ -1515,6 +1516,7 @@
"reload instance": "reiniciar la instancia",
"repeat": "repetir",
"repo_update_hint": "Ha configurado para ejecutar actualizaciones automáticas para el repositorio \"beta\". Tenga en cuenta que si el repositorio beta está activo, este adaptador obtendrá actualizaciones beta automáticamente de acuerdo con esta configuración.",
"repository": "repositorio",
"rest": "además (sólo lectura)",
"restart": "reiniciar",
"restart script": "reiniciar el script",
Expand Down
2 changes: 2 additions & 0 deletions packages/admin/src-admin/src/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,7 @@
"copy": "copie",
"copy note": "Appuyez sur Ctrl + A puis sur Ctrl + C pour copier le contenu dans le presse-papiers. Cliquez quelque part pour fermer la fenêtre.",
"create operation": "créer",
"current": "actuel",
"custom enum": "Enum personnalisé",
"custom group": "Groupe personnalisé",
"custom range": "gamme personnalisée",
Expand Down Expand Up @@ -1515,6 +1516,7 @@
"reload instance": "reload instance",
"repeat": "répéter",
"repo_update_hint": "Vous avez configuré pour exécuter des mises à niveau automatiques pour le référentiel \"bêta\", sachez que si le référentiel bêta est actif, cet adaptateur extraira automatiquement les mises à jour bêta en fonction de cette configuration !",
"repository": "dépôt",
"rest": "autres (lecture seulement)",
"restart": "redémarrer",
"restart script": "redémarrer le script",
Expand Down
2 changes: 2 additions & 0 deletions packages/admin/src-admin/src/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,7 @@
"copy": "Copia",
"copy note": "Premi Ctrl + A e Ctrl + C per copiare il registro negli appunti e fai clic con il mouse ovunque per chiuderlo.",
"create operation": "Creare",
"current": "corrente",
"custom enum": "Enum personalizzato",
"custom group": "Gruppo personalizzato",
"custom range": "gamma personalizzata",
Expand Down Expand Up @@ -1515,6 +1516,7 @@
"reload instance": "Ricarica istanza",
"repeat": "ripetere",
"repo_update_hint": "Hai configurato per eseguire aggiornamenti automatici per il repository \"beta\", tieni presente che se il repository beta è attivo questo adattatore inserirà automaticamente gli aggiornamenti beta in base a questa configurazione!",
"repository": "deposito",
"rest": "Riposo (sola lettura)",
"restart": "Riavvio automatico",
"restart script": "Riavviare lo script",
Expand Down
2 changes: 2 additions & 0 deletions packages/admin/src-admin/src/i18n/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,7 @@
"copy": "kopiëren",
"copy note": "Druk op Ctrl + A en vervolgens op Ctrl + C om de inhoud naar het klembord te kopiëren. Klik ergens om het venster te sluiten.",
"create operation": "maken",
"current": "huidige",
"custom enum": "Aangepaste enum",
"custom group": "Aangepaste groep",
"custom range": "aangepast bereik",
Expand Down Expand Up @@ -1515,6 +1516,7 @@
"reload instance": "herlaad instantie",
"repeat": "herhaling",
"repo_update_hint": "U heeft geconfigureerd om automatische upgrades uit te voeren voor de \"bèta\"-repository. Houd er rekening mee dat als de bèta-repository actief is, deze adapter automatisch bèta-updates zal binnenhalen volgens deze configuratie!",
"repository": "archief",
"rest": "overige (alleen lezen)",
"restart": "herstarten",
"restart script": "herstart script",
Expand Down
2 changes: 2 additions & 0 deletions packages/admin/src-admin/src/i18n/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,7 @@
"copy": "Kopiuj",
"copy note": "Naciśnij Ctrl + A i Ctrl + C, aby skopiować dziennik do schowka i kliknij myszką w dowolnym miejscu, aby zamknąć.",
"create operation": "Stwórz",
"current": "bieżący",
"custom enum": "niestandardowe wyliczenie",
"custom group": "Grupa niestandardowa",
"custom range": "Zakres niestandardowy",
Expand Down Expand Up @@ -1515,6 +1516,7 @@
"reload instance": "przeładuj instancję",
"repeat": "powtarzać",
"repo_update_hint": "Skonfigurowałeś automatyczne aktualizacje repozytorium „beta”. Pamiętaj, że jeśli repozytorium beta jest aktywne, ten adapter automatycznie pobierze aktualizacje beta zgodnie z tą konfiguracją!",
"repository": "repozytorium",
"rest": "reszta (tylko do odczytu)",
"restart": "auto restart",
"restart script": "zrestartuj skrypt",
Expand Down
2 changes: 2 additions & 0 deletions packages/admin/src-admin/src/i18n/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,7 @@
"copy": "copiar",
"copy note": "Pressione Ctrl + A e depois Ctrl + C para copiar o conteúdo para a o clipboard. Clique em algum lugar para fechar a janela.",
"create operation": "produzir",
"current": "atual",
"custom enum": "Enum personalizado",
"custom group": "Grupo personalizado",
"custom range": "intervalo personalizado",
Expand Down Expand Up @@ -1515,6 +1516,7 @@
"reload instance": "reiniciar a instância",
"repeat": "repetir",
"repo_update_hint": "Você configurou para executar atualizações automáticas para o repositório \"beta\", esteja ciente de que se o repositório beta estiver ativo este adaptador puxará atualizações beta automaticamente de acordo com esta configuração!",
"repository": "repositório",
"rest": "além disso (apenas leitura)",
"restart": "reiniciar",
"restart script": "reiniciar o script",
Expand Down
2 changes: 2 additions & 0 deletions packages/admin/src-admin/src/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,7 @@
"copy": "Копировать",
"copy note": "Нажмите Ctrl+A и Ctrl+C, что бы скопировать в буфер обмена и после этого нажмите мышкой в любом месте.",
"create operation": "Создавать",
"current": "текущая",
"custom enum": "Своя группа",
"custom group": "Пользовательская группа",
"custom range": "настраиваемый диапазон",
Expand Down Expand Up @@ -1515,6 +1516,7 @@
"reload instance": "Перезагрузить экземпляр",
"repeat": "повтор",
"repo_update_hint": "Вы настроили автоматические обновления для «бета-репозитория». Имейте в виду, что если бета-репозиторий активен, этот адаптер будет автоматически получать бета-обновления в соответствии с этой конфигурацией!",
"repository": "репозиторий",
"rest": "Остальные параметры (только для чтения)",
"restart": "Перезапустить",
"restart script": "Перезапустить скрипт",
Expand Down
2 changes: 2 additions & 0 deletions packages/admin/src-admin/src/i18n/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,7 @@
"copy": "копія",
"copy note": "Натисніть Ctrl+A та Ctrl+C, щоб скопіювати журнал у буфер обміну, і клацніть мишкою будь-де, щоб закрити.",
"create operation": "створити",
"current": "поточний",
"custom enum": "?custom перелік",
"custom group": "Спеціальна група",
"custom range": "індивідуальний діапазон",
Expand Down Expand Up @@ -1515,6 +1516,7 @@
"reload instance": "перезавантажити екземпляр",
"repeat": "повторити",
"repo_update_hint": "Ви налаштували запуск автоматичних оновлень для репозиторію \"бета-версії\", майте на увазі, що якщо бета-репозиторій активний, цей адаптер автоматично завантажуватиме бета-оновлення відповідно до цієї конфігурації!",
"repository": "репозиторій",
"rest": "відпочинок (тільки для читання)",
"restart": "автоматичний перезапуск",
"restart script": "перезапустити сценарій",
Expand Down
2 changes: 2 additions & 0 deletions packages/admin/src-admin/src/i18n/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,7 @@
"copy": "复制",
"copy note": "按Ctrl + A和Ctrl + C将日志复制到剪贴板,然后单击鼠标左键关闭。",
"create operation": "创建",
"current": "current",
"custom enum": "?ustom enum",
"custom group": "自定义组",
"custom range": "自定义范围",
Expand Down Expand Up @@ -1515,6 +1516,7 @@
"reload instance": "重新加载程序",
"repeat": "重复",
"repo_update_hint": "您已配置为运行“beta”存储库的自动升级,请注意,如果 beta 存储库处于活动状态,则此适配器将根据此配置自动提取 beta 更新!",
"repository": "repository",
"rest": "休息(只读)",
"restart": "自动重启",
"restart script": "重启自动化",
Expand Down

0 comments on commit e5d741b

Please sign in to comment.