aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/src/app/menu/menu.component.html
blob: 1a95477b7672ca30cf5ce900965c02c2d7f8de37 (plain) (tree)
1
2
3
4
5
6
7
8

                                                  
                                         
                                                        
        
 
                                
                                                                                                         







                                                                              
                                                                                                                             
                            

              

                                                                                         

              








                                                                                     
                                                         





                                                                                                               
                                                               



                                                     
                                                                     


                                                           




                                                            

        
                           

                                       
                                                                                                         


                                                    




                                                     

        
<menu>
  <div *ngIf="isLoggedIn" class="logged-in-block">
    <a routerLink="/my-account/settings">
      <img [src]="user.accountAvatarUrl" alt="Avatar" />
    </a>

    <div class="logged-in-info">
      <a routerLink="/my-account/settings" class="logged-in-username">{{ user.account?.displayName }}</a>
      <div class="logged-in-email">{{ user.email }}</div>
    </div>

    <div class="logged-in-more" dropdown placement="right" container="body">
      <span class="glyphicon glyphicon-option-vertical" dropdownToggle></span>

      <ul *dropdownMenu class="dropdown-menu">
        <li>
          <a i18n [routerLink]="[ '/accounts', user.account?.nameWithHost ]" class="dropdown-item" title="My public profile">
           My public profile
          </a>

          <a routerLink="/my-account/settings" class="dropdown-item" title="My settings">
            My settings
          </a>

          <a (click)="logout($event)" class="dropdown-item" title="Log out" href="#">
            Log out
          </a>
        </li>
      </ul>
    </div>
  </div>

  <div *ngIf="!isLoggedIn" class="button-block">
    <a routerLink="/login" class="login-button">Login</a>
    <a *ngIf="isRegistrationAllowed()" routerLink="/signup" class="create-account-button">Create an account</a>
  </div>

  <div class="panel-block">
    <div class="block-title">Videos</div>

    <a routerLink="/videos/trending" routerLinkActive="active">
      <span class="icon icon-videos-trending"></span>
      Trending
    </a>

    <a routerLink="/videos/recently-added" routerLinkActive="active">
      <span class="icon icon-videos-recently-added"></span>
      Recently added
    </a>

    <a routerLink="/videos/local" routerLinkActive="active">
      <span class="icon icon-videos-local"></span>
      Local
    </a>
  </div>

  <div class="panel-block">
    <div class="block-title">More</div>

    <a *ngIf="userHasAdminAccess" [routerLink]="getFirstAdminRouteAvailable()" routerLinkActive="active">
      <span class="icon icon-administration"></span>
      Administration
    </a>

    <a routerLink="/about" routerLinkActive="active">
      <span class="icon icon-about"></span>
      About
    </a>
  </div>
</menu>