Skip to content

Stops user from adding duplicate ID in gui - #2628

Closed
kev-the-dev wants to merge 4 commits into
syncthing:masterfrom
kev-the-dev:gui-stop-duplicate-id
Closed

kev-the-dev wants to merge 4 commits into
syncthing:masterfrom
kev-the-dev:gui-stop-duplicate-id

Conversation

@kev-the-dev

Copy link
Copy Markdown
Contributor

Adds check in valid device id directive to check for uniqueness. If user wants to force a duplicate, cli or manual config change is still available. But for most users, it should be a good check. I can't think of a valid use case for a duplicate id, and it seems to introduce some problems.

Mentioned in #1675,#2465, and some other issues.

Feel free to change error message, I just wrote a sample one.

Also, am I required to update the translation files in any way to have a GUI change accepted?

Adds check in valid device id to check for uniqueness
@kev-the-dev

Copy link
Copy Markdown
Contributor Author

Screenshot of what user will see when attempting to add a duplicate device:
screenshot from 2015-12-29 22-51-00

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nearly all of the JavaScript code for this project has conditional blocks on their own line and surrounded by brackets, as lines 12-16 of this file. I recommend following the local custom.

@burkemw3

Copy link
Copy Markdown
Contributor

Overall, this diff looks good to me.

One inline comment about the if/else block styling.

Not sure what's up with the automatic verification. Hopefully, a maintainer will be along to give them the necessary kick for you.

@Zillode

Zillode commented Dec 30, 2015

Copy link
Copy Markdown
Contributor

Looks good,

Also, am I required to update the translation files in any way to have a GUI change accepted?

Nope

@calmh

calmh commented Dec 30, 2015

Copy link
Copy Markdown
Member

@st-jenkins add to whitelist

@calmh calmh added the enhancement New features or improvements of some kind, as opposed to a problem (bug) label Dec 30, 2015
@calmh

calmh commented Dec 30, 2015

Copy link
Copy Markdown
Member

@st-jenkins retest this please

@calmh

calmh commented Dec 30, 2015

Copy link
Copy Markdown
Member

Merged in 4a6f171

@calmh calmh closed this Dec 30, 2015
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Jun 16, 2017
@syncthing syncthing locked and limited conversation to collaborators Jun 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New features or improvements of some kind, as opposed to a problem (bug) frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants