Merge branch 'master' of Software_Engineering_I/greenvironment-frontend into max_dev
commit
39cdcbd96a
@ -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>
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<!-- Name Column -->
|
<h1>Greenvironment</h1>
|
||||||
<ng-container matColumnDef="name">
|
<br> <br> <br> <br> <br>
|
||||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> action </th>
|
<h1 class="mat-display-3">Keep it clean and green!</h1>
|
||||||
<td mat-cell *matCellDef="let action"> {{action.name}} </td>
|
<button mat-icon-button>
|
||||||
</ng-container>
|
<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 -->
|
<!-- Position Column -->
|
||||||
<ng-container matColumnDef="description">
|
<ng-container matColumnDef="points">
|
||||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> description </th>
|
<th mat-header-cell *matHeaderCellDef mat-sort-header> points</th>
|
||||||
<td mat-cell *matCellDef="let action"> {{action.description}} </td>
|
<td mat-cell *matCellDef="let action"> {{action.points}} </td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
<!-- Name Column -->
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
<ng-container matColumnDef="name">
|
||||||
</table>
|
<th mat-header-cell *matHeaderCellDef mat-sort-header> action</th>
|
||||||
</div>
|
<td mat-cell *matCellDef="let action"> {{action.name}} </td>
|
||||||
<div id="text2" style="text-align: center;">
|
</ng-container>
|
||||||
<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>
|
<!-- decriotion Column -->
|
||||||
<a mat-stroked-button color="primary" class="link-button" routerLink="/register" >Register</a>
|
<ng-container matColumnDef="description">
|
||||||
<br>
|
<th mat-header-cell *matHeaderCellDef mat-sort-header> description</th>
|
||||||
<a mat-stroked-button color="primary" class="link-button" routerLink="/login">Login</a>
|
<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>
|
||||||
</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,6 +1,6 @@
|
|||||||
@import '../../../styles/mixins.sass'
|
@import '../../../styles/mixins.sass'
|
||||||
@import '../../../styles/vars.sass'
|
@import '../../../styles/vars.sass'
|
||||||
|
|
||||||
div
|
div
|
||||||
width: 100%
|
width: 100%
|
||||||
height: 100%
|
height: 100%
|
||||||
|
@ -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,58 +1,64 @@
|
|||||||
<div id="home"
|
<div id="home"
|
||||||
infinite-scroll
|
infinite-scroll
|
||||||
[infiniteScrollDistance]="0.5"
|
[infiniteScrollDistance]="0.5"
|
||||||
[scrollWindow]="false"
|
[scrollWindow]="false"
|
||||||
(scrolled)="onScroll()">
|
(scrolled)="onScroll()">
|
||||||
<div [hidden]="!loggedIn">
|
<div [hidden]="!loggedIn">
|
||||||
<mat-card >
|
<mat-card>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-form-field id="input">
|
<mat-form-field id="input">
|
||||||
<textarea matInput #content type="text" [(ngModel)]="empty" mat-autosize="true" matAutosizeMaxRows="3" placeholder="post something"></textarea>
|
<textarea matInput #content type="text" (input)="onTextInputChange()" [(ngModel)]="textInputValue"
|
||||||
|
mat-autosize="true" matAutosizeMaxRows="3" placeholder="post something"></textarea>
|
||||||
<button mat-button matSuffix mat-icon-button>
|
<button mat-button matSuffix mat-icon-button>
|
||||||
<mat-icon>add</mat-icon>
|
<mat-icon>add</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<p id="check">
|
<p id="check">
|
||||||
<mat-checkbox color="primary" [(ngModel)]="checked" checked="checked">I protected the environment.</mat-checkbox>
|
<mat-checkbox color="primary" [(ngModel)]="checked" checked="checked">I protected the environment.
|
||||||
|
</mat-checkbox>
|
||||||
</p>
|
</p>
|
||||||
<mat-form-field id="action-chooser" *ngIf="checked">
|
<mat-form-field id="action-chooser" *ngIf="checked">
|
||||||
<mat-label>What did you do?</mat-label>
|
<mat-label>What did you do?</mat-label>
|
||||||
<mat-select [(ngModel)]="activityId" name="action">
|
<mat-select [(ngModel)]="activityId" name="action">
|
||||||
<mat-option>nothing ;)</mat-option>
|
<mat-option>nothing ;)</mat-option>
|
||||||
<mat-option *ngFor="let action of actionlist.Actions" [value]="action.id" [matTooltip]="action.description" matTooltipShowDelay="200">
|
<mat-option *ngFor="let action of actionlist.Actions" [value]="action.id" [matTooltip]="action.description"
|
||||||
|
matTooltipShowDelay="200">
|
||||||
{{action.name}} ({{action.description}})
|
{{action.name}} ({{action.description}})
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<button mat-raised-button *ngIf="empty" color="primary" id="post-button" (click)=createPost(content,activityId)>
|
<mat-error *ngIf="errorOccurred && textInputValue">{{getErrorMessage()}}</mat-error>
|
||||||
|
<button mat-raised-button *ngIf="textInputValue" color="primary" id="post-button"
|
||||||
|
(click)=createPost(content,activityId)>
|
||||||
POST
|
POST
|
||||||
</button>
|
</button>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
<div [hidden]="loggedIn">
|
<div [hidden]="loggedIn">
|
||||||
<mat-card id="info">
|
<mat-card id="info">
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<mat-card-title >
|
<mat-card-title>
|
||||||
You need to <a routerLink="/login" class="primary-color">login</a> to post something.
|
You need to <a routerLink="/login" class="primary-color">login</a> to post something.
|
||||||
</mat-card-title>
|
</mat-card-title>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="chooser-div" style="text-align: center; margin-top: 1em;">
|
<div id="chooser-div" style="text-align: center; margin-top: 1em;">
|
||||||
<mat-button-toggle-group id="feedchooser" [(ngModel)]="view" value="view">
|
<mat-button-toggle-group id="feedchooser" [(ngModel)]="view" value="view">
|
||||||
<mat-button-toggle (click)="showNew()" value="new">New</mat-button-toggle>
|
<mat-button-toggle (click)="showNew()" value="new">New</mat-button-toggle>
|
||||||
<mat-button-toggle (click)="showMostLiked()" value="mostliked">Most Liked</mat-button-toggle>
|
<mat-button-toggle (click)="showMostLiked()" value="mostliked">Most Liked</mat-button-toggle>
|
||||||
</mat-button-toggle-group>
|
</mat-button-toggle-group>
|
||||||
</div>
|
</div>
|
||||||
<div id="complete-feed">
|
<div id="complete-feed">
|
||||||
<div id="feedlist">
|
<div id="feedlist">
|
||||||
<feed-postlist [childPostList]="parentSelectedPostList"></feed-postlist>
|
<feed-postlist [childPostList]="parentSelectedPostList"></feed-postlist>
|
||||||
<div style="height: 60px;" [hidden]='(!loadingNew && view === "new") || (!loadingMostLiked && view === "mostliked") '>
|
<div style="height: 60px;"
|
||||||
<!--<mat-spinner *ngIf='loadingNew && view === "mostLiked"' style="margin:0 auto; margin-top: 2em;" diameter="50"></mat-spinner>-->
|
[hidden]='(!loadingNew && view === "new") || (!loadingMostLiked && view === "mostliked") '>
|
||||||
|
<!--<mat-spinner *ngIf='loadingNew && view === "mostLiked"' style="margin:0 auto; margin-top: 2em;" diameter="50"></mat-spinner>-->
|
||||||
<mat-spinner style="margin:0 auto; margin-top: 2em;" diameter="50"></mat-spinner>
|
<mat-spinner style="margin:0 auto; margin-top: 2em;" diameter="50"></mat-spinner>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
@ -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>
|
||||||
|
@ -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="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)="fileInput.click()">
|
<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>
|
||||||
<input #fileInput type="file" accept="image/*" (change)="onFileInput($event)" style="display:none;" />
|
</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>
|
|
||||||
</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>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="profile">
|
</mat-toolbar-row>
|
||||||
|
<mat-toolbar-row>
|
||||||
<!--<table style="width:100%">
|
<div>
|
||||||
<tr>
|
<span class="info">joined on {{userProfile.joinedAt}}</span>
|
||||||
<th>points </th>
|
</div>
|
||||||
<th>action</th>
|
</mat-toolbar-row>
|
||||||
</tr>
|
</mat-toolbar>
|
||||||
<tr *ngFor= "let action of actionlist.actions">
|
<!--on big screen-->
|
||||||
<td>{{action.points}}</td>
|
<mat-toolbar id="toolbar" fxShow="true" fxHide.lt-md="true">
|
||||||
<td>{{action.name}}</td>
|
<mat-toolbar-row>
|
||||||
</tr>
|
<div class="hover-box" matTooltip="upload new picture" *ngIf="ownProfile" (click)="openFileUploadDialog()">
|
||||||
</table>-->
|
<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,76 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
||||||
|
|
||||||
<svg
|
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
width="64px"
|
|
||||||
height="64px"
|
|
||||||
viewBox="0 0 64 64"
|
|
||||||
version="1.1"
|
|
||||||
id="SVGRoot"
|
|
||||||
inkscape:version="0.92.4 5da689c313, 2019-01-14"
|
|
||||||
sodipodi:docname="gv-new-logo-white.svg">
|
|
||||||
<defs
|
|
||||||
id="defs3412" />
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="base"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#666666"
|
|
||||||
borderopacity="1.0"
|
|
||||||
inkscape:pageopacity="0.0"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
inkscape:zoom="5.656854"
|
|
||||||
inkscape:cx="-16.580479"
|
|
||||||
inkscape:cy="40.712852"
|
|
||||||
inkscape:document-units="px"
|
|
||||||
inkscape:current-layer="layer2"
|
|
||||||
showgrid="false"
|
|
||||||
inkscape:window-width="1920"
|
|
||||||
inkscape:window-height="1003"
|
|
||||||
inkscape:window-x="0"
|
|
||||||
inkscape:window-y="0"
|
|
||||||
inkscape:window-maximized="1"
|
|
||||||
inkscape:grid-bbox="true" />
|
|
||||||
<metadata
|
|
||||||
id="metadata3415">
|
|
||||||
<rdf:RDF>
|
|
||||||
<cc:Work
|
|
||||||
rdf:about="">
|
|
||||||
<dc:format>image/svg+xml</dc:format>
|
|
||||||
<dc:type
|
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
||||||
<dc:title />
|
|
||||||
</cc:Work>
|
|
||||||
</rdf:RDF>
|
|
||||||
</metadata>
|
|
||||||
<g
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer2"
|
|
||||||
inkscape:label="Layer 2"
|
|
||||||
style="display:inline">
|
|
||||||
<path
|
|
||||||
style="fill:none;stroke:#ffffff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
d="m 59.638425,10.982918 c -2.598034,1.65974 -5.164767,1.536797 -6.79245,1.598268 -1.627684,0.06147 -7.89147,-0.248912 -10.548644,-0.307359 -2.031158,-0.04467 -10.408921,-0.634292 -18.029729,3.227272 -6.189793,3.136452 -10.030686,7.78418 -11.299883,11.09567 -1.095556,2.858442 -1.721588,5.317315 -1.095556,9.896969 0.334798,2.449172 0.916715,4.631314 0.829032,5.615672 -0.07744,0.869314 0.04741,1.638006 -2.331509,4.035408 -2.3789231,2.397403 -7.5630585,6.702992 -7.5630585,6.702992"
|
|
||||||
id="path3986"
|
|
||||||
inkscape:connector-curvature="0"
|
|
||||||
sodipodi:nodetypes="csssssssc" />
|
|
||||||
<path
|
|
||||||
style="fill:none;stroke:#ffffff;stroke-width:2.81999993;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
d="m 17.040936,45.75125 c 0,0 5.71124,1.10058 9.863991,0.923511 4.152753,-0.177069 10.503177,-1.963537 14.640251,-4.074381 2.654809,-1.354554 8.010685,-4.452479 10.623857,-9.671077 1.545586,-3.086589 2.392221,-6.933871 2.615983,-8.836099 0.374688,-3.185266 0.215574,-5.492636 0.858958,-6.968217"
|
|
||||||
id="path3988"
|
|
||||||
inkscape:connector-curvature="0"
|
|
||||||
sodipodi:nodetypes="cssssc" />
|
|
||||||
<path
|
|
||||||
style="fill:none;stroke:#ffffff;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
d="m 16.515165,41.68934 c 0,0 3.942744,-4.483925 8.75,-9 3.732038,-3.505984 5.757466,-5.519577 10.967068,-8.580806 3.85598,-2.265823 12.426015,-6.277728 15.87316,-7.736136"
|
|
||||||
id="path3990"
|
|
||||||
inkscape:connector-curvature="0"
|
|
||||||
sodipodi:nodetypes="cssc" />
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 3.4 KiB |
@ -1,141 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
||||||
|
|
||||||
<svg
|
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
width="64px"
|
|
||||||
height="64px"
|
|
||||||
viewBox="0 0 64 64"
|
|
||||||
version="1.1"
|
|
||||||
id="SVGRoot"
|
|
||||||
inkscape:version="0.92.4 5da689c313, 2019-01-14"
|
|
||||||
sodipodi:docname="gv-new-logo.svg">
|
|
||||||
<defs
|
|
||||||
id="defs3412">
|
|
||||||
<linearGradient
|
|
||||||
id="linearGradient4054"
|
|
||||||
inkscape:collect="always">
|
|
||||||
<stop
|
|
||||||
id="stop4050"
|
|
||||||
offset="0"
|
|
||||||
style="stop-color:#00c088;stop-opacity:1" />
|
|
||||||
<stop
|
|
||||||
id="stop4052"
|
|
||||||
offset="1"
|
|
||||||
style="stop-color:#08ff21;stop-opacity:0.97468352" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
id="linearGradient4048"
|
|
||||||
inkscape:collect="always">
|
|
||||||
<stop
|
|
||||||
id="stop4044"
|
|
||||||
offset="0"
|
|
||||||
style="stop-color:#00c088;stop-opacity:1" />
|
|
||||||
<stop
|
|
||||||
id="stop4046"
|
|
||||||
offset="1"
|
|
||||||
style="stop-color:#08ff21;stop-opacity:0.97468352" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
id="linearGradient4005">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#00c088;stop-opacity:1"
|
|
||||||
offset="0"
|
|
||||||
id="stop4001" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#08ff21;stop-opacity:0.95358652"
|
|
||||||
offset="1"
|
|
||||||
id="stop4003" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient4054"
|
|
||||||
id="linearGradient4007"
|
|
||||||
x1="13.48775"
|
|
||||||
y1="12.73616"
|
|
||||||
x2="52.052452"
|
|
||||||
y2="47.384392"
|
|
||||||
gradientUnits="userSpaceOnUse" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient4048"
|
|
||||||
id="linearGradient4017"
|
|
||||||
x1="14.551315"
|
|
||||||
y1="10.077048"
|
|
||||||
x2="51.051678"
|
|
||||||
y2="51.531181"
|
|
||||||
gradientUnits="userSpaceOnUse" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient4005"
|
|
||||||
id="linearGradient4025"
|
|
||||||
x1="13.637479"
|
|
||||||
y1="15.156103"
|
|
||||||
x2="52.776852"
|
|
||||||
y2="46.975906"
|
|
||||||
gradientUnits="userSpaceOnUse" />
|
|
||||||
</defs>
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="base"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#666666"
|
|
||||||
borderopacity="1.0"
|
|
||||||
inkscape:pageopacity="0.0"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
inkscape:zoom="8"
|
|
||||||
inkscape:cx="-4.045925"
|
|
||||||
inkscape:cy="41.653992"
|
|
||||||
inkscape:document-units="px"
|
|
||||||
inkscape:current-layer="layer2"
|
|
||||||
showgrid="false"
|
|
||||||
inkscape:window-width="1920"
|
|
||||||
inkscape:window-height="1003"
|
|
||||||
inkscape:window-x="0"
|
|
||||||
inkscape:window-y="0"
|
|
||||||
inkscape:window-maximized="1"
|
|
||||||
inkscape:grid-bbox="true" />
|
|
||||||
<metadata
|
|
||||||
id="metadata3415">
|
|
||||||
<rdf:RDF>
|
|
||||||
<cc:Work
|
|
||||||
rdf:about="">
|
|
||||||
<dc:format>image/svg+xml</dc:format>
|
|
||||||
<dc:type
|
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
||||||
<dc:title />
|
|
||||||
</cc:Work>
|
|
||||||
</rdf:RDF>
|
|
||||||
</metadata>
|
|
||||||
<g
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer2"
|
|
||||||
inkscape:label="Layer 2"
|
|
||||||
style="display:inline">
|
|
||||||
<path
|
|
||||||
style="fill:none;stroke:url(#linearGradient4007);stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
d="m 59.638425,10.982918 c -2.598034,1.65974 -5.164767,1.536797 -6.79245,1.598268 -1.627684,0.06147 -7.89147,-0.248912 -10.548644,-0.307359 -2.031158,-0.04467 -10.408921,-0.634292 -18.029729,3.227272 -6.189793,3.136452 -10.030686,7.78418 -11.299883,11.09567 -1.095556,2.858442 -1.721588,5.317315 -1.095556,9.896969 0.334798,2.449172 0.916715,4.631314 0.829032,5.615672 -0.07744,0.869314 0.04741,1.638006 -2.331509,4.035408 -2.3789231,2.397403 -7.5630585,6.702992 -7.5630585,6.702992"
|
|
||||||
id="path3986"
|
|
||||||
inkscape:connector-curvature="0"
|
|
||||||
sodipodi:nodetypes="csssssssc" />
|
|
||||||
<path
|
|
||||||
style="fill:none;stroke:url(#linearGradient4017);stroke-width:2.81999993;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
d="m 17.040936,45.75125 c 0,0 5.71124,1.10058 9.863991,0.923511 4.152753,-0.177069 10.503177,-1.963537 14.640251,-4.074381 2.654809,-1.354554 8.010685,-4.452479 10.623857,-9.671077 1.545586,-3.086589 2.392221,-6.933871 2.615983,-8.836099 0.374688,-3.185266 0.215574,-5.492636 0.858958,-6.968217"
|
|
||||||
id="path3988"
|
|
||||||
inkscape:connector-curvature="0"
|
|
||||||
sodipodi:nodetypes="cssssc" />
|
|
||||||
<path
|
|
||||||
style="fill:none;stroke:url(#linearGradient4025);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
d="m 16.515165,41.68934 c 0,0 3.942744,-4.483925 8.75,-9 3.732038,-3.505984 5.757466,-5.519577 10.967068,-8.580806 3.85598,-2.265823 12.426015,-6.277728 15.87316,-7.736136"
|
|
||||||
id="path3990"
|
|
||||||
inkscape:connector-curvature="0"
|
|
||||||
sodipodi:nodetypes="cssc" />
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 5.2 KiB |
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
export interface IFileUploadResult {
|
||||||
|
success: boolean;
|
||||||
|
fileName?: string;
|
||||||
|
error?: string;
|
||||||
|
}
|
@ -1,6 +1,4 @@
|
|||||||
import { Hash } from 'crypto';
|
|
||||||
|
|
||||||
export interface Login {
|
export interface Login {
|
||||||
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