Commit the pending application, help and browser regression work. Pin the patched PKCS dependency for the production release.
100 lines
4.6 KiB
C#
100 lines
4.6 KiB
C#
using PlotLine.Models;
|
|
|
|
namespace PlotLine.ViewModels;
|
|
|
|
public sealed class PlotLineWorkspaceViewModel
|
|
{
|
|
public Project Project { get; set; } = new();
|
|
public int? SelectedBookID { get; set; }
|
|
public int? SelectedScenarioID { get; set; }
|
|
public string? SelectedScenarioName { get; set; }
|
|
public string Mode { get; set; } = "Focus";
|
|
public IReadOnlySet<int> AssociatedSelectedSceneIDs { get; set; } = new HashSet<int>();
|
|
public IReadOnlyList<PlotLineWorkspaceAttributionRow> AssociationScenes { get; set; } = [];
|
|
public IReadOnlyList<PlotLineWorkspaceTargetRow> MapTargets { get; set; } = [];
|
|
public PlotHealthResult Health { get; set; } = PlotHealthResult.Empty;
|
|
public bool ShowSuggestions { get; set; }
|
|
public IReadOnlyList<Book> Books { get; set; } = [];
|
|
public IReadOnlyList<Scenario> Scenarios { get; set; } = [];
|
|
public IReadOnlyList<PlotLineWorkspaceLineViewModel> PlotLines { get; set; } = [];
|
|
public IReadOnlyList<int> SelectedPlotLineIDs { get; set; } = [];
|
|
public IReadOnlyList<int> SelectedThreadIDs { get; set; } = [];
|
|
public IReadOnlyList<PlotLineWorkspaceSceneViewModel> Scenes { get; set; } = [];
|
|
public IReadOnlyList<PlotLineWorkspaceSuggestionSceneViewModel> SuggestedScenes { get; set; } = [];
|
|
public IReadOnlyList<PlotLineWorkspaceAttributionRow> ProposedOnlyScenes { get; set; } = [];
|
|
public IReadOnlyList<PlotLineWorkspaceAttributionRow> NoKnownAttributionScenes { get; set; } = [];
|
|
public bool IsUnattributedMode => string.Equals(Mode, "Unattributed", StringComparison.OrdinalIgnoreCase);
|
|
public bool IsWeaveMode => SelectedPlotLineIDs.Count > 1;
|
|
}
|
|
|
|
public sealed class PlotLineWorkspaceLineViewModel
|
|
{
|
|
public PlotLineWorkspaceLineRow Line { get; set; } = new();
|
|
public bool IsSelected { get; set; }
|
|
public IReadOnlyList<PlotLineWorkspaceThreadRow> Threads { get; set; } = [];
|
|
}
|
|
|
|
public sealed class PlotLineWorkspaceSceneViewModel
|
|
{
|
|
public int SceneID { get; set; }
|
|
public int NarrativeOrder { get; set; }
|
|
public int GapBefore { get; set; }
|
|
public int ChapterGapBefore { get; set; }
|
|
public decimal ChapterNumber { get; set; }
|
|
public string ChapterTitle { get; set; } = string.Empty;
|
|
public decimal SceneNumber { get; set; }
|
|
public string SceneTitle { get; set; } = string.Empty;
|
|
public string? Summary { get; set; }
|
|
public string? PovCharacterName { get; set; }
|
|
public string? LocationName { get; set; }
|
|
public string? TimeLabel { get; set; }
|
|
public int WarningCount { get; set; }
|
|
public int DependencyCount { get; set; }
|
|
public bool HasManuscript { get; set; }
|
|
public int StructuralTargetCount { get; set; }
|
|
public IReadOnlyList<PlotLineWorkspaceSceneMembershipViewModel> Memberships { get; set; } = [];
|
|
public IReadOnlyList<PlotLineWorkspaceDependencyRow> Connections { get; set; } = [];
|
|
public bool IsShared => Memberships.Select(x => x.PlotLineID).Distinct().Count() > 1;
|
|
}
|
|
|
|
public sealed class PlotLineWorkspaceSceneMembershipViewModel
|
|
{
|
|
public int PlotLineID { get; set; }
|
|
public string PlotLineName { get; set; } = string.Empty;
|
|
public string Colour { get; set; } = "#2f6f63";
|
|
public IReadOnlyList<PlotLineWorkspaceContributionRow> Contributions { get; set; } = [];
|
|
}
|
|
|
|
public sealed class PlotLineWorkspaceSuggestionSceneViewModel
|
|
{
|
|
public PlotLineWorkspaceAttributionRow Scene { get; set; } = new();
|
|
public IReadOnlyList<PlotLineWorkspaceSuggestionRow> Suggestions { get; set; } = [];
|
|
}
|
|
|
|
public sealed class PlotLineWorkspaceInspectorViewModel
|
|
{
|
|
public int ProjectID { get; set; }
|
|
public int? BookID { get; set; }
|
|
public SceneEditViewModel Scene { get; set; } = new();
|
|
public IReadOnlyList<PlotLineWorkspaceSceneMembershipViewModel> Memberships { get; set; } = [];
|
|
public IReadOnlyList<PlotLineWorkspaceThreadRow> Threads { get; set; } = [];
|
|
public IReadOnlyList<PlotLineWorkspaceDependencyRow> Dependencies { get; set; } = [];
|
|
public IReadOnlyList<PlotLineWorkspaceTargetViewModel> Targets { get; set; } = [];
|
|
public IReadOnlyList<PlotLineWorkspaceSuggestionRow> Suggestions { get; set; } = [];
|
|
}
|
|
|
|
public sealed class PlotLineWorkspaceTargetViewModel
|
|
{
|
|
public string SourcePlotLineName { get; set; } = string.Empty;
|
|
public string TargetPlotLineName { get; set; } = string.Empty;
|
|
public string StructuralType { get; set; } = string.Empty;
|
|
}
|
|
|
|
public sealed class PlotLineWorkspaceManuscriptViewModel
|
|
{
|
|
public int SceneID { get; set; }
|
|
public string SceneTitle { get; set; } = string.Empty;
|
|
public string SourceText { get; set; } = string.Empty;
|
|
public int SourceWordCount { get; set; }
|
|
}
|