-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migration of first components into signals
- Loading branch information
1 parent
770f8df
commit fc73fad
Showing
29 changed files
with
908 additions
and
843 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<img | ||
[ngSrc]="user?.avatarUrl ?? 'assets/avatar.svg'" | ||
[ngSrc]="user()?.avatarUrl ?? 'assets/avatar.svg'" | ||
width="600" | ||
height="600" | ||
[ngClass]="{ 'circle': isCircle, 'rectangle': !isCircle, 'huge': size === avatarSize.huge, 'big': size === avatarSize.big, 'medium': size === avatarSize.medium, 'small': size === avatarSize.small, 'verysmall': size === avatarSize.verysmall}" | ||
[ngClass]="{ 'circle': isCircle(), 'rectangle': !isCircle(), 'huge': size() === avatarSize.huge, 'big': size() === avatarSize.big, 'medium': size() === avatarSize.medium, 'small': size() === avatarSize.small, 'verysmall': size() === avatarSize.verysmall}" | ||
alt="Avatar" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 25 additions & 19 deletions
44
src/app/components/widgets/blurhash-image/blurhash-image.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,37 @@ | ||
<div class="blurhash-container"> | ||
|
||
<div class="text">{{ text }}</div> | ||
<div class="content-warning">{{ contentWarning() }}</div> | ||
<canvas class="blurhash" #canvas width="32" height="32"></canvas> | ||
<img class="image-item" [ngClass]="{ 'img-vertical': !horizontal, 'img-horizontal': horizontal }" [src]="imageSrc" alt="Status image" /> | ||
<img class="image-item" [ngClass]="{ 'img-vertical': !horizontal(), 'img-horizontal': horizontal() }" [src]="imageSrc()" alt="Status image" /> | ||
|
||
@if (canvasIsLoaded) { | ||
@if(showAvatar && user) { | ||
<div class="avatar" [satPopoverAnchor]="popover" (mouseenter)="mouseenter.next()" (mouseleave)="mouseleave.next()"> | ||
<app-mini-user-card [user]="user" [showUserName]="false" [whiteLink]="true" [size]="avatarSize.verysmall"></app-mini-user-card> | ||
</div> | ||
|
||
<sat-popover #popover [autoFocus]="false" verticalAlign="below"> | ||
<div class="popover" (mouseenter)="mouseenter.next()" (mouseleave)="mouseleave.next()"> | ||
<app-user-popover [user]="user" [relationship]="relationship"></app-user-popover> | ||
@if (canvasIsLoaded()) { | ||
@if (showAvatar()) { | ||
@if (user(); as userObject) { | ||
<div class="avatar" [satPopoverAnchor]="popover" (mouseenter)="mouseenter.next()" (mouseleave)="mouseleave.next()"> | ||
<app-mini-user-card [user]="userObject" [showUserName]="false" [whiteLink]="true" [size]="avatarSize.verysmall"></app-mini-user-card> | ||
</div> | ||
</sat-popover> | ||
|
||
<sat-popover #popover [autoFocus]="false" verticalAlign="below"> | ||
<div class="popover" (mouseenter)="mouseenter.next()" (mouseleave)="mouseleave.next()"> | ||
<app-user-popover [user]="userObject" [relationship]="relationship()"></app-user-popover> | ||
</div> | ||
</sat-popover> | ||
} | ||
} | ||
|
||
@if (signedInUser && showFavourites) { | ||
<div class="favourite" (click)="favouriteToggle(); $event.preventDefault(); $event.stopPropagation();" (keydown.enter)="favouriteToggle(); $event.preventDefault(); $event.stopPropagation();" tabindex="0"> | ||
<mat-icon *ngIf="!getMainStatus()?.favourited" class="outline-symbol">grade</mat-icon> | ||
<mat-icon *ngIf="getMainStatus()?.favourited" class="fill-symbol">grade</mat-icon> | ||
</div> | ||
@if(showAltIcon() && alt()) { | ||
<div class="alt" [matTooltip]="alt()" matTooltipPosition="above">ALT</div> | ||
} | ||
|
||
@if(showAltIcon && alt) { | ||
<div class="alt" [matTooltip]="alt" matTooltipPosition="above">ALT</div> | ||
@if (signedInUser() && showFavourites()) { | ||
<div class="favourite" (click)="favouriteToggle(); $event.preventDefault(); $event.stopPropagation();" (keydown.enter)="favouriteToggle(); $event.preventDefault(); $event.stopPropagation();" tabindex="0"> | ||
@if (isFavourited()) { | ||
<mat-icon class="fill-symbol">grade</mat-icon> | ||
} | ||
@else { | ||
<mat-icon class="outline-symbol">grade</mat-icon> | ||
} | ||
</div> | ||
} | ||
} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.