1
0
Fork 0
peertube/client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.html

43 lines
2 KiB
HTML
Raw Normal View History

2021-04-07 11:01:29 -04:00
<div class="actor" *ngIf="actor">
<div class="d-flex">
2022-06-27 05:22:21 -04:00
<my-actor-avatar [actor]="actor" [actorType]="getActorType()" [previewImage]="preview" size="100"></my-actor-avatar>
2021-04-07 11:01:29 -04:00
<div class="actor-img-edit-container">
<div *ngIf="editable && !hasAvatar()" class="actor-img-edit-button" [ngbTooltip]="avatarFormat" placement="right" container="body">
<my-global-icon iconName="upload"></my-global-icon>
2022-06-08 10:14:24 -04:00
<label class="visually-hidden" for="avatarfile" i18n>Upload a new avatar</label>
2021-04-07 11:01:29 -04:00
<input #avatarfileInput type="file" name="avatarfile" id="avatarfile" [accept]="avatarExtensions" (change)="onAvatarChange(avatarfileInput)"/>
</div>
<div
*ngIf="editable && hasAvatar()" class="actor-img-edit-button"
#avatarPopover="ngbPopover" [ngbPopover]="avatarEditContent" popoverClass="popover-image-info" autoClose="outside" placement="right"
>
<my-global-icon iconName="edit"></my-global-icon>
2022-06-08 10:14:24 -04:00
<label class="visually-hidden" for="avatarMenu" i18n>Change your avatar</label>
2021-04-07 11:01:29 -04:00
</div>
</div>
</div>
<div class="actor-info">
<div class="actor-info-display-name">{{ actor.displayName }}</div>
<div *ngIf="displayUsername" class="actor-info-username">{{ actor.name }}</div>
<div *ngIf="displaySubscribers" i18n class="actor-info-followers">{{ actor.followersCount }} subscribers</div>
</div>
</div>
<ng-template #avatarEditContent>
<div class="dropdown-item c-hand" [ngbTooltip]="avatarFormat" placement="right" container="body">
<my-global-icon iconName="upload"></my-global-icon>
<span for="avatarfile" i18n>Upload a new avatar</span>
<input #avatarfileInput type="file" name="avatarfile" id="avatarfile" [accept]="avatarExtensions" (change)="onAvatarChange(avatarfileInput)"/>
</div>
2021-04-28 05:49:34 -04:00
2021-04-07 11:01:29 -04:00
<div class="dropdown-item c-hand" (click)="deleteAvatar()" (key.enter)="deleteAvatar()">
<my-global-icon iconName="delete"></my-global-icon>
<span i18n>Remove avatar</span>
</div>
</ng-template>