Skip to content

Commit

Permalink
Disable save button for renamers without settings (#972)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshithmohan authored Aug 12, 2024
1 parent ca05e1a commit 8c0398e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/utilities/Renamer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
</Button>
Expand Down Expand Up @@ -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
</Button>
Expand Down

0 comments on commit 8c0398e

Please sign in to comment.