Skip to content
This repository has been archived by the owner on Mar 23, 2022. It is now read-only.

Automatically inject UserPicker into view #158

Open
snebjorn opened this issue Jul 19, 2017 · 2 comments
Open

Automatically inject UserPicker into view #158

snebjorn opened this issue Jul 19, 2017 · 2 comments

Comments

@snebjorn
Copy link
Contributor

It would be awesome if the UserPicker would be injected into the view without the need for

@using RimDev.Stuntman.Core
@inject StuntmanOptions StuntmanOptions
<!DOCTYPE html>
<html>
...
    <environment names="Development">
        @Html.Raw(StuntmanOptions.UserPicker(User))
    </environment>
</body>
</html>

BrowserLink works that way.
All you have to do is app.UseBrowserLink(); and this is injected into the view.

    <!-- Visual Studio Browser Link -->
    <script type="application/json" id="__browserLink_initializationData">
        {"requestId":"a717d5a07c1741949a7cefd6fa2bad08","requestMappingFromServer":false}
    </script>
    <script type="text/javascript" src="http://localhost:54139/b6e36e429d034f578ebccd6a79bf19bf/browserLink" async="async"></script>
    <!-- End Browser Link -->

source

@khalidabuhakmeh
Copy link
Contributor

This may be possible, but may inadvertently cause issues for our users. That said, we could look at the resulting response and determine if it has a content type of text/html and modify it then. Something for discussion certainly. Thank you.

@kendaleiv
Copy link
Contributor

I like the idea! We can investigate this in vnext once #161 is finished and merged.

@kendaleiv kendaleiv self-assigned this Dec 15, 2017
@kendaleiv kendaleiv removed their assignment Mar 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants