Skip to content
Snippets Groups Projects
question-wall.component.html 6.19 KiB
Newer Older
<ars-screen ars-flex-box class="questionwall-screen">
  <ars-row [height]="50" class="questionwall-header">
    <ars-style-btn-material *ngIf="room" style="width:100%;height:100%;" ars-flex-box>
      <ars-fill ars-flex-box>
        <ars-col ars-btn-wrp [xp]="16" [yp]="0" [extra]="true">
          <button ars-btn (click)="leave()"><i>arrow_back</i></button>
        </ars-col>
      </ars-fill>
      <ars-col>
        <!-- centered col -->
      </ars-col>
      <ars-fill ars-flex-box>
        <ars-fill></ars-fill>
        <ars-col ars-btn-wrp [xp]="16" [extra]="true">
          <button ars-btn (click)="sortTime()"><p>{{'question-wall.sort-time' | translate}}</p><i>expand_less</i></button>
          <button ars-btn (click)="sortTime(true)"><i>expand_more</i></button>
          <button ars-btn (click)="sortScore()"><p>{{'question-wall.sort-score' | translate}}</p><i>expand_less</i></button>
          <button ars-btn (click)="sortScore(true)"><i>expand_more</i></button>
        </ars-col>
      </ars-fill>
    </ars-style-btn-material>
  </ars-row>
  <ars-fill ars-flex-box>
    <ars-fill style="overflow:hidden;" ars-flex-box>
      <ars-fill>
      </ars-fill>
      <ars-row class="questionwall-present-box-outer">
        <div class="questionwall-present-box-inner">
          <ng-container *ngIf="commentFocus">
            <ars-row class="questionwall-present-meta">
              <ars-col>
                <h2 class="questionwall-present-meta-user">#{{commentFocus.comment.userNumber}}</h2>
              </ars-col>
              <ars-col>
                  <h2 class="questionwall-present-meta-timestamp">{{commentFocus.timeAgo}}</h2>
              </ars-col>
            </ars-row>
            <ars-row>
              <p class="questionwall-present">{{commentFocus.comment.body}}</p>
            </ars-row>
          </ng-container>
          <ng-container *ngIf="!commentFocus">
            <p class="questionwall-present-introduction-title">{{'question-wall.intro-title' | translate}}</p>
            <p class="questionwall-present-introduction-desc">{{'question-wall.intro-desc' | translate}}</p>
          </ng-container>
        </div>
    <ars-col [width]="450" [overflow]="'auto'" class="questionwall-list" #colComponent>
      <ars-row *ngFor="let comment of comments" class="questionwall-comment-anchor">
        <ars-row style="box-sizing:border-box;padding:8px;">
          <ars-row
            [ngClass]="comment===commentFocus?'questionwall-comment-border-on':'questionwall-comment-border-off'"
            style="border-radius:5px">
            <ars-row ars-flex-box
                     (click)="focusComment(comment)"
                     style="box-sizing:border-box;padding:16px;cursor:pointer">
                <p class="questionwall-comment-user">#{{comment.comment.userNumber}}</p>
              <ars-col>
                <p class="questionwall-comment-timestamp">{{comment.timeAgo}}</p>
              </ars-col>
              <ars-fill></ars-fill>
              <ars-col>
                <p class="questionwall-comment-notification">{{comment.old?'':'NEW'}}</p>
              </ars-col>
              <ars-col>
                <!-- Fav,Mark as wrong/correct -->
                <!--
                <ars-style-btn-material>
                  <ars-col ars-btn-wrp [xp]="16" [extraStart]="true" class="questionwall-comment-btn">
                    <button ars-btn><i>check_circle</i></button>
                    <button ars-btn><i>not_interested</i></button>
                    <button ars-btn><i>{{comment.comment.favorite?'star':'star_border'}}</i></button>
                  </ars-col>
                </ars-style-btn-material>
                -->
              </ars-col>
            </ars-row>
            <ars-row
              (click)="focusComment(comment)"
              style="box-sizing:border-box;padding:0 16px;cursor:pointer">
              <p class="questionwall-comment-body">{{comment.comment.body}}</p>
            </ars-row>
            <ars-row [height]="50">
              <ars-style-btn-material style="width:100%;height:100%;" ars-flex-box>
                <ars-col ars-btn-wrp [xp]="16" [extra]="true" class="questionwall-comment-btn">
                  <button ars-btn (click)="likeComment(comment)"><i>thumb_up</i><p>{{comment.comment.score}}</p></button>
                  <button ars-btn (click)="dislikeComment(comment)"><i>thumb_down</i></button>
                </ars-col>
                <ars-fill (click)="focusComment(comment)" style="cursor:pointer"></ars-fill>
              </ars-style-btn-material>
            </ars-row>
          </ars-row>
        </ars-row>
      </ars-row>
    </ars-col>
  </ars-fill>
    <ars-row [height]="50" class="questionwall-footer">
      <ars-style-btn-material style="width:100%;" ars-flex-box>
        <ars-col ars-btn-wrp [xp]="16" [extra]="true">
          <button ars-btn (click)="toggleFocusIncommingComments()">
            <ng-container *ngIf="focusIncommingComments">
              <i>{{'question-wall.auto-renew-off-icon' | translate}}</i>
              <p>{{'question-wall.auto-renew-off' | translate}}</p>
            </ng-container>
            <ng-container *ngIf="!focusIncommingComments">
              <i>{{'question-wall.auto-renew-on-icon' | translate}}</i>
              <p>{{'question-wall.auto-renew-on' | translate}}</p>
            </ng-container>
          </button>
        </ars-col>
        <ars-fill></ars-fill>
        <ars-col style="display:flex;flex-direction:column;justify-content:center">
          <p *ngIf="unreadComments" style="line-height:18px;" class="questionwall-text-color">{{unreadComments}}</p>
        </ars-col>
        <ars-col ars-btn-wrp [xp]="16" [extra]="true">
          <button ars-btn (click)="prevComment()">
            <i>{{'question-wall.prev-comment-icon' | translate}}</i>
            <p>{{'question-wall.prev-comment' | translate}}</p>
          </button>
          <button ars-btn (click)="nextComment()">
            <i>{{'question-wall.next-comment-icon' | translate}}</i>
            <p>{{'question-wall.next-comment' | translate}}</p>
          </button>
        </ars-col>
      </ars-style-btn-material>
    </ars-row>