Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
1d30804
Merge branch 'tobias_jansen' of https://github.com/socialstuff-org/so…
HerrSvenson Oct 28, 2020
f2ed24e
Changed dependence and data structure on Settings Component
HerrSvenson Oct 28, 2020
b8fa4dc
Merge branch 'tobias_jansen' of https://github.com/socialstuff-org/so…
HerrSvenson Oct 28, 2020
6738f37
Merge branch 'tobias_jansen' of https://github.com/socialstuff-org/so…
HerrSvenson Oct 28, 2020
cea4260
Implemented Interface for ServerSettings in Settings Component
HerrSvenson Oct 30, 2020
b82c3eb
Merge branch 'tobias_jansen' of https://github.com/socialstuff-org/so…
HerrSvenson Oct 30, 2020
d6c4f34
Merge branch 'tobias_jansen' of https://github.com/socialstuff-org/so…
HerrSvenson Oct 30, 2020
b491c9e
Merge branch 'tobias_jansen' of https://github.com/socialstuff-org/so…
HerrSvenson Nov 6, 2020
1541350
Merge branch 'tobias_jansen' of https://github.com/socialstuff-org/so…
HerrSvenson Nov 6, 2020
6a5aea0
Merge branch 'tobias_jansen' of https://github.com/socialstuff-org/so…
HerrSvenson Nov 6, 2020
39f9a43
Merge branch 'tobias_jansen' of https://github.com/socialstuff-org/so…
HerrSvenson Nov 6, 2020
a36924d
Implemented Save Function for Security Settings, created component st…
HerrSvenson Nov 6, 2020
863d58e
Merge branch 'tobias_jansen' of https://github.com/socialstuff-org/so…
HerrSvenson Nov 6, 2020
b79756d
Merge branch 'tobias_jansen' of https://github.com/socialstuff-org/so…
HerrSvenson Nov 6, 2020
23f5982
Implemented Invite Code Section (no logic yet)
HerrSvenson Nov 9, 2020
12adaca
Finalized InviteCode (Creattion + List + logic)
HerrSvenson Nov 25, 2020
01933ce
Merge branch 'tobias_jansen' of https://github.com/socialstuff-org/so…
HerrSvenson Nov 25, 2020
a1bba1d
Merged changes from master
HerrSvenson Nov 27, 2020
49b3f76
Implemented Confirm Dialog for deleting invite codes + started workin…
HerrSvenson Dec 4, 2020
a488070
Implemented Confirm Dialog for deleting invite codes + started workin…
HerrSvenson Dec 4, 2020
b37cc36
Resolved Merge conflicts
HerrSvenson Dec 4, 2020
68422ac
Prepared for ReportReason Endpoint
HerrSvenson Dec 7, 2020
8b68bb7
REPORTREASON binding to endpoint
HerrSvenson Dec 7, 2020
a2f673a
Merge branch 'tobias_jansen' of https://github.com/socialstuff-org/so…
HerrSvenson Dec 7, 2020
8649d81
gmrg
HerrSvenson Dec 7, 2020
1a48d24
Merge branch 'tobias_jansen' of https://github.com/socialstuff-org/so…
HerrSvenson Dec 7, 2020
d32a7a5
Fixed Security Settings
HerrSvenson Dec 9, 2020
1c17727
Merge branch 'tobias_jansen' of https://github.com/socialstuff-org/so…
HerrSvenson Dec 9, 2020
e821a23
Merge branch 'tobias_jansen' of https://github.com/socialstuff-org/so…
HerrSvenson Dec 9, 2020
9fc2e91
Merge branch 'tobias_jansen' of https://github.com/socialstuff-org/so…
HerrSvenson Dec 9, 2020
13c70d9
Merge branch 'tobias_jansen' of https://github.com/socialstuff-org/so…
HerrSvenson Dec 9, 2020
e040942
Fixed delete function for invite codes
HerrSvenson Dec 9, 2020
8a4454e
Merge branch 'tobias_jansen' of https://github.com/socialstuff-org/so…
HerrSvenson Dec 9, 2020
ce0e755
Merge branch 'tobias_jansen' of https://github.com/socialstuff-org/so…
HerrSvenson Dec 9, 2020
8aaef9d
Edited Confirm Dialog
HerrSvenson Dec 11, 2020
769ab44
Merged with master
HerrSvenson Dec 14, 2020
913d97c
Fixed Deletion of ReportReason
HerrSvenson Dec 16, 2020
17098d0
Merge branch 'tobias_jansen' of https://github.com/socialstuff-org/so…
HerrSvenson Dec 16, 2020
fc5fcaf
Merged with Master
HerrSvenson Dec 16, 2020
deb9d91
Merged with Master
HerrSvenson Dec 19, 2020
d303e82
Merge branch 'master' of https://github.com/socialstuff-org/socialstu…
HerrSvenson Dec 19, 2020
9cd32cc
Merged with Master
HerrSvenson Jan 4, 2021
60ac409
Prepared for Demo
HerrSvenson Jan 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion clients/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"devDependencies": {
"@angular-builders/custom-webpack": "9.2.0",
"@angular-devkit/build-angular": "0.1000.5",
"@angular-devkit/build-angular": "0.1100.4",
"@angular-eslint/builder": "0.0.1-alpha.32",
"@angular-eslint/eslint-plugin": "0.0.1-alpha.32",
"@angular-eslint/eslint-plugin-template": "0.0.1-alpha.32",
Expand All @@ -54,6 +54,7 @@
"@types/dom-mediacapture-record": "1.0.7",
"@types/jasmine": "3.5.12",
"@types/jasminewd2": "2.0.8",
"@types/lodash": "4.14.164",
"@types/mocha": "8.0.2",
"@types/node": "12.12.6",
"@typescript-eslint/eslint-plugin": "3.9.0",
Expand Down Expand Up @@ -90,16 +91,23 @@
"node": ">=10.13.0"
},
"dependencies": {
"@angular-material-components/datetime-picker": "4.0.5",
"@angular/animations": "10.2.3",
"@angular/cdk": "10.2.0",
"@angular/forms": "^10.0.0 || ^11.0.0-0",
"@angular/material": "10.2.0",
"@socialstuff/utilities": "0.6.2",
"@trale/persistence": "0.1.7",
"@trale/transport": "0.3.2",
"deep-diff": "1.0.2",
"custom-electron-titlebar": "3.2.5",
"electron-titlebar": "0.0.3",
"idb": "5.0.6",
"lodash": "4.17.20",
"moment": "2.29.1",
"ng-inline-svg": "11.0.1",
"npm-lifecycle": "3.1.5",
"observe": "1.4.1",
"particles.js": "2.0.0",
"sweetalert2": "10.9.0",
"systeminformation": "4.27.7",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="tile-grid">
<app-information-type-tile (click)="changeTile(tileInformation.id)" [active]="activeTile === tileInformation.id" [tileInformation]="tileInformation" *ngFor="let tileInformation of tileInformations"></app-information-type-tile>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@import "../../../styles/colors";

.tile-grid {
display: inline-flex;
width: 100%;
justify-content: space-evenly;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { DashboardViewComponent } from './dashboard-view.component';

describe('DashboardViewComponent', () => {
let component: DashboardViewComponent;
let fixture: ComponentFixture<DashboardViewComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DashboardViewComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(DashboardViewComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { Component, OnInit } from '@angular/core';

/**
* This component is loaded over the router-outlet into the "SettingsView" Component. In the app-routing module it is decided, that this is the standard
* component shown when logged in as an admin. Currently it shows dummy data, in the Future it will show general information about the Usage of the SocialStuff
* Server like amount of members number of open invites and so on. It is important to consider that all the data which will be shown, will not violate privacy standards
* of the users.
*/

@Component({
selector: 'app-dashboard-view',
templateUrl: './dashboard-view.component.html',
styleUrls: ['./dashboard-view.component.scss']
})

export class DashboardViewComponent implements OnInit {

private tileInformations = [
{
name: 'Open Invites',
id: 'openInvites',
amount: 405
},
{
name: 'Number of Users',
id: 'nbUsers',
amount: 3455
},
{
name: 'Active Users',
id: 'activeUsers',
amount: 212
},
{
name: 'Reported Users',
id: 'reportedUsers',
amount: 4
}
];

private activeTile = 'openInvites';

constructor() { }

ngOnInit(): void {
}

private changeTile(id): void {
this.activeTile = id;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<div [class]="active ? 'information-tile-card selected' : 'information-tile-card'">
<span class="title">{{tileInformation.name}}</span>
<span class="amount">{{tileInformation.amount}}</span>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
@import "../../../styles/colors";

.information-tile-card {
width: 200px;
height: 100px;
background-color: $frenchRasperry;
color: $plainWhite;
text-align: center;
margin: 20px;
padding: 20px;
position: relative;
}

.information-tile-card:hover {
-webkit-box-shadow: 0px 1px 22px -5px rgba(0,0,0,0.75);
-moz-box-shadow: 0px 1px 22px -5px rgba(0,0,0,0.75);
box-shadow: 0px 1px 22px -5px rgba(0,0,0,0.75);
cursor: pointer;
}

.selected {
background-color: $green;
color: black;
}

.title {
font-size: 20px;
}

.amount {
position: absolute;
width: 100%;
text-align: center;
font-size: 40px;
bottom: 30px;
left: 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { InformationTypeTileComponent } from './information-type-tile.component';

describe('InformationTypeTileComponent', () => {
let component: InformationTypeTileComponent;
let fixture: ComponentFixture<InformationTypeTileComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ InformationTypeTileComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(InformationTypeTileComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import {Component, Input, OnInit} from '@angular/core';

@Component({
selector: 'app-information-type-tile',
templateUrl: './information-type-tile.component.html',
styleUrls: ['./information-type-tile.component.scss']
})
export class InformationTypeTileComponent implements OnInit {

constructor() { }

ngOnInit(): void {
}

@Input() tileInformation = {name: '', id: '', amount: 0};
@Input() active = false;

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

#sidenav-container {
position: absolute;
top: 60px;
bottom: 60px;
top: 100px;
bottom: 0;
left: 0;
right: 0;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Component, OnInit} from '@angular/core';
import {routesSettings} from '../../../app-routing.module';
import {routesAdmin} from '../../../app-routing.module';
import {Route} from '@angular/router';

@Component({
Expand All @@ -10,33 +10,33 @@ import {Route} from '@angular/router';

export class NavigationContainerComponent implements OnInit {

navigationItems = [];
public navigationItems = [];



private add(children: Array<Route>): Array<any> {
const items = [];
children.forEach(route => {
if (!route.data.ignore) {
const navigationItem = {
path: route.data.parent ? `${route.data.parent}/${route.path}` : route.path,
name: route.data.name,
icon: route.data.icon,
subRoutes: []
};
if (route.children) {
navigationItem.subRoutes = this.add(route.children);
}
items.push(navigationItem);
return children.filter(route => !route.data.ignore).map(route => {
const navigationItem = {
path: route.data.parent ? `${route.data.parent}/${route.path}` : route.path,
name: route.data.name,
icon: route.data.icon,
subRoutes: []
};
console.log('1: ', navigationItem);
if (route.children) {
navigationItem.subRoutes = this.add(route.children);
}
console.log('2: ', navigationItem);
return navigationItem;
});
return items;
}

constructor() { }

ngOnInit(): void {
this.navigationItems = this.add(routesSettings[0].children);
console.log(routesAdmin[0]);
this.navigationItems = this.add(routesAdmin[0].children);
console.log('HHH', this.navigationItems)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export class NavigationItemComponent implements OnInit {

constructor(location: Location, router: Router) {
router.events.subscribe(val => {
if (location.path() != '') {
if (location.path() !== '') {
this.currentRoute = location.path().split('/')[1];
} else {
this.currentRoute = 'Home';
}
};
});
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<table style="padding-top: 100px">
<tr>
<td>
Invite Code
</td>
<td>
Expiration Date
</td>
<td>
Usage Limitation
</td>
<td>
Times Used
</td>
<td></td>
</tr>
</table>
<table>
<app-invite-code-row [reload]="reload" *ngFor="let inviteCode of inviteCodes" [inviteCode]="inviteCode"></app-invite-code-row>
</table>
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
@import "../../../../../styles/colors";

table {
border-collapse: collapse;
border-spacing: 0 !important;
width: 100%;
color: $plainWhite;
table-layout: auto;
}

tr {
width: 100%;
}

td {
text-align: left;
padding: 8px;
min-width: 200px;
width: 100%;
}


.text-field {
border-radius: 50px;
background-color: $plumViolet;
padding: 15px;
color: $plainWhite;
width: 80%;
border: none;
height: 20px;
}

.search-bar::placeholder {
color: $plainWhite;
}

.save-btn {
border-radius: 50px;
border: none;
background-color: $coralRed;
color: $plainWhite;
height: 50px;
min-width: 150px;
text-transform: uppercase;
}

@keyframes spinner {
to {transform: rotate(360deg);}
}

.spinner:before {
content: '';
box-sizing: border-box;
position: absolute;
top: 50%;
left: 50%;
width: 20px;
height: 20px;
margin-top: -10px;
margin-left: -10px;
border-radius: 50%;
border: 2px solid #ffffff;
border-top-color: #000000;
animation: spinner .8s linear infinite;
}
Loading