From 9383a2fb09ffb60cfe63683106945bd688affa59 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Wed, 1 Jun 2022 21:13:43 +0200 Subject: feat: Initial commit after clean slate --- src/Data/Static/AppCookies.cs | 21 +++++++++++++++++++++ src/Data/Static/AppPaths.cs | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 src/Data/Static/AppCookies.cs create mode 100644 src/Data/Static/AppPaths.cs (limited to 'src/Data/Static') diff --git a/src/Data/Static/AppCookies.cs b/src/Data/Static/AppCookies.cs new file mode 100644 index 0000000..711d59e --- /dev/null +++ b/src/Data/Static/AppCookies.cs @@ -0,0 +1,21 @@ +using VSH.Data.Miscellaneous; + +namespace VSH.Data.Static; + +public static class AppCookies +{ + public static AppCookie Xsrf => new() { + Name = "vsh_xsrf", + Required = true + }; + + public static AppCookie Session => new() { + Name = "vsh_session", + Required = true + }; + + public static AppCookie Culture => new() { + Name = "vsh_culture", + Required = false + }; +} \ No newline at end of file diff --git a/src/Data/Static/AppPaths.cs b/src/Data/Static/AppPaths.cs new file mode 100644 index 0000000..4073a75 --- /dev/null +++ b/src/Data/Static/AppPaths.cs @@ -0,0 +1,40 @@ +using System.IO; +using VSH.Data.Miscellaneous; + +namespace VSH.Data.Static; + +public static class AppPaths +{ + public static AppPath WwwRoot => new() { + HostPath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot"), + WebPath = "/" + }; + + public static AppPath Assets => new() { + HostPath = Path.Combine(WwwRoot.HostPath, "assets"), + WebPath = "/assets" + }; + + public static AppPath ProductImages => new() { + HostPath = Path.Combine(Assets.HostPath, "images", "products"), + WebPath = Path.Combine(Assets.WebPath, "images", "products") + }; + + public static AppPath DocumentImages => new() { + HostPath = Path.Combine(Assets.HostPath, "images", "documents"), + WebPath = Path.Combine(Assets.WebPath, "images", "documents") + }; + + public static AppPath DataProtectionKeys => new() { + HostPath = Path.Combine(AppData.HostPath, "DPKeys"), + }; + + public static AppPath AppData => new() { + HostPath = Path.Combine(Directory.GetCurrentDirectory(), "AppData"), + }; + + public static AppPath DefaultProductImage => new() { + HostPath = Path.Combine(Assets.HostPath, "profile", "innrammet.svg"), + WebPath = Path.Combine(Assets.WebPath, "profile", "innrammet.svg") + }; +} \ No newline at end of file -- cgit v1.3