Closed chinkan closed 6 years ago
Hello @chinkan
Thanks for your submit. Unfortunately I can't merge everything in your Pull Request because there's some breaking change and some of the function already exist.
1) For the UserBox component, you can already provide your own userbox, by using the new "header components" from the v1, and as it allow more possibilities I won't replace that.
2) For the logoutAction in the UserService, that's a nice feature, I will definitivly add that to next version (maybe you could submit a separate PR for that ? so your name could be in kept in the commits :) )
3) For the menu, your proposition of data structure will cause breaking change (and so, forcing everyone to change their projects) so I can't merge it that way. But the possibility to have intermediate "header title" is good, so I'm adding just that part. (if you want, you can also do a separate PR for that to mark your contribution :) )
4) For the display_profile property, it's a feature too 'specific' to be in the main configuration of the layout. And as you can override that component by using the "Header Components" I don't see the need of that. But it gave me an idea of a "DisplayService" where we could set our own rules to define if a part of the app should be displayed or not (in a more fine way, for example: ok for that user, but not for the other one...). So I will give you are more personnalisable way to that.
Anyway, feel free to argument if I'm not explaining correctly, and many thanks for your work it will give very good ideas for the project :)
Thanks @TwanoO67
Let me close this request.
Hi @TwanoO67 ,
I have updated some features:
custom user body in user box: simply create a component and add this code below to app.routes.ts
custom logout action: just add this code to app.component.ts could override the logout process
menu support multiple section: menu can be multiple section with this links json
and you can hide or show the profile button with adding
'display_profile': false,
to component data in app.routes.ts, and the profile link is now default "/profile"Is it suitable for this project? Thanks and sorry for my English :)