feat(app): Edit opens workspace projects, with versions, sync and the project menu
Owner review 2, phase 5a (R8), desktop package: editing moves out of the library. A sequence of this PC's archive now opens in Edit as a project of the workspace (%LOCALAPPDATA%\Chronos\workspace, .\data\workspace when portable), with this PC's archive as its home; the editor writes the workspace's working state, never the library. - WorkspaceHost composes WorkspaceStore and WorkspaceSync over Settings > Workspace's folder: checkout and the WorkspaceCopy job, status, Save version with the sync after it (Sync automatically, on by default), sync (pull, then push), conflicts, restore, history, new / rename / delete project, and Remove local copy, which refuses while work is unsent unless the user sends it first or discards it, reads back the home's head and base and checks their hashes, and keeps discarded work in <workspace>/.trash; versions past Kept versions are pruned only once the home returns them with the same content. - WorkspaceSequenceSource: frames and pixels of the media (proxies), the working state saved atomically under the project's lease and merged against the basis, the home's deep report while its frames are the media's, renders at the home with the portable settings recording the project and the version. - Edit: the project opened last for the sequence, else "Open in workspace" (Main made from the sequence's settings, another project or a new one; proxies) checks out, copies and opens once the copy is done. The picker lists the workspace's projects with their state above the library. The title's project menu: Save version (Ctrl+S, note), Sync, History (compare, restore as one undo step), New project, Rename, Delete project, Remove local copy; a conflict dialog only on real conflicts (keep mine, take the library's, save both, later); Update media when the library's frames moved. .chronos files: format 2 opens its project, format 1 gives its settings to Main. - Settings > Workspace: folder (shown, Open), Sync automatically, Kept versions. Strings in English and Italian. - A capture (sample data without an engine) keeps editing the library. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit da47a580ba9db3ce2a1db2f11c30cf7344c8b394)
This commit is contained in:
1 parent
03d32f18d3
commit
b9d1c396a1
37 files changed
+4547
-104
No files matched your search
@@ -89,6 +89,7 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
|
||||
/// <summary>The user chose a step since the editor opened.</summary>
|
||||
private bool _stepChosen;
|
||||
|
||||
private Workspace.ProjectMenuViewModel? _project;
|
||||
private bool _disposed;
|
||||
|
||||
public EditorViewModel(ShellViewModel shell, EditorSession session, IReadOnlyList<IVideoEncoderProvider> encoders, EncoderHost host)
|
||||
@@ -175,6 +176,23 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
|
||||
/// <summary>A server sequence edited with proxies (the header says where it lives).</summary>
|
||||
public bool IsRemote => Session.IsRemote;
|
||||
|
||||
/// <summary>
|
||||
/// The project menu beside the title (owner review 2, R8) when the sequence is open as a workspace project: its state,
|
||||
/// Save version, Sync, History and the rest; null otherwise (a server sequence, a capture's library sequence).
|
||||
/// </summary>
|
||||
public Workspace.ProjectMenuViewModel? Project
|
||||
{
|
||||
get => _project;
|
||||
internal set
|
||||
{
|
||||
_project?.Dispose();
|
||||
Set(ref _project, value);
|
||||
OnPropertyChanged(nameof(HasProject));
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasProject => _project is not null;
|
||||
|
||||
/// <summary>The server a server sequence lives on ("Studio NAS"); null for a sequence of this PC.</summary>
|
||||
public string? ServerName => IsRemote ? Shell.Services.Server.ServerName ?? Loc.L("Server.Label.Server") : null;
|
||||
|
||||
@@ -711,6 +729,7 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
|
||||
Shell.Services.Sync.Changed -= OnSyncChanged;
|
||||
Shell.Services.SequenceReorganized -= OnSequenceReorganized;
|
||||
foreach (var tab in Tabs) tab.Dispose();
|
||||
_project?.Dispose();
|
||||
base.Dispose();
|
||||
await Session.DisposeAsync();
|
||||
}
|
||||
@@ -1134,6 +1153,8 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
|
||||
if (job is { Kind: JobKind.DeepAnalyse, State: JobState.Done }) ClearVisited();
|
||||
// A render this editor followed to its end is said here, with its output, unless the Jobs screen said it first.
|
||||
if (job.State == JobState.Done) _ = ReloadAsync(job.Kind == JobKind.Render && Shell.Jobs.ClaimRenderToast(job.Id) ? job : null);
|
||||
// An analysis may have written its Auto values into the library's settings (Main): the project takes them or says so.
|
||||
if (job.State == JobState.Done && _project is { } project) _ = project.JobEndedAsync(job);
|
||||
else if (IsRemote && job.State is JobState.Failed or JobState.Cancelled) ReportServerJobEnded(job);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user