Add flag to mark save path as regex
parent
81f8d55694
commit
5d5e137e18
|
@ -46,5 +46,6 @@ namespace LANCommander.SDK
|
|||
public Guid Id { get; set; }
|
||||
public string Type { get; set; }
|
||||
public string Path { get; set; }
|
||||
public bool IsRegex { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ namespace LANCommander.SDK.Models
|
|||
{
|
||||
public SavePathType Type { get; set; }
|
||||
public string Path { get; set; }
|
||||
public bool IsRegex { get; set; }
|
||||
public virtual Game Game { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ namespace LANCommander.Data.Models
|
|||
{
|
||||
public SavePathType Type { get; set; }
|
||||
public string Path { get; set; }
|
||||
public bool IsRegex { get; set; }
|
||||
|
||||
public Guid? GameId { get; set; }
|
||||
[JsonIgnore]
|
||||
|
|
1694
LANCommander/Migrations/20231106061719_AddRegexFlagToSavePath.Designer.cs
generated
Normal file
1694
LANCommander/Migrations/20231106061719_AddRegexFlagToSavePath.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,29 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LANCommander.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddRegexFlagToSavePath : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsRegex",
|
||||
table: "SavePaths",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsRegex",
|
||||
table: "SavePaths");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -649,6 +649,9 @@ namespace LANCommander.Migrations
|
|||
b.Property<Guid?>("GameId")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("IsRegex")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Path")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
<FilePicker @bind-Value="context.Path" ArchiveId="@ArchiveId" AllowDirectories="true" />
|
||||
}
|
||||
</PropertyColumn>
|
||||
<PropertyColumn Property="p => p.IsRegex" Title="Regex">
|
||||
<Checkbox @bind-Checked="context.IsRegex" />
|
||||
</PropertyColumn>
|
||||
<ActionColumn>
|
||||
<Space Style="display: flex; justify-content: end">
|
||||
<SpaceItem>
|
||||
|
|
|
@ -113,6 +113,7 @@ namespace LANCommander.Services
|
|||
{
|
||||
Id = p.Id,
|
||||
Path = p.Path,
|
||||
IsRegex = p.IsRegex,
|
||||
Type = p.Type.ToString()
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue