From ec7c783448747f1a30557d85b69045240ff629e1 Mon Sep 17 00:00:00 2001 From: Alexey Safronov Date: Thu, 11 Jul 2024 23:09:40 +0400 Subject: [PATCH] Client: Added RoomsPinLimitMessage toast --- i18next/client.babel | 132 ++++++++++++++++++ packages/client/public/locales/en/Files.json | 1 + .../client/src/store/FilesActionsStore.js | 5 +- 3 files changed, 137 insertions(+), 1 deletion(-) diff --git a/i18next/client.babel b/i18next/client.babel index 6fdd8f172f..4e25d4bbad 100644 --- a/i18next/client.babel +++ b/i18next/client.babel @@ -51906,6 +51906,138 @@ + + RoomsPinLimitMessage + + + + + + ar-SA + false + + + az-Latn-AZ + false + + + bg-BG + false + + + cs-CZ + false + + + de-DE + false + + + el-GR + false + + + en-US + false + + + es-ES + false + + + fi-FI + false + + + fr-FR + false + + + hy-AM + false + + + it-IT + false + + + ja-JP + false + + + ko-KR + false + + + lo-LA + false + + + lv-LV + false + + + nl-NL + false + + + pl-PL + false + + + pt-BR + false + + + pt-PT + false + + + ro-RO + false + + + ru-RU + false + + + si-SI + false + + + sk-SK + false + + + sl-SI + false + + + sr-Cyrl-RS + false + + + sr-Latn-RS + false + + + tr-TR + false + + + uk-UA + false + + + vi-VN + false + + + zh-CN + false + + + RoomsPinned diff --git a/packages/client/public/locales/en/Files.json b/packages/client/public/locales/en/Files.json index 9a2b60c036..2c25e4ac85 100644 --- a/packages/client/public/locales/en/Files.json +++ b/packages/client/public/locales/en/Files.json @@ -149,6 +149,7 @@ "RoomOwner": "Room owner", "RoomPinned": "Room pinned", "RoomRemoved": "Room removed", + "RoomsPinLimitMessage": "You can't pin more than 10 rooms to the top. Unpin some that are currently pinned.", "RoomsPinned": "Rooms pinned: {{count}}", "RoomsRemoved": "Rooms removed", "RoomsUnpinned": "Rooms unpinned: {{count}}", diff --git a/packages/client/src/store/FilesActionsStore.js b/packages/client/src/store/FilesActionsStore.js index 2a0cef1eb7..22f6990ca4 100644 --- a/packages/client/src/store/FilesActionsStore.js +++ b/packages/client/src/store/FilesActionsStore.js @@ -1108,7 +1108,10 @@ class FilesActionStore { : t("RoomPinned"), ), ) - .catch((error) => console.log(error)); + .catch((error) => { + console.log(error); + toastr.error(t("RoomsPinLimitMessage")); + }); case "unpin": items.forEach((item) => { updateRoomPin(item);