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

master
Max_ES 5 years ago committed by Gitea
commit 8584a7a92c

@ -3,7 +3,7 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"socket-app": {
"greenvironment": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
@ -17,14 +17,15 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/socket-app",
"outputPath": "dist/greenvironment",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
"src/assets",
"src/manifest.webmanifest"
],
"styles": [
"src/styles/greenvironment-material-theme.scss",
@ -55,25 +56,27 @@
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
],
"serviceWorker": true,
"ngswConfigPath": "ngsw-config.json"
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "socket-app:build"
"browserTarget": "greenvironment:build"
},
"configurations": {
"production": {
"browserTarget": "socket-app:build:production"
"browserTarget": "greenvironment:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "socket-app:build"
"browserTarget": "greenvironment:build"
}
},
"test": {
@ -90,7 +93,8 @@
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets"
"src/assets",
"src/manifest.webmanifest"
]
}
},
@ -108,7 +112,7 @@
}
}
},
"socket-app-e2e": {
"greenvironment-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
@ -117,11 +121,11 @@
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "socket-app:serve"
"devServerTarget": "greenvironment:serve"
},
"configurations": {
"production": {
"devServerTarget": "socket-app:serve:production"
"devServerTarget": "greenvironment:serve:production"
}
}
},
@ -137,5 +141,5 @@
}
}
},
"defaultProject": "socket-app"
}
"defaultProject": "greenvironment"
}

@ -9,6 +9,6 @@ describe('workspace-project App', () => {
it('should display welcome message', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to socket-app!');
expect(page.getParagraphText()).toEqual('Welcome to greenvironment!');
});
});

@ -0,0 +1,29 @@
{
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
"index": "/index.html",
"assetGroups": [
{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html",
"/manifest.webmanifest",
"/*.css",
"/*.js"
]
}
}, {
"name": "assets",
"installMode": "lazy",
"updateMode": "prefetch",
"resources": {
"files": [
"/assets/**",
"/*.(eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)"
]
}
}
]
}

10
package-lock.json generated

@ -1,5 +1,5 @@
{
"name": "socket-app",
"name": "greenvironment",
"version": "0.0.0",
"lockfileVersion": 1,
"requires": true,
@ -607,6 +607,14 @@
"tslib": "^1.9.0"
}
},
"@angular/service-worker": {
"version": "8.2.14",
"resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-8.2.14.tgz",
"integrity": "sha512-Xv1ES5bXDRxPJ5uyRqeKw6mGKaJVzKK0oFcR0mr4OSdyLXGZ+x6fC2S/QcLy4ugpb64fyEksrnHhHjeMVzGh2Q==",
"requires": {
"tslib": "^1.9.0"
}
},
"@babel/code-frame": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz",

@ -1,5 +1,5 @@
{
"name": "socket-app",
"name": "greenvironment",
"version": "0.0.0",
"scripts": {
"ng": "ng",
@ -23,6 +23,7 @@
"@angular/platform-browser": "8.2.14",
"@angular/platform-browser-dynamic": "^8.2.14",
"@angular/router": "~8.2.14",
"@angular/service-worker": "^8.2.14",
"apollo-angular": "^1.8.0",
"apollo-angular-link-http": "^1.9.0",
"apollo-cache-inmemory": "^1.6.5",

@ -16,16 +16,16 @@ describe('AppComponent', () => {
expect(app).toBeTruthy();
});
it(`should have as title 'socket-app'`, () => {
it(`should have as title 'greenvironment'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app.title).toEqual('socket-app');
expect(app.title).toEqual('greenvironment');
});
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!');
expect(compiled.querySelector('h1').textContent).toContain('Welcome to greenvironment!');
});
});

@ -20,7 +20,6 @@ import {DialogCreateEventComponent, GroupComponent} from './components/group/gro
import {ChatmanagerComponent} from './components/chatmanager/chatmanager.component';
import {ChatlistComponent} from './components/chatlist/chatlist.component';
import {PostlistComponent} from './components/feed/postlist/postlist.component';
import {GraphQLModule} from './graphql.module';
import {HttpClientModule} from '@angular/common/http';
import {ProfileComponent} from './components/profile/profile.component';
import {ImprintComponent} from './components/imprint/imprint.component';
@ -63,6 +62,8 @@ import {MatDatepickerModule} from '@angular/material/datepicker';
import {MatNativeDateModule, MatProgressBarModule} from '@angular/material/';
import {MatSnackBarModule} from '@angular/material/snack-bar';
import {DialogFileUploadComponent} from './components/profile/fileUpload/fileUpload.component';
import { ServiceWorkerModule } from '@angular/service-worker';
import { environment } from '../environments/environment';
const config: SocketIoConfig = {url: 'http://localhost:4444', options: {}};
@ -110,7 +111,6 @@ const appRoutes: Routes = [
FormsModule,
HttpModule,
SocketIoModule.forRoot(config),
GraphQLModule,
HttpClientModule,
InfiniteScrollModule,
MatDatepickerModule,
@ -149,6 +149,7 @@ const appRoutes: Routes = [
MatDatepickerModule,
MatSnackBarModule,
MatProgressBarModule,
ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }),
],
entryComponents: [
DialogCreateGroupComponent,

@ -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>

@ -1,27 +0,0 @@
import {NgModule} from '@angular/core';
import {APOLLO_OPTIONS, ApolloModule} from 'apollo-angular';
import {HttpLink, HttpLinkModule} from 'apollo-angular-link-http';
import {InMemoryCache} from 'apollo-cache-inmemory';
const uri = 'https://o5x5jzoo7z.sse.codesandbox.io/graphql';
// 'https://greenvironment.net/graphql:443'; // <-- add the URL of the GraphQL server here
export function createApollo(httpLink: HttpLink) {
return {
link: httpLink.create({uri}),
cache: new InMemoryCache(),
};
}
@NgModule({
exports: [ApolloModule, HttpLinkModule],
providers: [
{
provide: APOLLO_OPTIONS,
useFactory: createApollo,
deps: [HttpLink],
},
],
})
export class GraphQLModule {
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 21 KiB

@ -7,10 +7,13 @@
<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>
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500&amp;display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="manifest" href="manifest.webmanifest">
<meta name="theme-color" content="#1976d2">
</head>
<body>
<app-root></app-root>
<noscript>Please enable JavaScript to continue using this application.</noscript>
</body>
</html>

@ -0,0 +1,51 @@
{
"name": "greenvironment",
"short_name": "greenvironment",
"theme_color": "#1976d2",
"background_color": "#fafafa",
"display": "standalone",
"scope": "/",
"start_url": "/",
"icons": [
{
"src": "assets/icons/icon-72x72.png",
"sizes": "72x72",
"type": "image/png"
},
{
"src": "assets/icons/icon-96x96.png",
"sizes": "96x96",
"type": "image/png"
},
{
"src": "assets/icons/icon-128x128.png",
"sizes": "128x128",
"type": "image/png"
},
{
"src": "assets/icons/icon-144x144.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "assets/icons/icon-152x152.png",
"sizes": "152x152",
"type": "image/png"
},
{
"src": "assets/icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "assets/icons/icon-384x384.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "assets/icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
Loading…
Cancel
Save