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



                                                      
                                                                       
 
                                    

                                                                                                                 
              
 











                                                                                                                         



                                                                          



                                                                            






                                                                                                                        
 

                                                  
 




                                                                                           




                                                                   



                                                                   
 



                                                                         
 




                                                                
 
                               
                                                
 



                                                                                                             
 






                                                         
                                                       
                             
                                                                                                                                                                          
             


                                                                                                                                                                                   
                                  
                                                                                                                                                                   
             


          
 
                                                                 
<div class="menu-wrapper">
  <menu>
    <div class="top-menu">
      <div *ngIf="isLoggedIn" class="logged-in-block">
        <my-avatar-notification [user]="user"></my-avatar-notification>

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

        <div class="logged-in-more" ngbDropdown placement="bottom-right">
          <span class="glyphicon glyphicon-option-vertical" ngbDropdownToggle role="button"></span>

          <div ngbDropdownMenu>
            <a *ngIf="user.account" i18n [routerLink]="[ '/accounts', user.account.nameWithHost ]" class="dropdown-item">
             My public profile
            </a>

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

            <a i18n routerLink="/my-account/videos" class="dropdown-item">
              My videos
            </a>

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

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

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

        <a *ngIf="isLoggedIn" routerLink="/videos/subscriptions" routerLinkActive="active">
          <span class="icon icon-videos-subscriptions"></span>
          <ng-container i18n>Subscriptions</ng-container>
        </a>

        <a routerLink="/videos/overview" routerLinkActive="active">
          <span class="icon icon-videos-overview"></span>
          <ng-container i18n>Overview</ng-container>
        </a>

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

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

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

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

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

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

    <div class="footer d-flex justify-content-between">
      <span class="language">
        <span tabindex="0" (keyup.enter)="openLanguageChooser()" (click)="openLanguageChooser()" i18n-title title="Change the language" class="icon icon-language"></span>
      </span>
      <span class="shortcuts">
        <span tabindex="0" (keyup.enter)="openHotkeysCheatSheet()" (click)="openHotkeysCheatSheet()" i18n-title title="Show keyboard shortcuts" class="icon icon-shortcuts"></span>
      </span>
      <span class="color-palette">
        <span tabindex="0" (keyup.enter)="toggleDarkTheme()" (click)="toggleDarkTheme()" i18n-title title="Toggle dark interface" class="icon icon-moonsun"></span>
      </span>
    </div>
  </menu>
</div>

<my-language-chooser #languageChooserModal></my-language-chooser>