feat(autostart): "Start with Windows" toggle

- PM.AutoStart wraps HKCU\Software\Microsoft\Windows\CurrentVersion\Run.
  Value "PMServer" = "<exe>" -tray. Per-user, no admin required, shows
  up in Task Manager → Startup so the user can override from there.

- UMainForm honours the -tray CLI flag (set by the registry entry):
  after the server starts, MinimizeToTray via TThread.ForceQueue so the
  app comes up directly in the tray with no visible window flash.

- Bridge cmd://autostart/{get,set} + Bridge.getAutoStart() /
  setAutoStart() / onAutoStartStatus(). Settings exposes a toggle in
  the Security section, visible only when Bridge.active (the PHP
  frontend can't touch the registry).

- Toggle reads "on" only when the registered command matches the
  current exe path, so a stale entry from a moved exe lets the user
  re-enable to refresh.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-08 21:39:37 +01:00
parent 40b3154a34
commit 33e4b4b614
8 changed files with 213 additions and 1 deletions
+14
View File
@@ -396,6 +396,20 @@
<span class="toggle-slider"></span>
</label>
</div>
<div class="setting-row" id="settingAutoStartRow">
<span>
Start with Windows
<small class="setting-hint">
Launch this app in the tray when you sign in to
Windows — so the autofill hotkeys are ready
immediately. Device-only setting (per Windows user).
</small>
</span>
<label class="toggle">
<input type="checkbox" id="settingAutoStart">
<span class="toggle-slider"></span>
</label>
</div>
<div class="setting-row" id="settingAutofillRow">
<span>
Autofill with global hotkey