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

                                                      
                                                                       
 
                                    



                                                                                                                                                              
              
 
                                                                              
                                                                                                    

                               
                                                                                                                    
                                                                                                              

                

                                                
                                                              
                                                                                                                  

                





                                                                                                                     



                                                                                                                    

                                                                                                             

                






                                                                                                                        
 











                                                                              
 

                                                                        


                                                         









                                                                             
                                                                   
                                                            
                                                    

            
                                                                   
                                                               

                                                    
 




                                                                     
                                                                         
                                                                     

                                                          
 
                                                                
                                                           


                                                 
 
                               
                                                
 
                                                                                                             
                                                                     

                                                          
 
                                                         
                                                            




                                                 
                                                       
                             
                                                                                                                                                                                        
             
 
                              
                                                                                                                                                                                                 
             


          
 
                                                                 
<div class="menu-wrapper">
  <menu [ngClass]="{ 'logged-in': isLoggedIn }">
    <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 *ngIf="user.account" [routerLink]="[ '/accounts', user.account.nameWithHost ]" class="logged-in-display-name">{{ user.account?.displayName }}</a>
          <a *ngIf="!user.account" routerLink="/my-account/settings" class="logged-in-display-name">{{ user.account?.displayName }}</a>

          <div ngxClipboard [cbContent]="user.account?.nameWithHost" class="logged-in-username">{{ user.username }}</div>
        </div>

        <div class="logged-in-more" ngbDropdown placement="bottom-right auto">
          <my-global-icon iconName="more-vertical" ngbDropdownToggle role="button"></my-global-icon>

          <div ngbDropdownMenu>
            <a *ngIf="user.account" [routerLink]="[ '/accounts', user.account.nameWithHost ]" class="dropdown-item">
              <my-global-icon iconName="go"></my-global-icon> <ng-container i18n>Public profile</ng-container>
            </a>

            <div class="dropdown-divider"></div>

            <a routerLink="/my-account" class="dropdown-item">
              <my-global-icon iconName="user"></my-global-icon> <ng-container i18n>Account settings</ng-container>
            </a>

            <a routerLink="/my-account/video-channels" class="dropdown-item">
              <my-global-icon iconName="folder"></my-global-icon> <ng-container i18n>Channels settings</ng-container>
            </a>

            <div class="dropdown-divider"></div>

            <a class="dropdown-item" href="https://joinpeertube.org/help" target="_blank" rel="noopener noreferrer">
              <my-global-icon iconName="help"></my-global-icon> <ng-container i18n>Help</ng-container>
            </a>

            <a (click)="logout($event)" class="dropdown-item" href="#">
              <my-global-icon iconName="sign-out"></my-global-icon> <ng-container i18n>Log out</ng-container>
            </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 *ngIf="isLoggedIn" class="panel-block">
        <div i18n class="block-title">My library</div>

        <a routerLink="/my-account/videos" routerLinkActive="active">
          <my-global-icon iconName="videos"></my-global-icon>
          <ng-container i18n>Videos</ng-container>
        </a>

        <a routerLink="/my-account/video-playlists" routerLinkActive="active">
          <my-global-icon iconName="playlists"></my-global-icon>
          <ng-container i18n>Playlists</ng-container>
        </a>

        <a routerLink="/videos/subscriptions" routerLinkActive="active">
          <my-global-icon iconName="subscriptions"></my-global-icon>
          <ng-container i18n>Subscriptions</ng-container>
        </a>

        <a routerLink="/my-account/history/videos" routerLinkActive="active">
          <my-global-icon iconName="history"></my-global-icon>
          <ng-container i18n>History</ng-container>
        </a>

      </div>

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

        <a routerLink="/videos/overview" routerLinkActive="active">
          <my-global-icon iconName="globe"></my-global-icon>
          <ng-container i18n>Discover</ng-container>
        </a>

        <a routerLink="/videos/trending" routerLinkActive="active">
          <my-global-icon iconName="trending"></my-global-icon>
          <ng-container i18n>Trending</ng-container>
        </a>

        <a routerLink="/videos/most-liked" routerLinkActive="active">
          <my-global-icon iconName="like"></my-global-icon>
          <ng-container i18n>Most liked</ng-container>
        </a>

        <a routerLink="/videos/recently-added" routerLinkActive="active">
          <my-global-icon iconName="recently-added"></my-global-icon>
          <ng-container i18n>Recently added</ng-container>
        </a>

        <a routerLink="/videos/local" routerLinkActive="active">
          <my-global-icon iconName="home"></my-global-icon>
          <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">
          <my-global-icon iconName="administration"></my-global-icon>
          <ng-container i18n>Administration</ng-container>
        </a>

        <a routerLink="/about" routerLinkActive="active">
          <my-global-icon iconName="about"></my-global-icon>
          <ng-container i18n>About</ng-container>
        </a>
      </div>
    </div>

    <div class="footer d-flex justify-content-between">
      <span class="language">
        <span tabindex="0" role="button" (keyup.enter)="openLanguageChooser()" (click)="openLanguageChooser()" i18n-title title="Change the language" class="icon icon-language"></span>
      </span>

      <span class="shortcuts">
        <span tabindex="0" role="button" (keyup.enter)="openHotkeysCheatSheet()" (click)="openHotkeysCheatSheet()" i18n-title title="Show keyboard shortcuts" class="icon icon-shortcuts"></span>
      </span>
    </div>
  </menu>
</div>

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