- @switch (Model.Result) + @if (Model.Result == ConfirmOwnershipResult.Success + || Model.Result == ConfirmOwnershipResult.AlreadyOwner) { - case ConfirmOwnershipResult.Success: - case ConfirmOwnershipResult.AlreadyOwner: - @:Ownership Confirmed - break; - - case ConfirmOwnershipResult.Rejected: - @:Ownership Rejected - break; - - case ConfirmOwnershipResult.Cancelled: - @:Ownership Request Cancelled - break; - - default: - @:Ownership Confirmation Failed - break; + @:Email Confirmed + } + else + { + @:Email Confirmation Failed }

- @switch (Model.Result) + @if (Model.Result == ConfirmOwnershipResult.Success) { - case ConfirmOwnershipResult.Success: -

- You are now an owner of the - '@Model.PackageId' package! -

- break; - - case ConfirmOwnershipResult.Rejected: -

- You have rejected a request to become an owner of the - '@Model.PackageId' package! -

- break; - - case ConfirmOwnershipResult.Cancelled: -

- You have cancelled your request for @Model.Username to become an owner of the - '@Model.PackageId' package! -

- break; - - case ConfirmOwnershipResult.AlreadyOwner: - @ViewHelpers.AlertInfo( - @ - You are already an owner of the - '@Model.PackageId' package. - - ) - -

- If you manage multiple accounts, make sure you sign in as the user who received the request before clicking the confirmation link. -

- break; - - case ConfirmOwnershipResult.NotYourRequest: - @* Note that we're not confirming that a request even exists for this user, it's just a string compare against the name in the URL *@ - @ViewHelpers.AlertDanger( - @ - This request link is for the user '@Model.Username'. If you wish to accept it, - please sign in as that user and click the link again. - - ) - break; +

+ You are now an owner of the + '@Model.PackageId' package! +

+ } + else if (Model.Result == ConfirmOwnershipResult.AlreadyOwner) + { + @ViewHelpers.AlertInfo( + @ + You are already an owner of the + '@Model.PackageId' package. + + ) - default: - @ViewHelpers.AlertDanger( - @ - Could not confirm package ownership for '@Model.PackageId'. - - ) +

+ If you manage multiple accounts, make sure you sign in as the user who received the request before clicking the confirmation link. +

+ } + else if (Model.Result == ConfirmOwnershipResult.NotYourRequest) + { + @* Note that we're not confirming that a request even exists for this user, it's just a string compare against the name in the URL *@ + @ViewHelpers.AlertDanger( + @ + This request link is for the user '@Model.Username'. If you wish to accept it, + please sign in as that user and click the link again. + + ) + } + else + { + @ViewHelpers.AlertDanger( + @ + Could not confirm package ownership for '@Model.PackageId'. + + ) -

- Make sure you clicked on the confirmation URL in the email we sent. - It's also possible that the existing owner revoked the - request to add you as an owner. -

- break; +

+ Make sure you clicked on the confirmation URL in the email we sent. + It's also possible that the existing owner revoked the + request to add you as an owner. +

}