version up
This commit is contained in:
@@ -1,8 +1,29 @@
|
||||
namespace Blahblah.FlowerApp;
|
||||
using Blahblah.FlowerApp.Data.Model;
|
||||
using static Blahblah.FlowerApp.Extensions;
|
||||
|
||||
namespace Blahblah.FlowerApp;
|
||||
|
||||
internal class AppResources
|
||||
{
|
||||
public const string EmptyCover = "empty_flower.jpg";
|
||||
|
||||
public const int EmptyUserId = -1;
|
||||
|
||||
public static readonly Size EmptySize = new(512, 339);
|
||||
|
||||
static readonly UserItem emptyUser = new()
|
||||
{
|
||||
Id = EmptyUserId,
|
||||
Name = L("guest", "Guest")
|
||||
};
|
||||
static UserItem? user;
|
||||
|
||||
public static UserItem User => user ?? emptyUser;
|
||||
|
||||
public static bool IsLogined => user != null;
|
||||
|
||||
public static void SetUser(UserItem user)
|
||||
{
|
||||
AppResources.user = user;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user