Polls: Provide displayNames instead of userId

Created on 8 Jan 2020  Β·  8Comments  Β·  Source: nextcloud/polls

402 is back.

Bildschirmfoto 2020-01-08 um 13 42 17

enhancement

Most helpful comment

Hi @dartcafe,

First of all, thank you for this great Nextcloud App πŸ‘

Here some clues to display name instead of user id, based on Nextcloud Talk/Spreed code:
Nextcloud Talk use the @nextcloud/auth NPM module.
Dependency reference: https://github.com/nextcloud/spreed/blob/v8.0.0/package.json#L18

Then, the code to load this module: https://github.com/nextcloud/spreed/blob/v8.0.0/src/PublicShareAuthSidebar.vue#L37

The code to manipulate the getCurrentUser() object: https://github.com/nextcloud/spreed/blob/v8.0.0/src/PublicShareAuthSidebar.vue#L164

Finally, the code to extract the displayName of the user, if any: https://github.com/nextcloud/spreed/blob/v8.0.0/src/store/actorStore.js#L135

Have a good day,
Tortue Torche

All 8 comments

Looking at the screenshot I would also take care of the column width (created entries overlapping expiration date) and the vertical alignment of the owner to the other text lines.

I have to fiddle out, how to get the displaynames via the js API. comes later.

Hi @dartcafe,

First of all, thank you for this great Nextcloud App πŸ‘

Here some clues to display name instead of user id, based on Nextcloud Talk/Spreed code:
Nextcloud Talk use the @nextcloud/auth NPM module.
Dependency reference: https://github.com/nextcloud/spreed/blob/v8.0.0/package.json#L18

Then, the code to load this module: https://github.com/nextcloud/spreed/blob/v8.0.0/src/PublicShareAuthSidebar.vue#L37

The code to manipulate the getCurrentUser() object: https://github.com/nextcloud/spreed/blob/v8.0.0/src/PublicShareAuthSidebar.vue#L164

Finally, the code to extract the displayName of the user, if any: https://github.com/nextcloud/spreed/blob/v8.0.0/src/store/actorStore.js#L135

Have a good day,
Tortue Torche

Hi folks,

I think my previous comment go in the wrong direction, because it's only focused on the current user πŸ˜•

Cheers,
Tortue Torche

Yes, right. The displayNames are AFAIK not available via the JS API. But I want to avoid loading every username via a individual API-Call. That means, I have to load them when gathering the information in the backend. This means extending the models. I need some time for that. Stabilizing the app has a higher priority ATM.

I have the same problem, I don’t know who has voted πŸ˜…πŸ€·β€β™‚οΈ
NC 17.0.2 on Ubuntu with Polls 1.1.6

See beta4 in the releases. There are some more enhancements and fixes. please report bugs in new issues.

Resolved in 1.2.0b4. Good job!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

khayman123 picture khayman123  Β·  3Comments

dartcafe picture dartcafe  Β·  4Comments

brtptrs picture brtptrs  Β·  4Comments

Dubidubiduu picture Dubidubiduu  Β·  5Comments

wompydomp picture wompydomp  Β·  6Comments