-
Notifications
You must be signed in to change notification settings - Fork 436
/
_top_navigation.html.haml
34 lines (33 loc) · 2.23 KB
/
_top_navigation.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
%nav.navbar.navbar-dark.navbar-themed-colors.fixed-top
.container-fluid.d-flex.flex-nowrap.justify-content-between.w-100
= link_to(root_path, class: 'navbar-brand', alt: 'Logo') do
= image_tag(::Configuration.logo.attached? ? ::Configuration.logo : 'obs-logo_small.svg')
.d-flex.nav
= render partial: 'layouts/webui/top_navigation_search'
- if User.session
.toggler.text-center.justify-content-center.nav-item
= link_to('javascript:void(0)', class: 'nav-link text-light p-0 w-100', alt: 'Watchlist', data: { toggle: 'watchlist' }) do
%i.far.fa-eye
%span.d-block Watchlist
.toggler.text-center.justify-content-center.nav-item
= link_to(my_notifications_path, id: 'top-notifications-counter', class: 'nav-link text-light p-0 w-100', alt: 'Notifications') do
= render partial: 'layouts/webui/unread_notifications_counter'
.toggler.text-center.justify-content-center.nav-item.dropdown
= link_to('#', class: 'nav-link dropdown-toggle text-light', id: 'top-navigation-profile-dropdown', role: 'button',
'data-bs-toggle': 'dropdown', aria: { haspopup: true, expanded: false }) do
= render(AvatarComponent.new(name: User.session.name, email: User.session.email, size: 32, shape: :circle, custom_css: 'me-2'))
.dropdown-menu.dropdown-menu-end{ 'aria-labelledby': 'top-navigation-profile-dropdown' }
.dropdown-item
= link_to(user_path(User.session!), id: 'link-to-user-home', class: 'nav-link text-light p-0 w-100') do
= render(AvatarComponent.new(name: User.session.name, email: User.session.email, size: 20, shape: :circle, custom_css: 'me-2'))
Your profile
.dropdown-item
= link_to(session_path, method: :delete, id: 'logout-link', class: 'nav-link text-light p-0 w-100') do
%i.fas.fa-sign-out-alt.fa-lg.me-2
Logout
- else
= render partial: 'layouts/webui/top_navigation_nobody'
- if User.possibly_nobody.is_nobody? && !kerberos_mode?
- if !::Configuration.proxy_auth_mode_enabled? && can_sign_up?
= render partial: 'layouts/webui/sign_up_modal'
= render partial: 'layouts/webui/login_modal'