aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/menu/menu.component.html
blob: 8e3b295f77bcab42407db800bbdd27d0cf8df168 (plain) (blame)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<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 i18n routerLink="/my-account" class="dropdown-item" title="My account">
            My account
          </a>

          <a i18n (click)="logout($event)" class="dropdown-item" title="Log out" href="#">
            Log out
          </a>
        </li>
      </ul>
    </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 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">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>
</menu>