feat(app): keep sharing from the tray when the window closes

The owner wants the shared library to keep running while Chronos runs.
While sharing is on (or on its way), closing the main window now hides it
behind a tray icon (Open Chronos, Exit) instead of ending Chronos. Exit asks
first when clients used the library in the last minutes, then closes the
window for real, so the editor still stores its last edit and the exit path
stops sharing before the other services. A start at sign-in (--minimized)
with sharing on waits in the tray. With sharing off nothing changes.

The decisions live in ShareLifetime (unit-tested); ShellTray wires them to
the window, LibraryShare and OsNotifications, whose balloons reuse the icon.

Server > This library also warns when the 1.0 Windows Server's service
(ChronosServer) is installed, through a read-only SCM P/Invoke probe.

Refs #67

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-15 16:37:00 +01:00
1 parent f30eb2904a
commit 192265f1b7
18 files changed
+502 -6

No files matched your search

+3
View File
@@ -715,6 +715,7 @@
<data name="Tooltips.Server.Share.CopyFingerprint" xml:space="preserve"><value>Copy the fingerprint</value></data>
<data name="Tooltips.Server.Share.CopyPassword" xml:space="preserve"><value>Copy the temporary password</value></data>
<data name="Tooltips.Server.Share.Fingerprint" xml:space="preserve"><value>Clients see this fingerprint the first time they connect; it must match</value></data>
<data name="Tooltips.Server.Share.LegacyService" xml:space="preserve"><value>The Windows service of Chronos Server 1.0 is installed on this PC: it may hold the same ports. The Chronos setup can remove it</value></data>
<data name="Tooltips.Server.Share.Ports" xml:space="preserve"><value>The ports the shared library listens on</value></data>
<data name="Tooltips.Server.Share.Restart" xml:space="preserve"><value>Try to start sharing again</value></data>
<data name="Tooltips.Server.Share.Settings" xml:space="preserve"><value>Open Settings › Server to share this library</value></data>
@@ -930,6 +931,8 @@
<data name="Tooltips.Setup.UninstallAll" xml:space="preserve"><value>No program is selected: remove the whole installation · the next step shows what goes</value></data>
<data name="Tooltips.Setup.Update" xml:space="preserve"><value>Update the installed programs in place and apply the changes listed · your data is kept</value></data>
<data name="Tooltips.Shell.CollapseRail" xml:space="preserve"><value>Collapse navigation to icons · Ctrl+B</value></data>
<data name="Tooltips.Shell.Exit.Exit" xml:space="preserve"><value>Stop sharing and close Chronos; the clients lose this library until Chronos runs again</value></data>
<data name="Tooltips.Shell.Exit.Keep" xml:space="preserve"><value>Keep Chronos running in the notification area, sharing this library</value></data>
<data name="Tooltips.Shell.ExpandRail" xml:space="preserve"><value>Show navigation names · Ctrl+B</value></data>
<data name="Tooltips.Shell.Homes.Logs" xml:space="preserve"><value>Show the logs folder in Explorer: the log says which folder could not be sorted</value></data>
<data name="Tooltips.Shell.PauseJob" xml:space="preserve"><value>Pause the job shown; it continues from its checkpoint when resumed</value></data>