fix(t113): 拿掉「暫停看守」——leo:想不出什麼場景要暫停
同 t101 語意收斂:列入=同步、不要=刪除,沒有暫停態。tray go test 綠。 (實作=子 CC;驗證+commit=總管)
This commit is contained in:
@@ -787,19 +787,6 @@ func main() {
|
|||||||
}()
|
}()
|
||||||
})
|
})
|
||||||
|
|
||||||
var pauseItem *fyne.MenuItem
|
|
||||||
pauseItem = fyne.NewMenuItem("暫停看守", func() {
|
|
||||||
st := sup.Status()
|
|
||||||
if st.State == supervisor.StateStopped {
|
|
||||||
sup.Start()
|
|
||||||
pauseItem.Label = "暫停看守"
|
|
||||||
} else {
|
|
||||||
sup.Stop()
|
|
||||||
pauseItem.Label = "繼續看守"
|
|
||||||
}
|
|
||||||
rebuildTray()
|
|
||||||
})
|
|
||||||
|
|
||||||
rebuildTray = func() {
|
rebuildTray = func() {
|
||||||
if !hasTray {
|
if !hasTray {
|
||||||
return
|
return
|
||||||
@@ -910,7 +897,6 @@ func main() {
|
|||||||
items = append(items,
|
items = append(items,
|
||||||
fyne.NewMenuItemSeparator(),
|
fyne.NewMenuItemSeparator(),
|
||||||
syncNowItem, // t98:立刻同步
|
syncNowItem, // t98:立刻同步
|
||||||
pauseItem,
|
|
||||||
// t104:「連上知識庫」改為「新增帳號」——精靈成功後 append 到 accounts,不換掉舊帳號
|
// t104:「連上知識庫」改為「新增帳號」——精靈成功後 append 到 accounts,不換掉舊帳號
|
||||||
fyne.NewMenuItem("+ 新增帳號…", func() { showConnectWizard() }),
|
fyne.NewMenuItem("+ 新增帳號…", func() { showConnectWizard() }),
|
||||||
fyne.NewMenuItemSeparator(),
|
fyne.NewMenuItemSeparator(),
|
||||||
@@ -988,8 +974,6 @@ func buildStatusLabel(s supervisor.Status, sync traySyncStatus, extractor string
|
|||||||
return "啟動中…"
|
return "啟動中…"
|
||||||
case supervisor.StateError:
|
case supervisor.StateError:
|
||||||
return "暫時出錯,正在自動重試"
|
return "暫時出錯,正在自動重試"
|
||||||
case supervisor.StateStopped:
|
|
||||||
return "已暫停"
|
|
||||||
default:
|
default:
|
||||||
return "尚未開始"
|
return "尚未開始"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,16 +223,6 @@ func TestBuildStatusLabelExtractorOKWithCount(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestBuildStatusLabelStopped:已暫停狀態不受 sync status 影響。
|
|
||||||
func TestBuildStatusLabelStopped(t *testing.T) {
|
|
||||||
s := supervisor.Status{State: supervisor.StateStopped}
|
|
||||||
sync := traySyncStatus{ExtractorOK: false, ExtractorError: "任何錯誤"}
|
|
||||||
got := buildStatusLabel(s, sync, "claude")
|
|
||||||
if got != "已暫停" {
|
|
||||||
t.Errorf("已暫停狀態應回「已暫停」,got=%q", got)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// TestSyncNowSignalPath:syncNowSignalPath 回傳以 sync-now 結尾的路徑(t98)。
|
// TestSyncNowSignalPath:syncNowSignalPath 回傳以 sync-now 結尾的路徑(t98)。
|
||||||
// tray 寫這個路徑,collector 從 manifest 同目錄讀——路徑語意必須一致。
|
// tray 寫這個路徑,collector 從 manifest 同目錄讀——路徑語意必須一致。
|
||||||
func TestSyncNowSignalPath(t *testing.T) {
|
func TestSyncNowSignalPath(t *testing.T) {
|
||||||
|
|||||||
Reference in New Issue
Block a user