Skip to content

Commit 4699ba6

Browse files
committed
feat: add text for when no values have changed in SettingList
1 parent 08f352d commit 4699ba6

22 files changed

Lines changed: 40 additions & 6 deletions

File tree

react/src/components/SettingList.tsx

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
Button,
1010
Checkbox,
1111
Divider,
12+
Empty,
1213
Input,
1314
Tabs,
1415
Typography,
@@ -213,6 +214,15 @@ const SettingList: React.FC<SettingPageProps> = ({
213214
hideEmpty
214215
/>
215216
))}
217+
{_.sumBy(
218+
filteredSettingGroups,
219+
(group) => group.settingItems.length,
220+
) === 0 && (
221+
<Empty
222+
image={Empty.PRESENTED_IMAGE_SIMPLE}
223+
description={t('settings.NoChangesToDisplay')}
224+
/>
225+
)}
216226
</Flex>
217227
),
218228
},
@@ -224,12 +234,15 @@ const SettingList: React.FC<SettingPageProps> = ({
224234
count={group.settingItems.length}
225235
/>
226236
),
227-
children: (
228-
<GroupSettingItems
229-
group={filteredSettingGroups[idx]}
230-
hideEmpty
231-
/>
232-
),
237+
children:
238+
group.settingItems.length > 0 ? (
239+
<GroupSettingItems group={group} hideEmpty />
240+
) : (
241+
<Empty
242+
image={Empty.PRESENTED_IMAGE_SIMPLE}
243+
description={t('settings.NoChangesToDisplay')}
244+
/>
245+
),
233246
})),
234247
]}
235248
/>

resources/i18n/de.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,6 +1469,7 @@
14691469
"InputRequired": "Dieses Feld wird benötigt.",
14701470
"InvalidValue": "Bitte geben Sie den richtigen Eingabewert ein.",
14711471
"MTUDescription": "Maximale Übertragungseinheit, die Größe des größten Pakets, das ein Netzprotokoll übertragen kann.",
1472+
"NoChangesToDisplay": "Es gibt keine Änderungen zu Anzeigen",
14721473
"NoteAboutFixedSetup": "Die folgenden Einstellungen werden je nach Installationsumgebung und Status automatisch angewendet.",
14731474
"OpenSourceCudaGPUSupport": "Open Source CUDA GPU Unterstützung",
14741475
"OutOfRange": "Außerhalb der Reichweite.",

resources/i18n/el.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,6 +1465,7 @@
14651465
"InputRequired": "Αυτό το πεδίο είναι υποχρεωτικό.",
14661466
"InvalidValue": "Εισαγάγετε τη σωστή τιμή εισαγωγής.",
14671467
"MTUDescription": "Μέγιστη μονάδα μετάδοσης, το μέγεθος του μεγαλύτερου πακέτου που μπορεί να μεταδώσει ένα πρωτόκολλο δικτύου.",
1468+
"NoChangesToDisplay": "Δεν υπάρχουν αλλαγές στην προβολή",
14681469
"NoteAboutFixedSetup": "Οι παρακάτω ρυθμίσεις εφαρμόζονται αυτόματα ανάλογα με το περιβάλλον και την κατάσταση εγκατάστασης.",
14691470
"OpenSourceCudaGPUSupport": "Υποστήριξη ανοιχτού κώδικα CUDA GPU",
14701471
"OutOfRange": "Εκτός εμβέλειας.",

resources/i18n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,6 +1476,7 @@
14761476
"InputRequired": "This field is required.",
14771477
"InvalidValue": "Please put the correct input value.",
14781478
"MTUDescription": "Maximum transmission unit, the size of the largest packet that a network protocol can transmit.",
1479+
"NoChangesToDisplay": "There are no changes to display",
14791480
"NoteAboutFixedSetup": "The settings below are automatically applied depending on the installation environment and status.",
14801481
"OpenSourceCudaGPUSupport": "Open Source CUDA GPU support",
14811482
"OutOfRange": "Out of range.",

resources/i18n/es.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,6 +1469,7 @@
14691469
"InputRequired": "Este campo es obligatorio.",
14701470
"InvalidValue": "Por favor, ponga el valor de entrada correcto.",
14711471
"MTUDescription": "Unidad máxima de transmisión, el tamaño del paquete más grande que puede transmitir un protocolo de red.",
1472+
"NoChangesToDisplay": "No hay cambios que mostrar",
14721473
"NoteAboutFixedSetup": "Las configuraciones a continuación se aplican automáticamente según el entorno y el estado de instalación.",
14731474
"OpenSourceCudaGPUSupport": "Compatibilidad con GPU CUDA de código abierto",
14741475
"OutOfRange": "Fuera de alcance.",

resources/i18n/fi.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,6 +1467,7 @@
14671467
"InputRequired": "Tämä kenttä on pakollinen.",
14681468
"InvalidValue": "Laita oikea syöttöarvo.",
14691469
"MTUDescription": "Suurin lähetysyksikkö, suurimman paketin koko, jonka verkkoprotokolla voi lähettää.",
1470+
"NoChangesToDisplay": "Näyttöön ei ole muutoksia",
14701471
"NoteAboutFixedSetup": "Alla olevia asetuksia sovelletaan automaattisesti asennusympäristöstä ja tilasta riippuen.",
14711472
"OpenSourceCudaGPUSupport": "Avoimen lähdekoodin CUDA GPU-tuki",
14721473
"OutOfRange": "Alueen ulkopuolella.",

resources/i18n/fr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,6 +1469,7 @@
14691469
"InputRequired": "Ce champ est requis.",
14701470
"InvalidValue": "Veuillez mettre la valeur d'entrée correcte.",
14711471
"MTUDescription": "Unité de transmission maximale, la taille du plus grand paquet qu'un protocole de réseau peut transmettre.",
1472+
"NoChangesToDisplay": "Il n'y a aucun changement à afficher",
14721473
"NoteAboutFixedSetup": "Les paramètres ci-dessous sont automatiquement appliqués en fonction de l'environnement d'installation et de l'état.",
14731474
"OpenSourceCudaGPUSupport": "Prise en charge des GPU CUDA Open Source",
14741475
"OutOfRange": "Hors de portée.",

resources/i18n/id.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,6 +1468,7 @@
14681468
"InputRequired": "Bagian ini diperlukan.",
14691469
"InvalidValue": "Harap masukkan nilai input yang benar.",
14701470
"MTUDescription": "Unit transmisi maksimum, ukuran paket terbesar yang dapat ditransmisikan oleh protokol jaringan.",
1471+
"NoChangesToDisplay": "Tidak ada perubahan untuk ditampilkan",
14711472
"NoteAboutFixedSetup": "Pengaturan di bawah ini diterapkan secara otomatis tergantung pada lingkungan dan status pemasangan.",
14721473
"OpenSourceCudaGPUSupport": "Dukungan GPU CUDA Sumber Terbuka",
14731474
"OutOfRange": "Di luar jangkauan.",

resources/i18n/it.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,6 +1466,7 @@
14661466
"InputRequired": "Questo campo è obbligatorio.",
14671467
"InvalidValue": "Si prega di inserire il valore di input corretto.",
14681468
"MTUDescription": "Unità di trasmissione massima, la dimensione del pacchetto più grande che un protocollo di rete può trasmettere.",
1469+
"NoChangesToDisplay": "Non ci sono modifiche da visualizzare",
14691470
"NoteAboutFixedSetup": "Le impostazioni seguenti vengono applicate automaticamente a seconda dell'ambiente di installazione e dello stato.",
14701471
"OpenSourceCudaGPUSupport": "Supporto GPU CUDA open source",
14711472
"OutOfRange": "Fuori portata.",

resources/i18n/ja.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,6 +1468,7 @@
14681468
"InputRequired": "この項目は必須です。",
14691469
"InvalidValue": "正しい入力値を入力してください。",
14701470
"MTUDescription": "最大送信単位 - 当該レイヤーが送信できる最大プロトコルデータ単位のサイズです。",
1471+
"NoChangesToDisplay": "表示する変更はありません",
14711472
"NoteAboutFixedSetup": "以下の設定は、インストール環境とステータスに応じて自動的に適用されます。",
14721473
"OpenSourceCudaGPUSupport": "オープンソースのCUDA GPUのサポート",
14731474
"OutOfRange": "入力範囲外です。",

0 commit comments

Comments
 (0)