Merge branch 'master' into julius-dev

master
trivernis 5 years ago
commit a87236cebe

@ -39,6 +39,7 @@ export class FeedComponent implements OnInit {
}
ngOnInit() {
console.log('init feedcomponent');
this.data.currentUserInfo.subscribe(user => {
this.user = user;
this.loggedIn = user.loggedIn;

@ -1,4 +1,5 @@
<div id="content" fxShow="true" fxHide.lt-md="true">
<!--on big screen-->
<div id="content" *ngIf="media.isActive('md') || media.isActive('lg')">
<div id="chat">
<home-chatmanager [hidden]="!loggedIn"></home-chatmanager>
</div>
@ -12,14 +13,9 @@
<home-search></home-search>
</div>
</div>
<!--
<mat-tab-group headerPosition="below" position="0" id="bottom-menu" fxShow="true" fxHide.gt-sm="true">
<mat-tab label="First"> <home-chatmanager ></home-chatmanager></mat-tab>
<mat-tab label="Second"><home-feed id="feed"></home-feed></mat-tab>
<mat-tab label="Third"> <home-social ></home-social></mat-tab>
</mat-tab-group>
-->
<div class="bottom-menu" fxShow="true" fxHide.gt-sm="true">
<!--on small screen-->
<div class="bottom-menu" *ngIf="media.isActive('sm') || media.isActive('xs')">
<mat-tab-group id="tab-group" selectedIndex="1" mat-stretch-tabs headerPosition="below">
<mat-tab disabled>
<ng-template mat-tab-label>

@ -1,6 +1,6 @@
import {Component, OnInit} from '@angular/core';
import {DatasharingService} from 'src/app/services/datasharing.service';
import {FeedService} from 'src/app/services/feed/feed.service';
import { MediaObserver } from '@angular/flex-layout';
@Component({
selector: 'app-home',
@ -11,7 +11,7 @@ export class HomeComponent implements OnInit {
loggedIn: boolean;
constructor(private data: DatasharingService, private feedService: FeedService) {
constructor(private data: DatasharingService, public media: MediaObserver) {
}
ngOnInit() {

@ -3,6 +3,12 @@
.dialogFormField
width: 100%
#error
margin-top: 1em
#progress-bar
margin-top: 1em
.confirmationButton
background-color: $primary-color

@ -1,5 +1,5 @@
<div id="file-upload-dialog">
<h1 mat-dialog-title align="center">Upload a new Profile Picture!</h1>
<h1 mat-dialog-title align="center">Upload a new profile picture!</h1>
<div class="uploadDialogContent" mat-dialog-content>
<input style="display: none" id="input-file" type="file" accept="image/*" (change)="onFileInputChange($event)" #name>
<label for="input-file" class="mat-button mat-raised-button mat-primary">Choose File</label>
@ -7,9 +7,9 @@
<h2 *ngIf="localFileUrl">Preview:</h2>
<img *ngIf="localFileUrl" id="inputPreview" [src]="localFileUrl"/>
</div>
<mat-progress-bar *ngIf="uploading" mode="indeterminate"></mat-progress-bar>
<mat-progress-bar id="progress-bar" *ngIf="uploading" mode="indeterminate"></mat-progress-bar>
</div>
<mat-error *ngIf="errorOccurred">{{getErrorMessage()}}</mat-error>
<mat-error id="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>

@ -60,6 +60,7 @@ export class ProfileComponent implements OnInit {
this.userProfile = response;
// tslint:disable-next-line:max-line-length
this.userProfile.allowedToSendRequest = this.requestService.isAllowedToSendRequest(this.userProfile.userID, this.self);
console.log(this.userProfile.allowedToSendRequest);
this.ownProfile = this.userProfile.userID === this.self.userID;
this.rankname = this.levellist.getLevelName(this.userProfile.level);
} else {

@ -41,10 +41,12 @@ export class User {
this.joinedAt = userDataResponse.joinedAt;
this.friendCount = userDataResponse.friendCount;
this.groupCount = userDataResponse.groupCount;
try {
this.darkmode = !!JSON.parse(userDataResponse.settings).darkmode;
} catch (err) {
console.error(err);
if (userDataResponse.settings) {
try {
this.darkmode = !!JSON.parse(userDataResponse.settings).darkmode;
} catch (err) {
console.error(err);
}
}
if (userDataResponse.friends) {
this.friends = userDataResponse.friends

@ -19,6 +19,9 @@ export class RequestService {
if (!self.loggedIn) {
return false;
} else {
if (userID === self.userID) {
return false;
}
for (const receiverID of self.sentRequestUserIDs) {
if (userID === receiverID ||
userID === self.userID) {

@ -1,5 +1,8 @@
@mixin gridPosition($rowStart, $rowEnd, $columnStart, $columnEnd)
grid-row-start: $rowStart
grid-row-end: $rowEnd
grid-column-start: $columnStart
grid-column-end: $columnEnd
::-webkit-scrollbar
width: 4px
::-webkit-scrollbar-track
background: #ddd
::-webkit-scrollbar-thumb
background: #666

Loading…
Cancel
Save