Detect missing Syncthing, rewrite README with architecture diagram
Some checks failed
Release / build (push) Failing after 2m53s
Some checks failed
Release / build (push) Failing after 2m53s
Add Syncthing installation detection (PATH + config file check) to both the tray app and setup installer. When missing, the tray shows an "Install Syncthing..." menu item and the setup opens the download page. Rewrite README with Mermaid topology graph, per-binary dependency tables, project layout, API endpoint reference, and shields.io badges. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
||||
st "git.davoryn.de/calic/syncwarden/internal/syncthing"
|
||||
)
|
||||
|
||||
const version = "0.1.0"
|
||||
const version = "0.2.0"
|
||||
|
||||
// App manages the tray icon and Syncthing monitoring.
|
||||
type App struct {
|
||||
@@ -37,6 +37,8 @@ type App struct {
|
||||
conflictItem *systray.MenuItem
|
||||
folderItems []*systray.MenuItem
|
||||
recentItems []*systray.MenuItem
|
||||
|
||||
syncthingMissing bool
|
||||
}
|
||||
|
||||
// Run starts the tray application (blocking).
|
||||
@@ -59,10 +61,20 @@ func (a *App) onReady() {
|
||||
|
||||
a.client = st.NewClient(a.cfg.BaseURL(), a.cfg.SyncthingAPIKey)
|
||||
|
||||
// Check if Syncthing is installed
|
||||
if !st.IsInstalled() {
|
||||
a.syncthingMissing = true
|
||||
log.Println("Syncthing not found on this system")
|
||||
}
|
||||
|
||||
// Set initial icon
|
||||
a.setState(icons.StateDisconnected)
|
||||
systray.SetTitle("SyncWarden")
|
||||
systray.SetTooltip("SyncWarden: connecting...")
|
||||
if a.syncthingMissing {
|
||||
systray.SetTooltip("SyncWarden: Syncthing not found")
|
||||
} else {
|
||||
systray.SetTooltip("SyncWarden: connecting...")
|
||||
}
|
||||
|
||||
// Right-click shows menu
|
||||
systray.SetOnRClick(func(menu systray.IMenu) {
|
||||
|
||||
Reference in New Issue
Block a user