-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #152 from SakuraIsayeki/develop
0.17.1 - Support for Profile Roles display
- Loading branch information
Showing
13 changed files
with
113 additions
and
35 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,11 +1,13 @@ | ||
namespace WowsKarma.Common.Models.DTOs; | ||
|
||
public record UserProfileFlagsDTO | ||
public sealed record UserProfileFlagsDTO | ||
{ | ||
public uint Id { get; init; } | ||
|
||
public bool PostsBanned { get; init; } | ||
|
||
public bool OptedOut { get; init; } | ||
public DateTime OptOutChanged { get; init; } | ||
|
||
public IEnumerable<byte> ProfileRoles { get; init; } | ||
} |
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
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
11 changes: 11 additions & 0 deletions
11
wowskarma.app/src/app/shared/components/icons/user-roles/user-roles.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<sup class="d-inline-flex flex-row gap-3"> | ||
<ng-container *ngFor="let role of UserRolesMap"> | ||
<ng-container *ngIf="UserRoles.includes(role.id)"> | ||
<i [style]="'color: ' + role.color" | ||
[class]="'bi ' + role.icon" | ||
[title]="role.name" | ||
[ngbTooltip]="role.name" placement="bottom"> | ||
</i> | ||
</ng-container> | ||
</ng-container> | ||
</sup> |
Empty file.
30 changes: 30 additions & 0 deletions
30
wowskarma.app/src/app/shared/components/icons/user-roles/user-roles.component.ts
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'icon-user-roles', | ||
templateUrl: './user-roles.component.html', | ||
styleUrls: ['./user-roles.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush | ||
}) | ||
export class UserRolesComponent { | ||
@Input() UserRoles: number[] = []; | ||
|
||
constructor() { } | ||
|
||
protected readonly UserRolesMap = UserRolesMap; | ||
} | ||
|
||
const UserRolesMap = [ | ||
{ | ||
"id": 1, | ||
"name": "Platform Administrator", | ||
"icon": "bi-tools", | ||
"color": "#e74c3c" | ||
}, | ||
{ | ||
"id": 2, | ||
"name": "Community Manager", | ||
"icon": "bi-shield-shaded", | ||
"color": "#1abc9c" | ||
} | ||
] |
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