feat: work board, no usage data, archive folder tree, deploy guide (owner review 4 + owner review 1 phase 6) (#62)
CI / Build and test (push) Successful in 10m37s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 9s
Release / Build, test and publish (push) Successful in 16m19s
CI / PostgreSQL 16 integration (push) Successful in 10m19s
CI / PostgreSQL 17 integration (push) Successful in 11m27s
CI / Docker image (push) Successful in 57s
Release / Server image (push) Successful in 1m34s
CI / Build and test (push) Successful in 10m37s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 9s
Release / Build, test and publish (push) Successful in 16m19s
CI / PostgreSQL 16 integration (push) Successful in 10m19s
CI / PostgreSQL 17 integration (push) Successful in 11m27s
CI / Docker image (push) Successful in 57s
Release / Server image (push) Successful in 1m34s
Owner review 4 and owner review 1 phase 6. - Work board in Videos (desktop and admin panel): Published and Workspace lanes (#29). - Anonymous usage counts removed: Chronos sends nothing about its use (#30). - The archive's whole folder tree is created inside any archive root, on the server and the desktop (#31). - Video cards start with the preset; sizes keep number and unit together (#28). - Deploy guide docs/deploy (Docker, Unraid, desktop), BRIEF §24, original documentation in docs/reference/original (#22). Closes #22 #28 #29 #30 #31 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 #62.
This commit is contained in:
1 parent
728ffa35cb
commit
0075065884
304 files changed
+6892
-325
No files matched your search
@@ -78,7 +78,7 @@ public sealed class SettingsViewModel : SectionViewModel
|
||||
AllPages =
|
||||
[
|
||||
new(SettingsPage.General, ["Settings.General.Language", "Settings.General.Theme", .. ShowsStartup ? (string[])["Settings.General.Startup"] : [],
|
||||
"Settings.General.Notifications", .. ProductFeatures.AdsEnabled ? (string[])["Settings.General.Usage"] : []]),
|
||||
"Settings.General.Notifications"]),
|
||||
new(SettingsPage.Archive, ["Settings.Archive.Root", "Settings.Archive.Folders", "Settings.Archive.Files", "Settings.Archive.Proxies",
|
||||
"Settings.Archive.Thumbnails", "Settings.Archive.VideosFolder"]),
|
||||
new(SettingsPage.Import, ["Import.Scan.Sessions", "Import.Label.Scan", "Import.Scan.Subfolders", "Import.Scan.Verify", "Import.Label.Duplicates",
|
||||
@@ -108,7 +108,7 @@ public sealed class SettingsViewModel : SectionViewModel
|
||||
_s.LastArchivePath = v.Length == 0 ? null : Path.GetFullPath(v);
|
||||
Save();
|
||||
UpdateArchiveFree();
|
||||
_retarget = RetargetArchiveAsync();
|
||||
_retarget = RetargetArchiveAsync(offerCreate: true);
|
||||
}, () => Loc.L("Tooltips.Settings.ArchiveRoot"));
|
||||
FolderTemplate = new EditableField(_s.FolderTemplate, v => NamingPreview.Validate(v, isFolder: true), v =>
|
||||
{
|
||||
@@ -387,21 +387,6 @@ public sealed class SettingsViewModel : SectionViewModel
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>The usage counts consent belongs to monetization (BRIEF §21): only builds with it enabled offer it.</summary>
|
||||
public bool ShowsUsageCounts => ProductFeatures.AdsEnabled;
|
||||
|
||||
public bool UsageCounts
|
||||
{
|
||||
get => _s.AnonymousUsageCounts;
|
||||
set
|
||||
{
|
||||
if (_s.AnonymousUsageCounts == value) return;
|
||||
_s.AnonymousUsageCounts = value;
|
||||
Save();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------- Archive ----------------
|
||||
|
||||
public EditableField ArchiveRoot { get; }
|
||||
@@ -1181,11 +1166,13 @@ public sealed class SettingsViewModel : SectionViewModel
|
||||
|
||||
/// <summary>
|
||||
/// The archive folder changed: an archive already there is registered as at start (relinked when it moved) and given
|
||||
/// its rescan, and the rows show its settings; any other folder leaves them with this PC's defaults for new archives.
|
||||
/// Later edits never reach the archive shown before. Returns the archive registered at that folder (null for none),
|
||||
/// even when another folder has been chosen since: edits made for this one go there.
|
||||
/// its rescan, and the rows show its settings. A folder that is no archive yet becomes one in place, with the archive's
|
||||
/// whole layout (as Welcome's Create), only when <paramref name="offerCreate"/> and the user confirms it for that folder
|
||||
/// by name; otherwise the folder is only remembered and the rows keep this PC's defaults for new archives. Later edits
|
||||
/// never reach the archive shown before. Returns the archive registered at that folder (null for none), even when
|
||||
/// another folder has been chosen since: edits made for this one go there.
|
||||
/// </summary>
|
||||
private async Task<Archive?> RetargetArchiveAsync()
|
||||
private async Task<Archive?> RetargetArchiveAsync(bool offerCreate)
|
||||
{
|
||||
_archive = null;
|
||||
var root = _s.LastArchivePath;
|
||||
@@ -1195,9 +1182,11 @@ public sealed class SettingsViewModel : SectionViewModel
|
||||
{
|
||||
var opened = await Task.Run(async () => File.Exists(new ArchivePaths(root).ManifestPath) ? await archives.OpenAsync(root) : null);
|
||||
if (opened is not null) await Shell.Services.QueueScanAsync(opened, full: false);
|
||||
// Never on its own: a folder the user typed half of, or one of their own folders, would become an archive and be scanned.
|
||||
else if (offerCreate && ConfirmCreateArchive(root)) await Shell.Services.ArchiveSetup.CreateAsync(root);
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or InvalidDataException or NewerFormatException
|
||||
or DatabaseException)
|
||||
or DatabaseException or ArgumentException or InvalidOperationException)
|
||||
{
|
||||
Log.Warning("settings", $"The archive at {root} could not be opened", ex);
|
||||
Shell.Notify(Loc.L("Errors.Archive.Open"), ArchiveActions.Cause(ex), isError: true);
|
||||
@@ -1206,6 +1195,21 @@ public sealed class SettingsViewModel : SectionViewModel
|
||||
return await LoadArchiveAsync(root);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The archive folder typed or picked holds no archive: the user confirms making it one, the folder named, before any
|
||||
/// folder or file is written there. Declined, the folder is only remembered.
|
||||
/// </summary>
|
||||
private bool ConfirmCreateArchive(string root) => Shell.Services.Dialogs.Confirm(new ConfirmRequest
|
||||
{
|
||||
Heading = Loc.L("Settings.Archive.CreateTitle"),
|
||||
Message = Loc.L("Settings.Archive.CreateMessage"),
|
||||
Detail = root,
|
||||
SafeText = Loc.L("Settings.Archive.CreateSkip"),
|
||||
SafeToolTip = Loc.L("Tooltips.Settings.SkipCreateArchive"),
|
||||
ActionText = Loc.L("Settings.Archive.CreateAction"),
|
||||
ActionToolTip = Loc.L("Tooltips.Settings.CreateArchiveHere"),
|
||||
});
|
||||
|
||||
/// <summary>
|
||||
/// Archive › Reset section with an archive open writes the defaults into that archive's archive.json, which the server
|
||||
/// and the other PCs share: the user confirms it for that archive by name first.
|
||||
@@ -1575,7 +1579,6 @@ public sealed class SettingsViewModel : SectionViewModel
|
||||
switch (_page)
|
||||
{
|
||||
case SettingsPage.General:
|
||||
_s.AnonymousUsageCounts = defaults.AnonymousUsageCounts;
|
||||
_s.OsNotifications = defaults.OsNotifications;
|
||||
Startup.SetEnabled(false);
|
||||
ApplyTheme(defaults.Theme);
|
||||
@@ -1770,11 +1773,11 @@ public sealed class SettingsViewModel : SectionViewModel
|
||||
return;
|
||||
}
|
||||
// Everything but the session, the window and its rail, the sequence edited last (another PC's ids mean nothing here),
|
||||
// the first-run flag and the workspace, which is this PC's (its folder, the projects opened last and when).
|
||||
// the first-run flag, the archive folder and the workspace, which are this PC's (another PC's drives mean nothing here).
|
||||
ApplyAll(_s.KeepLocalIn(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.
|
||||
_retarget = RetargetArchiveAsync();
|
||||
// archives, and the rows show the own settings of this PC's archive. An import never makes a folder an archive.
|
||||
_retarget = RetargetArchiveAsync(offerCreate: false);
|
||||
Shell.Notify(Loc.L("Settings.Import.Done"));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user