feat(portal): add notifications sidebar (#2516)

* feat(portal): add notifications sidebar

* chore: add service

* chore: simplify style

* chore: fix comments

* WIP, moving notifications to patch-db

* revamp notifications

* chore: small adjustments

---------

Co-authored-by: Matt Hill <mattnine@protonmail.com>
This commit is contained in:
Alex Inkin
2023-12-08 20:12:03 +04:00
committed by GitHub
parent 8bc93d23b2
commit 7324a4973f
52 changed files with 1181 additions and 255 deletions

View File

@@ -117,10 +117,6 @@ export class LiveApiService extends ApiService {
return this.openWebsocket(config)
}
async followLogs(): Promise<string> {
return this.rpcRequest({ method: 'setup.logs.follow', params: {} })
}
openLogsWebsocket$(config: WebSocketSubjectConfig<Log>): Observable<Log> {
return this.openWebsocket(config)
}
@@ -259,21 +255,33 @@ export class LiveApiService extends ApiService {
return this.rpcRequest({ method: 'notification.list', params })
}
async deleteNotification(
async deleteNotifications(
params: RR.DeleteNotificationReq,
): Promise<RR.DeleteNotificationRes> {
return this.rpcRequest({ method: 'notification.delete', params })
}
async deleteAllNotifications(
params: RR.DeleteAllNotificationsReq,
): Promise<RR.DeleteAllNotificationsRes> {
async markSeenNotifications(
params: RR.MarkSeenNotificationReq,
): Promise<RR.MarkSeenNotificationRes> {
return this.rpcRequest({ method: 'notification.mark-seen', params })
}
async markSeenAllNotifications(
params: RR.MarkSeenAllNotificationsReq,
): Promise<RR.MarkSeenAllNotificationsRes> {
return this.rpcRequest({
method: 'notification.delete-before',
method: 'notification.mark-seen-before',
params,
})
}
async markUnseenNotifications(
params: RR.MarkUnseenNotificationReq,
): Promise<RR.MarkUnseenNotificationRes> {
return this.rpcRequest({ method: 'notification.mark-unseen', params })
}
// network
async addProxy(params: RR.AddProxyReq): Promise<RR.AddProxyRes> {