Closed kkrrz closed 4 months ago
That's because the redirections are kept in an object with titles as keys, so they will be overwritten if the same title is used.
I don't quite see the need for having the same titles. Maybe you could just add 1, 2, 3 etc. after the title? Only one character longer.
Because moving redirections to an array requires changes and it's not really simple to change I think.
I understood. If it is not possible to save the same title, I would like an error message to be displayed when pressing the save button. With the current behavior, if you enter the same title, the entered data will be lost without you noticing.
I will add an error message.
Commit 98b0dbf fixes this.
If you enter multiple items with the same title from the settings page, press the save button, and reload the page, only the last item entered will be reflected.
If you can register with the same title, it is convenient because you can switch the "URL" according to "Enable URL" without making the title longer. For example, you can switch the "URL" depending on whether "Enable URL" is https or http.