feat: owner review 2 phase 5a: workspace and projects with a local home (#14)
CI / Build and test (push) Successful in 9m43s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 27s
CI / PostgreSQL 16 integration (push) Failing after 8m41s
CI / PostgreSQL 17 integration (push) Successful in 12m37s
CI / Docker image (push) Successful in 56s
Release / Build, test and publish (push) Successful in 14m59s
Release / Server image (push) Successful in 1m51s
CI / Build and test (push) Successful in 9m43s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 27s
CI / PostgreSQL 16 integration (push) Failing after 8m41s
CI / PostgreSQL 17 integration (push) Successful in 12m37s
CI / Docker image (push) Successful in 56s
Release / Build, test and publish (push) Successful in 14m59s
Release / Server image (push) Successful in 1m51s
Edit opens a sequence as a project of a workspace folder outside the library. Projects have linear version histories kept as sidecars in .chronos/projects/, Main mirrors the sequence's settings, and sync merges setting by setting. Migration 0009, JobKind.WorkspaceCopy = 20, Settings › Workspace, and 241 new strings in 38 languages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #14.
This commit is contained in:
1 parent
efa87f68ce
commit
9b24cf74fc
370 files changed
+29237
-287
No files matched your search
@@ -8,6 +8,7 @@ using Chronos.App.Infrastructure;
|
||||
using Chronos.App.Server;
|
||||
using Chronos.App.Settings;
|
||||
using Chronos.App.Shell;
|
||||
using Chronos.App.Workspace;
|
||||
using Chronos.Core.Archiving;
|
||||
using Chronos.Core.Diagnostics;
|
||||
using Chronos.Core.Import;
|
||||
@@ -86,6 +87,7 @@ public sealed class SettingsViewModel : SectionViewModel
|
||||
"Settings.Rendering.Hardware", "Settings.Rendering.Encoders"]),
|
||||
new(SettingsPage.Formats, ["Settings.Formats.Title", "Settings.Formats.Column.Tier", "Settings.Formats.Install"]),
|
||||
new(SettingsPage.Storage, ["Settings.Storage.Folder", "Settings.Storage.Thumbnails", "Settings.Storage.Limit"]),
|
||||
new(SettingsPage.Workspace, ["Settings.Workspace.Folder", "Settings.Workspace.Sync", "Settings.Workspace.AfterSave", "Settings.Workspace.Kept"]),
|
||||
new(SettingsPage.Server, ["Settings.Server.Default", "Settings.Server.RenderNode", "Settings.Server.Certificates"]),
|
||||
new(SettingsPage.Updates, ["Settings.General.CheckOnStart", "Settings.Updates.Latest", "About.Update.Check", "About.Releases"]),
|
||||
new(SettingsPage.Advanced, ["Settings.Advanced.DataFolder", "Settings.Advanced.Logs", "Settings.Advanced.LogLevel", "Settings.Advanced.KeepLogs",
|
||||
@@ -166,6 +168,9 @@ public sealed class SettingsViewModel : SectionViewModel
|
||||
// Saving applies them to the log files (App.SaveSettings).
|
||||
Logs = new LogSettingsRows(_s, Save);
|
||||
|
||||
// ---- Workspace ----
|
||||
WorkspaceRows = new WorkspaceSettingsRows(_s, Save, () => Shell.Services.Workspace.Root, OpenWorkspaceFolder, ChangeWorkspaceFolderAsync);
|
||||
|
||||
// ---- Storage ----
|
||||
CacheFolder = new EditableField(CacheStore.Folder(shell.Services.Environment, _s), v => ArchiveLocations.Validate(v), v =>
|
||||
{
|
||||
@@ -718,6 +723,31 @@ public sealed class SettingsViewModel : SectionViewModel
|
||||
private set => Set(ref _cacheUsageText, value);
|
||||
}
|
||||
|
||||
// ---------------- Workspace ----------------
|
||||
|
||||
/// <summary>Settings › Workspace (owner review 2, R8): the folder, Sync automatically and Kept versions.</summary>
|
||||
public WorkspaceSettingsRows WorkspaceRows { get; }
|
||||
|
||||
/// <summary>Shows the workspace folder in Explorer (made, with its manifest, when the workspace was never used).</summary>
|
||||
private void OpenWorkspaceFolder()
|
||||
{
|
||||
try
|
||||
{
|
||||
ShellActions.Reveal(Shell.Services.Workspace.Store.Root);
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or InvalidDataException)
|
||||
{
|
||||
Shell.ReportError(ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Another workspace folder, after its plan (nothing is moved): Edit lists its projects from then on.</summary>
|
||||
private async Task ChangeWorkspaceFolderAsync()
|
||||
{
|
||||
await WorkspaceFolderChange.ChooseAsync(Shell);
|
||||
WorkspaceRows.Refresh();
|
||||
}
|
||||
|
||||
// ---------------- Server ----------------
|
||||
|
||||
public EditableField DefaultServer { get; }
|
||||
@@ -1176,7 +1206,7 @@ public sealed class SettingsViewModel : SectionViewModel
|
||||
[
|
||||
JobKind.Render, JobKind.Import, JobKind.Download, JobKind.UploadCommit, JobKind.Scan, JobKind.Rebuild, JobKind.Verify, JobKind.LightAnalyse,
|
||||
JobKind.DeepAnalyse, JobKind.Thumbs, JobKind.Proxies, JobKind.Maintenance, JobKind.Duplicates, JobKind.Orphans, JobKind.Adopt, JobKind.Move,
|
||||
JobKind.Backup, JobKind.Cleanup, JobKind.EmptyTrash, JobKind.Convert,
|
||||
JobKind.Backup, JobKind.Cleanup, JobKind.EmptyTrash, JobKind.Convert, JobKind.WorkspaceCopy,
|
||||
];
|
||||
|
||||
/// <summary>Stores <paramref name="level"/> for <paramref name="kind"/>, keeping only the levels that differ from the defaults.</summary>
|
||||
@@ -1534,6 +1564,9 @@ public sealed class SettingsViewModel : SectionViewModel
|
||||
case SettingsPage.Updates:
|
||||
_s.CheckForUpdates = defaults.CheckForUpdates;
|
||||
break;
|
||||
case SettingsPage.Workspace:
|
||||
WorkspaceRows.Reset();
|
||||
break;
|
||||
case SettingsPage.Advanced:
|
||||
Logs.Reset();
|
||||
break;
|
||||
@@ -1611,6 +1644,9 @@ public sealed class SettingsViewModel : SectionViewModel
|
||||
LastEditedSequence = _s.LastEditedSequence,
|
||||
FirstRunCompleted = _s.FirstRunCompleted,
|
||||
JobsClearedAt = _s.JobsClearedAt,
|
||||
// The workspace holds this PC's work: its folder stays where it is (moving it is its own operation).
|
||||
WorkspaceFolder = _s.WorkspaceFolder,
|
||||
WorkspaceRecent = _s.WorkspaceRecent,
|
||||
};
|
||||
// Start with Windows lives in the registry, not in the settings file: its default is off.
|
||||
Startup.SetEnabled(false);
|
||||
@@ -1642,6 +1678,7 @@ public sealed class SettingsViewModel : SectionViewModel
|
||||
_interfacePriority?.Update();
|
||||
foreach (var row in JobPriorities) row.Refresh();
|
||||
Logs.Refresh();
|
||||
WorkspaceRows.Refresh();
|
||||
UpdatePreview();
|
||||
LoadCertificates();
|
||||
OnAllPropertiesChanged();
|
||||
@@ -1656,6 +1693,8 @@ public sealed class SettingsViewModel : SectionViewModel
|
||||
// Secrets and machine-bound values stay on this PC.
|
||||
copy.ProtectedToken = null;
|
||||
copy.Window = null;
|
||||
copy.WorkspaceFolder = null;
|
||||
copy.WorkspaceRecent = [];
|
||||
var path = Path.Combine(folder, $"Chronos settings {DateTime.Now.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)}.json");
|
||||
await Task.Run(() => AtomicFile.WriteAllText(path, copy.ToJson()));
|
||||
Shell.Notify(Loc.L("Settings.Export.Done"), Path.GetFileName(path), Loc.L("Library.Export.Show"), Loc.L("Tooltips.Library.ShowExport"), () => ShellActions.Reveal(path));
|
||||
@@ -1688,6 +1727,9 @@ public sealed class SettingsViewModel : SectionViewModel
|
||||
imported.RailCollapsed = _s.RailCollapsed;
|
||||
imported.LastEditedSequence = _s.LastEditedSequence;
|
||||
imported.FirstRunCompleted = _s.FirstRunCompleted;
|
||||
// The workspace is this PC's: its folder and the projects opened last stay.
|
||||
imported.WorkspaceFolder = _s.WorkspaceFolder;
|
||||
imported.WorkspaceRecent = _s.WorkspaceRecent;
|
||||
ApplyAll(imported);
|
||||
// Settings of a PC never rewrite the shared archive.json: the imported templates and sizes are the defaults of new
|
||||
// archives, and the rows show the own settings of the archive at the (possibly imported) archive folder.
|
||||
@@ -1717,6 +1759,7 @@ public sealed class SettingsViewModel : SectionViewModel
|
||||
foreach (var row in Formats) row.Refresh();
|
||||
foreach (var row in MissingExtensions) row.Refresh();
|
||||
Logs.Refresh();
|
||||
WorkspaceRows.Refresh();
|
||||
ArchiveRoot.Refresh();
|
||||
FolderTemplate.Refresh();
|
||||
FileTemplate.Refresh();
|
||||
|
||||
Reference in new issue
Block a user