-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
* switch to .NET 8 * switch to primary constructors
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
namespace LightTube.Contexts; | ||
|
||
public class ImportContext : BaseContext | ||
public class ImportContext(HttpContext context, string? message = null, bool isError = false) : BaseContext(context) | ||
{ | ||
public string? Message { get; } | ||
public bool IsError { get; } | ||
|
||
public ImportContext(HttpContext context, string? message = null, bool isError = false) : base(context) | ||
{ | ||
Message = message; | ||
IsError = isError; | ||
} | ||
public string? Message { get; } = message; | ||
public bool IsError { get; } = isError; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,15 @@ | ||
namespace LightTube.Contexts; | ||
|
||
public class ModalContext : BaseContext | ||
public class ModalContext(HttpContext context) : BaseContext(context) | ||
{ | ||
public string Title { get; set; } | ||
Check warning on line 5 in LightTube/Contexts/ModalContext.cs GitHub Actions / build (linux-musl-x64)
Check warning on line 5 in LightTube/Contexts/ModalContext.cs GitHub Actions / build (linux-musl-x64)
Check warning on line 5 in LightTube/Contexts/ModalContext.cs GitHub Actions / build (linux-arm)
Check warning on line 5 in LightTube/Contexts/ModalContext.cs GitHub Actions / build (linux-arm)
Check warning on line 5 in LightTube/Contexts/ModalContext.cs GitHub Actions / build (linux-arm64)
Check warning on line 5 in LightTube/Contexts/ModalContext.cs GitHub Actions / build (linux-arm64)
Check warning on line 5 in LightTube/Contexts/ModalContext.cs GitHub Actions / build (linux-x64)
Check warning on line 5 in LightTube/Contexts/ModalContext.cs GitHub Actions / build (linux-x64)
Check warning on line 5 in LightTube/Contexts/ModalContext.cs GitHub Actions / build (win-x86)
Check warning on line 5 in LightTube/Contexts/ModalContext.cs GitHub Actions / build (win-x86)
Check warning on line 5 in LightTube/Contexts/ModalContext.cs GitHub Actions / build (osx-x64)
Check warning on line 5 in LightTube/Contexts/ModalContext.cs GitHub Actions / build (osx-x64)
Check warning on line 5 in LightTube/Contexts/ModalContext.cs GitHub Actions / build (win-arm64)
Check warning on line 5 in LightTube/Contexts/ModalContext.cs GitHub Actions / build (win-arm64)
Check warning on line 5 in LightTube/Contexts/ModalContext.cs GitHub Actions / build (win-x64)
|
||
public ModalButton[] Buttons { get; set; } | ||
public bool AlignToStart { get; set; } | ||
|
||
public ModalContext(HttpContext context) : base(context) | ||
{ | ||
} | ||
} | ||
|
||
public class ModalButton | ||
public class ModalButton(string label, string target, string type) | ||
{ | ||
public string Type; | ||
public string Target; | ||
public string Label; | ||
|
||
public ModalButton(string label, string target, string type) | ||
{ | ||
Label = label; | ||
Target = target; | ||
Type = type; | ||
} | ||
public string Type = type; | ||
public string Target = target; | ||
public string Label = label; | ||
} |