Page MenuHomePhorge

Don't require setting a name
ClosedPublic

Authored by mollekopf on Mar 23 2023, 1:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 5, 4:52 PM
Unknown Object (File)
Sep 16 2024, 7:41 PM
Unknown Object (File)
Sep 13 2024, 8:40 AM
Unknown Object (File)
Sep 13 2024, 8:38 AM
Unknown Object (File)
Sep 13 2024, 8:38 AM
Unknown Object (File)
Sep 3 2024, 4:47 PM
Unknown Object (File)
Sep 2 2024, 4:56 AM
Unknown Object (File)
Aug 28 2024, 1:51 AM
Subscribers

Details

Summary

When creating a new device for pairing, we can just generate the name.
It will be replaced during pairing anyways with the device name.

Also, instead if there already exists a corresponding device we can just
show the existing one.

Diff Detail

Repository
rK kolab
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mollekopf created this revision.
mollekopf added a reviewer: Restricted Project.Mar 23 2023, 1:31 PM
machniak added inline comments.
src/resources/vue/CompanionApp/Info.vue
92โ€“96

This request should probably be done only if the previous one was successful.

src/resources/vue/CompanionApp/List.vue
69

I think we should not use localized labels as an identifier (name). It will not work if user changes the name or UI language.

src/resources/vue/CompanionApp/Info.vue
92โ€“96

Nothing improves by doing the second conditionally and this way we're doing them in parallel.

src/resources/vue/CompanionApp/List.vue
69

The name is not used as id, it's just a name for display. I agree that the mechanism used here to show existing instead of creating a new device by matching the name is not the prettiest approach, but it should normally work, and if it doesn't (because the language was changed) no harm is done either. The alternative would be to show the last device that was created that isn't paired, with the risk of picking the wrong one for recovery or regular.
So I think we should just leave it as is, unless you have a good alternative approach.

This revision is now accepted and ready to land.Mar 27 2023, 7:56 AM
This revision was automatically updated to reflect the committed changes.