feat(editor): open server sequences with proxies, hero frame to the index, export sync and saved copies
Server sequences that are not in the local index open through a RemoteSequenceSource: proxies from the cache, project from the server's settings with their version (a 409 merges again), analysis report from the server, analyses and renders posted as server jobs (one per preset) and followed through the server's events. Set hero now reaches the index (SequenceEdit.HeroFrameId) so the Library card shows it. The Export tab gains the Sync option (remembered in the project) and restores "Save both" copies through undo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
36 files changed
+1307
-116
No files matched your search
@@ -270,6 +270,10 @@ public sealed class SyncService
|
||||
/// <summary>A server sequence from the proxy cache, for the editor; null when its proxies were never fetched or were cleared.</summary>
|
||||
public RemoteSequence? OpenRemote(string server, Guid remoteId) => Proxies.Load(server, remoteId);
|
||||
|
||||
/// <summary>The link of a local sequence to a sequence of <paramref name="server"/>; null when the server does not have it.</summary>
|
||||
public Task<SyncLink?> LinkOfAsync(string server, Guid localId, CancellationToken cancellationToken = default) =>
|
||||
_links.FindByLocalAsync(server, localId, cancellationToken);
|
||||
|
||||
// ---------------- Engine ----------------
|
||||
|
||||
/// <summary>Server ids of the sequences an upload or download job is working on.</summary>
|
||||
@@ -649,7 +653,24 @@ public sealed class SyncService
|
||||
return path;
|
||||
}
|
||||
|
||||
internal static string SavedCopyName(DateTime localTime) => string.Create(CultureInfo.InvariantCulture, $"project.this-pc-{localTime:yyyyMMdd-HHmmss}.json");
|
||||
internal static string SavedCopyName(DateTime localTime) =>
|
||||
string.Create(CultureInfo.InvariantCulture, $"{SavedCopyPrefix}{localTime.ToString(SavedCopyTimeFormat, CultureInfo.InvariantCulture)}.json");
|
||||
|
||||
/// <summary>File name pattern of "Save both" copies in a sequence's <c>.titano</c> folder.</summary>
|
||||
public const string SavedCopyPattern = SavedCopyPrefix + "*.json";
|
||||
|
||||
private const string SavedCopyPrefix = "project.this-pc-";
|
||||
private const string SavedCopyTimeFormat = "yyyyMMdd-HHmmss";
|
||||
|
||||
/// <summary>When a "Save both" copy was kept (local time, from its name); null for a name of another shape.</summary>
|
||||
public static DateTime? SavedCopyTime(string fileName)
|
||||
{
|
||||
var name = Path.GetFileNameWithoutExtension(fileName);
|
||||
return name.StartsWith(SavedCopyPrefix, StringComparison.Ordinal)
|
||||
&& DateTime.TryParseExact(name[SavedCopyPrefix.Length..], SavedCopyTimeFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out var time)
|
||||
? time
|
||||
: null;
|
||||
}
|
||||
|
||||
private async Task ForgetAsync(SyncLink link, CancellationToken cancellationToken)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user