Quality of life: in-app dialogs, selections in the URL, editable widgets, token dialog, gallery search, status history, stream errors that say why, tab reordering and shortcuts, log out everywhere
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
8ee2a2d293
commit
d7ed4d8549
@@ -146,6 +146,15 @@ func (s *Sessions) Valid(tok string) bool {
|
||||
return ok
|
||||
}
|
||||
|
||||
// DeleteAll ends every session on every device and says how many there were.
|
||||
func (s *Sessions) DeleteAll() (n int) {
|
||||
_ = s.st.Update(func(state *store.State) {
|
||||
n = len(state.Sessions)
|
||||
state.Sessions = map[string]time.Time{}
|
||||
})
|
||||
return n
|
||||
}
|
||||
|
||||
func (s *Sessions) Delete(tok string) {
|
||||
_ = s.st.Update(func(state *store.State) { delete(state.Sessions, tok) })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user