mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
bookmarks view
This commit is contained in:
@@ -1914,10 +1914,12 @@ func BookmarksShowCommand(ctx context.Context, pk *scpacket.FeCommandPacketType)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot retrieve bookmarks: %v", err)
|
||||
}
|
||||
for _, bm := range bms {
|
||||
fmt.Printf("%v\n", bm)
|
||||
update := sstore.ModelUpdate{
|
||||
BookmarksView: &sstore.BookmarksViewType{
|
||||
Bookmarks: bms,
|
||||
},
|
||||
}
|
||||
return nil, nil
|
||||
return update, nil
|
||||
}
|
||||
|
||||
func LineBookmarkCommand(ctx context.Context, pk *scpacket.FeCommandPacketType) (sstore.UpdatePacket, error) {
|
||||
|
||||
@@ -43,6 +43,7 @@ type ModelUpdate struct {
|
||||
History *HistoryInfoType `json:"history,omitempty"`
|
||||
Interactive bool `json:"interactive"`
|
||||
Connect bool `json:"connect,omitempty"`
|
||||
BookmarksView *BookmarksViewType `json:"bookmarksview,omitempty"`
|
||||
}
|
||||
|
||||
func (ModelUpdate) UpdateType() string {
|
||||
@@ -184,3 +185,7 @@ func MakeSessionsUpdateForRemote(sessionId string, ri *RemoteInstance) []*Sessio
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
type BookmarksViewType struct {
|
||||
Bookmarks []*BookmarkType `json:"bookmarks"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user