26 lines
818 B
C#
26 lines
818 B
C#
|
namespace TSC2.Components.Layout
|
|||
|
{
|
|||
|
public partial class MainLayout
|
|||
|
{
|
|||
|
public static string Greeting = "Hello, {}";
|
|||
|
public string ClientId = CSharp.Credentials.GoogleClientId;
|
|||
|
public string ClientSecret = CSharp.Credentials.GoogleClientSecret;
|
|||
|
public static string Redirect = "https://localhost:7282/signin-google";
|
|||
|
public static Dictionary<string, string> Session = new Dictionary<string, string>();
|
|||
|
|
|||
|
|
|||
|
|
|||
|
public static void UpdateGreeting()
|
|||
|
{
|
|||
|
if (Session.Count == 0)
|
|||
|
{
|
|||
|
return;
|
|||
|
}
|
|||
|
|
|||
|
// This should only execute if the user is signed in AND is the first render
|
|||
|
Greeting = "Hello, " + Session["name"];
|
|||
|
Console.Out.WriteLine("Updated greeting");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|