Merge branch 'max_dev' of Software_Engineering_I/greenvironment-frontend into master

master
Trivernis 5 years ago committed by Gitea
commit 7d107b075e

@ -1,3 +1,4 @@
<div id="about">
<div id="text0" style="text-align: center;"> <div id="text0" style="text-align: center;">
<h1>Greenvironment</h1> <h1>Greenvironment</h1>
<br> <br> <br> <br> <br> <br> <br> <br> <br> <br>
@ -17,3 +18,4 @@
<br> <br>
<a mat-raised-button class="link-button" routerLink="/login">Login</a> <a mat-raised-button class="link-button" routerLink="/login">Login</a>
</div> </div>
</div>

@ -3,6 +3,12 @@
@import '~@angular/material/theming' @import '~@angular/material/theming'
@import '../../../styles/greenvironment-material-theme.scss' @import '../../../styles/greenvironment-material-theme.scss'
#about
position: fixed
width: 100%
height: calc(100% - 56px)
overflow: scroll
#text0, #text2 #text0, #text2
padding: 2em padding: 2em
max-width: 100% max-width: 100%

@ -30,7 +30,7 @@
<mat-card id="info"> <mat-card id="info">
<mat-card-header> <mat-card-header>
<mat-card-title > <mat-card-title >
You are not logged in. Do you want to post something? You need no log in to post something.
</mat-card-title> </mat-card-title>
</mat-card-header> </mat-card-header>
<mat-card-content> <mat-card-content>

@ -1,6 +1,5 @@
.mat-sidenav-container .mat-sidenav-container
margin-top: 56px height: 100vh
height: calc(100vh - 56px)
.sidenav .sidenav
width: 200px width: 200px
@ -22,6 +21,9 @@
.mat-tab-link .mat-tab-link
height: 56px height: 56px
.mat-sidenav-content
padding-top: 56px
#link-box #link-box
padding: 0.5em padding: 0.5em

@ -19,6 +19,12 @@ export class DatasharingService {
this.userInfoSource.next(pUserInfo); this.userInfoSource.next(pUserInfo);
} }
addSentRequestUserID(id: number) {
const user: User = this.userInfoSource.getValue();
user.sentRequestUserIDs.push(id);
this.changeUserInfo(user);
}
changeChatIDs(pChatIDs: number[]) { changeChatIDs(pChatIDs: number[]) {
this.chatIDsSource.next(pChatIDs); this.chatIDsSource.next(pChatIDs);
} }

@ -37,6 +37,7 @@ export class RequestService {
} }
public sendFriendRequest(user: User) { public sendFriendRequest(user: User) {
this.data.addSentRequestUserID(user.userID);
const headers = new Headers(); const headers = new Headers();
headers.set('Content-Type', 'application/json'); headers.set('Content-Type', 'application/json');
this.http.post(environment.graphQLUrl, this.buildJsonRequest(user.userID, 'FRIENDREQUEST')) this.http.post(environment.graphQLUrl, this.buildJsonRequest(user.userID, 'FRIENDREQUEST'))

1
src/typings.d.ts vendored

@ -2,3 +2,4 @@ declare module '*.svg' {
const svg: string; const svg: string;
export default svg; export default svg;
} }
Loading…
Cancel
Save