From 8c0398e29a47b57d48ef863d6aedc035cf60987a Mon Sep 17 00:00:00 2001 From: Harshith Mohan <26010946+harshithmohan@users.noreply.github.com> Date: Mon, 12 Aug 2024 19:33:35 +0530 Subject: [PATCH] Disable save button for renamers without settings (#972) --- src/pages/utilities/Renamer.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/utilities/Renamer.tsx b/src/pages/utilities/Renamer.tsx index fdf406031..268689b39 100644 --- a/src/pages/utilities/Renamer.tsx +++ b/src/pages/utilities/Renamer.tsx @@ -431,6 +431,9 @@ const Renamer = () => { loading={settingsPatchPending} disabled={(selectedConfig.Name === settings.Plugins.Renamer.DefaultRenamer) || settingsPatchPending} + tooltip={selectedConfig.Name === settings.Plugins.Renamer.DefaultRenamer + ? 'Already set as default!' + : ''} > Set as default @@ -462,7 +465,8 @@ const Renamer = () => { buttonType="primary" buttonSize="normal" loading={savePending} - disabled={savePending} + disabled={savePending || !renamer?.DefaultSettings} + tooltip={!renamer?.DefaultSettings ? 'Renamer does not have any settings to save.' : ''} > Save