24 lines
624 B
C#
24 lines
624 B
C#
using Shogi.UI.Shared;
|
|
|
|
namespace Shogi.UI.Pages.Home.Account;
|
|
|
|
public static class LocalStorageExtensions
|
|
{
|
|
private const string AccountPlatform = "AccountPlatform";
|
|
|
|
public static Task<WhichAccountPlatform?> GetAccountPlatform(this ILocalStorage self)
|
|
{
|
|
return self.Get<WhichAccountPlatform>(AccountPlatform).AsTask();
|
|
}
|
|
|
|
public static Task SetAccountPlatform(this ILocalStorage self, WhichAccountPlatform platform)
|
|
{
|
|
return self.Set(AccountPlatform, platform.ToString()).AsTask();
|
|
}
|
|
|
|
public static Task DeleteAccountPlatform(this ILocalStorage self)
|
|
{
|
|
return self.Delete(AccountPlatform).AsTask();
|
|
}
|
|
}
|