notifications: support real-time notifications with websockets via channelstream
This commit is contained in:
parent
b70466f693
commit
e9d5eb09c5
25 changed files with 1728 additions and 81 deletions
|
|
@ -346,3 +346,17 @@ class MyAccountController(BaseController):
|
|||
h.flash(_("Auth token successfully deleted"), category='success')
|
||||
|
||||
return redirect(url('my_account_auth_tokens'))
|
||||
|
||||
def my_notifications(self):
|
||||
c.active = 'notifications'
|
||||
return render('admin/my_account/my_account.html')
|
||||
|
||||
@auth.CSRFRequired()
|
||||
def my_notifications_toggle_visibility(self):
|
||||
user = c.rhodecode_user.get_instance()
|
||||
user_data = user.user_data
|
||||
status = user_data.get('notification_status', False)
|
||||
user_data['notification_status'] = not status
|
||||
user.user_data = user_data
|
||||
Session().commit()
|
||||
return redirect(url('my_account_notifications'))
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ class NotificationsController(BaseController):
|
|||
|
||||
return render('admin/notifications/notifications.html')
|
||||
|
||||
|
||||
@auth.CSRFRequired()
|
||||
def mark_all_read(self):
|
||||
if request.is_xhr:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue