Clear Master
parent
7df45a835f
commit
9ce7a7596b
@ -1,4 +0,0 @@
|
|||||||
<!--<app-login id="login"></app-login>-->
|
|
||||||
<registration id="register"></registration>
|
|
||||||
<!--<app-imprint id="imprint"></app-imprint>-->
|
|
||||||
<!--<app-about id="about"></app-about>-->
|
|
@ -1,37 +0,0 @@
|
|||||||
@import '../styles/mixins.sass'
|
|
||||||
@import '../styles/vars.sass'
|
|
||||||
|
|
||||||
#content
|
|
||||||
grid-template: 7.5% 92.5% / 25% 50% 25%
|
|
||||||
display: grid
|
|
||||||
min-height: 100vh
|
|
||||||
max-height: 100vh
|
|
||||||
|
|
||||||
#imprint
|
|
||||||
background-color: $cSecondaryBackground
|
|
||||||
grid-template: 15% 70% 15% / 15% 70% 15%
|
|
||||||
display: grid
|
|
||||||
min-height: 100vh
|
|
||||||
max-height: 100vh
|
|
||||||
|
|
||||||
#about
|
|
||||||
background-color: $cSecondaryBackground
|
|
||||||
grid-template: 15% 70% 15% / 15% 70% 15%
|
|
||||||
display: grid
|
|
||||||
min-height: 100vh
|
|
||||||
max-height: 100vh
|
|
||||||
|
|
||||||
#login
|
|
||||||
background-color: $cSecondaryBackground
|
|
||||||
grid-template: 15% 70% 15% / 15% 70% 15%
|
|
||||||
display: grid
|
|
||||||
min-height: 100vh
|
|
||||||
max-height: 100vh
|
|
||||||
|
|
||||||
#register
|
|
||||||
background-color: $cSecondaryBackground
|
|
||||||
grid-template: 15% 70% 15% / 15% 70% 15%
|
|
||||||
display: grid
|
|
||||||
min-height: 100vh
|
|
||||||
max-height: 100vh
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
import { TestBed, async } from '@angular/core/testing';
|
|
||||||
import { AppComponent } from './app.component';
|
|
||||||
|
|
||||||
describe('AppComponent', () => {
|
|
||||||
beforeEach(async(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [
|
|
||||||
AppComponent
|
|
||||||
],
|
|
||||||
}).compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
it('should create the app', () => {
|
|
||||||
const fixture = TestBed.createComponent(AppComponent);
|
|
||||||
const app = fixture.debugElement.componentInstance;
|
|
||||||
expect(app).toBeTruthy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should have as title 'socket-app'`, () => {
|
|
||||||
const fixture = TestBed.createComponent(AppComponent);
|
|
||||||
const app = fixture.debugElement.componentInstance;
|
|
||||||
expect(app.title).toEqual('socket-app');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render title in a h1 tag', () => {
|
|
||||||
const fixture = TestBed.createComponent(AppComponent);
|
|
||||||
fixture.detectChanges();
|
|
||||||
const compiled = fixture.debugElement.nativeElement;
|
|
||||||
expect(compiled.querySelector('h1').textContent).toContain('Welcome to socket-app!');
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,14 +0,0 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
import { RegisterService } from './services/register/register.service';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-root',
|
|
||||||
templateUrl: './app.component.html',
|
|
||||||
styleUrls: ['./app.component.sass'],
|
|
||||||
providers: [RegisterService]
|
|
||||||
})
|
|
||||||
export class AppComponent implements OnInit {
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit() { }
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
import { BrowserModule } from '@angular/platform-browser';
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { FormsModule } from '@angular/forms';
|
|
||||||
import { SocketIoModule, SocketIoConfig } from 'ngx-socket-io';
|
|
||||||
import { HttpModule } from '@angular/http';
|
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
|
||||||
import { DocumentListComponent } from './components/document-list/document-list.component';
|
|
||||||
import { DocumentComponent } from './components/document/document.component';
|
|
||||||
import { RegisterComponent } from './components/register/register.component';
|
|
||||||
import { LoginComponent } from './components/login/login.component';
|
|
||||||
import { AppScaffoldComponent } from './components/app-scaffold/app-scaffold.component';
|
|
||||||
import { ChatComponent } from './components/chat/chat.component';
|
|
||||||
import { FriendsComponent } from './components/social/friends/friends.component';
|
|
||||||
import { FeedComponent } from './components/feed/feed.component';
|
|
||||||
import { HomeComponent } from './components/home/home.component';
|
|
||||||
import { SocialComponent } from './components/social/social.component';
|
|
||||||
import { GroupsComponent } from './components/social/groups/groups.component';
|
|
||||||
import { ImprintComponent } from './components/imprint/imprint.component';
|
|
||||||
import { AboutComponent } from './components/about/about.component';
|
|
||||||
|
|
||||||
const config: SocketIoConfig = { url: 'http://localhost:4444', options: {} };
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [
|
|
||||||
AppComponent,
|
|
||||||
DocumentListComponent,
|
|
||||||
DocumentComponent,
|
|
||||||
RegisterComponent,
|
|
||||||
LoginComponent,
|
|
||||||
ImprintComponent,
|
|
||||||
AboutComponent,
|
|
||||||
AppScaffoldComponent,
|
|
||||||
ChatComponent,
|
|
||||||
FriendsComponent,
|
|
||||||
FeedComponent,
|
|
||||||
HomeComponent,
|
|
||||||
SocialComponent,
|
|
||||||
GroupsComponent
|
|
||||||
],
|
|
||||||
imports: [
|
|
||||||
BrowserModule,
|
|
||||||
HttpModule,
|
|
||||||
FormsModule,
|
|
||||||
SocketIoModule.forRoot(config)
|
|
||||||
],
|
|
||||||
providers: [],
|
|
||||||
bootstrap: [AppComponent]
|
|
||||||
})
|
|
||||||
export class AppModule { }
|
|
@ -1,10 +0,0 @@
|
|||||||
@import '../../../styles/mixins.sass'
|
|
||||||
@import '../../../styles/vars.sass'
|
|
||||||
|
|
||||||
#aboutcontainer
|
|
||||||
@include gridPosition(2, 2,2,2)
|
|
||||||
background-color: $cPrimaryBackground
|
|
||||||
input
|
|
||||||
margin: 0.25em
|
|
||||||
#header
|
|
||||||
@include gridPosition(1, 2, 1, 2)
|
|
@ -1,25 +0,0 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { AboutComponent } from './about.component';
|
|
||||||
|
|
||||||
describe('AboutComponent', () => {
|
|
||||||
let component: AboutComponent;
|
|
||||||
let fixture: ComponentFixture<AboutComponent>;
|
|
||||||
|
|
||||||
beforeEach(async(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [ AboutComponent ]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(AboutComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,15 +0,0 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-about',
|
|
||||||
templateUrl: './about.component.html',
|
|
||||||
styleUrls: ['./about.component.sass']
|
|
||||||
})
|
|
||||||
export class AboutComponent implements OnInit {
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
<h1>Greenvironment</h1>
|
|
||||||
<button id="tab-home">Home</button>
|
|
||||||
<button id="tab-profile">Profile</button>
|
|
||||||
<button id="tab-rank">Rank</button>
|
|
||||||
<button id="logoutbutton">Log out</button>
|
|
@ -1,37 +0,0 @@
|
|||||||
@import '../../../styles/mixins.sass'
|
|
||||||
@import '../../../styles/vars.sass'
|
|
||||||
|
|
||||||
button
|
|
||||||
border: 2px solid $cHeadPrimaryBackground
|
|
||||||
margin-top: 0.125em
|
|
||||||
padding: 0.125em
|
|
||||||
background-color: $cHeadPrimaryBackground
|
|
||||||
color: $cHeadFontColor
|
|
||||||
font-weight: bold
|
|
||||||
transition-duration: 0.25s
|
|
||||||
|
|
||||||
button:hover
|
|
||||||
background-color: lighten($cHeadPrimaryBackground, 10%)
|
|
||||||
cursor: pointer
|
|
||||||
|
|
||||||
button:active
|
|
||||||
background-color: darken($cHeadPrimaryBackground, 5%)
|
|
||||||
box-shadow: inset 0.25em 0.25em 0.1em rgba(0, 0, 0, 0.25)
|
|
||||||
|
|
||||||
h1
|
|
||||||
@include gridPosition(1, 2, 1, 2)
|
|
||||||
line-height: 100%
|
|
||||||
margin-left: 0.5em
|
|
||||||
margin-top: 0.25em
|
|
||||||
|
|
||||||
#tab-home
|
|
||||||
@include gridPosition(1, 2, 2, 3)
|
|
||||||
|
|
||||||
#tab-profile
|
|
||||||
@include gridPosition(1, 2, 3, 4)
|
|
||||||
|
|
||||||
#tab-rank
|
|
||||||
@include gridPosition(1, 2, 4, 5)
|
|
||||||
|
|
||||||
#logoutbutton
|
|
||||||
@include gridPosition(1, 2, 8, 9)
|
|
@ -1,25 +0,0 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { AppScaffoldComponent } from './app-scaffold.component';
|
|
||||||
|
|
||||||
describe('AppScaffoldComponent', () => {
|
|
||||||
let component: AppScaffoldComponent;
|
|
||||||
let fixture: ComponentFixture<AppScaffoldComponent>;
|
|
||||||
|
|
||||||
beforeEach(async(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [ AppScaffoldComponent ]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(AppScaffoldComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,15 +0,0 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-scaffold',
|
|
||||||
templateUrl: './app-scaffold.component.html',
|
|
||||||
styleUrls: ['./app-scaffold.component.sass']
|
|
||||||
})
|
|
||||||
export class AppScaffoldComponent implements OnInit {
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
<div id="header">
|
|
||||||
<span class="title">Chats</span>
|
|
||||||
<button id="newchat" type="submit"><span><i class="fa fa-plus fa-3x" aria-hidden="true"></i></span></button>
|
|
||||||
</div>
|
|
||||||
<div id="chats">
|
|
||||||
<div class="chatitem">
|
|
||||||
<div class="title"> <span>Name</span></div>
|
|
||||||
<div class="date"> <a>Datum</a></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,59 +0,0 @@
|
|||||||
@import '../../../styles/mixins.sass'
|
|
||||||
@import '../../../styles/vars.sass'
|
|
||||||
|
|
||||||
#header
|
|
||||||
@include gridPosition(1, 2, 1, 2)
|
|
||||||
background-color: $cBoxHeaderBackground
|
|
||||||
display: grid
|
|
||||||
grid-template: 100% /80% 20%
|
|
||||||
|
|
||||||
span
|
|
||||||
color: $cFontWhite
|
|
||||||
span.title
|
|
||||||
@include gridPosition(1, 2, 1, 2)
|
|
||||||
margin-top: 0.25em
|
|
||||||
margin-left: 0.25em
|
|
||||||
line-height: 100%
|
|
||||||
font-size: 2em
|
|
||||||
|
|
||||||
button
|
|
||||||
background-color: $cBoxHeaderBackground
|
|
||||||
border: none
|
|
||||||
|
|
||||||
button:hover
|
|
||||||
background-color: lighten($cBoxHeaderBackground, 10%)
|
|
||||||
cursor: pointer
|
|
||||||
|
|
||||||
button:active
|
|
||||||
background-color: darken($cBoxHeaderBackground, 5%)
|
|
||||||
|
|
||||||
#newchat
|
|
||||||
@include gridPosition(1, 2, 2, 3)
|
|
||||||
|
|
||||||
#chats
|
|
||||||
overflow: auto
|
|
||||||
@include gridPosition(2, 3, 1, 2)
|
|
||||||
|
|
||||||
.chatitem
|
|
||||||
background-color: $cPrimaryBackground
|
|
||||||
height: 3em
|
|
||||||
margin: 0.2em
|
|
||||||
padding: 0.25em
|
|
||||||
border-radius: 0.25em
|
|
||||||
border: solid
|
|
||||||
display: flex;
|
|
||||||
.title, .date
|
|
||||||
margin: auto
|
|
||||||
.title
|
|
||||||
font-weight: bold
|
|
||||||
text-align: left
|
|
||||||
border: solid
|
|
||||||
width: 60%
|
|
||||||
padding-left: 1em
|
|
||||||
span
|
|
||||||
font-size: 125%
|
|
||||||
.date
|
|
||||||
color: $cInactiveText
|
|
||||||
text-align: right
|
|
||||||
border: solid
|
|
||||||
width: 40%
|
|
@ -1,25 +0,0 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { ChatComponent } from './chat.component';
|
|
||||||
|
|
||||||
describe('ChatComponent', () => {
|
|
||||||
let component: ChatComponent;
|
|
||||||
let fixture: ComponentFixture<ChatComponent>;
|
|
||||||
|
|
||||||
beforeEach(async(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [ ChatComponent ]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(ChatComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,15 +0,0 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'home-chat',
|
|
||||||
templateUrl: './chat.component.html',
|
|
||||||
styleUrls: ['./chat.component.sass']
|
|
||||||
})
|
|
||||||
export class ChatComponent implements OnInit {
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
<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>
|
|
||||||
</div>
|
|
@ -1,24 +0,0 @@
|
|||||||
.sidenav {
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { DocumentListComponent } from './document-list.component';
|
|
||||||
|
|
||||||
describe('DocumentListComponent', () => {
|
|
||||||
let component: DocumentListComponent;
|
|
||||||
let fixture: ComponentFixture<DocumentListComponent>;
|
|
||||||
|
|
||||||
beforeEach(async(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [ DocumentListComponent ]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(DocumentListComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,35 +0,0 @@
|
|||||||
import { Component, OnInit, OnDestroy } from '@angular/core';
|
|
||||||
import { Observable, Subscription } from 'rxjs';
|
|
||||||
|
|
||||||
import { DocumentService } from 'src/app/services/document.service';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-document-list',
|
|
||||||
templateUrl: './document-list.component.html',
|
|
||||||
styleUrls: ['./document-list.component.scss']
|
|
||||||
})
|
|
||||||
export class DocumentListComponent implements OnInit, OnDestroy {
|
|
||||||
documents: Observable<string[]>;
|
|
||||||
currentDoc: string;
|
|
||||||
private _docSub: Subscription;
|
|
||||||
|
|
||||||
constructor(private documentService: DocumentService) { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.documents = this.documentService.documents;
|
|
||||||
this._docSub = this.documentService.currentDocument.subscribe(doc => this.currentDoc = doc.id);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
this._docSub.unsubscribe();
|
|
||||||
}
|
|
||||||
|
|
||||||
loadDoc(id: string) {
|
|
||||||
this.documentService.getDocument(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
newDoc() {
|
|
||||||
this.documentService.newDocument();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
<textarea [(ngModel)]='document.doc' (keyup)='editDoc()' placeholder='Start typing...'></textarea>
|
|
@ -1,12 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { DocumentComponent } from './document.component';
|
|
||||||
|
|
||||||
describe('DocumentComponent', () => {
|
|
||||||
let component: DocumentComponent;
|
|
||||||
let fixture: ComponentFixture<DocumentComponent>;
|
|
||||||
|
|
||||||
beforeEach(async(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [ DocumentComponent ]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(DocumentComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,30 +0,0 @@
|
|||||||
import { Component, OnInit, OnDestroy } from '@angular/core';
|
|
||||||
import { DocumentService } from 'src/app/services/document.service';
|
|
||||||
import { Subscription } from 'rxjs';
|
|
||||||
import { Document } from 'src/app/models/document';
|
|
||||||
import { startWith } from 'rxjs/operators';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-document',
|
|
||||||
templateUrl: './document.component.html',
|
|
||||||
styleUrls: ['./document.component.scss']
|
|
||||||
})
|
|
||||||
export class DocumentComponent implements OnInit, OnDestroy {
|
|
||||||
document: Document;
|
|
||||||
private _docSub: Subscription;
|
|
||||||
constructor(private documentService: DocumentService) { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this._docSub = this.documentService.currentDocument.pipe(
|
|
||||||
startWith({ id: '', doc: 'Select an existing document or create a new one to get started'})
|
|
||||||
).subscribe(document => this.document = document);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
this._docSub.unsubscribe();
|
|
||||||
}
|
|
||||||
|
|
||||||
editDoc() {
|
|
||||||
this.documentService.editDocument(this.document);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
<div id="postinput">
|
|
||||||
<textarea id='input' placeholder="Post something ..." rows='3' wrap="soft"></textarea>
|
|
||||||
<button id="attach" type='submit'><span><i class="fa fa-paperclip fa-2x" aria-hidden="true"></i></span></button>
|
|
||||||
<button id="submit" type='submit'><span><i class="fa fa-send-o fa-2x" aria-hidden="true"></i></span></button>
|
|
||||||
</div>
|
|
||||||
<div id='completeFeed'>
|
|
||||||
<div id='feedchooser'>
|
|
||||||
<button id="new">New</button>
|
|
||||||
<button id='mostliked'>Most Liked</button>
|
|
||||||
</div>
|
|
||||||
<div id='feedlist'>
|
|
||||||
<div class="feeditem">
|
|
||||||
<div class="itemhead">
|
|
||||||
<span class="title">Testuser</span>
|
|
||||||
<span class="handle"><a href="#">@testuser</a></span>
|
|
||||||
<span class="date">23.09.19 10:07</span></div>
|
|
||||||
<p class="text">Example Test text. This is a test</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,92 +0,0 @@
|
|||||||
@import '../../../styles/mixins.sass'
|
|
||||||
@import '../../../styles/vars.sass'
|
|
||||||
|
|
||||||
#postinput
|
|
||||||
@include gridPosition(1, 2, 1, 2)
|
|
||||||
margin: 0.5em
|
|
||||||
display: grid
|
|
||||||
grid-template: 100% /80% 10% 10%
|
|
||||||
#input
|
|
||||||
@include gridPosition(1, 2, 1, 2)
|
|
||||||
border-radius: 0.25em
|
|
||||||
border: 1px solid $cFeedInputBorder
|
|
||||||
padding: 0.125em
|
|
||||||
#attach
|
|
||||||
@include gridPosition(1, 2, 2, 3)
|
|
||||||
#submit
|
|
||||||
@include gridPosition(1, 2, 3, 4)
|
|
||||||
|
|
||||||
#completeFeed
|
|
||||||
@include gridPosition(2, 3, 1, 2)
|
|
||||||
display: grid
|
|
||||||
grid-template: 5% 95% /100%
|
|
||||||
|
|
||||||
#feedchooser
|
|
||||||
@include gridPosition(1, 2, 1, 2)
|
|
||||||
display: grid
|
|
||||||
grid-template: 100% /50% 50%
|
|
||||||
background-color: $cFontWhite
|
|
||||||
padding: 0
|
|
||||||
margin: 0
|
|
||||||
button
|
|
||||||
background-color: $cFeedChooserBackground
|
|
||||||
border: none
|
|
||||||
font-size: 1.5em
|
|
||||||
color: $cFontWhite
|
|
||||||
button:hover
|
|
||||||
background-color: lighten($cFeedChooserBackground, 10%)
|
|
||||||
cursor: pointer
|
|
||||||
#new
|
|
||||||
@include gridPosition(1, 2, 1, 2)
|
|
||||||
#mostliked
|
|
||||||
@include gridPosition(1, 2, 2, 3)
|
|
||||||
|
|
||||||
#feedlist
|
|
||||||
@include gridPosition(2, 3, 1, 2)
|
|
||||||
overflow: auto
|
|
||||||
background-color: $cFeedBackground
|
|
||||||
.feeditem
|
|
||||||
background-color: $cFeedItemBackground
|
|
||||||
min-height: 2em
|
|
||||||
margin: 0.5em
|
|
||||||
padding: 0.25em
|
|
||||||
border-radius: 0.25em
|
|
||||||
.itemhead
|
|
||||||
align-items: flex-start
|
|
||||||
|
|
||||||
.title, .handle, .date
|
|
||||||
margin: 0.125em
|
|
||||||
.title
|
|
||||||
font-weight: bold
|
|
||||||
|
|
||||||
.handle, .date
|
|
||||||
color: $cInactiveText
|
|
||||||
.handle a
|
|
||||||
text-decoration: none
|
|
||||||
color: $cInactiveText
|
|
||||||
font-style: normal
|
|
||||||
.handle a:hover
|
|
||||||
text-decoration: underline
|
|
||||||
|
|
||||||
.feeditemPicture
|
|
||||||
background-color: $cFeedItemBackground
|
|
||||||
min-height: 2em
|
|
||||||
margin: 0.5em
|
|
||||||
padding: 0.25em
|
|
||||||
border-radius: 0.25em
|
|
||||||
.itemhead
|
|
||||||
align-items: flex-start
|
|
||||||
|
|
||||||
.title, .handle, .date
|
|
||||||
margin: 0.125em
|
|
||||||
.title
|
|
||||||
font-weight: bold
|
|
||||||
|
|
||||||
.handle, .date
|
|
||||||
color: $cInactiveText
|
|
||||||
.handle a
|
|
||||||
text-decoration: none
|
|
||||||
color: $cInactiveText
|
|
||||||
font-style: normal
|
|
||||||
.handle a:hover
|
|
||||||
text-decoration: underline
|
|
@ -1,25 +0,0 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { FeedComponent } from './feed.component';
|
|
||||||
|
|
||||||
describe('FeedComponent', () => {
|
|
||||||
let component: FeedComponent;
|
|
||||||
let fixture: ComponentFixture<FeedComponent>;
|
|
||||||
|
|
||||||
beforeEach(async(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [ FeedComponent ]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(FeedComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,15 +0,0 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'home-feed',
|
|
||||||
templateUrl: './feed.component.html',
|
|
||||||
styleUrls: ['./feed.component.sass']
|
|
||||||
})
|
|
||||||
export class FeedComponent implements OnInit {
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
<app-scaffold id="headerbar"></app-scaffold>
|
|
||||||
<home-chat id="chatcontainer"></home-chat>
|
|
||||||
<home-feed id="feedcontainer"></home-feed>
|
|
||||||
<home-social id="socialcontainer"></home-social>
|
|
@ -1,23 +0,0 @@
|
|||||||
@import '../../../styles/mixins.sass'
|
|
||||||
@import '../../../styles/vars.sass'
|
|
||||||
|
|
||||||
#headerbar
|
|
||||||
@include gridPosition(1, 2, 1, 4)
|
|
||||||
display: grid
|
|
||||||
grid-template: 100% /30% 10% 10% 10% 10% 10% 10% 10%
|
|
||||||
background-color: $cHeadPrimaryBackground
|
|
||||||
color: $cHeadFontColor
|
|
||||||
|
|
||||||
#chatcontainer
|
|
||||||
@include gridPosition(2, 3, 1, 2)
|
|
||||||
display: grid
|
|
||||||
grid-template: 7.5% 92.5% /100%
|
|
||||||
background-color: $cBoxBodyBackground
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#socialcontainer
|
|
||||||
@include gridPosition(2, 3, 3, 4)
|
|
||||||
display: grid
|
|
||||||
grid-template: 50% 50% /100%
|
|
||||||
background-color: $cBoxBodyBackground
|
|
@ -1,25 +0,0 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { HomeComponent } from './home.component';
|
|
||||||
|
|
||||||
describe('HomeComponent', () => {
|
|
||||||
let component: HomeComponent;
|
|
||||||
let fixture: ComponentFixture<HomeComponent>;
|
|
||||||
|
|
||||||
beforeEach(async(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [ HomeComponent ]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(HomeComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,15 +0,0 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-home',
|
|
||||||
templateUrl: './home.component.html',
|
|
||||||
styleUrls: ['./home.component.sass']
|
|
||||||
})
|
|
||||||
export class HomeComponent implements OnInit {
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
|
|
||||||
<div id="imprintcontainer">
|
|
||||||
<h1>Imprint</h1>
|
|
||||||
<p>The greenvironment network is being developed by Bliblablub</p>
|
|
||||||
<h2>Contact</h2>
|
|
||||||
<p>Email: mailadress</p>
|
|
||||||
</div>
|
|
@ -1,10 +0,0 @@
|
|||||||
@import '../../../styles/mixins.sass'
|
|
||||||
@import '../../../styles/vars.sass'
|
|
||||||
|
|
||||||
#imprintcontainer
|
|
||||||
@include gridPosition(2, 2,2,2)
|
|
||||||
background-color: $cPrimaryBackground
|
|
||||||
input
|
|
||||||
margin: 0.25em
|
|
||||||
#header
|
|
||||||
@include gridPosition(1, 2, 1, 2)
|
|
@ -1,25 +0,0 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { ImprintComponent } from './imprint.component';
|
|
||||||
|
|
||||||
describe('ImprintComponent', () => {
|
|
||||||
let component: ImprintComponent;
|
|
||||||
let fixture: ComponentFixture<ImprintComponent>;
|
|
||||||
|
|
||||||
beforeEach(async(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [ ImprintComponent ]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(ImprintComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,15 +0,0 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-imprint',
|
|
||||||
templateUrl: './imprint.component.html',
|
|
||||||
styleUrls: ['./imprint.component.sass']
|
|
||||||
})
|
|
||||||
export class ImprintComponent implements OnInit {
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
@import '../../../styles/mixins.sass'
|
|
||||||
@import '../../../styles/vars.sass'
|
|
||||||
|
|
||||||
#logincontainer
|
|
||||||
@include gridPosition(2, 2,2,2)
|
|
||||||
grid-template: 15% 15% 15% 15% 15% 15% / 100%
|
|
||||||
background-color: $cPrimaryBackground
|
|
||||||
input
|
|
||||||
margin: 0.25em
|
|
||||||
#header
|
|
||||||
@include gridPosition(1, 2, 1, 2)
|
|
@ -1,25 +0,0 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { LoginComponent } from './login.component';
|
|
||||||
|
|
||||||
describe('LoginComponent', () => {
|
|
||||||
let component: LoginComponent;
|
|
||||||
let fixture: ComponentFixture<LoginComponent>;
|
|
||||||
|
|
||||||
beforeEach(async(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [ LoginComponent ]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(LoginComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,15 +0,0 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-login',
|
|
||||||
templateUrl: './login.component.html',
|
|
||||||
styleUrls: ['./login.component.sass']
|
|
||||||
})
|
|
||||||
export class LoginComponent implements OnInit {
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
<div id="registercontainer">
|
|
||||||
<table style="width:100%">
|
|
||||||
<tr>
|
|
||||||
<td>username: </td>
|
|
||||||
<td><input #username type="text" name="username" username.value=''><br></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>email:</td>
|
|
||||||
<td><input #email type="text" name="email"><br></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>password:</td>
|
|
||||||
<td> <input #password type="text" name="password"><br></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>repeat password:</td>
|
|
||||||
<td> <input #repeatpassword type="text" name="repeatpassword"><br></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<button type="registerbutton" (click)="onClickSubmit(username.value,email.value,password.value, repeatpassword.value)">Register</button>
|
|
||||||
<br>
|
|
||||||
<a href="/login">You are already part of greenvironment? - login</a>
|
|
||||||
</div>
|
|
@ -1,13 +0,0 @@
|
|||||||
@import '../../../styles/mixins.sass'
|
|
||||||
@import '../../../styles/vars.sass'
|
|
||||||
|
|
||||||
#registercontainer
|
|
||||||
@include gridPosition(2, 2,2,2)
|
|
||||||
grid-template: 15% 15% 15% 15% 15% 15% / 100%
|
|
||||||
background-color: $cPrimaryBackground
|
|
||||||
padding: 1em
|
|
||||||
input
|
|
||||||
margin: 0.25em
|
|
||||||
|
|
||||||
#header
|
|
||||||
@include gridPosition(1, 2, 1, 2)
|
|
@ -1,25 +0,0 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { RegisterComponent } from './register.component';
|
|
||||||
|
|
||||||
describe('RegisterComponent', () => {
|
|
||||||
let component: RegisterComponent;
|
|
||||||
let fixture: ComponentFixture<RegisterComponent>;
|
|
||||||
|
|
||||||
beforeEach(async(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [ RegisterComponent ]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(RegisterComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,34 +0,0 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
import {RegisterService} from '../../services/register/register.service';
|
|
||||||
import {Registration} from '../../models/registration';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'registration',
|
|
||||||
templateUrl: './register.component.html',
|
|
||||||
styleUrls: ['./register.component.sass']
|
|
||||||
})
|
|
||||||
export class RegisterComponent implements OnInit {
|
|
||||||
registration: Registration
|
|
||||||
|
|
||||||
constructor(private registerService: RegisterService) {
|
|
||||||
this.registration = {username: null, passwordHash: null, email: null};
|
|
||||||
}
|
|
||||||
|
|
||||||
onClickSubmit(pUsername: string, pEmail: string, pPasswordHash: string,pPasswordHashRepeat: string ) {
|
|
||||||
console.log('username: ' + pUsername);
|
|
||||||
console.log('email: ' + pEmail);
|
|
||||||
|
|
||||||
if(pPasswordHash == pPasswordHashRepeat){
|
|
||||||
console.log('password same');
|
|
||||||
this.registration.username = pUsername
|
|
||||||
this.registration.email = pEmail
|
|
||||||
this.registration.passwordHash = pPasswordHash
|
|
||||||
|
|
||||||
this.registerService.register(this.registration)
|
|
||||||
} else{console.log('password NOT same'); }
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
|||||||
<div id="header">
|
|
||||||
<span class="title">Friends</span>
|
|
||||||
<button id="new" type="submit"><span><i class="fa fa-plus fa-3x" aria-hidden="true"></i></span></button>
|
|
||||||
<button id="invitations" type="submit"><span><i class="fa fa-envelope-o fa-3x" aria-hidden="true"></i></span></button>
|
|
||||||
</div>
|
|
||||||
<div id="friendslist">
|
|
||||||
<div class="frienditem" *ngFor="let friend of friends">
|
|
||||||
<div class="friendname">{{friend}}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,24 +0,0 @@
|
|||||||
@import '../../../../styles/mixins.sass'
|
|
||||||
@import '../../../../styles/vars.sass'
|
|
||||||
@import '../social.component.sass'
|
|
||||||
|
|
||||||
#friendslist
|
|
||||||
overflow: auto
|
|
||||||
@include gridPosition(2, 3, 1, 2)
|
|
||||||
.frienditem
|
|
||||||
background-color: $cPrimaryBackground
|
|
||||||
height: 3em
|
|
||||||
margin: 0.2em
|
|
||||||
padding: 0.25em
|
|
||||||
border-radius: 0.25em
|
|
||||||
border: solid
|
|
||||||
display: flex;
|
|
||||||
.friendname
|
|
||||||
font-weight: bold
|
|
||||||
text-align: left
|
|
||||||
border: solid
|
|
||||||
width: 60%
|
|
||||||
padding-left: 1em
|
|
||||||
margin: auto
|
|
||||||
span
|
|
||||||
font-size: 125%
|
|
@ -1,25 +0,0 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { FriendsComponent } from './friends.component';
|
|
||||||
|
|
||||||
describe('FriendsComponent', () => {
|
|
||||||
let component: FriendsComponent;
|
|
||||||
let fixture: ComponentFixture<FriendsComponent>;
|
|
||||||
|
|
||||||
beforeEach(async(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [ FriendsComponent ]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(FriendsComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,15 +0,0 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'social-friends',
|
|
||||||
templateUrl: './friends.component.html',
|
|
||||||
styleUrls: ['./friends.component.sass']
|
|
||||||
})
|
|
||||||
export class FriendsComponent implements OnInit {
|
|
||||||
friends: Array<String> = ["Friend 1", "Friend 2", "Friend 3", "Friend 4", "Friend 5", "Friend 6"]
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
<div id="header">
|
|
||||||
<span class="title">Groups</span>
|
|
||||||
<button id="new" type="submit"><span><i class="fa fa-plus fa-3x" aria-hidden="true"></i></span></button>
|
|
||||||
<button id="invitations" type="submit"><span><i class="fa fa-envelope-o fa-3x" aria-hidden="true"></i></span></button>
|
|
||||||
</div>
|
|
||||||
<div id="groupslist">
|
|
||||||
<div class="groupitem" *ngFor="let group of groups">
|
|
||||||
<div class="groupname">{{group}}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,24 +0,0 @@
|
|||||||
@import '../../../../styles/mixins.sass'
|
|
||||||
@import '../../../../styles/vars.sass'
|
|
||||||
@import '../social.component.sass'
|
|
||||||
|
|
||||||
#groupslist
|
|
||||||
overflow: auto
|
|
||||||
@include gridPosition(2, 3, 1, 2)
|
|
||||||
.groupitem
|
|
||||||
background-color: $cPrimaryBackground
|
|
||||||
height: 3em
|
|
||||||
margin: 0.2em
|
|
||||||
padding: 0.25em
|
|
||||||
border-radius: 0.25em
|
|
||||||
border: solid
|
|
||||||
display: flex;
|
|
||||||
.groupname
|
|
||||||
font-weight: bold
|
|
||||||
text-align: left
|
|
||||||
border: solid
|
|
||||||
width: 60%
|
|
||||||
padding-left: 1em
|
|
||||||
margin: auto
|
|
||||||
span
|
|
||||||
font-size: 125%
|
|
@ -1,25 +0,0 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { GroupsComponent } from './groups.component';
|
|
||||||
|
|
||||||
describe('GroupsComponent', () => {
|
|
||||||
let component: GroupsComponent;
|
|
||||||
let fixture: ComponentFixture<GroupsComponent>;
|
|
||||||
|
|
||||||
beforeEach(async(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [ GroupsComponent ]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(GroupsComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,15 +0,0 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'social-groups',
|
|
||||||
templateUrl: './groups.component.html',
|
|
||||||
styleUrls: ['./groups.component.sass']
|
|
||||||
})
|
|
||||||
export class GroupsComponent implements OnInit {
|
|
||||||
groups: Array<String> = ["Group 1", "Group 2", "Group 3", "Group 4", "Group 5", "Group 6"]
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,2 +0,0 @@
|
|||||||
<social-friends id="friendscontainer"></social-friends>
|
|
||||||
<social-groups id="groupscontainer"></social-groups>
|
|
@ -1,44 +0,0 @@
|
|||||||
@import '../../../styles/mixins.sass'
|
|
||||||
@import '../../../styles/vars.sass'
|
|
||||||
|
|
||||||
#friendscontainer
|
|
||||||
@include gridPosition(1, 2, 1, 2)
|
|
||||||
display: grid
|
|
||||||
grid-template: 15% 85% /100%
|
|
||||||
|
|
||||||
#groupscontainer
|
|
||||||
@include gridPosition(2, 3, 1, 2)
|
|
||||||
display: grid
|
|
||||||
grid-template: 15% 85% /100%
|
|
||||||
|
|
||||||
#header
|
|
||||||
@include gridPosition(1, 2, 1, 2)
|
|
||||||
background-color: $cBoxHeaderBackground
|
|
||||||
display: grid
|
|
||||||
grid-template: 100% /60% 20% 20%
|
|
||||||
|
|
||||||
span
|
|
||||||
color: $cFontWhite
|
|
||||||
span.title
|
|
||||||
@include gridPosition(1, 2, 1, 2)
|
|
||||||
margin-top: 0.25em
|
|
||||||
margin-left: 0.25em
|
|
||||||
line-height: 100%
|
|
||||||
font-size: 2em
|
|
||||||
|
|
||||||
button
|
|
||||||
background-color: $cBoxHeaderBackground
|
|
||||||
border: none
|
|
||||||
|
|
||||||
button:hover
|
|
||||||
background-color: lighten($cBoxHeaderBackground, 10%)
|
|
||||||
cursor: pointer
|
|
||||||
|
|
||||||
button:active
|
|
||||||
background-color: darken($cBoxHeaderBackground, 5%)
|
|
||||||
|
|
||||||
#new
|
|
||||||
@include gridPosition(1, 2, 2, 3)
|
|
||||||
|
|
||||||
#invitations
|
|
||||||
@include gridPosition(1, 2, 3, 4)
|
|
@ -1,25 +0,0 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { SocialComponent } from './social.component';
|
|
||||||
|
|
||||||
describe('SocialComponent', () => {
|
|
||||||
let component: SocialComponent;
|
|
||||||
let fixture: ComponentFixture<SocialComponent>;
|
|
||||||
|
|
||||||
beforeEach(async(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [ SocialComponent ]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(SocialComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,15 +0,0 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'home-social',
|
|
||||||
templateUrl: './social.component.html',
|
|
||||||
styleUrls: ['./social.component.sass']
|
|
||||||
})
|
|
||||||
export class SocialComponent implements OnInit {
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
export class Document {
|
|
||||||
id: string;
|
|
||||||
doc: string;
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
export interface Registration {
|
|
||||||
username: string;
|
|
||||||
email: string;
|
|
||||||
passwordHash: string
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
import { TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { DocumentService } from './document.service';
|
|
||||||
|
|
||||||
describe('DocumentService', () => {
|
|
||||||
beforeEach(() => TestBed.configureTestingModule({}));
|
|
||||||
|
|
||||||
it('should be created', () => {
|
|
||||||
const service: DocumentService = TestBed.get(DocumentService);
|
|
||||||
expect(service).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,38 +0,0 @@
|
|||||||
import { Injectable } from '@angular/core';
|
|
||||||
|
|
||||||
import { Socket } from 'ngx-socket-io';
|
|
||||||
|
|
||||||
import { Document } from '../models/document';
|
|
||||||
|
|
||||||
@Injectable({
|
|
||||||
providedIn: 'root'
|
|
||||||
})
|
|
||||||
export class DocumentService {
|
|
||||||
currentDocument = this.socket.fromEvent<Document>('document');
|
|
||||||
documents = this.socket.fromEvent<string[]>('documents');
|
|
||||||
|
|
||||||
constructor(private socket: Socket) { }
|
|
||||||
|
|
||||||
getDocument(id: string) {
|
|
||||||
this.socket.emit('getDoc', id);
|
|
||||||
}
|
|
||||||
|
|
||||||
newDocument() {
|
|
||||||
this.socket.emit('addDoc', { id: this.docId(), doc: '' });
|
|
||||||
}
|
|
||||||
|
|
||||||
editDocument(document: Document) {
|
|
||||||
this.socket.emit('editDoc', document);
|
|
||||||
}
|
|
||||||
|
|
||||||
private docId() {
|
|
||||||
let text = '';
|
|
||||||
const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
||||||
|
|
||||||
for (let i = 0; i < 5; i++) {
|
|
||||||
text += possible.charAt(Math.floor(Math.random() * possible.length));
|
|
||||||
}
|
|
||||||
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
import { TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { LoginService } from './login.service';
|
|
||||||
|
|
||||||
describe('LoginService', () => {
|
|
||||||
beforeEach(() => TestBed.configureTestingModule({}));
|
|
||||||
|
|
||||||
it('should be created', () => {
|
|
||||||
const service: LoginService = TestBed.get(LoginService);
|
|
||||||
expect(service).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,9 +0,0 @@
|
|||||||
import { Injectable } from '@angular/core';
|
|
||||||
|
|
||||||
@Injectable({
|
|
||||||
providedIn: 'root'
|
|
||||||
})
|
|
||||||
export class LoginService {
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
import { TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { RegisterService } from './register.service';
|
|
||||||
|
|
||||||
describe('RegisterService', () => {
|
|
||||||
beforeEach(() => TestBed.configureTestingModule({}));
|
|
||||||
|
|
||||||
it('should be created', () => {
|
|
||||||
const service: RegisterService = TestBed.get(RegisterService);
|
|
||||||
expect(service).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,34 +0,0 @@
|
|||||||
import { Injectable } from '@angular/core';
|
|
||||||
import {Http, URLSearchParams, Headers} from '@angular/http';
|
|
||||||
import { Registration } from '../../models/registration';
|
|
||||||
|
|
||||||
@Injectable({
|
|
||||||
providedIn: 'root'
|
|
||||||
})
|
|
||||||
export class RegisterService {
|
|
||||||
|
|
||||||
constructor(private http: Http) { }
|
|
||||||
|
|
||||||
public register(registration: Registration) {
|
|
||||||
|
|
||||||
//let url = './graphql'
|
|
||||||
let url = 'https://greenvironment.net/graphql'
|
|
||||||
|
|
||||||
let headers = new Headers();
|
|
||||||
headers.set('Content-Type', 'application/json');
|
|
||||||
|
|
||||||
return this.http.post(url, this.buildJson(registration)).subscribe(response => console.log(response.text()));
|
|
||||||
}
|
|
||||||
|
|
||||||
public buildJson(registration: Registration): any {
|
|
||||||
const body = {query: `mutation($username: String, $email: String, $pwHash: String) {
|
|
||||||
register(username: $username, email: $email, passwordHash: $pwHash) {id}
|
|
||||||
}`, variables: {
|
|
||||||
email: registration.email,
|
|
||||||
pwHash: registration.passwordHash,
|
|
||||||
username: registration.username,
|
|
||||||
}};
|
|
||||||
return body;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
|||||||
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
|
|
||||||
# For additional information regarding the format and rule options, please see:
|
|
||||||
# https://github.com/browserslist/browserslist#queries
|
|
||||||
#
|
|
||||||
# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed
|
|
||||||
|
|
||||||
> 0.5%
|
|
||||||
last 2 versions
|
|
||||||
Firefox ESR
|
|
||||||
not dead
|
|
||||||
not IE 9-11
|
|
@ -1,3 +0,0 @@
|
|||||||
export const environment = {
|
|
||||||
production: true
|
|
||||||
};
|
|
@ -1,16 +0,0 @@
|
|||||||
// This file can be replaced during build by using the `fileReplacements` array.
|
|
||||||
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
|
|
||||||
// The list of file replacements can be found in `angular.json`.
|
|
||||||
|
|
||||||
export const environment = {
|
|
||||||
production: false
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* For easier debugging in development mode, you can import the following file
|
|
||||||
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
|
|
||||||
*
|
|
||||||
* This import should be commented out in production mode because it will have a negative impact
|
|
||||||
* on performance if an error is thrown.
|
|
||||||
*/
|
|
||||||
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
|
|
Binary file not shown.
Before Width: | Height: | Size: 5.3 KiB |
@ -1,14 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>SocketApp</title>
|
|
||||||
<base href="/">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
|
||||||
<script src="https://kit.fontawesome.com/84cf838715.js"></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<app-root></app-root>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,31 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage-istanbul-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma')
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
coverageIstanbulReporter: {
|
|
||||||
dir: require('path').join(__dirname, '../coverage'),
|
|
||||||
reports: ['html', 'lcovonly'],
|
|
||||||
fixWebpackSourcePaths: true
|
|
||||||
},
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
singleRun: false
|
|
||||||
});
|
|
||||||
};
|
|
@ -1,13 +0,0 @@
|
|||||||
import { enableProdMode } from '@angular/core';
|
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
||||||
|
|
||||||
import { AppModule } from './app/app.module';
|
|
||||||
import { environment } from './environments/environment';
|
|
||||||
import 'rxjs';
|
|
||||||
|
|
||||||
if (environment.production) {
|
|
||||||
enableProdMode();
|
|
||||||
}
|
|
||||||
|
|
||||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
|
||||||
.catch(err => console.error(err));
|
|
@ -1,82 +0,0 @@
|
|||||||
/**
|
|
||||||
* This file includes polyfills needed by Angular and is loaded before the app.
|
|
||||||
* You can add your own extra polyfills to this file.
|
|
||||||
*
|
|
||||||
* This file is divided into 2 sections:
|
|
||||||
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
|
||||||
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
|
||||||
* file.
|
|
||||||
*
|
|
||||||
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
|
||||||
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
|
|
||||||
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
|
|
||||||
*
|
|
||||||
* Learn more in https://angular.io/guide/browser-support
|
|
||||||
*/
|
|
||||||
|
|
||||||
/***************************************************************************************************
|
|
||||||
* BROWSER POLYFILLS
|
|
||||||
*/
|
|
||||||
|
|
||||||
(window as any).global = window;
|
|
||||||
|
|
||||||
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
|
|
||||||
// import 'core-js/es6/symbol';
|
|
||||||
// import 'core-js/es6/object';
|
|
||||||
// import 'core-js/es6/function';
|
|
||||||
// import 'core-js/es6/parse-int';
|
|
||||||
// import 'core-js/es6/parse-float';
|
|
||||||
// import 'core-js/es6/number';
|
|
||||||
// import 'core-js/es6/math';
|
|
||||||
// import 'core-js/es6/string';
|
|
||||||
// import 'core-js/es6/date';
|
|
||||||
// import 'core-js/es6/array';
|
|
||||||
// import 'core-js/es6/regexp';
|
|
||||||
// import 'core-js/es6/map';
|
|
||||||
// import 'core-js/es6/weak-map';
|
|
||||||
// import 'core-js/es6/set';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If the application will be indexed by Google Search, the following is required.
|
|
||||||
* Googlebot uses a renderer based on Chrome 41.
|
|
||||||
* https://developers.google.com/search/docs/guides/rendering
|
|
||||||
**/
|
|
||||||
// import 'core-js/es6/array';
|
|
||||||
|
|
||||||
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
|
|
||||||
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
|
||||||
|
|
||||||
/** IE10 and IE11 requires the following for the Reflect API. */
|
|
||||||
// import 'core-js/es6/reflect';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Web Animations `@angular/platform-browser/animations`
|
|
||||||
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
|
|
||||||
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
|
|
||||||
**/
|
|
||||||
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
|
||||||
|
|
||||||
/**
|
|
||||||
* By default, zone.js will patch all possible macroTask and DomEvents
|
|
||||||
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
|
||||||
*/
|
|
||||||
|
|
||||||
// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
|
|
||||||
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
|
|
||||||
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
|
|
||||||
|
|
||||||
/*
|
|
||||||
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
|
|
||||||
* with the following flag, it will bypass `zone.js` patch for IE/Edge
|
|
||||||
*/
|
|
||||||
// (window as any).__Zone_enable_cross_context_check = true;
|
|
||||||
|
|
||||||
/***************************************************************************************************
|
|
||||||
* Zone JS is required by default for Angular itself.
|
|
||||||
*/
|
|
||||||
import 'zone.js/dist/zone'; // Included with Angular CLI.
|
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************************************
|
|
||||||
* APPLICATION IMPORTS
|
|
||||||
*/
|
|
@ -1,9 +0,0 @@
|
|||||||
@import 'styles/mixins.sass'
|
|
||||||
@import 'styles/vars.sass'
|
|
||||||
|
|
||||||
body
|
|
||||||
font-family: Arial, serif
|
|
||||||
margin: 0
|
|
||||||
padding: 0
|
|
||||||
min-height: 100vh
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
|||||||
@mixin gridPosition($rowStart, $rowEnd, $columnStart, $columnEnd)
|
|
||||||
grid-row-start: $rowStart
|
|
||||||
grid-row-end: $rowEnd
|
|
||||||
grid-column-start: $columnStart
|
|
||||||
grid-column-end: $columnEnd
|
|
@ -1,23 +0,0 @@
|
|||||||
$cPrimaryBackground: #fff
|
|
||||||
$cSecondaryBackground: #ddd
|
|
||||||
$cInactiveText: #555
|
|
||||||
$cPrimarySurface: #fff
|
|
||||||
|
|
||||||
//Headerbar
|
|
||||||
$cHeadPrimaryBackground: #0d6b14
|
|
||||||
$cHeadFontColor: #243dca
|
|
||||||
|
|
||||||
//Home -- Feed
|
|
||||||
$cFeedPrimaryFontColor: #243dca
|
|
||||||
$cFeedSecondaryFontColor: #243dca
|
|
||||||
$cFeedInputBorder: #396d51
|
|
||||||
$cFeedItemBackground: #7fd4a7
|
|
||||||
$cFeedChooserBackground: #259145
|
|
||||||
$cFeedBackground: #0d6b14
|
|
||||||
|
|
||||||
//Home -- Chat, Friends, Groups
|
|
||||||
$cFontWhite: #243dca
|
|
||||||
$cBoxHeaderBackground: #259145
|
|
||||||
$cBoxBodyBackground: #3deb71
|
|
||||||
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js/dist/zone-testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import {
|
|
||||||
BrowserDynamicTestingModule,
|
|
||||||
platformBrowserDynamicTesting
|
|
||||||
} from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
declare const require: any;
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(
|
|
||||||
BrowserDynamicTestingModule,
|
|
||||||
platformBrowserDynamicTesting()
|
|
||||||
);
|
|
||||||
// Then we find all the tests.
|
|
||||||
const context = require.context('./', true, /\.spec\.ts$/);
|
|
||||||
// And load the modules.
|
|
||||||
context.keys().map(context);
|
|
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"outDir": "../out-tsc/app",
|
|
||||||
"types": []
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"test.ts",
|
|
||||||
"**/*.spec.ts"
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"outDir": "../out-tsc/spec",
|
|
||||||
"types": [
|
|
||||||
"jasmine",
|
|
||||||
"node"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"test.ts",
|
|
||||||
"polyfills.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.d.ts"
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../tslint.json",
|
|
||||||
"rules": {
|
|
||||||
"directive-selector": [
|
|
||||||
true,
|
|
||||||
"attribute",
|
|
||||||
"app",
|
|
||||||
"camelCase"
|
|
||||||
],
|
|
||||||
"component-selector": [
|
|
||||||
true,
|
|
||||||
"element",
|
|
||||||
"app",
|
|
||||||
"kebab-case"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue