foris 6.4.0 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/common/ActionButtonWithModal/ActionButtonWithModal.js +135 -0
  2. package/common/ActionButtonWithModal/ActionButtonWithModal.md +39 -0
  3. package/common/RichTable/RichTable.js +84 -0
  4. package/common/RichTable/RichTable.md +135 -0
  5. package/common/RichTable/RichTableBody.js +48 -0
  6. package/common/RichTable/RichTableHeader.js +96 -0
  7. package/common/RichTable/RichTablePagination.js +128 -0
  8. package/foris-6.5.0.tgz +0 -0
  9. package/index.js +2 -1
  10. package/package.json +2 -1
  11. package/testUtils/customTestRender.js +1 -1
  12. package/translations/cs/LC_MESSAGES/forisjs.po +79 -21
  13. package/translations/da/LC_MESSAGES/forisjs.po +75 -16
  14. package/translations/de/LC_MESSAGES/forisjs.po +79 -21
  15. package/translations/el/LC_MESSAGES/forisjs.po +76 -19
  16. package/translations/en/LC_MESSAGES/forisjs.po +75 -16
  17. package/translations/es/LC_MESSAGES/forisjs.po +79 -21
  18. package/translations/fi/LC_MESSAGES/forisjs.po +75 -16
  19. package/translations/fo/LC_MESSAGES/forisjs.po +75 -16
  20. package/translations/forisjs.pot +61 -17
  21. package/translations/fr/LC_MESSAGES/forisjs.po +79 -21
  22. package/translations/hr/LC_MESSAGES/forisjs.po +75 -16
  23. package/translations/hu/LC_MESSAGES/forisjs.po +76 -16
  24. package/translations/it/LC_MESSAGES/forisjs.po +75 -16
  25. package/translations/ja/LC_MESSAGES/forisjs.po +76 -17
  26. package/translations/ko/LC_MESSAGES/forisjs.po +75 -16
  27. package/translations/lt/LC_MESSAGES/forisjs.po +75 -16
  28. package/translations/nb_NO/LC_MESSAGES/forisjs.po +78 -21
  29. package/translations/nl/LC_MESSAGES/forisjs.po +78 -22
  30. package/translations/pl/LC_MESSAGES/forisjs.po +79 -21
  31. package/translations/pt_BR/LC_MESSAGES/forisjs.po +77 -20
  32. package/translations/ro/LC_MESSAGES/forisjs.po +75 -16
  33. package/translations/ru/LC_MESSAGES/forisjs.po +79 -21
  34. package/translations/sk/LC_MESSAGES/forisjs.po +79 -21
  35. package/translations/sv/LC_MESSAGES/forisjs.po +78 -21
  36. package/common/RebootButton.js +0 -80
  37. package/foris-6.4.0.tgz +0 -0
  38. /package/testUtils/{cutomizationContextMock.js → customizationContextMock.js} +0 -0
@@ -7,7 +7,7 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: PROJECT VERSION\n"
9
9
  "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10
- "POT-Creation-Date: 2024-09-25 16:10+0200\n"
10
+ "POT-Creation-Date: 2024-11-13 14:06+0100\n"
11
11
  "PO-Revision-Date: 2019-02-19 13:35+0100\n"
12
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
13
  "Language: ro\n"
@@ -35,41 +35,85 @@ msgstr ""
35
35
  msgid "An unknown API error occurred."
36
36
  msgstr ""
37
37
 
38
- #: src/bootstrap/Alert.js:57 src/bootstrap/Modal.js:101
38
+ #: src/bootstrap/Alert.js:73 src/bootstrap/Modal.js:101
39
39
  #: src/common/WiFiSettings/WiFiQRCode.js:89
40
40
  msgid "Close"
41
41
  msgstr ""
42
42
 
43
- #: src/bootstrap/CopyInput.js:57
43
+ #: src/bootstrap/CopyInput.js:56
44
44
  msgid "Copied!"
45
45
  msgstr ""
46
46
 
47
- #: src/bootstrap/CopyInput.js:57
47
+ #: src/bootstrap/CopyInput.js:56
48
48
  msgid "Copy"
49
49
  msgstr ""
50
50
 
51
- #: src/common/RebootButton.js:27
52
- msgid "Reboot request failed."
51
+ #: src/common/ActionButtonWithModal/ActionButtonWithModal.js:60
52
+ msgid "Action successful."
53
53
  msgstr ""
54
54
 
55
- #: src/common/RebootButton.js:51
56
- msgid "Reboot"
55
+ #: src/common/ActionButtonWithModal/ActionButtonWithModal.js:65
56
+ msgid "Action failed."
57
57
  msgstr ""
58
58
 
59
- #: src/common/RebootButton.js:66
60
- msgid "Warning!"
59
+ #: src/common/ActionButtonWithModal/ActionButtonWithModal.js:125
60
+ msgid "Cancel"
61
61
  msgstr ""
62
62
 
63
- #: src/common/RebootButton.js:68
64
- msgid "Are you sure you want to restart the router?"
63
+ #: src/common/ActionButtonWithModal/ActionButtonWithModal.js:128
64
+ msgid "Confirm"
65
65
  msgstr ""
66
66
 
67
- #: src/common/RebootButton.js:71
68
- msgid "Cancel"
67
+ #: src/common/RichTable/RichTableHeader.js:29
68
+ msgid "Sort ascending"
69
+ msgstr ""
70
+
71
+ #: src/common/RichTable/RichTableHeader.js:30
72
+ msgid "Sort descending"
73
+ msgstr ""
74
+
75
+ #: src/common/RichTable/RichTableHeader.js:31
76
+ msgid "Clear sort"
77
+ msgstr ""
78
+
79
+ #: src/common/RichTable/RichTablePagination.js:65
80
+ msgid "Pagination navigation bar"
81
+ msgstr ""
82
+
83
+ #: src/common/RichTable/RichTablePagination.js:71
84
+ msgid "First page"
85
+ msgstr ""
86
+
87
+ #: src/common/RichTable/RichTablePagination.js:77
88
+ msgid "Previous page"
89
+ msgstr ""
90
+
91
+ #: src/common/RichTable/RichTablePagination.js:83
92
+ msgid "Next page"
93
+ msgstr ""
94
+
95
+ #: src/common/RichTable/RichTablePagination.js:89
96
+ msgid "Last page"
97
+ msgstr ""
98
+
99
+ #: src/common/RichTable/RichTablePagination.js:95
100
+ msgid "Page"
101
+ msgstr ""
102
+
103
+ #: src/common/RichTable/RichTablePagination.js:98
104
+ msgid "of"
105
+ msgstr ""
106
+
107
+ #: src/common/RichTable/RichTablePagination.js:106
108
+ msgid "Rows per page:"
69
109
  msgstr ""
70
110
 
71
- #: src/common/RebootButton.js:73
72
- msgid "Confirm reboot"
111
+ #: src/common/RichTable/RichTablePagination.js:109
112
+ msgid "Select rows per page"
113
+ msgstr ""
114
+
115
+ #: src/common/RichTable/RichTablePagination.js:121
116
+ msgid "All"
73
117
  msgstr ""
74
118
 
75
119
  #: src/common/WiFiSettings/ResetWiFiSettings.js:39
@@ -426,3 +470,18 @@ msgstr ""
426
470
  #~ "channel."
427
471
  #~ msgstr ""
428
472
 
473
+ #~ msgid "Reboot request failed."
474
+ #~ msgstr ""
475
+
476
+ #~ msgid "Reboot"
477
+ #~ msgstr ""
478
+
479
+ #~ msgid "Warning!"
480
+ #~ msgstr ""
481
+
482
+ #~ msgid "Are you sure you want to restart the router?"
483
+ #~ msgstr ""
484
+
485
+ #~ msgid "Confirm reboot"
486
+ #~ msgstr ""
487
+
@@ -7,7 +7,7 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: PROJECT VERSION\n"
9
9
  "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10
- "POT-Creation-Date: 2024-09-25 16:10+0200\n"
10
+ "POT-Creation-Date: 2024-11-13 14:06+0100\n"
11
11
  "PO-Revision-Date: 2022-12-07 12:47+0000\n"
12
12
  "Last-Translator: Алексей Леньшин <alenshin@gmail.com>\n"
13
13
  "Language: ru\n"
@@ -36,43 +36,89 @@ msgstr "Ответ не получен."
36
36
  msgid "An unknown API error occurred."
37
37
  msgstr "Неизвестная ошибка программного интерфейса приложения."
38
38
 
39
- #: src/bootstrap/Alert.js:57 src/bootstrap/Modal.js:101
39
+ #: src/bootstrap/Alert.js:73 src/bootstrap/Modal.js:101
40
40
  #: src/common/WiFiSettings/WiFiQRCode.js:89
41
41
  msgid "Close"
42
42
  msgstr ""
43
43
 
44
- #: src/bootstrap/CopyInput.js:57
44
+ #: src/bootstrap/CopyInput.js:56
45
45
  msgid "Copied!"
46
46
  msgstr "Скопировано!"
47
47
 
48
- #: src/bootstrap/CopyInput.js:57
48
+ #: src/bootstrap/CopyInput.js:56
49
49
  msgid "Copy"
50
50
  msgstr "Копировать"
51
51
 
52
- #: src/common/RebootButton.js:27
53
- msgid "Reboot request failed."
54
- msgstr "Запрос на перезагрузку не выполнен."
55
-
56
- #: src/common/RebootButton.js:51
57
- msgid "Reboot"
58
- msgstr "Перезагрузка"
59
-
60
- #: src/common/RebootButton.js:66
61
- msgid "Warning!"
62
- msgstr "Предупреждение!"
52
+ #: src/common/ActionButtonWithModal/ActionButtonWithModal.js:60
53
+ #, fuzzy
54
+ msgid "Action successful."
55
+ msgstr "Настройки были успешно сохранены"
63
56
 
64
- #: src/common/RebootButton.js:68
65
- msgid "Are you sure you want to restart the router?"
66
- msgstr "Вы уверены, что хотите перезагрузить маршрутизатор?"
57
+ #: src/common/ActionButtonWithModal/ActionButtonWithModal.js:65
58
+ msgid "Action failed."
59
+ msgstr ""
67
60
 
68
- #: src/common/RebootButton.js:71
61
+ #: src/common/ActionButtonWithModal/ActionButtonWithModal.js:125
69
62
  msgid "Cancel"
70
63
  msgstr "Отмена"
71
64
 
72
- #: src/common/RebootButton.js:73
73
- msgid "Confirm reboot"
65
+ #: src/common/ActionButtonWithModal/ActionButtonWithModal.js:128
66
+ #, fuzzy
67
+ msgid "Confirm"
74
68
  msgstr "Подтвердите перезагрузку"
75
69
 
70
+ #: src/common/RichTable/RichTableHeader.js:29
71
+ msgid "Sort ascending"
72
+ msgstr ""
73
+
74
+ #: src/common/RichTable/RichTableHeader.js:30
75
+ msgid "Sort descending"
76
+ msgstr ""
77
+
78
+ #: src/common/RichTable/RichTableHeader.js:31
79
+ msgid "Clear sort"
80
+ msgstr ""
81
+
82
+ #: src/common/RichTable/RichTablePagination.js:65
83
+ msgid "Pagination navigation bar"
84
+ msgstr ""
85
+
86
+ #: src/common/RichTable/RichTablePagination.js:71
87
+ msgid "First page"
88
+ msgstr ""
89
+
90
+ #: src/common/RichTable/RichTablePagination.js:77
91
+ msgid "Previous page"
92
+ msgstr ""
93
+
94
+ #: src/common/RichTable/RichTablePagination.js:83
95
+ msgid "Next page"
96
+ msgstr ""
97
+
98
+ #: src/common/RichTable/RichTablePagination.js:89
99
+ msgid "Last page"
100
+ msgstr ""
101
+
102
+ #: src/common/RichTable/RichTablePagination.js:95
103
+ msgid "Page"
104
+ msgstr ""
105
+
106
+ #: src/common/RichTable/RichTablePagination.js:98
107
+ msgid "of"
108
+ msgstr ""
109
+
110
+ #: src/common/RichTable/RichTablePagination.js:106
111
+ msgid "Rows per page:"
112
+ msgstr ""
113
+
114
+ #: src/common/RichTable/RichTablePagination.js:109
115
+ msgid "Select rows per page"
116
+ msgstr ""
117
+
118
+ #: src/common/RichTable/RichTablePagination.js:121
119
+ msgid "All"
120
+ msgstr ""
121
+
76
122
  #: src/common/WiFiSettings/ResetWiFiSettings.js:39
77
123
  msgid "An error occurred during resetting Wi-Fi settings."
78
124
  msgstr "При сбросе настроек Wi-Fi произошла ошибка."
@@ -395,3 +441,15 @@ msgstr "Не содержит списка электронных адресов
395
441
  #~ "значений по умолчанию.\n"
396
442
  #~ " "
397
443
 
444
+ #~ msgid "Reboot request failed."
445
+ #~ msgstr "Запрос на перезагрузку не выполнен."
446
+
447
+ #~ msgid "Reboot"
448
+ #~ msgstr "Перезагрузка"
449
+
450
+ #~ msgid "Warning!"
451
+ #~ msgstr "Предупреждение!"
452
+
453
+ #~ msgid "Are you sure you want to restart the router?"
454
+ #~ msgstr "Вы уверены, что хотите перезагрузить маршрутизатор?"
455
+
@@ -7,7 +7,7 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: PROJECT VERSION\n"
9
9
  "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10
- "POT-Creation-Date: 2024-09-25 16:10+0200\n"
10
+ "POT-Creation-Date: 2024-11-13 14:06+0100\n"
11
11
  "PO-Revision-Date: 2024-09-09 18:09+0000\n"
12
12
  "Last-Translator: Atec <dr.atec@gmail.com>\n"
13
13
  "Language: sk\n"
@@ -35,43 +35,89 @@ msgstr "Nenastala žiadna odozva."
35
35
  msgid "An unknown API error occurred."
36
36
  msgstr "Nastala neznáma chyba v API."
37
37
 
38
- #: src/bootstrap/Alert.js:57 src/bootstrap/Modal.js:101
38
+ #: src/bootstrap/Alert.js:73 src/bootstrap/Modal.js:101
39
39
  #: src/common/WiFiSettings/WiFiQRCode.js:89
40
40
  msgid "Close"
41
41
  msgstr "Zatvoriť"
42
42
 
43
- #: src/bootstrap/CopyInput.js:57
43
+ #: src/bootstrap/CopyInput.js:56
44
44
  msgid "Copied!"
45
45
  msgstr "Skopírované!"
46
46
 
47
- #: src/bootstrap/CopyInput.js:57
47
+ #: src/bootstrap/CopyInput.js:56
48
48
  msgid "Copy"
49
49
  msgstr "Kopírovať"
50
50
 
51
- #: src/common/RebootButton.js:27
52
- msgid "Reboot request failed."
53
- msgstr "Požiadavka na reštart neúspešná."
54
-
55
- #: src/common/RebootButton.js:51
56
- msgid "Reboot"
57
- msgstr "Reštartovať"
58
-
59
- #: src/common/RebootButton.js:66
60
- msgid "Warning!"
61
- msgstr "Výstraha!"
51
+ #: src/common/ActionButtonWithModal/ActionButtonWithModal.js:60
52
+ #, fuzzy
53
+ msgid "Action successful."
54
+ msgstr "Nastavenia boli úspešne uložené"
62
55
 
63
- #: src/common/RebootButton.js:68
64
- msgid "Are you sure you want to restart the router?"
65
- msgstr "Naozaj sa má router reštartovať?"
56
+ #: src/common/ActionButtonWithModal/ActionButtonWithModal.js:65
57
+ msgid "Action failed."
58
+ msgstr ""
66
59
 
67
- #: src/common/RebootButton.js:71
60
+ #: src/common/ActionButtonWithModal/ActionButtonWithModal.js:125
68
61
  msgid "Cancel"
69
62
  msgstr "Zrušiť"
70
63
 
71
- #: src/common/RebootButton.js:73
72
- msgid "Confirm reboot"
64
+ #: src/common/ActionButtonWithModal/ActionButtonWithModal.js:128
65
+ #, fuzzy
66
+ msgid "Confirm"
73
67
  msgstr "Potvrdiť reštart"
74
68
 
69
+ #: src/common/RichTable/RichTableHeader.js:29
70
+ msgid "Sort ascending"
71
+ msgstr ""
72
+
73
+ #: src/common/RichTable/RichTableHeader.js:30
74
+ msgid "Sort descending"
75
+ msgstr ""
76
+
77
+ #: src/common/RichTable/RichTableHeader.js:31
78
+ msgid "Clear sort"
79
+ msgstr ""
80
+
81
+ #: src/common/RichTable/RichTablePagination.js:65
82
+ msgid "Pagination navigation bar"
83
+ msgstr ""
84
+
85
+ #: src/common/RichTable/RichTablePagination.js:71
86
+ msgid "First page"
87
+ msgstr ""
88
+
89
+ #: src/common/RichTable/RichTablePagination.js:77
90
+ msgid "Previous page"
91
+ msgstr ""
92
+
93
+ #: src/common/RichTable/RichTablePagination.js:83
94
+ msgid "Next page"
95
+ msgstr ""
96
+
97
+ #: src/common/RichTable/RichTablePagination.js:89
98
+ msgid "Last page"
99
+ msgstr ""
100
+
101
+ #: src/common/RichTable/RichTablePagination.js:95
102
+ msgid "Page"
103
+ msgstr ""
104
+
105
+ #: src/common/RichTable/RichTablePagination.js:98
106
+ msgid "of"
107
+ msgstr ""
108
+
109
+ #: src/common/RichTable/RichTablePagination.js:106
110
+ msgid "Rows per page:"
111
+ msgstr ""
112
+
113
+ #: src/common/RichTable/RichTablePagination.js:109
114
+ msgid "Select rows per page"
115
+ msgstr ""
116
+
117
+ #: src/common/RichTable/RichTablePagination.js:121
118
+ msgid "All"
119
+ msgstr ""
120
+
75
121
  #: src/common/WiFiSettings/ResetWiFiSettings.js:39
76
122
  msgid "An error occurred during resetting Wi-Fi settings."
77
123
  msgstr "Pri resete nastavení Wi-Fi nastala chyba."
@@ -390,3 +436,15 @@ msgstr "Neobsahuje zoznam e-mailov oddelených čiarkami."
390
436
  #~ " a obnovia sa východiskové hodnoty.\n"
391
437
  #~ " "
392
438
 
439
+ #~ msgid "Reboot request failed."
440
+ #~ msgstr "Požiadavka na reštart neúspešná."
441
+
442
+ #~ msgid "Reboot"
443
+ #~ msgstr "Reštartovať"
444
+
445
+ #~ msgid "Warning!"
446
+ #~ msgstr "Výstraha!"
447
+
448
+ #~ msgid "Are you sure you want to restart the router?"
449
+ #~ msgstr "Naozaj sa má router reštartovať?"
450
+
@@ -7,7 +7,7 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: PROJECT VERSION\n"
9
9
  "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10
- "POT-Creation-Date: 2024-09-25 16:10+0200\n"
10
+ "POT-Creation-Date: 2024-11-13 14:06+0100\n"
11
11
  "PO-Revision-Date: 2023-09-22 21:00+0000\n"
12
12
  "Last-Translator: Kristoffer Grundström "
13
13
  "<swedishsailfishosuser@tutanota.com>\n"
@@ -36,43 +36,88 @@ msgstr "Inget svar togs emot."
36
36
  msgid "An unknown API error occurred."
37
37
  msgstr "Ett okänt API-fel inträffade."
38
38
 
39
- #: src/bootstrap/Alert.js:57 src/bootstrap/Modal.js:101
39
+ #: src/bootstrap/Alert.js:73 src/bootstrap/Modal.js:101
40
40
  #: src/common/WiFiSettings/WiFiQRCode.js:89
41
41
  msgid "Close"
42
42
  msgstr ""
43
43
 
44
- #: src/bootstrap/CopyInput.js:57
44
+ #: src/bootstrap/CopyInput.js:56
45
45
  msgid "Copied!"
46
46
  msgstr "Kopierades!"
47
47
 
48
- #: src/bootstrap/CopyInput.js:57
48
+ #: src/bootstrap/CopyInput.js:56
49
49
  msgid "Copy"
50
50
  msgstr "Kopiera"
51
51
 
52
- #: src/common/RebootButton.js:27
53
- msgid "Reboot request failed."
54
- msgstr "Förfrågning för omstart misslyckades."
55
-
56
- #: src/common/RebootButton.js:51
57
- msgid "Reboot"
58
- msgstr "Starta om"
59
-
60
- #: src/common/RebootButton.js:66
61
- msgid "Warning!"
62
- msgstr "Varning!"
52
+ #: src/common/ActionButtonWithModal/ActionButtonWithModal.js:60
53
+ msgid "Action successful."
54
+ msgstr ""
63
55
 
64
- #: src/common/RebootButton.js:68
65
- msgid "Are you sure you want to restart the router?"
66
- msgstr "Är du säker på att du vill starta om routern?"
56
+ #: src/common/ActionButtonWithModal/ActionButtonWithModal.js:65
57
+ msgid "Action failed."
58
+ msgstr ""
67
59
 
68
- #: src/common/RebootButton.js:71
60
+ #: src/common/ActionButtonWithModal/ActionButtonWithModal.js:125
69
61
  msgid "Cancel"
70
62
  msgstr "Avbryt"
71
63
 
72
- #: src/common/RebootButton.js:73
73
- msgid "Confirm reboot"
64
+ #: src/common/ActionButtonWithModal/ActionButtonWithModal.js:128
65
+ #, fuzzy
66
+ msgid "Confirm"
74
67
  msgstr "Bekräfta omstart"
75
68
 
69
+ #: src/common/RichTable/RichTableHeader.js:29
70
+ msgid "Sort ascending"
71
+ msgstr ""
72
+
73
+ #: src/common/RichTable/RichTableHeader.js:30
74
+ msgid "Sort descending"
75
+ msgstr ""
76
+
77
+ #: src/common/RichTable/RichTableHeader.js:31
78
+ msgid "Clear sort"
79
+ msgstr ""
80
+
81
+ #: src/common/RichTable/RichTablePagination.js:65
82
+ msgid "Pagination navigation bar"
83
+ msgstr ""
84
+
85
+ #: src/common/RichTable/RichTablePagination.js:71
86
+ msgid "First page"
87
+ msgstr ""
88
+
89
+ #: src/common/RichTable/RichTablePagination.js:77
90
+ msgid "Previous page"
91
+ msgstr ""
92
+
93
+ #: src/common/RichTable/RichTablePagination.js:83
94
+ msgid "Next page"
95
+ msgstr ""
96
+
97
+ #: src/common/RichTable/RichTablePagination.js:89
98
+ msgid "Last page"
99
+ msgstr ""
100
+
101
+ #: src/common/RichTable/RichTablePagination.js:95
102
+ msgid "Page"
103
+ msgstr ""
104
+
105
+ #: src/common/RichTable/RichTablePagination.js:98
106
+ msgid "of"
107
+ msgstr ""
108
+
109
+ #: src/common/RichTable/RichTablePagination.js:106
110
+ msgid "Rows per page:"
111
+ msgstr ""
112
+
113
+ #: src/common/RichTable/RichTablePagination.js:109
114
+ msgid "Select rows per page"
115
+ msgstr ""
116
+
117
+ #: src/common/RichTable/RichTablePagination.js:121
118
+ msgid "All"
119
+ msgstr ""
120
+
76
121
  #: src/common/WiFiSettings/ResetWiFiSettings.js:39
77
122
  msgid "An error occurred during resetting Wi-Fi settings."
78
123
  msgstr "Ett fel inträffade under återställningen av Wi-Fi-inställningarna."
@@ -441,3 +486,15 @@ msgstr ""
441
486
  #~ "channel."
442
487
  #~ msgstr ""
443
488
 
489
+ #~ msgid "Reboot request failed."
490
+ #~ msgstr "Förfrågning för omstart misslyckades."
491
+
492
+ #~ msgid "Reboot"
493
+ #~ msgstr "Starta om"
494
+
495
+ #~ msgid "Warning!"
496
+ #~ msgstr "Varning!"
497
+
498
+ #~ msgid "Are you sure you want to restart the router?"
499
+ #~ msgstr "Är du säker på att du vill starta om routern?"
500
+
@@ -1,80 +0,0 @@
1
- /*
2
- * Copyright (C) 2019-2024 CZ.NIC z.s.p.o. (https://www.nic.cz/)
3
- *
4
- * This is free software, licensed under the GNU General Public License v3.
5
- * See /LICENSE for more information.
6
- */
7
-
8
- import React, { useState, useEffect } from "react";
9
-
10
- import PropTypes from "prop-types";
11
-
12
- import { useAPIPost } from "../api/hooks";
13
- import { API_STATE } from "../api/utils";
14
- import Button from "../bootstrap/Button";
15
- import { Modal, ModalHeader, ModalBody, ModalFooter } from "../bootstrap/Modal";
16
- import { useAlert } from "../context/alertContext/AlertContext";
17
- import { ForisURLs } from "../utils/forisUrls";
18
-
19
- function RebootButton(props) {
20
- const [triggered, setTriggered] = useState(false);
21
- const [modalShown, setModalShown] = useState(false);
22
- const [triggerRebootStatus, triggerReboot] = useAPIPost(ForisURLs.reboot);
23
-
24
- const [setAlert] = useAlert();
25
- useEffect(() => {
26
- if (triggerRebootStatus.state === API_STATE.ERROR) {
27
- setAlert(_("Reboot request failed."));
28
- }
29
- });
30
-
31
- const rebootHandler = () => {
32
- setTriggered(true);
33
- triggerReboot();
34
- setModalShown(false);
35
- };
36
-
37
- return (
38
- <>
39
- <RebootModal
40
- shown={modalShown}
41
- setShown={setModalShown}
42
- onReboot={rebootHandler}
43
- />
44
- <Button
45
- className="btn-danger"
46
- loading={triggered}
47
- disabled={triggered}
48
- onClick={() => setModalShown(true)}
49
- {...props}
50
- >
51
- {_("Reboot")}
52
- </Button>
53
- </>
54
- );
55
- }
56
-
57
- RebootModal.propTypes = {
58
- shown: PropTypes.bool.isRequired,
59
- setShown: PropTypes.func.isRequired,
60
- onReboot: PropTypes.func.isRequired,
61
- };
62
-
63
- function RebootModal({ shown, setShown, onReboot }) {
64
- return (
65
- <Modal shown={shown} setShown={setShown}>
66
- <ModalHeader setShown={setShown} title={_("Warning!")} />
67
- <ModalBody>
68
- <p>{_("Are you sure you want to restart the router?")}</p>
69
- </ModalBody>
70
- <ModalFooter>
71
- <Button onClick={() => setShown(false)}>{_("Cancel")}</Button>
72
- <Button className="btn-danger" onClick={onReboot}>
73
- {_("Confirm reboot")}
74
- </Button>
75
- </ModalFooter>
76
- </Modal>
77
- );
78
- }
79
-
80
- export default RebootButton;
package/foris-6.4.0.tgz DELETED
Binary file