csharp-mvc: user and lang selectors

This commit is contained in:
Andrey Panov
2019-09-09 17:31:10 +03:00
parent df74cdeb66
commit fe38ca4a08
4 changed files with 101 additions and 4 deletions

View File

@ -94,13 +94,13 @@ namespace OnlineEditorsExampleMVC.Models
"editorConfig", new Dictionary<string, object>
{
{ "mode", DocManagerHelper.EditedExts.Contains(Path.GetExtension(FileName)) && request["mode"] != "view" ? "edit" : "view" },
{ "lang", "en" },
{ "lang", request.Cookies["ulang"]?.Value ?? "en" },
{ "callbackUrl", CallbackUrl },
{
"user", new Dictionary<string, object>
{
{ "id", DocManagerHelper.CurUserHostAddress() },
{ "name", "John Smith" }
{ "id", request.Cookies["uid"]?.Value ?? "uid-1" },
{ "name", request.Cookies["uname"]?.Value ?? "John Smith" }
}
},
{