Cleanup code
parent
d99310c9b6
commit
5a19cc0dc4
@ -1,72 +1,74 @@
|
|||||||
<div id="about">
|
<div id="about">
|
||||||
<div id="text0" style="text-align: center;">
|
<div id="text0" style="text-align: center;">
|
||||||
|
|
||||||
<h1>Greenvironment</h1>
|
<h1>Greenvironment</h1>
|
||||||
<br> <br> <br> <br> <br>
|
<br> <br> <br> <br> <br>
|
||||||
<h1 class="mat-display-3">Keep it clean and green!</h1>
|
<h1 class="mat-display-3">Keep it clean and green!</h1>
|
||||||
<button mat-icon-button>
|
<button mat-icon-button>
|
||||||
<mat-icon class="big-icon" color="primary">keyboard_arrow_down</mat-icon>
|
<mat-icon class="big-icon" color="primary">keyboard_arrow_down</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="text1" style="text-align: center;">
|
<div id="text1" style="text-align: center;">
|
||||||
<h1>What's Greenvironment?</h1>
|
<h1>What's Greenvironment?</h1>
|
||||||
<p>We, the greenviroment team want to create a network for environmentalists who care for our nature and our planet as much as we do.</p>
|
<p>We, the greenviroment team want to create a network for environmentalists who care for our nature and our planet
|
||||||
<br>
|
as much as we do.</p>
|
||||||
<h1>What does the level mean?</h1>
|
<br>
|
||||||
<p>There are different levels you can reach through green behaviour.
|
<h1>What does the level mean?</h1>
|
||||||
Collect 100 points to level up! The levels are called:
|
<p>There are different levels you can reach through green behaviour.
|
||||||
</p>
|
Collect 100 points to level up! The levels are called:
|
||||||
<table mat-table [dataSource]="levelSource" class="mat-elevation-z8">
|
</p>
|
||||||
<ng-container matColumnDef="level">
|
<table mat-table [dataSource]="levelSource" class="mat-elevation-z8">
|
||||||
<th mat-header-cell *matHeaderCellDef> level </th>
|
<ng-container matColumnDef="level">
|
||||||
<td mat-cell *matCellDef="let level"> {{level.level}} </td>
|
<th mat-header-cell *matHeaderCellDef> level</th>
|
||||||
</ng-container>
|
<td mat-cell *matCellDef="let level"> {{level.level}} </td>
|
||||||
<ng-container matColumnDef="name">
|
</ng-container>
|
||||||
<th mat-header-cell *matHeaderCellDef> level name </th>
|
<ng-container matColumnDef="name">
|
||||||
<td mat-cell *matCellDef="let level"> {{level.name}} </td>
|
<th mat-header-cell *matHeaderCellDef> level name</th>
|
||||||
</ng-container>
|
<td mat-cell *matCellDef="let level"> {{level.name}} </td>
|
||||||
<tr mat-header-row *matHeaderRowDef="displayedLevelColumns"></tr>
|
</ng-container>
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedLevelColumns;"></tr>
|
<tr mat-header-row *matHeaderRowDef="displayedLevelColumns"></tr>
|
||||||
</table>
|
<tr mat-row *matRowDef="let row; columns: displayedLevelColumns;"></tr>
|
||||||
<br>
|
</table>
|
||||||
<h1>How to level up?</h1>
|
<br>
|
||||||
<p>There is an always growing list of things you can do,
|
<h1>How to level up?</h1>
|
||||||
to support your environment
|
<p>There is an always growing list of things you can do,
|
||||||
and earn points to level up at the same time.
|
to support your environment
|
||||||
You can get a different amount of points
|
and earn points to level up at the same time.
|
||||||
for differnet actions you can see in the list below:
|
You can get a different amount of points
|
||||||
</p>
|
for differnet actions you can see in the list below:
|
||||||
<table mat-table [dataSource]="dataSource" matSort class="mat-elevation-z8">
|
</p>
|
||||||
<!--- Note that these columns can be defined in any order.
|
<table mat-table [dataSource]="dataSource" matSort class="mat-elevation-z8">
|
||||||
The actual rendered columns are set as a property on the row definition" -->
|
<!--- Note that these columns can be defined in any order.
|
||||||
|
The actual rendered columns are set as a property on the row definition" -->
|
||||||
|
|
||||||
<!-- Position Column -->
|
<!-- Position Column -->
|
||||||
<ng-container matColumnDef="points">
|
<ng-container matColumnDef="points">
|
||||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> points </th>
|
<th mat-header-cell *matHeaderCellDef mat-sort-header> points</th>
|
||||||
<td mat-cell *matCellDef="let action"> {{action.points}} </td>
|
<td mat-cell *matCellDef="let action"> {{action.points}} </td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<!-- Name Column -->
|
<!-- Name Column -->
|
||||||
<ng-container matColumnDef="name">
|
<ng-container matColumnDef="name">
|
||||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> action </th>
|
<th mat-header-cell *matHeaderCellDef mat-sort-header> action</th>
|
||||||
<td mat-cell *matCellDef="let action"> {{action.name}} </td>
|
<td mat-cell *matCellDef="let action"> {{action.name}} </td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<!-- decriotion Column -->
|
<!-- decriotion Column -->
|
||||||
<ng-container matColumnDef="description">
|
<ng-container matColumnDef="description">
|
||||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> description </th>
|
<th mat-header-cell *matHeaderCellDef mat-sort-header> description</th>
|
||||||
<td mat-cell *matCellDef="let action"> {{action.description}} </td>
|
<td mat-cell *matCellDef="let action"> {{action.description}} </td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div id="text2" style="text-align: center;">
|
<div id="text2" style="text-align: center;">
|
||||||
<p class="mat-display-1">We believe, that together we can do amazing things to protect our environment and keep it clean and green.</p>
|
<p class="mat-display-1">We believe, that together we can do amazing things to protect our environment and keep it
|
||||||
<p class="mat-display-1">You aren't part of greenvironment yet? - join us now!</p>
|
clean and green.</p>
|
||||||
<a mat-stroked-button color="primary" class="link-button" routerLink="/register" >Register</a>
|
<p class="mat-display-1">You aren't part of greenvironment yet? - join us now!</p>
|
||||||
<br>
|
<a mat-stroked-button color="primary" class="link-button" routerLink="/register">Register</a>
|
||||||
<a mat-stroked-button color="primary" class="link-button" routerLink="/login">Login</a>
|
<br>
|
||||||
</div>
|
<a mat-stroked-button color="primary" class="link-button" routerLink="/login">Login</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
@ -1,15 +1,16 @@
|
|||||||
<div id="contacts">
|
<div id="contacts">
|
||||||
<div id='header'>
|
<div id='header'>
|
||||||
<button id="goback" (click)="goBack()"><span><i class="fa fa-arrow-left fa-3x" aria-hidden="true"></i></span></button>
|
<button id="goback" (click)="goBack()"><span><i class="fa fa-arrow-left fa-3x" aria-hidden="true"></i></span>
|
||||||
<span class='title'>Contacts</span>
|
</button>
|
||||||
</div>
|
<span class='title'>Contacts</span>
|
||||||
<div class="search-container">
|
</div>
|
||||||
</div>
|
<div class="search-container">
|
||||||
<div class="data-container">
|
</div>
|
||||||
<div class="contact-item" *ngFor="let contact of contactList"
|
<div class="data-container">
|
||||||
[class.selected]="contact === selectedContact" (click)="createChat(contact.id)">
|
<div class="contact-item" *ngFor="let contact of contactList"
|
||||||
<div class="picture">Pic</div>
|
[class.selected]="contact === selectedContact" (click)="createChat(contact.id)">
|
||||||
<div class="name"><span>{{contact.name}}</span></div>
|
<div class="picture">Pic</div>
|
||||||
</div>
|
<div class="name"><span>{{contact.name}}</span></div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<div class='sidenav'>
|
<div class='sidenav'>
|
||||||
<span (click)='newDoc()'>New Document</span>
|
<span (click)='newDoc()'>New Document</span>
|
||||||
<span [class.selected]='docId === currentDoc' (click)='loadDoc(docId)' *ngFor='let docId of documents | async'>{{ docId }}</span>
|
<span [class.selected]='docId === currentDoc' (click)='loadDoc(docId)'
|
||||||
|
*ngFor='let docId of documents | async'>{{ docId }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,24 +1,28 @@
|
|||||||
.sidenav {
|
.sidenav {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 220px;
|
width: 220px;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
background-color: #111111;
|
background-color: #111111;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
padding: 6px 8px 6px 16px;
|
padding: 6px 8px 6px 16px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
font-family: 'Roboto', Tahoma, Geneva, Verdana, sans-serif;
|
font-family: 'Roboto', Tahoma, Geneva, Verdana, sans-serif;
|
||||||
color: #818181;
|
color: #818181;
|
||||||
display: block;
|
display: block;
|
||||||
}.selected {
|
}
|
||||||
color: #e1e1e1;
|
|
||||||
}:hover {
|
.selected {
|
||||||
color: #f1f1f1;
|
color: #e1e1e1;
|
||||||
cursor: pointer;
|
}
|
||||||
}
|
|
||||||
|
:hover {
|
||||||
|
color: #f1f1f1;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
textarea {
|
textarea {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: calc(100% - 235px);
|
width: calc(100% - 235px);
|
||||||
height: 100%;
|
height: 100%;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
font-size: 18pt;
|
font-size: 18pt;
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
resize: none;
|
resize: none;
|
||||||
border: none;
|
border: none;
|
||||||
padding: 20px 0px 20px 15px;
|
padding: 20px 0px 20px 15px;
|
||||||
}
|
}
|
||||||
|
@ -1,118 +1,121 @@
|
|||||||
<div id="profile-page">
|
<div id="profile-page">
|
||||||
<div id="profilecontainer" *ngIf="!groupNotFound && !loading">
|
<div id="profilecontainer" *ngIf="!groupNotFound && !loading">
|
||||||
<!--on small screen-->
|
<!--on small screen-->
|
||||||
<mat-toolbar id="toolbar" fxShow="true" fxHide.gt-sm="true">
|
<mat-toolbar id="toolbar" fxShow="true" fxHide.gt-sm="true">
|
||||||
<mat-toolbar-row>
|
<mat-toolbar-row>
|
||||||
<div class="profile-picture"></div>
|
<div class="profile-picture"></div>
|
||||||
<span id="username">{{groupProfile.name}}</span>
|
<span id="username">{{groupProfile.name}}</span>
|
||||||
|
<div class="button-box">
|
||||||
|
<button mat-icon-button
|
||||||
|
class="request-button"
|
||||||
|
matTooltip="join group" matTooltipShowDelay="500"
|
||||||
|
(click)="joinGroup(groupProfile)"
|
||||||
|
[disabled]="!groupProfile.allowedToJoinGroup">
|
||||||
|
<mat-icon>group_add</mat-icon>
|
||||||
|
</button>
|
||||||
|
<button mat-icon-button
|
||||||
|
class="request-button"
|
||||||
|
matTooltip="create event" matTooltipShowDelay="500"
|
||||||
|
(click)="openDialog()"
|
||||||
|
[disabled]="!isAdmin">
|
||||||
|
<mat-icon>event</mat-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</mat-toolbar-row>
|
||||||
|
<mat-toolbar-row>
|
||||||
|
<div class="info-box">
|
||||||
|
<span id="handle" class="pointer"
|
||||||
|
(click)="showUserProfile(groupProfile.creator)">created by {{groupProfile.creator.username}}
|
||||||
|
@{{groupProfile.creator.handle}}</span>
|
||||||
|
</div>
|
||||||
|
</mat-toolbar-row>
|
||||||
|
<mat-toolbar-row>
|
||||||
|
<div class="info-box">
|
||||||
|
<span class="info">{{groupProfile.members.length}} member(s)</span>
|
||||||
|
</div>
|
||||||
|
</mat-toolbar-row>
|
||||||
|
</mat-toolbar>
|
||||||
|
<!--on big screen-->
|
||||||
|
<mat-toolbar id="toolbar" fxShow="true" fxHide.lt-md="true">
|
||||||
|
<mat-toolbar-row>
|
||||||
|
<div class="profile-picture"></div>
|
||||||
|
<span id="username">{{groupProfile.name}}</span>
|
||||||
|
<span id="handle" class="pointer"
|
||||||
|
(click)="showUserProfile(groupProfile.creator)">created by {{groupProfile.creator.username}}
|
||||||
|
@{{groupProfile.creator.handle}}</span>
|
||||||
|
<div class="button-box">
|
||||||
|
<button mat-icon-button
|
||||||
|
class="request-button"
|
||||||
|
matTooltip="join group" matTooltipShowDelay="500"
|
||||||
|
(click)="joinGroup(groupProfile)"
|
||||||
|
[disabled]="!groupProfile.allowedToJoinGroup">
|
||||||
|
<mat-icon>group_add</mat-icon>
|
||||||
|
</button>
|
||||||
|
<button mat-icon-button
|
||||||
|
class="request-button"
|
||||||
|
matTooltip="create event" matTooltipShowDelay="500"
|
||||||
|
(click)="openDialog()"
|
||||||
|
[disabled]="!isAdmin">
|
||||||
|
<mat-icon>event</mat-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</mat-toolbar-row>
|
||||||
|
<mat-toolbar-row>
|
||||||
|
<div class="info-box">
|
||||||
|
<span class="info">{{groupProfile.members.length}} member(s)</span>
|
||||||
|
</div>
|
||||||
|
</mat-toolbar-row>
|
||||||
|
</mat-toolbar>
|
||||||
|
<div id="accordion">
|
||||||
|
<mat-accordion>
|
||||||
|
<mat-expansion-panel *ngIf="groupProfile.events.length > 0" expanded>
|
||||||
|
<mat-expansion-panel-header>
|
||||||
|
<mat-panel-title>
|
||||||
|
Events
|
||||||
|
</mat-panel-title>
|
||||||
|
</mat-expansion-panel-header>
|
||||||
|
<div class="list">
|
||||||
|
<mat-card class="card" *ngFor="let event of groupProfile.events"
|
||||||
|
[class.selected]="event === selectedEvent"
|
||||||
|
tabindex="0">
|
||||||
|
<mat-card-header>
|
||||||
|
<mat-card-title>{{event.name}}</mat-card-title>
|
||||||
|
<mat-card-subtitle>{{event.date}}</mat-card-subtitle>
|
||||||
<div class="button-box">
|
<div class="button-box">
|
||||||
<button mat-icon-button
|
<button mat-icon-button class="request-button"
|
||||||
class="request-button"
|
matTooltip="join event" matTooltipShowDelay="500"
|
||||||
matTooltip="join group" matTooltipShowDelay="500"
|
(click)="joinEvent(event)"
|
||||||
(click)="joinGroup(groupProfile)"
|
[disabled]="event.joined">
|
||||||
[disabled]="!groupProfile.allowedToJoinGroup">
|
<mat-icon *ngIf="event.joined" color="primary">event_available</mat-icon>
|
||||||
<mat-icon>group_add</mat-icon>
|
<mat-icon *ngIf="!event.joined">event_available</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button mat-icon-button
|
<button mat-icon-button class="request-button"
|
||||||
class="request-button"
|
matTooltip="leave event" matTooltipShowDelay="500"
|
||||||
matTooltip="create event" matTooltipShowDelay="500"
|
(click)="leaveEvent(event)"
|
||||||
(click)="openDialog()"
|
[disabled]="!event.joined">
|
||||||
[disabled]="!isAdmin">
|
<mat-icon>event_busy</mat-icon>
|
||||||
<mat-icon>event</mat-icon>
|
</button>
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</mat-toolbar-row>
|
</mat-card-header>
|
||||||
<mat-toolbar-row>
|
</mat-card>
|
||||||
<div class="info-box">
|
|
||||||
<span id="handle" class="pointer" (click)="showUserProfile(groupProfile.creator)">created by {{groupProfile.creator.username}} @{{groupProfile.creator.handle}}</span>
|
|
||||||
</div>
|
|
||||||
</mat-toolbar-row>
|
|
||||||
<mat-toolbar-row>
|
|
||||||
<div class="info-box">
|
|
||||||
<span class="info">{{groupProfile.members.length}} member(s)</span>
|
|
||||||
</div>
|
|
||||||
</mat-toolbar-row>
|
|
||||||
</mat-toolbar>
|
|
||||||
<!--on big screen-->
|
|
||||||
<mat-toolbar id="toolbar" fxShow="true" fxHide.lt-md="true">
|
|
||||||
<mat-toolbar-row>
|
|
||||||
<div class="profile-picture"></div>
|
|
||||||
<span id="username">{{groupProfile.name}}</span>
|
|
||||||
<span id="handle" class="pointer" (click)="showUserProfile(groupProfile.creator)">created by {{groupProfile.creator.username}} @{{groupProfile.creator.handle}}</span>
|
|
||||||
<div class="button-box">
|
|
||||||
<button mat-icon-button
|
|
||||||
class="request-button"
|
|
||||||
matTooltip="join group" matTooltipShowDelay="500"
|
|
||||||
(click)="joinGroup(groupProfile)"
|
|
||||||
[disabled]="!groupProfile.allowedToJoinGroup">
|
|
||||||
<mat-icon>group_add</mat-icon>
|
|
||||||
</button>
|
|
||||||
<button mat-icon-button
|
|
||||||
class="request-button"
|
|
||||||
matTooltip="create event" matTooltipShowDelay="500"
|
|
||||||
(click)="openDialog()"
|
|
||||||
[disabled]="!isAdmin">
|
|
||||||
<mat-icon>event</mat-icon>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</mat-toolbar-row>
|
|
||||||
<mat-toolbar-row>
|
|
||||||
<div class="info-box">
|
|
||||||
<span class="info">{{groupProfile.members.length}} member(s)</span>
|
|
||||||
</div>
|
|
||||||
</mat-toolbar-row>
|
|
||||||
</mat-toolbar>
|
|
||||||
<div id="accordion">
|
|
||||||
<mat-accordion>
|
|
||||||
<mat-expansion-panel *ngIf="groupProfile.events.length > 0" expanded>
|
|
||||||
<mat-expansion-panel-header>
|
|
||||||
<mat-panel-title>
|
|
||||||
Events
|
|
||||||
</mat-panel-title>
|
|
||||||
</mat-expansion-panel-header>
|
|
||||||
<div class="list">
|
|
||||||
<mat-card class="card" *ngFor="let event of groupProfile.events"
|
|
||||||
[class.selected]="event === selectedEvent"
|
|
||||||
tabindex="0">
|
|
||||||
<mat-card-header>
|
|
||||||
<mat-card-title>{{event.name}}</mat-card-title>
|
|
||||||
<mat-card-subtitle >{{event.date}}</mat-card-subtitle>
|
|
||||||
<div class="button-box">
|
|
||||||
<button mat-icon-button class="request-button"
|
|
||||||
matTooltip="join event" matTooltipShowDelay="500"
|
|
||||||
(click)="joinEvent(event)"
|
|
||||||
[disabled]="event.joined">
|
|
||||||
<mat-icon *ngIf="event.joined" color="primary">event_available</mat-icon>
|
|
||||||
<mat-icon *ngIf="!event.joined">event_available</mat-icon>
|
|
||||||
</button>
|
|
||||||
<button mat-icon-button class="request-button"
|
|
||||||
matTooltip="leave event" matTooltipShowDelay="500"
|
|
||||||
(click)="leaveEvent(event)"
|
|
||||||
[disabled]="!event.joined">
|
|
||||||
<mat-icon>event_busy</mat-icon>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</mat-card-header>
|
|
||||||
</mat-card>
|
|
||||||
</div>
|
|
||||||
</mat-expansion-panel>
|
|
||||||
<mat-expansion-panel [expanded]="groupProfile.events.length < 1">
|
|
||||||
<mat-expansion-panel-header>
|
|
||||||
<mat-panel-title>
|
|
||||||
Members
|
|
||||||
</mat-panel-title>
|
|
||||||
</mat-expansion-panel-header>
|
|
||||||
<div class="list">
|
|
||||||
<user-list [userList]="groupProfile.members"></user-list>
|
|
||||||
</div>
|
|
||||||
</mat-expansion-panel>
|
|
||||||
</mat-accordion>
|
|
||||||
</div>
|
</div>
|
||||||
|
</mat-expansion-panel>
|
||||||
|
<mat-expansion-panel [expanded]="groupProfile.events.length < 1">
|
||||||
|
<mat-expansion-panel-header>
|
||||||
|
<mat-panel-title>
|
||||||
|
Members
|
||||||
|
</mat-panel-title>
|
||||||
|
</mat-expansion-panel-header>
|
||||||
|
<div class="list">
|
||||||
|
<user-list [userList]="groupProfile.members"></user-list>
|
||||||
|
</div>
|
||||||
|
</mat-expansion-panel>
|
||||||
|
</mat-accordion>
|
||||||
</div>
|
</div>
|
||||||
<div id="profilecontainer" *ngIf="groupNotFound">
|
</div>
|
||||||
<h1>Group not found :(</h1>
|
<div id="profilecontainer" *ngIf="groupNotFound">
|
||||||
</div>
|
<h1>Group not found :(</h1>
|
||||||
<mat-spinner *ngIf="loading" style="margin:0 auto; margin-top: 10em;" diameter="100"></mat-spinner>
|
</div>
|
||||||
|
<mat-spinner *ngIf="loading" style="margin:0 auto; margin-top: 10em;" diameter="100"></mat-spinner>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -1,24 +1,25 @@
|
|||||||
<div id="login">
|
<div id="login">
|
||||||
<mat-card style="text-align: center;" >
|
<mat-card style="text-align: center;">
|
||||||
<mat-card-title>
|
<mat-card-title>
|
||||||
Login
|
Login
|
||||||
</mat-card-title>
|
</mat-card-title>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div class="example-container" (keyup.enter)="onClickSubmit(email.value,password.value)">
|
<div class="example-container" (keyup.enter)="onClickSubmit(email.value,password.value)">
|
||||||
<mat-error *ngIf="errorOccurred">{{getErrorMessage()}}</mat-error>
|
<mat-error *ngIf="errorOccurred">{{getErrorMessage()}}</mat-error>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Enter your email" #email >
|
<input matInput placeholder="Enter your email" #email>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Enter your password" [type]="hide ? 'password' : 'text'" #password>
|
<input matInput placeholder="Enter your password" [type]="hide ? 'password' : 'text'" #password>
|
||||||
<button mat-icon-button matSuffix (click)="hide = !hide" [attr.aria-label]="'Hide password'" [attr.aria-pressed]="hide">
|
<button mat-icon-button matSuffix (click)="hide = !hide" [attr.aria-label]="'Hide password'"
|
||||||
<mat-icon>{{hide ? 'visibility_off' : 'visibility'}}</mat-icon>
|
[attr.aria-pressed]="hide">
|
||||||
</button>
|
<mat-icon>{{hide ? 'visibility_off' : 'visibility'}}</mat-icon>
|
||||||
</mat-form-field>
|
</button>
|
||||||
</div>
|
</mat-form-field>
|
||||||
<button mat-raised-button color="primary" (click)="onClickSubmit(email.value,password.value)">Login</button>
|
</div>
|
||||||
<p>You aren't part of greenvironment yet?</p>
|
<button mat-raised-button color="primary" (click)="onClickSubmit(email.value,password.value)">Login</button>
|
||||||
<a mat-stroked-button color="primary" routerLink="/register">Register</a>
|
<p>You aren't part of greenvironment yet?</p>
|
||||||
</mat-card-content>
|
<a mat-stroked-button color="primary" routerLink="/register">Register</a>
|
||||||
</mat-card>
|
</mat-card-content>
|
||||||
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,83 +1,83 @@
|
|||||||
<div id="profile-page">
|
<div id="profile-page">
|
||||||
<div id="profilecontainer" *ngIf="!profileNotFound && !loading">
|
<div id="profilecontainer" *ngIf="!profileNotFound && !loading">
|
||||||
<!--on small screen-->
|
<!--on small screen-->
|
||||||
<mat-toolbar id="toolbar" fxShow="true" fxHide.gt-sm="true">
|
<mat-toolbar id="toolbar" fxShow="true" fxHide.gt-sm="true">
|
||||||
<mat-toolbar-row>
|
<mat-toolbar-row>
|
||||||
<div class="hover-box" matTooltip="upload new picture" *ngIf="ownProfile" (click)="openFileUploadDialog()">
|
<div class="hover-box" matTooltip="upload new picture" *ngIf="ownProfile" (click)="openFileUploadDialog()">
|
||||||
<img class="profile-picture" [src]="userProfile.profilePicture"/>
|
<img class="profile-picture" [src]="userProfile.profilePicture"/>
|
||||||
<mat-icon id="icon">camera_alt</mat-icon>
|
<mat-icon id="icon">camera_alt</mat-icon>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!ownProfile">
|
<div *ngIf="!ownProfile">
|
||||||
<img class="profile-picture" [src]="userProfile.profilePicture"/>
|
<img class="profile-picture" [src]="userProfile.profilePicture"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span id="username">{{userProfile.username}}</span>
|
<span id="username">{{userProfile.username}}</span>
|
||||||
<button mat-icon-button
|
<button mat-icon-button
|
||||||
class="request-button"
|
class="request-button"
|
||||||
(click)="sendFriendRequest(userProfile)"
|
(click)="sendFriendRequest(userProfile)"
|
||||||
[disabled]="!userProfile.allowedToSendRequest">
|
[disabled]="!userProfile.allowedToSendRequest">
|
||||||
<mat-icon>person_add</mat-icon>
|
<mat-icon>person_add</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</mat-toolbar-row>
|
</mat-toolbar-row>
|
||||||
<mat-toolbar-row>
|
<mat-toolbar-row>
|
||||||
<div class="info-box">
|
<div class="info-box">
|
||||||
<span id="handle">@{{userProfile.handle}}</span>
|
<span id="handle">@{{userProfile.handle}}</span>
|
||||||
</div>
|
</div>
|
||||||
</mat-toolbar-row>
|
</mat-toolbar-row>
|
||||||
<mat-toolbar-row>
|
<mat-toolbar-row>
|
||||||
<div>
|
<div>
|
||||||
<span class="info">{{rankname}} ({{userProfile.points}} points)</span>
|
<span class="info">{{rankname}} ({{userProfile.points}} points)</span>
|
||||||
</div>
|
</div>
|
||||||
</mat-toolbar-row>
|
</mat-toolbar-row>
|
||||||
<mat-toolbar-row>
|
<mat-toolbar-row>
|
||||||
<div>
|
<div>
|
||||||
<span class="info">{{userProfile.friendCount}} friends</span>
|
<span class="info">{{userProfile.friendCount}} friends</span>
|
||||||
<span class="info">{{userProfile.groupCount}} groups</span>
|
<span class="info">{{userProfile.groupCount}} groups</span>
|
||||||
</div>
|
</div>
|
||||||
</mat-toolbar-row>
|
</mat-toolbar-row>
|
||||||
<mat-toolbar-row>
|
<mat-toolbar-row>
|
||||||
<div>
|
<div>
|
||||||
<span class="info">joined on {{userProfile.joinedAt}}</span>
|
<span class="info">joined on {{userProfile.joinedAt}}</span>
|
||||||
</div>
|
|
||||||
</mat-toolbar-row>
|
|
||||||
</mat-toolbar>
|
|
||||||
<!--on big screen-->
|
|
||||||
<mat-toolbar id="toolbar" fxShow="true" fxHide.lt-md="true">
|
|
||||||
<mat-toolbar-row>
|
|
||||||
<div class="hover-box" matTooltip="upload new picture" *ngIf="ownProfile" (click)="openFileUploadDialog()">
|
|
||||||
<img class="profile-picture" [src]="userProfile.profilePicture"/>
|
|
||||||
<mat-icon id="icon">camera_alt</mat-icon>
|
|
||||||
</div>
|
|
||||||
<div *ngIf="!ownProfile">
|
|
||||||
<img class="profile-picture" [src]="userProfile.profilePicture"/>
|
|
||||||
</div>
|
|
||||||
<span id="username">{{userProfile.username}}</span>
|
|
||||||
<span id="handle">@{{userProfile.handle}}</span>
|
|
||||||
<button mat-icon-button
|
|
||||||
class="request-button"
|
|
||||||
(click)="sendFriendRequest(userProfile)"
|
|
||||||
[disabled]="!userProfile.allowedToSendRequest">
|
|
||||||
<mat-icon>person_add</mat-icon>
|
|
||||||
</button>
|
|
||||||
</mat-toolbar-row>
|
|
||||||
<mat-toolbar-row>
|
|
||||||
<div class="info-box">
|
|
||||||
<span class="info">{{rankname}} ({{userProfile.points}} points)</span>
|
|
||||||
<span class="info">{{userProfile.friendCount}} friends</span>
|
|
||||||
<span class="info">{{userProfile.groupCount}} groups</span>
|
|
||||||
<span class="info">joined on {{userProfile.joinedAt}}</span>
|
|
||||||
</div>
|
|
||||||
</mat-toolbar-row>
|
|
||||||
</mat-toolbar>
|
|
||||||
<div id="postlist">
|
|
||||||
<feed-postlist [childPostList]="this.userProfile.posts"></feed-postlist>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="profile">
|
</mat-toolbar-row>
|
||||||
|
</mat-toolbar>
|
||||||
|
<!--on big screen-->
|
||||||
|
<mat-toolbar id="toolbar" fxShow="true" fxHide.lt-md="true">
|
||||||
|
<mat-toolbar-row>
|
||||||
|
<div class="hover-box" matTooltip="upload new picture" *ngIf="ownProfile" (click)="openFileUploadDialog()">
|
||||||
|
<img class="profile-picture" [src]="userProfile.profilePicture"/>
|
||||||
|
<mat-icon id="icon">camera_alt</mat-icon>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="!ownProfile">
|
||||||
|
<img class="profile-picture" [src]="userProfile.profilePicture"/>
|
||||||
|
</div>
|
||||||
|
<span id="username">{{userProfile.username}}</span>
|
||||||
|
<span id="handle">@{{userProfile.handle}}</span>
|
||||||
|
<button mat-icon-button
|
||||||
|
class="request-button"
|
||||||
|
(click)="sendFriendRequest(userProfile)"
|
||||||
|
[disabled]="!userProfile.allowedToSendRequest">
|
||||||
|
<mat-icon>person_add</mat-icon>
|
||||||
|
</button>
|
||||||
|
</mat-toolbar-row>
|
||||||
|
<mat-toolbar-row>
|
||||||
|
<div class="info-box">
|
||||||
|
<span class="info">{{rankname}} ({{userProfile.points}} points)</span>
|
||||||
|
<span class="info">{{userProfile.friendCount}} friends</span>
|
||||||
|
<span class="info">{{userProfile.groupCount}} groups</span>
|
||||||
|
<span class="info">joined on {{userProfile.joinedAt}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
</mat-toolbar-row>
|
||||||
|
</mat-toolbar>
|
||||||
|
<div id="postlist">
|
||||||
|
<feed-postlist [childPostList]="this.userProfile.posts"></feed-postlist>
|
||||||
</div>
|
</div>
|
||||||
<div id="profilecontainer" *ngIf="profileNotFound">
|
<div id="profile">
|
||||||
<h1>Profile not found :(</h1>
|
|
||||||
</div>
|
</div>
|
||||||
<mat-spinner *ngIf="loading" style="margin:0 auto; margin-top: 10em;" diameter="100"></mat-spinner>
|
</div>
|
||||||
|
<div id="profilecontainer" *ngIf="profileNotFound">
|
||||||
|
<h1>Profile not found :(</h1>
|
||||||
|
</div>
|
||||||
|
<mat-spinner *ngIf="loading" style="margin:0 auto; margin-top: 10em;" diameter="100"></mat-spinner>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,33 +1,38 @@
|
|||||||
<div id="register">
|
<div id="register">
|
||||||
<mat-card style="text-align: center;" >
|
<mat-card style="text-align: center;">
|
||||||
<mat-card-title>
|
<mat-card-title>
|
||||||
Register
|
Register
|
||||||
</mat-card-title>
|
</mat-card-title>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div class="example-container" (keyup.enter)="onClickSubmit(username.value,email.value,password.value, repeatpassword.value)">
|
<div class="example-container"
|
||||||
|
(keyup.enter)="onClickSubmit(username.value,email.value,password.value, repeatpassword.value)">
|
||||||
<mat-error *ngIf="errorOccurred">{{errorMessage}}</mat-error>
|
<mat-error *ngIf="errorOccurred">{{errorMessage}}</mat-error>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Enter your email" #email >
|
<input matInput placeholder="Enter your email" #email>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Enter your username" #username >
|
<input matInput placeholder="Enter your username" #username>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Enter your password" [type]="hide1 ? 'password' : 'text'" #password>
|
<input matInput placeholder="Enter your password" [type]="hide1 ? 'password' : 'text'" #password>
|
||||||
<button mat-icon-button matSuffix (click)="hide1 = !hide1" [attr.aria-label]="'Hide password'" [attr.aria-pressed]="hide1">
|
<button mat-icon-button matSuffix (click)="hide1 = !hide1" [attr.aria-label]="'Hide password'"
|
||||||
<mat-icon>{{hide1 ? 'visibility_off' : 'visibility'}}</mat-icon>
|
[attr.aria-pressed]="hide1">
|
||||||
|
<mat-icon>{{hide1 ? 'visibility_off' : 'visibility'}}</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Repeat your password" [type]="hide2 ? 'password' : 'text'" #repeatpassword>
|
<input matInput placeholder="Repeat your password" [type]="hide2 ? 'password' : 'text'" #repeatpassword>
|
||||||
<button mat-icon-button matSuffix (click)="hide2 = !hide2" [attr.aria-label]="'Hide password'" [attr.aria-pressed]="hide2">
|
<button mat-icon-button matSuffix (click)="hide2 = !hide2" [attr.aria-label]="'Hide password'"
|
||||||
<mat-icon>{{hide2 ? 'visibility_off' : 'visibility'}}</mat-icon>
|
[attr.aria-pressed]="hide2">
|
||||||
|
<mat-icon>{{hide2 ? 'visibility_off' : 'visibility'}}</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<button mat-raised-button color="primary" (click)="onClickSubmit(username.value,email.value,password.value, repeatpassword.value)">Register</button>
|
<button mat-raised-button color="primary"
|
||||||
|
(click)="onClickSubmit(username.value,email.value,password.value, repeatpassword.value)">Register
|
||||||
|
</button>
|
||||||
<p>You are already part of greenvironment?</p>
|
<p>You are already part of greenvironment?</p>
|
||||||
<a mat-stroked-button color="primary" routerLink="/login">Login</a>
|
<a mat-stroked-button color="primary" routerLink="/login">Login</a>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,16 +1,19 @@
|
|||||||
<mat-toolbar>
|
<mat-toolbar>
|
||||||
<span>Groups</span>
|
<span>Groups</span>
|
||||||
<div id="button-box">
|
<div id="button-box">
|
||||||
<button mat-icon-button (click)="openDialog()" matTooltip="create group" matTooltipPosition="left" matTooltipShowDelay="500"><mat-icon>group_add</mat-icon></button>
|
<button mat-icon-button (click)="openDialog()" matTooltip="create group" matTooltipPosition="left"
|
||||||
|
matTooltipShowDelay="500">
|
||||||
|
<mat-icon>group_add</mat-icon>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</mat-toolbar>
|
</mat-toolbar>
|
||||||
|
|
||||||
<div id="grouplist">
|
<div id="grouplist">
|
||||||
<mat-card class="group-card" *ngFor="let group of user.groups"
|
<mat-card class="group-card" *ngFor="let group of user.groups"
|
||||||
[class.selected]="group === selectedGroup" (click)="showGroupProfile(group)">
|
[class.selected]="group === selectedGroup" (click)="showGroupProfile(group)">
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<div mat-card-avatar class="group-picture"></div>
|
<div mat-card-avatar class="group-picture"></div>
|
||||||
<mat-card-title>{{group.name}}</mat-card-title>
|
<mat-card-title>{{group.name}}</mat-card-title>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
<div id="content" fxShow="true" fxHide.lt-md="true">
|
<div id="content" fxShow="true" fxHide.lt-md="true">
|
||||||
<mat-tab-group selectedIndex="0" mat-stretch-tabs id="tabs">
|
<mat-tab-group selectedIndex="0" mat-stretch-tabs id="tabs">
|
||||||
<mat-tab>
|
<mat-tab>
|
||||||
<ng-template mat-tab-label>
|
<ng-template mat-tab-label>
|
||||||
<mat-icon>people</mat-icon>
|
<mat-icon>people</mat-icon>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<div id="friendscontainer">
|
<div id="friendscontainer">
|
||||||
<social-friends></social-friends>
|
<social-friends></social-friends>
|
||||||
</div>
|
</div>
|
||||||
<social-groups id="groupscontainer"></social-groups>
|
<social-groups id="groupscontainer"></social-groups>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
<mat-tab>
|
<mat-tab>
|
||||||
<ng-template mat-tab-label>
|
<ng-template mat-tab-label>
|
||||||
<mat-icon>search</mat-icon>
|
<mat-icon>search</mat-icon>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<home-search class="tab-content"></home-search>
|
<home-search class="tab-content"></home-search>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
</mat-tab-group>
|
</mat-tab-group>
|
||||||
</div>
|
</div>
|
||||||
<div fxShow="true" fxHide.gt-sm="true">
|
<div fxShow="true" fxHide.gt-sm="true">
|
||||||
<social-friends id="friendscontainer"></social-friends>
|
<social-friends id="friendscontainer"></social-friends>
|
||||||
<social-groups id="groupscontainer"></social-groups>
|
<social-groups id="groupscontainer"></social-groups>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
<mat-card class="card" *ngFor = "let user of userList" [class.selected]="user === selectedUser" tabindex="0">
|
<mat-card class="card" *ngFor="let user of userList" [class.selected]="user === selectedUser" tabindex="0">
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<div mat-card-avatar>
|
<div mat-card-avatar>
|
||||||
<img class="profile-picture" [src]="user.profilePicture"/>
|
<img class="profile-picture" [src]="user.profilePicture"/>
|
||||||
</div>
|
</div>
|
||||||
<mat-card-title class="pointer" (click)="showUserProfile(user)">{{user.username}}</mat-card-title>
|
<mat-card-title class="pointer" (click)="showUserProfile(user)">{{user.username}}</mat-card-title>
|
||||||
<mat-card-subtitle class="pointer" (click)="showUserProfile(user)">{{user.handle}}</mat-card-subtitle>
|
<mat-card-subtitle class="pointer" (click)="showUserProfile(user)">{{user.handle}}</mat-card-subtitle>
|
||||||
<div class="icon-box">
|
<div class="icon-box">
|
||||||
<button mat-icon-button class="request-button" (click)="sendFriendRequest(user)" [disabled]="!user.allowedToSendRequest"><mat-icon>person_add</mat-icon></button>
|
<button mat-icon-button class="request-button" (click)="sendFriendRequest(user)"
|
||||||
</div>
|
[disabled]="!user.allowedToSendRequest">
|
||||||
</mat-card-header>
|
<mat-icon>person_add</mat-icon>
|
||||||
</mat-card>
|
</button>
|
||||||
|
</div>
|
||||||
|
</mat-card-header>
|
||||||
|
</mat-card>
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
export class Author {
|
export class Author {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
handle: string;
|
handle: string;
|
||||||
profilePicture: string;
|
profilePicture: string;
|
||||||
|
|
||||||
constructor(pId: number, pName: string, pHandle: string, pic: string) {
|
constructor(pId: number, pName: string, pHandle: string, pic: string) {
|
||||||
this.id = pId;
|
this.id = pId;
|
||||||
this.name = pName;
|
this.name = pName;
|
||||||
this.handle = pHandle;
|
this.handle = pHandle;
|
||||||
this.profilePicture = pic;
|
this.profilePicture = pic;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import { Chatmessage } from './chatmessage';
|
import {Chatmessage} from './chatmessage';
|
||||||
|
|
||||||
export class Chat {
|
export class Chat {
|
||||||
id: number;
|
id: number;
|
||||||
memberID: number;
|
memberID: number;
|
||||||
memberName: string;
|
memberName: string;
|
||||||
messages: Array<Chatmessage>;
|
messages: Array<Chatmessage>;
|
||||||
|
|
||||||
|
|
||||||
constructor(pId: number, pMemberID: number, pMemberName: string, pMessages: Array<Chatmessage>) {
|
constructor(pId: number, pMemberID: number, pMemberName: string, pMessages: Array<Chatmessage>) {
|
||||||
this.id = pId;
|
this.id = pId;
|
||||||
this.memberID = pMemberID;
|
this.memberID = pMemberID;
|
||||||
this.memberName = pMemberName;
|
this.memberName = pMemberName;
|
||||||
this.messages = pMessages;
|
this.messages = pMessages;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
export class Chatinfo {
|
export class Chatinfo {
|
||||||
id: string;
|
id: string;
|
||||||
date: string;
|
date: string;
|
||||||
|
|
||||||
constructor(pId: string, pDate: string) {
|
constructor(pId: string, pDate: string) {
|
||||||
this.id = pId;
|
this.id = pId;
|
||||||
this.date = pDate;
|
this.date = pDate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
export class Chatmessage {
|
export class Chatmessage {
|
||||||
content: string;
|
content: string;
|
||||||
date: string;
|
date: string;
|
||||||
myself: boolean;
|
myself: boolean;
|
||||||
|
|
||||||
constructor(pContent: string, pDate: string, pMyself: boolean) {
|
constructor(pContent: string, pDate: string, pMyself: boolean) {
|
||||||
this.content = pContent;
|
this.content = pContent;
|
||||||
this.date = pDate;
|
this.date = pDate;
|
||||||
this.myself = pMyself;
|
this.myself = pMyself;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export class Document {
|
export class Document {
|
||||||
id: string;
|
id: string;
|
||||||
doc: string;
|
doc: string;
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
export class Event {
|
export class Event {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
date: string;
|
date: string;
|
||||||
joined: boolean;
|
joined: boolean;
|
||||||
|
|
||||||
constructor(pId: string, pName: string, pdate: string, pjoined: boolean) {
|
constructor(pId: string, pName: string, pdate: string, pjoined: boolean) {
|
||||||
this.id = pId;
|
this.id = pId;
|
||||||
this.name = pName;
|
this.name = pName;
|
||||||
this.date = pdate;
|
this.date = pdate;
|
||||||
this.joined = pjoined;
|
this.joined = pjoined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,13 @@
|
|||||||
import { User } from 'src/app/models/user';
|
|
||||||
|
|
||||||
export class FriendRequest {
|
export class FriendRequest {
|
||||||
id: number;
|
id: number;
|
||||||
senderUserID: number;
|
senderUserID: number;
|
||||||
senderHandle: string;
|
senderHandle: string;
|
||||||
senderUsername: string;
|
senderUsername: string;
|
||||||
|
|
||||||
constructor(id?: number, senderUserId?: number, senderHandle?: string, senderName?: string) {
|
constructor(id?: number, senderUserId?: number, senderHandle?: string, senderName?: string) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.senderUserID = senderUserId;
|
this.senderUserID = senderUserId;
|
||||||
this.senderHandle = senderHandle;
|
this.senderHandle = senderHandle;
|
||||||
this.senderUsername = senderName;
|
this.senderUsername = senderName;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import { Levellist } from 'src/app/models/levellist';
|
import {Levellist} from 'src/app/models/levellist';
|
||||||
|
|
||||||
export class FriendInfo {
|
export class FriendInfo {
|
||||||
levellist: Levellist = new Levellist();
|
levellist: Levellist = new Levellist();
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
rankname: string;
|
rankname: string;
|
||||||
profilePicture: string;
|
profilePicture: string;
|
||||||
|
|
||||||
constructor(pId: number, pName: string, pLevel: number, pic: string) {
|
constructor(pId: number, pName: string, pLevel: number, pic: string) {
|
||||||
this.id = pId;
|
this.id = pId;
|
||||||
this.name = pName;
|
this.name = pName;
|
||||||
this.rankname = this.levellist.getLevelName(pLevel);
|
this.rankname = this.levellist.getLevelName(pLevel);
|
||||||
this.profilePicture = pic;
|
this.profilePicture = pic;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import { User } from 'src/app/models/user';
|
import {User} from 'src/app/models/user';
|
||||||
import { Event } from 'src/app/models/event';
|
import {Event} from 'src/app/models/event';
|
||||||
|
|
||||||
export class Group {
|
export class Group {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
handle: string;
|
handle: string;
|
||||||
creator: User = new User();
|
creator: User = new User();
|
||||||
members: User[] = new Array();
|
members: User[] = [];
|
||||||
admins: User[] = new Array();
|
admins: User[] = [];
|
||||||
events: Event[] = new Array();
|
events: Event[] = [];
|
||||||
joined: boolean;
|
joined: boolean;
|
||||||
allowedToJoinGroup = false;
|
allowedToJoinGroup = false;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
export class GroupInfo {
|
export class GroupInfo {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
allowedToJoinGroup = false;
|
allowedToJoinGroup = false;
|
||||||
|
|
||||||
constructor(pId: number, pName: string) {
|
constructor(pId: number, pName: string) {
|
||||||
this.id = pId;
|
this.id = pId;
|
||||||
this.name = pName;
|
this.name = pName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
import { Hash } from 'crypto';
|
|
||||||
|
|
||||||
export interface Login {
|
export interface Login {
|
||||||
email: string;
|
email: string;
|
||||||
passwordHash: string;
|
passwordHash: string;
|
||||||
}
|
}
|
||||||
|
@ -1,40 +1,40 @@
|
|||||||
import { Author } from './author';
|
import {Author} from './author';
|
||||||
import { Activity } from './activity';
|
import {Activity} from './activity';
|
||||||
|
|
||||||
export class Post {
|
export class Post {
|
||||||
id: number;
|
id: number;
|
||||||
content: string;
|
content: string;
|
||||||
htmlContent: string;
|
htmlContent: string;
|
||||||
date: string;
|
date: string;
|
||||||
upvotes: number;
|
upvotes: number;
|
||||||
downvotes: number;
|
downvotes: number;
|
||||||
userVote: string;
|
userVote: string;
|
||||||
deletable: boolean;
|
deletable: boolean;
|
||||||
author: Author;
|
author: Author;
|
||||||
activity: Activity;
|
activity: Activity;
|
||||||
|
|
||||||
// TODO: constructor properties need normal names
|
// TODO: constructor properties need normal names
|
||||||
constructor(
|
constructor(
|
||||||
pId: number,
|
pId: number,
|
||||||
pContent: string,
|
pContent: string,
|
||||||
pHtmlContent: string,
|
pHtmlContent: string,
|
||||||
pUpvotes: number,
|
pUpvotes: number,
|
||||||
pDownvotes: number,
|
pDownvotes: number,
|
||||||
pUserVote: string,
|
pUserVote: string,
|
||||||
pDeletable: boolean,
|
pDeletable: boolean,
|
||||||
pDate: string,
|
pDate: string,
|
||||||
pAuthor: Author,
|
pAuthor: Author,
|
||||||
pactivity: Activity
|
pactivity: Activity
|
||||||
) {
|
) {
|
||||||
this.id = pId;
|
this.id = pId;
|
||||||
this.content = pContent;
|
this.content = pContent;
|
||||||
this.htmlContent = pHtmlContent;
|
this.htmlContent = pHtmlContent;
|
||||||
this.upvotes = pUpvotes;
|
this.upvotes = pUpvotes;
|
||||||
this.downvotes = pDownvotes;
|
this.downvotes = pDownvotes;
|
||||||
this.userVote = pUserVote;
|
this.userVote = pUserVote;
|
||||||
this.deletable = pDeletable;
|
this.deletable = pDeletable;
|
||||||
this.date = pDate;
|
this.date = pDate;
|
||||||
this.author = pAuthor;
|
this.author = pAuthor;
|
||||||
this.activity = pactivity;
|
this.activity = pactivity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
export interface Registration {
|
export interface Registration {
|
||||||
username: string;
|
username: string;
|
||||||
email: string;
|
email: string;
|
||||||
passwordHash: string;
|
passwordHash: string;
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue