redirect-link icon indicating copy to clipboard operation
redirect-link copied to clipboard

If you register the same title, only the last item will be reflected

Open kkrrz opened this issue 1 year ago • 3 comments

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.

kkrrz avatar Dec 30 '23 03:12 kkrrz

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.

fluks avatar Dec 30 '23 16:12 fluks

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.

kkrrz avatar Dec 31 '23 01:12 kkrrz

I will add an error message.

fluks avatar Jan 01 '24 16:01 fluks

Commit 98b0dbf fixes this.

fluks avatar Jun 18 '24 20:06 fluks