Initial commit

This commit is contained in:
oqtane
2019-05-04 20:32:08 -04:00
committed by Shaun Walker
parent 2f232eea7e
commit d71de1c21f
177 changed files with 8536 additions and 0 deletions

View File

@ -0,0 +1,44 @@
@using Oqtane.Skins
@using Oqtane.Shared;
@using Microsoft.JSInterop
@inject IJSRuntime jsRuntime
@inherits SkinObjectBase
<button type="button" class="btn btn-primary" onclick="@SetMode">
@displayMode
</button>
@functions {
string displayMode = "";
protected override async Task OnInitAsync()
{
var interop = new Interop(jsRuntime);
string value = await interop.GetCookie("blazor");
if (value == "client")
{
displayMode = "Server Mode";
}
else
{
displayMode = "Client Mode";
}
}
public async void SetMode()
{
var interop = new Interop(jsRuntime);
string mode = await interop.GetCookie("blazor");
if (mode == "client")
{
mode = "server";
}
else
{
mode = "client";
}
await interop.SetCookie("blazor", mode, 7);
}
}