From fbee60ecbd0fe7300efcf635db8a1841c2104b90 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Mon, 20 Nov 2023 19:32:48 +0000 Subject: [PATCH] Add coordinator notice --- frontend/src/components/Dialogs/Coordinator.tsx | 12 ++++++++++++ frontend/static/locales/ca.json | 2 +- frontend/static/locales/cs.json | 2 +- frontend/static/locales/de.json | 2 +- frontend/static/locales/en.json | 2 +- frontend/static/locales/es.json | 2 +- frontend/static/locales/eu.json | 2 +- frontend/static/locales/fr.json | 2 +- frontend/static/locales/it.json | 2 +- frontend/static/locales/ja.json | 2 +- frontend/static/locales/pl.json | 2 +- frontend/static/locales/pt.json | 2 +- frontend/static/locales/ru.json | 2 +- frontend/static/locales/sv.json | 2 +- frontend/static/locales/sw.json | 2 +- frontend/static/locales/th.json | 2 +- frontend/static/locales/zh-SI.json | 2 +- frontend/static/locales/zh-TR.json | 2 +- 18 files changed, 29 insertions(+), 17 deletions(-) diff --git a/frontend/src/components/Dialogs/Coordinator.tsx b/frontend/src/components/Dialogs/Coordinator.tsx index 6d422ca3..8d7fe831 100644 --- a/frontend/src/components/Dialogs/Coordinator.tsx +++ b/frontend/src/components/Dialogs/Coordinator.tsx @@ -3,6 +3,7 @@ import { useTranslation } from 'react-i18next'; import { Dialog, + Alert, DialogContent, Divider, Grid, @@ -19,6 +20,7 @@ import { Accordion, AccordionDetails, AccordionSummary, + AlertTitle, } from '@mui/material'; import { @@ -413,6 +415,16 @@ const CoordinatorDialog = ({ open = false, onClose, network, shortAlias }: Props )} + + {coordinator?.info?.notice_severity != undefined && + coordinator?.info?.notice_severity !== 'none' && ( + + + {t('Coordinator Notice')} +
+ + + )} diff --git a/frontend/static/locales/ca.json b/frontend/static/locales/ca.json index 0ab8c470..893de540 100644 --- a/frontend/static/locales/ca.json +++ b/frontend/static/locales/ca.json @@ -244,6 +244,7 @@ "CLN version": "CLN version", "Client": "Client", "Coordinator": "Coordinador", + "Coordinator Notice": "Coordinator Notice", "Coordinator commit hash": "Coordinator commit hash", "Coordinator description": "Coordinator description", "Coordinator offline": "Coordinator offline", @@ -299,7 +300,6 @@ "Generate a robot avatar first. Then create your own order.": "Primer genera un avatar de robot. A continuació, crea la teva pròpia oferta.", "You do not have a robot avatar": "No tens un avatar robot", "#29": "Phrases in components/Dialogs/Notice.tsx", - "Coordinator Notice": "Coordinator Notice", "#30": "Phrases in components/Dialogs/Profile.tsx", "Coordinators that know your robots": "Coordinators that know your robots", "Your Robot": "El teu Robot", diff --git a/frontend/static/locales/cs.json b/frontend/static/locales/cs.json index bd90b4cf..658c9fc5 100644 --- a/frontend/static/locales/cs.json +++ b/frontend/static/locales/cs.json @@ -244,6 +244,7 @@ "CLN version": "CLN version", "Client": "Client", "Coordinator": "Coordinator", + "Coordinator Notice": "Coordinator Notice", "Coordinator commit hash": "Coordinator commit hash", "Coordinator description": "Coordinator description", "Coordinator offline": "Coordinator offline", @@ -299,7 +300,6 @@ "Generate a robot avatar first. Then create your own order.": "Generate a robot avatar first. Then create your own order.", "You do not have a robot avatar": "Nemáš robota a avatar", "#29": "Phrases in components/Dialogs/Notice.tsx", - "Coordinator Notice": "Coordinator Notice", "#30": "Phrases in components/Dialogs/Profile.tsx", "Coordinators that know your robots": "Coordinators that know your robots", "Your Robot": "Your Robot", diff --git a/frontend/static/locales/de.json b/frontend/static/locales/de.json index 5ae8cab9..67abb080 100644 --- a/frontend/static/locales/de.json +++ b/frontend/static/locales/de.json @@ -244,6 +244,7 @@ "CLN version": "CLN version", "Client": "Client", "Coordinator": "Coordinator", + "Coordinator Notice": "Coordinator Notice", "Coordinator commit hash": "Coordinator commit hash", "Coordinator description": "Coordinator description", "Coordinator offline": "Coordinator offline", @@ -299,7 +300,6 @@ "Generate a robot avatar first. Then create your own order.": "Generate a robot avatar first. Then create your own order.", "You do not have a robot avatar": "Du hast keinen Roboter-Avatar", "#29": "Phrases in components/Dialogs/Notice.tsx", - "Coordinator Notice": "Coordinator Notice", "#30": "Phrases in components/Dialogs/Profile.tsx", "Coordinators that know your robots": "Coordinators that know your robots", "Your Robot": "Your Robot", diff --git a/frontend/static/locales/en.json b/frontend/static/locales/en.json index 0644c0ca..c5c7e73f 100644 --- a/frontend/static/locales/en.json +++ b/frontend/static/locales/en.json @@ -244,6 +244,7 @@ "CLN version": "CLN version", "Client": "Client", "Coordinator": "Coordinator", + "Coordinator Notice": "Coordinator Notice", "Coordinator commit hash": "Coordinator commit hash", "Coordinator description": "Coordinator description", "Coordinator offline": "Coordinator offline", @@ -299,7 +300,6 @@ "Generate a robot avatar first. Then create your own order.": "Generate a robot avatar first. Then create your own order.", "You do not have a robot avatar": "You do not have a robot avatar", "#29": "Phrases in components/Dialogs/Notice.tsx", - "Coordinator Notice": "Coordinator Notice", "#30": "Phrases in components/Dialogs/Profile.tsx", "Coordinators that know your robots": "Coordinators that know your robots", "Your Robot": "Your Robot", diff --git a/frontend/static/locales/es.json b/frontend/static/locales/es.json index 7cb8c9c5..c6a5554f 100644 --- a/frontend/static/locales/es.json +++ b/frontend/static/locales/es.json @@ -244,6 +244,7 @@ "CLN version": "CLN version", "Client": "Cliente", "Coordinator": "Coordinador", + "Coordinator Notice": "Coordinator Notice", "Coordinator commit hash": "Hash de confirmación del coordinador", "Coordinator description": "Coordinator description", "Coordinator offline": "Coordinator offline", @@ -299,7 +300,6 @@ "Generate a robot avatar first. Then create your own order.": "Primero genera un robot avatar. Después crea tu propia orden.", "You do not have a robot avatar": "No tienes un avatar robot", "#29": "Phrases in components/Dialogs/Notice.tsx", - "Coordinator Notice": "Coordinator Notice", "#30": "Phrases in components/Dialogs/Profile.tsx", "Coordinators that know your robots": "Coordinators that know your robots", "Your Robot": "Your Robot", diff --git a/frontend/static/locales/eu.json b/frontend/static/locales/eu.json index ef0c8f17..9a8788c4 100644 --- a/frontend/static/locales/eu.json +++ b/frontend/static/locales/eu.json @@ -244,6 +244,7 @@ "CLN version": "CLN version", "Client": "Bezeroa", "Coordinator": "Koordinatzailea", + "Coordinator Notice": "Coordinator Notice", "Coordinator commit hash": "Coordinator commit hash", "Coordinator description": "Coordinator description", "Coordinator offline": "Coordinator offline", @@ -299,7 +300,6 @@ "Generate a robot avatar first. Then create your own order.": "Generate a robot avatar first. Then create your own order.", "You do not have a robot avatar": "Ez daukazu robot avatarrik", "#29": "Phrases in components/Dialogs/Notice.tsx", - "Coordinator Notice": "Coordinator Notice", "#30": "Phrases in components/Dialogs/Profile.tsx", "Coordinators that know your robots": "Coordinators that know your robots", "Your Robot": "Your Robot", diff --git a/frontend/static/locales/fr.json b/frontend/static/locales/fr.json index c4066c49..f49dffe5 100644 --- a/frontend/static/locales/fr.json +++ b/frontend/static/locales/fr.json @@ -244,6 +244,7 @@ "CLN version": "CLN version", "Client": "Client", "Coordinator": "Coordinateur", + "Coordinator Notice": "Coordinator Notice", "Coordinator commit hash": "Coordinateur commit hash", "Coordinator description": "Coordinator description", "Coordinator offline": "Coordinator offline", @@ -299,7 +300,6 @@ "Generate a robot avatar first. Then create your own order.": "Créez d'abord un avatar de robot. Créez ensuite votre propre commande.", "You do not have a robot avatar": "Vous n'avez pas d'avatar robot", "#29": "Phrases in components/Dialogs/Notice.tsx", - "Coordinator Notice": "Coordinator Notice", "#30": "Phrases in components/Dialogs/Profile.tsx", "Coordinators that know your robots": "Coordinators that know your robots", "Your Robot": "Votre Robot", diff --git a/frontend/static/locales/it.json b/frontend/static/locales/it.json index e329eb4c..77628d6b 100644 --- a/frontend/static/locales/it.json +++ b/frontend/static/locales/it.json @@ -244,6 +244,7 @@ "CLN version": "Versione di CLN", "Client": "Client", "Coordinator": "Coordinatore", + "Coordinator Notice": "Coordinator Notice", "Coordinator commit hash": "Commit hash del coordinatore", "Coordinator description": "Coordinator description", "Coordinator offline": "Coordinator offline", @@ -299,7 +300,6 @@ "Generate a robot avatar first. Then create your own order.": "Genera prima un avatar robot. Poi crea il tuo ordine.", "You do not have a robot avatar": "Non hai un avatar robot", "#29": "Phrases in components/Dialogs/Notice.tsx", - "Coordinator Notice": "Coordinator Notice", "#30": "Phrases in components/Dialogs/Profile.tsx", "Coordinators that know your robots": "Coordinators that know your robots", "Your Robot": "Il tuo Robot", diff --git a/frontend/static/locales/ja.json b/frontend/static/locales/ja.json index bac16bed..d86e7644 100644 --- a/frontend/static/locales/ja.json +++ b/frontend/static/locales/ja.json @@ -244,6 +244,7 @@ "CLN version": "CLN version", "Client": "クライアント", "Coordinator": "コーディネーター", + "Coordinator Notice": "Coordinator Notice", "Coordinator commit hash": "コーディネーターコミットハッシュ", "Coordinator description": "Coordinator description", "Coordinator offline": "Coordinator offline", @@ -299,7 +300,6 @@ "Generate a robot avatar first. Then create your own order.": "最初にロボットアバターを生成してください。次に自分のオーダーを作成してください。", "You do not have a robot avatar": "ロボットのアバターがありません", "#29": "Phrases in components/Dialogs/Notice.tsx", - "Coordinator Notice": "Coordinator Notice", "#30": "Phrases in components/Dialogs/Profile.tsx", "Coordinators that know your robots": "Coordinators that know your robots", "Your Robot": "Your Robot", diff --git a/frontend/static/locales/pl.json b/frontend/static/locales/pl.json index 334c904c..bc5478c5 100644 --- a/frontend/static/locales/pl.json +++ b/frontend/static/locales/pl.json @@ -244,6 +244,7 @@ "CLN version": "CLN version", "Client": "Client", "Coordinator": "Coordinator", + "Coordinator Notice": "Coordinator Notice", "Coordinator commit hash": "Coordinator commit hash", "Coordinator description": "Coordinator description", "Coordinator offline": "Coordinator offline", @@ -299,7 +300,6 @@ "Generate a robot avatar first. Then create your own order.": "Generate a robot avatar first. Then create your own order.", "You do not have a robot avatar": "You do not have a robot avatar", "#29": "Phrases in components/Dialogs/Notice.tsx", - "Coordinator Notice": "Coordinator Notice", "#30": "Phrases in components/Dialogs/Profile.tsx", "Coordinators that know your robots": "Coordinators that know your robots", "Your Robot": "Your Robot", diff --git a/frontend/static/locales/pt.json b/frontend/static/locales/pt.json index a17f4c30..4610840c 100644 --- a/frontend/static/locales/pt.json +++ b/frontend/static/locales/pt.json @@ -244,6 +244,7 @@ "CLN version": "CLN version", "Client": "Client", "Coordinator": "Coordinator", + "Coordinator Notice": "Coordinator Notice", "Coordinator commit hash": "Coordinator commit hash", "Coordinator description": "Coordinator description", "Coordinator offline": "Coordinator offline", @@ -299,7 +300,6 @@ "Generate a robot avatar first. Then create your own order.": "Generate a robot avatar first. Then create your own order.", "You do not have a robot avatar": "Você não tem um avatar de robô", "#29": "Phrases in components/Dialogs/Notice.tsx", - "Coordinator Notice": "Coordinator Notice", "#30": "Phrases in components/Dialogs/Profile.tsx", "Coordinators that know your robots": "Coordinators that know your robots", "Your Robot": "Your Robot", diff --git a/frontend/static/locales/ru.json b/frontend/static/locales/ru.json index 783a58ab..8f0aad05 100644 --- a/frontend/static/locales/ru.json +++ b/frontend/static/locales/ru.json @@ -244,6 +244,7 @@ "CLN version": "CLN version", "Client": "Client", "Coordinator": "Coordinator", + "Coordinator Notice": "Coordinator Notice", "Coordinator commit hash": "Coordinator commit hash", "Coordinator description": "Coordinator description", "Coordinator offline": "Coordinator offline", @@ -299,7 +300,6 @@ "Generate a robot avatar first. Then create your own order.": "Generate a robot avatar first. Then create your own order.", "You do not have a robot avatar": "У Вас нет аватара робота", "#29": "Phrases in components/Dialogs/Notice.tsx", - "Coordinator Notice": "Coordinator Notice", "#30": "Phrases in components/Dialogs/Profile.tsx", "Coordinators that know your robots": "Coordinators that know your robots", "Your Robot": "Your Robot", diff --git a/frontend/static/locales/sv.json b/frontend/static/locales/sv.json index f2499c17..1dafd3b5 100644 --- a/frontend/static/locales/sv.json +++ b/frontend/static/locales/sv.json @@ -244,6 +244,7 @@ "CLN version": "CLN version", "Client": "Client", "Coordinator": "Coordinator", + "Coordinator Notice": "Coordinator Notice", "Coordinator commit hash": "Coordinator commit hash", "Coordinator description": "Coordinator description", "Coordinator offline": "Coordinator offline", @@ -299,7 +300,6 @@ "Generate a robot avatar first. Then create your own order.": "Generate a robot avatar first. Then create your own order.", "You do not have a robot avatar": "Du har ingen robotavatar", "#29": "Phrases in components/Dialogs/Notice.tsx", - "Coordinator Notice": "Coordinator Notice", "#30": "Phrases in components/Dialogs/Profile.tsx", "Coordinators that know your robots": "Coordinators that know your robots", "Your Robot": "Your Robot", diff --git a/frontend/static/locales/sw.json b/frontend/static/locales/sw.json index 8523a178..4b46d71f 100644 --- a/frontend/static/locales/sw.json +++ b/frontend/static/locales/sw.json @@ -244,6 +244,7 @@ "CLN version": "Toleo la CLN", "Client": "Mteja", "Coordinator": "Msimamizi", + "Coordinator Notice": "Coordinator Notice", "Coordinator commit hash": "Coordinator commit hash", "Coordinator description": "Coordinator description", "Coordinator offline": "Coordinator offline", @@ -299,7 +300,6 @@ "Generate a robot avatar first. Then create your own order.": "Zalisha picha ya mwakilishi wa roboti kwanza. Kisha tengeneza amri yako mwenyewe.", "You do not have a robot avatar": "Huna picha ya mwakilishi wa roboti", "#29": "Phrases in components/Dialogs/Notice.tsx", - "Coordinator Notice": "Coordinator Notice", "#30": "Phrases in components/Dialogs/Profile.tsx", "Coordinators that know your robots": "Coordinators that know your robots", "Your Robot": "Roboti yako", diff --git a/frontend/static/locales/th.json b/frontend/static/locales/th.json index 3df4bb2e..b0424c88 100644 --- a/frontend/static/locales/th.json +++ b/frontend/static/locales/th.json @@ -244,6 +244,7 @@ "CLN version": "CLN version", "Client": "Client", "Coordinator": "Coordinator", + "Coordinator Notice": "Coordinator Notice", "Coordinator commit hash": "Coordinator commit hash", "Coordinator description": "Coordinator description", "Coordinator offline": "Coordinator offline", @@ -299,7 +300,6 @@ "Generate a robot avatar first. Then create your own order.": "Generate a robot avatar first. Then create your own order.", "You do not have a robot avatar": "คุณไม่มีโรบอท", "#29": "Phrases in components/Dialogs/Notice.tsx", - "Coordinator Notice": "Coordinator Notice", "#30": "Phrases in components/Dialogs/Profile.tsx", "Coordinators that know your robots": "Coordinators that know your robots", "Your Robot": "Your Robot", diff --git a/frontend/static/locales/zh-SI.json b/frontend/static/locales/zh-SI.json index 48d89e3d..f744283d 100644 --- a/frontend/static/locales/zh-SI.json +++ b/frontend/static/locales/zh-SI.json @@ -244,6 +244,7 @@ "CLN version": "CLN version", "Client": "客户端", "Coordinator": "协调器", + "Coordinator Notice": "Coordinator Notice", "Coordinator commit hash": "协调器提交哈希", "Coordinator description": "Coordinator description", "Coordinator offline": "Coordinator offline", @@ -299,7 +300,6 @@ "Generate a robot avatar first. Then create your own order.": "请先生成一个机器人头像,然后创建你自己的订单。", "You do not have a robot avatar": "你没有机器人头像", "#29": "Phrases in components/Dialogs/Notice.tsx", - "Coordinator Notice": "Coordinator Notice", "#30": "Phrases in components/Dialogs/Profile.tsx", "Coordinators that know your robots": "Coordinators that know your robots", "Your Robot": "你的机器人", diff --git a/frontend/static/locales/zh-TR.json b/frontend/static/locales/zh-TR.json index 9eadd63b..680c2705 100644 --- a/frontend/static/locales/zh-TR.json +++ b/frontend/static/locales/zh-TR.json @@ -244,6 +244,7 @@ "CLN version": "CLN version", "Client": "客戶端", "Coordinator": "協調器", + "Coordinator Notice": "Coordinator Notice", "Coordinator commit hash": "協調器提交哈希", "Coordinator description": "Coordinator description", "Coordinator offline": "Coordinator offline", @@ -299,7 +300,6 @@ "Generate a robot avatar first. Then create your own order.": "請先生成一個機器人頭像,然後創建你自己的訂單。", "You do not have a robot avatar": "你沒有機器人頭像", "#29": "Phrases in components/Dialogs/Notice.tsx", - "Coordinator Notice": "Coordinator Notice", "#30": "Phrases in components/Dialogs/Profile.tsx", "Coordinators that know your robots": "Coordinators that know your robots", "Your Robot": "你的機器人",