Merge branch 'julius-dev' of Software_Engineering_I/greenvironment-frontend into master
commit
9d9d2dfbea
@ -1,72 +1,74 @@
|
||||
<div id="about">
|
||||
<div id="text0" style="text-align: center;">
|
||||
|
||||
<h1>Greenvironment</h1>
|
||||
<br> <br> <br> <br> <br>
|
||||
<h1 class="mat-display-3">Keep it clean and green!</h1>
|
||||
<button mat-icon-button>
|
||||
<mat-icon class="big-icon" color="primary">keyboard_arrow_down</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div id="text1" style="text-align: center;">
|
||||
<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>
|
||||
<br>
|
||||
<h1>What does the level mean?</h1>
|
||||
<p>There are different levels you can reach through green behaviour.
|
||||
Collect 100 points to level up! The levels are called:
|
||||
</p>
|
||||
<table mat-table [dataSource]="levelSource" class="mat-elevation-z8">
|
||||
<ng-container matColumnDef="level">
|
||||
<th mat-header-cell *matHeaderCellDef> level </th>
|
||||
<td mat-cell *matCellDef="let level"> {{level.level}} </td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef> level name </th>
|
||||
<td mat-cell *matCellDef="let level"> {{level.name}} </td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedLevelColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedLevelColumns;"></tr>
|
||||
</table>
|
||||
<br>
|
||||
<h1>How to level up?</h1>
|
||||
<p>There is an always growing list of things you can do,
|
||||
to support your environment
|
||||
and earn points to level up at the same time.
|
||||
You can get a different amount of points
|
||||
for differnet actions you can see in the list below:
|
||||
</p>
|
||||
<table mat-table [dataSource]="dataSource" matSort class="mat-elevation-z8">
|
||||
<!--- 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 -->
|
||||
<ng-container matColumnDef="points">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> points </th>
|
||||
<td mat-cell *matCellDef="let action"> {{action.points}} </td>
|
||||
</ng-container>
|
||||
<div id="text0" style="text-align: center;">
|
||||
|
||||
<!-- Name Column -->
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> action </th>
|
||||
<td mat-cell *matCellDef="let action"> {{action.name}} </td>
|
||||
</ng-container>
|
||||
<h1>Greenvironment</h1>
|
||||
<br> <br> <br> <br> <br>
|
||||
<h1 class="mat-display-3">Keep it clean and green!</h1>
|
||||
<button mat-icon-button>
|
||||
<mat-icon class="big-icon" color="primary">keyboard_arrow_down</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div id="text1" style="text-align: center;">
|
||||
<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>
|
||||
<br>
|
||||
<h1>What does the level mean?</h1>
|
||||
<p>There are different levels you can reach through green behaviour.
|
||||
Collect 100 points to level up! The levels are called:
|
||||
</p>
|
||||
<table mat-table [dataSource]="levelSource" class="mat-elevation-z8">
|
||||
<ng-container matColumnDef="level">
|
||||
<th mat-header-cell *matHeaderCellDef> level</th>
|
||||
<td mat-cell *matCellDef="let level"> {{level.level}} </td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef> level name</th>
|
||||
<td mat-cell *matCellDef="let level"> {{level.name}} </td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedLevelColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedLevelColumns;"></tr>
|
||||
</table>
|
||||
<br>
|
||||
<h1>How to level up?</h1>
|
||||
<p>There is an always growing list of things you can do,
|
||||
to support your environment
|
||||
and earn points to level up at the same time.
|
||||
You can get a different amount of points
|
||||
for differnet actions you can see in the list below:
|
||||
</p>
|
||||
<table mat-table [dataSource]="dataSource" matSort class="mat-elevation-z8">
|
||||
<!--- Note that these columns can be defined in any order.
|
||||
The actual rendered columns are set as a property on the row definition" -->
|
||||
|
||||
<!-- decriotion Column -->
|
||||
<ng-container matColumnDef="description">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> description </th>
|
||||
<td mat-cell *matCellDef="let action"> {{action.description}} </td>
|
||||
</ng-container>
|
||||
<!-- Position Column -->
|
||||
<ng-container matColumnDef="points">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> points</th>
|
||||
<td mat-cell *matCellDef="let action"> {{action.points}} </td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
</div>
|
||||
<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">You aren't part of greenvironment yet? - join us now!</p>
|
||||
<a mat-stroked-button color="primary" class="link-button" routerLink="/register" >Register</a>
|
||||
<br>
|
||||
<a mat-stroked-button color="primary" class="link-button" routerLink="/login">Login</a>
|
||||
<!-- Name Column -->
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> action</th>
|
||||
<td mat-cell *matCellDef="let action"> {{action.name}} </td>
|
||||
</ng-container>
|
||||
|
||||
<!-- decriotion Column -->
|
||||
<ng-container matColumnDef="description">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> description</th>
|
||||
<td mat-cell *matCellDef="let action"> {{action.description}} </td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
</div>
|
||||
<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">You aren't part of greenvironment yet? - join us now!</p>
|
||||
<a mat-stroked-button color="primary" class="link-button" routerLink="/register">Register</a>
|
||||
<br>
|
||||
<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='header'>
|
||||
<button id="goback" (click)="goBack()"><span><i class="fa fa-arrow-left fa-3x" aria-hidden="true"></i></span></button>
|
||||
<span class='title'>Contacts</span>
|
||||
</div>
|
||||
<div class="search-container">
|
||||
</div>
|
||||
<div class="data-container">
|
||||
<div class="contact-item" *ngFor="let contact of contactList"
|
||||
[class.selected]="contact === selectedContact" (click)="createChat(contact.id)">
|
||||
<div class="picture">Pic</div>
|
||||
<div class="name"><span>{{contact.name}}</span></div>
|
||||
</div>
|
||||
<div id='header'>
|
||||
<button id="goback" (click)="goBack()"><span><i class="fa fa-arrow-left fa-3x" aria-hidden="true"></i></span>
|
||||
</button>
|
||||
<span class='title'>Contacts</span>
|
||||
</div>
|
||||
<div class="search-container">
|
||||
</div>
|
||||
<div class="data-container">
|
||||
<div class="contact-item" *ngFor="let contact of contactList"
|
||||
[class.selected]="contact === selectedContact" (click)="createChat(contact.id)">
|
||||
<div class="picture">Pic</div>
|
||||
<div class="name"><span>{{contact.name}}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
@import '../../../styles/mixins.sass'
|
||||
@import '../../../styles/vars.sass'
|
||||
|
||||
div
|
||||
width: 100%
|
||||
height: 100%
|
||||
div
|
||||
width: 100%
|
||||
height: 100%
|
||||
|
@ -1,4 +1,5 @@
|
||||
<div class='sidenav'>
|
||||
<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>
|
||||
|
@ -1,24 +1,28 @@
|
||||
.sidenav {
|
||||
position: fixed;
|
||||
height: 100%;
|
||||
width: 220px;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: #111111;
|
||||
overflow-x: hidden;
|
||||
padding-top: 20px;
|
||||
position: fixed;
|
||||
height: 100%;
|
||||
width: 220px;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: #111111;
|
||||
overflow-x: hidden;
|
||||
padding-top: 20px;
|
||||
|
||||
span {
|
||||
padding: 6px 8px 6px 16px;
|
||||
text-decoration: none;
|
||||
font-size: 25px;
|
||||
font-family: 'Roboto', Tahoma, Geneva, Verdana, sans-serif;
|
||||
color: #818181;
|
||||
display: block;
|
||||
}.selected {
|
||||
color: #e1e1e1;
|
||||
}:hover {
|
||||
color: #f1f1f1;
|
||||
cursor: pointer;
|
||||
}
|
||||
span {
|
||||
padding: 6px 8px 6px 16px;
|
||||
text-decoration: none;
|
||||
font-size: 25px;
|
||||
font-family: 'Roboto', Tahoma, Geneva, Verdana, sans-serif;
|
||||
color: #818181;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.selected {
|
||||
color: #e1e1e1;
|
||||
}
|
||||
|
||||
:hover {
|
||||
color: #f1f1f1;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,12 @@
|
||||
textarea {
|
||||
position: fixed;
|
||||
width: calc(100% - 235px);
|
||||
height: 100%;
|
||||
right: 0;
|
||||
top: 0;
|
||||
font-size: 18pt;
|
||||
padding-top: 20px;
|
||||
resize: none;
|
||||
border: none;
|
||||
padding: 20px 0px 20px 15px;
|
||||
position: fixed;
|
||||
width: calc(100% - 235px);
|
||||
height: 100%;
|
||||
right: 0;
|
||||
top: 0;
|
||||
font-size: 18pt;
|
||||
padding-top: 20px;
|
||||
resize: none;
|
||||
border: none;
|
||||
padding: 20px 0px 20px 15px;
|
||||
}
|
||||
|
@ -1,118 +1,121 @@
|
||||
<div id="profile-page">
|
||||
<div id="profilecontainer" *ngIf="!groupNotFound && !loading">
|
||||
<!--on small screen-->
|
||||
<mat-toolbar id="toolbar" fxShow="true" fxHide.gt-sm="true">
|
||||
<mat-toolbar-row>
|
||||
<div class="profile-picture"></div>
|
||||
<span id="username">{{groupProfile.name}}</span>
|
||||
<div id="profilecontainer" *ngIf="!groupNotFound && !loading">
|
||||
<!--on small screen-->
|
||||
<mat-toolbar id="toolbar" fxShow="true" fxHide.gt-sm="true">
|
||||
<mat-toolbar-row>
|
||||
<div class="profile-picture"></div>
|
||||
<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">
|
||||
<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>
|
||||
<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-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">
|
||||
<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>
|
||||
</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 id="profilecontainer" *ngIf="groupNotFound">
|
||||
<h1>Group not found :(</h1>
|
||||
</div>
|
||||
<mat-spinner *ngIf="loading" style="margin:0 auto; margin-top: 10em;" diameter="100"></mat-spinner>
|
||||
</div>
|
||||
<div id="profilecontainer" *ngIf="groupNotFound">
|
||||
<h1>Group not found :(</h1>
|
||||
</div>
|
||||
<mat-spinner *ngIf="loading" style="margin:0 auto; margin-top: 10em;" diameter="100"></mat-spinner>
|
||||
</div>
|
||||
|
||||
|
@ -1,24 +1,25 @@
|
||||
<div id="login">
|
||||
<mat-card style="text-align: center;" >
|
||||
<mat-card-title>
|
||||
Login
|
||||
</mat-card-title>
|
||||
<mat-card-content>
|
||||
<div class="example-container" (keyup.enter)="onClickSubmit(email.value,password.value)">
|
||||
<mat-error *ngIf="errorOccurred">{{getErrorMessage()}}</mat-error>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Enter your email" #email >
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<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">
|
||||
<mat-icon>{{hide ? 'visibility_off' : 'visibility'}}</mat-icon>
|
||||
</button>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<button mat-raised-button color="primary" (click)="onClickSubmit(email.value,password.value)">Login</button>
|
||||
<p>You aren't part of greenvironment yet?</p>
|
||||
<a mat-stroked-button color="primary" routerLink="/register">Register</a>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="text-align: center;">
|
||||
<mat-card-title>
|
||||
Login
|
||||
</mat-card-title>
|
||||
<mat-card-content>
|
||||
<div class="example-container" (keyup.enter)="onClickSubmit(email.value,password.value)">
|
||||
<mat-error *ngIf="errorOccurred">{{getErrorMessage()}}</mat-error>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Enter your email" #email>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<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">
|
||||
<mat-icon>{{hide ? 'visibility_off' : 'visibility'}}</mat-icon>
|
||||
</button>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<button mat-raised-button color="primary" (click)="onClickSubmit(email.value,password.value)">Login</button>
|
||||
<p>You aren't part of greenvironment yet?</p>
|
||||
<a mat-stroked-button color="primary" routerLink="/register">Register</a>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
|
@ -0,0 +1,23 @@
|
||||
@import '../../../../styles/greenvironment-material-theme'
|
||||
|
||||
.dialogFormField
|
||||
width: 100%
|
||||
|
||||
.confirmationButton
|
||||
background-color: $primary-color
|
||||
|
||||
.uploadDialogContent
|
||||
overflow: hidden
|
||||
text-align: center
|
||||
|
||||
#inputPreview
|
||||
max-width: 75%
|
||||
max-height: 100%
|
||||
width: auto
|
||||
clip-path: circle()
|
||||
mask-mode: luminance
|
||||
|
||||
#inputPreviewWrapper
|
||||
margin: auto
|
||||
text-align: center
|
||||
max-height: 512px
|
@ -0,0 +1,79 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {MatDialogRef} from '@angular/material/dialog';
|
||||
import {SelfService} from '../../../services/selfservice/self.service';
|
||||
import {environment} from '../../../../environments/environment';
|
||||
import {BehaviorSubject} from 'rxjs';
|
||||
|
||||
@Component({
|
||||
selector: 'file-upload-dialog',
|
||||
templateUrl: 'fileUploadDialog.component.html',
|
||||
styleUrls: ['./fileUpload.component.sass'],
|
||||
})
|
||||
export class DialogFileUploadComponent {
|
||||
public errorOccurred = false;
|
||||
public uploading = false;
|
||||
private errorMessage: string;
|
||||
public profilePictureUrl: BehaviorSubject<string | null>;
|
||||
private file;
|
||||
public localFileUrl;
|
||||
|
||||
constructor(public dialogRef: MatDialogRef<DialogFileUploadComponent>, private selfService: SelfService) {
|
||||
this.profilePictureUrl = new BehaviorSubject<string | null>(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for the error message
|
||||
*/
|
||||
getErrorMessage() {
|
||||
return this.errorMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when the cancel button of the dialog is pressed
|
||||
*/
|
||||
onCancelClicked() {
|
||||
this.dialogRef.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when the ok button was pressed
|
||||
*/
|
||||
onOkClicked() {
|
||||
this.errorOccurred = false;
|
||||
this.uploading = true;
|
||||
this.selfService.changeProfilePicture(this.file).subscribe((response) => {
|
||||
this.uploading = false;
|
||||
if (response.success) {
|
||||
this.profilePictureUrl.next(environment.greenvironmentUrl + response.fileName);
|
||||
this.dialogRef.close();
|
||||
} else {
|
||||
this.errorMessage = response.error;
|
||||
this.errorOccurred = true;
|
||||
}
|
||||
}, (error) => {
|
||||
this.uploading = false;
|
||||
this.errorOccurred = true;
|
||||
console.log(error);
|
||||
if (error.error) {
|
||||
this.errorMessage = error.error.error;
|
||||
} else {
|
||||
this.errorMessage = 'Failed to upload the profile picture.';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when the input of the file select changes.
|
||||
* @param event
|
||||
*/
|
||||
onFileInputChange(event) {
|
||||
this.errorOccurred = false;
|
||||
this.errorMessage = '';
|
||||
this.file = event.target.files[0];
|
||||
const reader = new FileReader();
|
||||
reader.onload = (e: any) => {
|
||||
this.localFileUrl = e.target.result;
|
||||
};
|
||||
reader.readAsDataURL(this.file);
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
<div id="file-upload-dialog">
|
||||
<h1 mat-dialog-title align="center">Upload a new Profile picture!</h1>
|
||||
<div class="uploadDialogContent" mat-dialog-content>
|
||||
<input type="file" accept="image/*" (change)="onFileInputChange($event)" #name>
|
||||
<div id="inputPreviewWrapper">
|
||||
<h2 *ngIf="localFileUrl">Preview:</h2>
|
||||
<img *ngIf="localFileUrl" id="inputPreview" [src]="localFileUrl"/>
|
||||
</div>
|
||||
<mat-progress-bar *ngIf="uploading" mode="indeterminate"></mat-progress-bar>
|
||||
</div>
|
||||
<mat-error *ngIf="errorOccurred">{{getErrorMessage()}}</mat-error>
|
||||
<div mat-dialog-actions align="end">
|
||||
<button mat-button (click)="onCancelClicked()">Cancel</button>
|
||||
<button class="confirmationButton" mat-raised-button cdkFocusInitial (click)="onOkClicked()">Upload</button>
|
||||
</div>
|
||||
</div>
|
@ -1,97 +1,83 @@
|
||||
<div id="profile-page">
|
||||
<div id="profilecontainer" *ngIf="!profileNotFound && !loading">
|
||||
<!--on small screen-->
|
||||
<mat-toolbar id="toolbar" fxShow="true" fxHide.gt-sm="true">
|
||||
<mat-toolbar-row>
|
||||
<div class="hover-box" matTooltip="upload new picture" *ngIf="ownProfile" (click)="fileInput.click()">
|
||||
<img class="profile-picture" [src]="userProfile.profilePicture"/>
|
||||
<mat-icon id="icon">camera_alt</mat-icon>
|
||||
<input #fileInput type="file" accept="image/*" (change)="onFileInput($event)" style="display:none;" />
|
||||
</div>
|
||||
<div *ngIf="!ownProfile">
|
||||
<img class="profile-picture" [src]="userProfile.profilePicture"/>
|
||||
</div>
|
||||
|
||||
<span id="username">{{userProfile.username}}</span>
|
||||
<button mat-icon-button
|
||||
class="request-button"
|
||||
(click)="sendFriendRequest(userProfile)"
|
||||
<div id="profilecontainer" *ngIf="!profileNotFound && !loading">
|
||||
<!--on small screen-->
|
||||
<mat-toolbar id="toolbar" fxShow="true" fxHide.gt-sm="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>
|
||||
<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 id="handle">@{{userProfile.handle}}</span>
|
||||
</div>
|
||||
</mat-toolbar-row>
|
||||
<mat-toolbar-row>
|
||||
<div>
|
||||
<span class="info">{{rankname}} ({{userProfile.points}} points)</span>
|
||||
</div>
|
||||
</mat-toolbar-row>
|
||||
<mat-toolbar-row>
|
||||
<div>
|
||||
<span class="info">{{userProfile.friendCount}} friends</span>
|
||||
<span class="info">{{userProfile.groupCount}} groups</span>
|
||||
</div>
|
||||
</mat-toolbar-row>
|
||||
<mat-toolbar-row>
|
||||
<div>
|
||||
<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)="fileInput.click()">
|
||||
<img class="profile-picture" [src]="userProfile.profilePicture"/>
|
||||
<mat-icon id="icon">camera_alt</mat-icon>
|
||||
<input #fileInput type="file" accept="image/*" (change)="onFileInput($event)" style="display:none;" />
|
||||
</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>
|
||||
<mat-icon>person_add</mat-icon>
|
||||
</button>
|
||||
</mat-toolbar-row>
|
||||
<mat-toolbar-row>
|
||||
<div class="info-box">
|
||||
<span id="handle">@{{userProfile.handle}}</span>
|
||||
</div>
|
||||
</mat-toolbar-row>
|
||||
<mat-toolbar-row>
|
||||
<div>
|
||||
<span class="info">{{rankname}} ({{userProfile.points}} points)</span>
|
||||
</div>
|
||||
</mat-toolbar-row>
|
||||
<mat-toolbar-row>
|
||||
<div>
|
||||
<span class="info">{{userProfile.friendCount}} friends</span>
|
||||
<span class="info">{{userProfile.groupCount}} groups</span>
|
||||
</div>
|
||||
<div id="profile">
|
||||
|
||||
<!--<table style="width:100%">
|
||||
<tr>
|
||||
<th>points </th>
|
||||
<th>action</th>
|
||||
</tr>
|
||||
<tr *ngFor= "let action of actionlist.actions">
|
||||
<td>{{action.points}}</td>
|
||||
<td>{{action.name}}</td>
|
||||
</tr>
|
||||
</table>-->
|
||||
</mat-toolbar-row>
|
||||
<mat-toolbar-row>
|
||||
<div>
|
||||
<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 id="profilecontainer" *ngIf="profileNotFound">
|
||||
<h1>Profile not found :(</h1>
|
||||
<div id="profile">
|
||||
</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>
|
||||
|
||||
|
@ -1,33 +1,38 @@
|
||||
<div id="register">
|
||||
<mat-card style="text-align: center;" >
|
||||
<mat-card-title>
|
||||
Register
|
||||
</mat-card-title>
|
||||
<mat-card-content>
|
||||
<div class="example-container" (keyup.enter)="onClickSubmit(username.value,email.value,password.value, repeatpassword.value)">
|
||||
<mat-card style="text-align: center;">
|
||||
<mat-card-title>
|
||||
Register
|
||||
</mat-card-title>
|
||||
<mat-card-content>
|
||||
<div class="example-container"
|
||||
(keyup.enter)="onClickSubmit(username.value,email.value,password.value, repeatpassword.value)">
|
||||
<mat-error *ngIf="errorOccurred">{{errorMessage}}</mat-error>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Enter your email" #email >
|
||||
<input matInput placeholder="Enter your email" #email>
|
||||
</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>
|
||||
<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">
|
||||
<mat-icon>{{hide1 ? 'visibility_off' : 'visibility'}}</mat-icon>
|
||||
<button mat-icon-button matSuffix (click)="hide1 = !hide1" [attr.aria-label]="'Hide password'"
|
||||
[attr.aria-pressed]="hide1">
|
||||
<mat-icon>{{hide1 ? 'visibility_off' : 'visibility'}}</mat-icon>
|
||||
</button>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<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">
|
||||
<mat-icon>{{hide2 ? 'visibility_off' : 'visibility'}}</mat-icon>
|
||||
<button mat-icon-button matSuffix (click)="hide2 = !hide2" [attr.aria-label]="'Hide password'"
|
||||
[attr.aria-pressed]="hide2">
|
||||
<mat-icon>{{hide2 ? 'visibility_off' : 'visibility'}}</mat-icon>
|
||||
</button>
|
||||
</mat-form-field>
|
||||
</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>
|
||||
<a mat-stroked-button color="primary" routerLink="/login">Login</a>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,16 +1,19 @@
|
||||
<mat-toolbar>
|
||||
<span>Groups</span>
|
||||
<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>
|
||||
</mat-toolbar>
|
||||
|
||||
<div id="grouplist">
|
||||
<mat-card class="group-card" *ngFor="let group of user.groups"
|
||||
[class.selected]="group === selectedGroup" (click)="showGroupProfile(group)">
|
||||
<mat-card-header>
|
||||
<div mat-card-avatar class="group-picture"></div>
|
||||
<mat-card-title>{{group.name}}</mat-card-title>
|
||||
</mat-card-header>
|
||||
</mat-card>
|
||||
<mat-card class="group-card" *ngFor="let group of user.groups"
|
||||
[class.selected]="group === selectedGroup" (click)="showGroupProfile(group)">
|
||||
<mat-card-header>
|
||||
<div mat-card-avatar class="group-picture"></div>
|
||||
<mat-card-title>{{group.name}}</mat-card-title>
|
||||
</mat-card-header>
|
||||
</mat-card>
|
||||
</div>
|
||||
|
@ -1,25 +1,25 @@
|
||||
<div id="content" fxShow="true" fxHide.lt-md="true">
|
||||
<mat-tab-group selectedIndex="0" mat-stretch-tabs id="tabs">
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>
|
||||
<mat-icon>people</mat-icon>
|
||||
</ng-template>
|
||||
<div id="friendscontainer">
|
||||
<social-friends></social-friends>
|
||||
</div>
|
||||
<social-groups id="groupscontainer"></social-groups>
|
||||
</mat-tab>
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>
|
||||
<mat-icon>search</mat-icon>
|
||||
</ng-template>
|
||||
<home-search class="tab-content"></home-search>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
<mat-tab-group selectedIndex="0" mat-stretch-tabs id="tabs">
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>
|
||||
<mat-icon>people</mat-icon>
|
||||
</ng-template>
|
||||
<div id="friendscontainer">
|
||||
<social-friends></social-friends>
|
||||
</div>
|
||||
<social-groups id="groupscontainer"></social-groups>
|
||||
</mat-tab>
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>
|
||||
<mat-icon>search</mat-icon>
|
||||
</ng-template>
|
||||
<home-search class="tab-content"></home-search>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</div>
|
||||
<div fxShow="true" fxHide.gt-sm="true">
|
||||
<social-friends id="friendscontainer"></social-friends>
|
||||
<social-groups id="groupscontainer"></social-groups>
|
||||
<social-friends id="friendscontainer"></social-friends>
|
||||
<social-groups id="groupscontainer"></social-groups>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -1,12 +1,15 @@
|
||||
<mat-card class="card" *ngFor = "let user of userList" [class.selected]="user === selectedUser" tabindex="0">
|
||||
<mat-card-header>
|
||||
<div mat-card-avatar>
|
||||
<img class="profile-picture" [src]="user.profilePicture"/>
|
||||
</div>
|
||||
<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>
|
||||
<div class="icon-box">
|
||||
<button mat-icon-button class="request-button" (click)="sendFriendRequest(user)" [disabled]="!user.allowedToSendRequest"><mat-icon>person_add</mat-icon></button>
|
||||
</div>
|
||||
</mat-card-header>
|
||||
</mat-card>
|
||||
<mat-card class="card" *ngFor="let user of userList" [class.selected]="user === selectedUser" tabindex="0">
|
||||
<mat-card-header>
|
||||
<div mat-card-avatar>
|
||||
<img class="profile-picture" [src]="user.profilePicture"/>
|
||||
</div>
|
||||
<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>
|
||||
<div class="icon-box">
|
||||
<button mat-icon-button class="request-button" (click)="sendFriendRequest(user)"
|
||||
[disabled]="!user.allowedToSendRequest">
|
||||
<mat-icon>person_add</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-header>
|
||||
</mat-card>
|
||||
|
@ -1,13 +1,13 @@
|
||||
export class Author {
|
||||
id: number;
|
||||
name: string;
|
||||
handle: string;
|
||||
profilePicture: string;
|
||||
id: number;
|
||||
name: string;
|
||||
handle: string;
|
||||
profilePicture: string;
|
||||
|
||||
constructor(pId: number, pName: string, pHandle: string, pic: string) {
|
||||
this.id = pId;
|
||||
this.name = pName;
|
||||
this.handle = pHandle;
|
||||
this.profilePicture = pic;
|
||||
}
|
||||
constructor(pId: number, pName: string, pHandle: string, pic: string) {
|
||||
this.id = pId;
|
||||
this.name = pName;
|
||||
this.handle = pHandle;
|
||||
this.profilePicture = pic;
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +1,16 @@
|
||||
import { Chatmessage } from './chatmessage';
|
||||
import {Chatmessage} from './chatmessage';
|
||||
|
||||
export class Chat {
|
||||
id: number;
|
||||
memberID: number;
|
||||
memberName: string;
|
||||
messages: Array<Chatmessage>;
|
||||
id: number;
|
||||
memberID: number;
|
||||
memberName: string;
|
||||
messages: Array<Chatmessage>;
|
||||
|
||||
|
||||
constructor(pId: number, pMemberID: number, pMemberName: string, pMessages: Array<Chatmessage>) {
|
||||
this.id = pId;
|
||||
this.memberID = pMemberID;
|
||||
this.memberName = pMemberName;
|
||||
this.messages = pMessages;
|
||||
}
|
||||
constructor(pId: number, pMemberID: number, pMemberName: string, pMessages: Array<Chatmessage>) {
|
||||
this.id = pId;
|
||||
this.memberID = pMemberID;
|
||||
this.memberName = pMemberName;
|
||||
this.messages = pMessages;
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
export class Chatinfo {
|
||||
id: string;
|
||||
date: string;
|
||||
id: string;
|
||||
date: string;
|
||||
|
||||
constructor(pId: string, pDate: string) {
|
||||
this.id = pId;
|
||||
this.date = pDate;
|
||||
}
|
||||
constructor(pId: string, pDate: string) {
|
||||
this.id = pId;
|
||||
this.date = pDate;
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
export class Chatmessage {
|
||||
content: string;
|
||||
date: string;
|
||||
myself: boolean;
|
||||
content: string;
|
||||
date: string;
|
||||
myself: boolean;
|
||||
|
||||
constructor(pContent: string, pDate: string, pMyself: boolean) {
|
||||
this.content = pContent;
|
||||
this.date = pDate;
|
||||
this.myself = pMyself;
|
||||
}
|
||||
constructor(pContent: string, pDate: string, pMyself: boolean) {
|
||||
this.content = pContent;
|
||||
this.date = pDate;
|
||||
this.myself = pMyself;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
export class Document {
|
||||
id: string;
|
||||
doc: string;
|
||||
id: string;
|
||||
doc: string;
|
||||
}
|
||||
|
@ -1,13 +1,13 @@
|
||||
export class Event {
|
||||
id: string;
|
||||
name: string;
|
||||
date: string;
|
||||
joined: boolean;
|
||||
id: string;
|
||||
name: string;
|
||||
date: string;
|
||||
joined: boolean;
|
||||
|
||||
constructor(pId: string, pName: string, pdate: string, pjoined: boolean) {
|
||||
this.id = pId;
|
||||
this.name = pName;
|
||||
this.date = pdate;
|
||||
this.joined = pjoined;
|
||||
}
|
||||
constructor(pId: string, pName: string, pdate: string, pjoined: boolean) {
|
||||
this.id = pId;
|
||||
this.name = pName;
|
||||
this.date = pdate;
|
||||
this.joined = pjoined;
|
||||
}
|
||||
}
|
||||
|
@ -1,15 +1,13 @@
|
||||
import { User } from 'src/app/models/user';
|
||||
|
||||
export class FriendRequest {
|
||||
id: number;
|
||||
senderUserID: number;
|
||||
senderHandle: string;
|
||||
senderUsername: string;
|
||||
id: number;
|
||||
senderUserID: number;
|
||||
senderHandle: string;
|
||||
senderUsername: string;
|
||||
|
||||
constructor(id?: number, senderUserId?: number, senderHandle?: string, senderName?: string) {
|
||||
this.id = id;
|
||||
this.senderUserID = senderUserId;
|
||||
this.senderHandle = senderHandle;
|
||||
this.senderUsername = senderName;
|
||||
}
|
||||
constructor(id?: number, senderUserId?: number, senderHandle?: string, senderName?: string) {
|
||||
this.id = id;
|
||||
this.senderUserID = senderUserId;
|
||||
this.senderHandle = senderHandle;
|
||||
this.senderUsername = senderName;
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +1,16 @@
|
||||
import { Levellist } from 'src/app/models/levellist';
|
||||
import {Levellist} from 'src/app/models/levellist';
|
||||
|
||||
export class FriendInfo {
|
||||
levellist: Levellist = new Levellist();
|
||||
id: number;
|
||||
name: string;
|
||||
rankname: string;
|
||||
profilePicture: string;
|
||||
levellist: Levellist = new Levellist();
|
||||
id: number;
|
||||
name: string;
|
||||
rankname: string;
|
||||
profilePicture: string;
|
||||
|
||||
constructor(pId: number, pName: string, pLevel: number, pic: string) {
|
||||
this.id = pId;
|
||||
this.name = pName;
|
||||
this.rankname = this.levellist.getLevelName(pLevel);
|
||||
this.profilePicture = pic;
|
||||
}
|
||||
constructor(pId: number, pName: string, pLevel: number, pic: string) {
|
||||
this.id = pId;
|
||||
this.name = pName;
|
||||
this.rankname = this.levellist.getLevelName(pLevel);
|
||||
this.profilePicture = pic;
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,14 @@
|
||||
import { User } from 'src/app/models/user';
|
||||
import { Event } from 'src/app/models/event';
|
||||
import {User} from 'src/app/models/user';
|
||||
import {Event} from 'src/app/models/event';
|
||||
|
||||
export class Group {
|
||||
id: number;
|
||||
name: string;
|
||||
handle: string;
|
||||
creator: User = new User();
|
||||
members: User[] = new Array();
|
||||
admins: User[] = new Array();
|
||||
events: Event[] = new Array();
|
||||
members: User[] = [];
|
||||
admins: User[] = [];
|
||||
events: Event[] = [];
|
||||
joined: boolean;
|
||||
allowedToJoinGroup = false;
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
export class GroupInfo {
|
||||
id: number;
|
||||
name: string;
|
||||
allowedToJoinGroup = false;
|
||||
id: number;
|
||||
name: string;
|
||||
allowedToJoinGroup = false;
|
||||
|
||||
constructor(pId: number, pName: string) {
|
||||
this.id = pId;
|
||||
this.name = pName;
|
||||
}
|
||||
constructor(pId: number, pName: string) {
|
||||
this.id = pId;
|
||||
this.name = pName;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,5 @@
|
||||
export interface IFileUploadResult {
|
||||
success: boolean;
|
||||
fileName?: string;
|
||||
error?: string;
|
||||
}
|
@ -1,6 +1,4 @@
|
||||
import { Hash } from 'crypto';
|
||||
|
||||
export interface Login {
|
||||
email: string;
|
||||
passwordHash: string;
|
||||
}
|
||||
email: string;
|
||||
passwordHash: string;
|
||||
}
|
||||
|
@ -1,40 +1,40 @@
|
||||
import { Author } from './author';
|
||||
import { Activity } from './activity';
|
||||
import {Author} from './author';
|
||||
import {Activity} from './activity';
|
||||
|
||||
export class Post {
|
||||
id: number;
|
||||
content: string;
|
||||
htmlContent: string;
|
||||
date: string;
|
||||
upvotes: number;
|
||||
downvotes: number;
|
||||
userVote: string;
|
||||
deletable: boolean;
|
||||
author: Author;
|
||||
activity: Activity;
|
||||
id: number;
|
||||
content: string;
|
||||
htmlContent: string;
|
||||
date: string;
|
||||
upvotes: number;
|
||||
downvotes: number;
|
||||
userVote: string;
|
||||
deletable: boolean;
|
||||
author: Author;
|
||||
activity: Activity;
|
||||
|
||||
// TODO: constructor properties need normal names
|
||||
constructor(
|
||||
pId: number,
|
||||
pContent: string,
|
||||
pHtmlContent: string,
|
||||
pUpvotes: number,
|
||||
pDownvotes: number,
|
||||
pUserVote: string,
|
||||
pDeletable: boolean,
|
||||
pDate: string,
|
||||
pAuthor: Author,
|
||||
pactivity: Activity
|
||||
) {
|
||||
this.id = pId;
|
||||
this.content = pContent;
|
||||
this.htmlContent = pHtmlContent;
|
||||
this.upvotes = pUpvotes;
|
||||
this.downvotes = pDownvotes;
|
||||
this.userVote = pUserVote;
|
||||
this.deletable = pDeletable;
|
||||
this.date = pDate;
|
||||
this.author = pAuthor;
|
||||
this.activity = pactivity;
|
||||
}
|
||||
// TODO: constructor properties need normal names
|
||||
constructor(
|
||||
pId: number,
|
||||
pContent: string,
|
||||
pHtmlContent: string,
|
||||
pUpvotes: number,
|
||||
pDownvotes: number,
|
||||
pUserVote: string,
|
||||
pDeletable: boolean,
|
||||
pDate: string,
|
||||
pAuthor: Author,
|
||||
pactivity: Activity
|
||||
) {
|
||||
this.id = pId;
|
||||
this.content = pContent;
|
||||
this.htmlContent = pHtmlContent;
|
||||
this.upvotes = pUpvotes;
|
||||
this.downvotes = pDownvotes;
|
||||
this.userVote = pUserVote;
|
||||
this.deletable = pDeletable;
|
||||
this.date = pDate;
|
||||
this.author = pAuthor;
|
||||
this.activity = pactivity;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
export interface Registration {
|
||||
username: string;
|
||||
email: string;
|
||||
passwordHash: string;
|
||||
}
|
||||
username: string;
|
||||
email: string;
|
||||
passwordHash: string;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue