diff --git a/angular.json b/angular.json index c796f0d6c03320cd8dbd05efaac0e3a6c85f17b4..c39b69a62cf0228c790408741884657458d66a6c 100644 --- a/angular.json +++ b/angular.json @@ -18,7 +18,8 @@ "polyfills": "src/polyfills.ts", "assets": [ "src/assets", - "src/favicon.ico" + "src/favicon.ico", + "src/manifest.webmanifest" ], "styles": [ "src/styles.scss" @@ -43,7 +44,8 @@ "replace": "src/environments/environment.ts", "with": "src/environments/environment.prod.ts" } - ] + ], + "serviceWorker": true } } }, @@ -79,7 +81,8 @@ ], "assets": [ "src/assets", - "src/favicon.ico" + "src/favicon.ico", + "src/manifest.webmanifest" ] } }, diff --git a/ngsw-config.json b/ngsw-config.json new file mode 100644 index 0000000000000000000000000000000000000000..fa9410f347f620ee86a69d5c12b6ed4f3a07968d --- /dev/null +++ b/ngsw-config.json @@ -0,0 +1,26 @@ +{ + "index": "/index.html", + "assetGroups": [ + { + "name": "app", + "installMode": "prefetch", + "resources": { + "files": [ + "/favicon.ico", + "/index.html", + "/*.css", + "/*.js" + ] + } + }, { + "name": "assets", + "installMode": "lazy", + "updateMode": "prefetch", + "resources": { + "files": [ + "/assets/**" + ] + } + } + ] +} diff --git a/package.json b/package.json index 4faf263ca093a23a7efb09d3729d68fe758c8544..ee3090a24bd70feddcc7a26ddf41723d37ce1296 100644 --- a/package.json +++ b/package.json @@ -13,18 +13,19 @@ }, "private": true, "dependencies": { - "@angular/animations": "7.1.0", + "@angular/animations": "7.2.15", "@angular/cdk": "^7.1.0", - "@angular/common": "7.1.0", - "@angular/compiler": "7.1.0", - "@angular/core": "7.1.0", + "@angular/common": "7.2.15", + "@angular/compiler": "7.2.15", + "@angular/core": "7.2.15", "@angular/flex-layout": "^7.0.0-beta.19", - "@angular/forms": "7.1.0", - "@angular/http": "7.1.0", + "@angular/forms": "7.2.15", + "@angular/http": "7.2.15", "@angular/material": "^7.1.0", - "@angular/platform-browser": "7.1.0", - "@angular/platform-browser-dynamic": "7.1.0", - "@angular/router": "7.1.0", + "@angular/platform-browser": "7.2.15", + "@angular/platform-browser-dynamic": "7.2.15", + "@angular/router": "7.2.15", + "@angular/service-worker": "7.2.15", "@ngx-translate/core": "^10.0.2", "@ngx-translate/http-loader": "^3.0.1", "@stomp/ng2-stompjs": "^7.2.0", @@ -34,17 +35,18 @@ "is-docker": "^1.1.0", "ng2-charts": "^1.6.0", "ngx-markdown": "^1.6.0", - "rxjs": "^6.3.3", + "rxjs": "^6.5.2", "rxjs-compat": "^6.2.2", + "tslib": "^1.9.0", "tslint-eslint-rules": "^5.3.1", "typescript-map": "0.0.7", "zone.js": "^0.8.26" }, "devDependencies": { "@angular-devkit/build-angular": "^0.13.7", - "@angular/cli": "7.0.6", + "@angular/cli": "7.3.9", "@angular/compiler-cli": "^7.2.11", - "@angular/language-service": "7.1.0", + "@angular/language-service": "7.2.15", "@biesbjerg/ngx-translate-extract": "^2.3.4", "@types/jasmine": "^2.8.8", "@types/jasminewd2": "~2.0.2", @@ -60,6 +62,6 @@ "protractor": "~5.1.2", "ts-node": "~4.1.0", "tslint": "~5.9.1", - "typescript": "3.1.6" + "typescript": "3.2.4" } -} +} \ No newline at end of file diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 30c5ab13ffaff929b5963d9c28c31b7c37ce4af3..12073d6504bbd108d9a6fd1d2db1258a25b387bd 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -27,6 +27,8 @@ import { NewLandingComponent } from './components/home/new-landing/new-landing.c import { HomePageComponent } from './components/home/home-page/home-page.component'; import { AppConfig } from './app.config'; import { ThemeModule } from '../theme/theme.module'; +import { ServiceWorkerModule } from '@angular/service-worker'; +import { environment } from '../environments/environment'; export function dialogClose(dialogResult: any) { } @@ -55,7 +57,8 @@ export function initializeApp(appConfig: AppConfig) { BrowserAnimationsModule, EssentialsModule, SharedModule, - ThemeModule + ThemeModule, + ServiceWorkerModule.register('ngsw-worker.js', { enabled: true }) // environment.production ], providers: [ AppConfig, diff --git a/src/assets/icons/icon-128x128.png b/src/assets/icons/icon-128x128.png new file mode 100644 index 0000000000000000000000000000000000000000..9f9241f0be40661db1eed29384231e76d33b6e7c Binary files /dev/null and b/src/assets/icons/icon-128x128.png differ diff --git a/src/assets/icons/icon-144x144.png b/src/assets/icons/icon-144x144.png new file mode 100644 index 0000000000000000000000000000000000000000..4a5f8c16389c261b3291ef34a9ef8b2222f76d69 Binary files /dev/null and b/src/assets/icons/icon-144x144.png differ diff --git a/src/assets/icons/icon-152x152.png b/src/assets/icons/icon-152x152.png new file mode 100644 index 0000000000000000000000000000000000000000..34a1a8d645872c776c9425de45c3fcfba12c271e Binary files /dev/null and b/src/assets/icons/icon-152x152.png differ diff --git a/src/assets/icons/icon-192x192.png b/src/assets/icons/icon-192x192.png new file mode 100644 index 0000000000000000000000000000000000000000..9172e5dd29e4b2c35cbf4da874e778934fa27e77 Binary files /dev/null and b/src/assets/icons/icon-192x192.png differ diff --git a/src/assets/icons/icon-384x384.png b/src/assets/icons/icon-384x384.png new file mode 100644 index 0000000000000000000000000000000000000000..e54e8d3eafe56a617b9de13c361ed68657371e84 Binary files /dev/null and b/src/assets/icons/icon-384x384.png differ diff --git a/src/assets/icons/icon-512x512.png b/src/assets/icons/icon-512x512.png new file mode 100644 index 0000000000000000000000000000000000000000..51ee297df1cbeb0354814ffe95afa6e4bc86ea23 Binary files /dev/null and b/src/assets/icons/icon-512x512.png differ diff --git a/src/assets/icons/icon-72x72.png b/src/assets/icons/icon-72x72.png new file mode 100644 index 0000000000000000000000000000000000000000..2814a3f30caf3abf4de2ac85082ef83888b4b479 Binary files /dev/null and b/src/assets/icons/icon-72x72.png differ diff --git a/src/assets/icons/icon-96x96.png b/src/assets/icons/icon-96x96.png new file mode 100644 index 0000000000000000000000000000000000000000..d271025c4f22c7ba3c5f43ccfcab0e52ebbe80ca Binary files /dev/null and b/src/assets/icons/icon-96x96.png differ diff --git a/src/index.html b/src/index.html index dfcd38904a0abef39e52cb2a0b6f07ea790be5af..2b1a07751ead044770f91de2f5ccf1e20c72372f 100644 --- a/src/index.html +++ b/src/index.html @@ -15,8 +15,8 @@ <!-- Add to homescreen for Safari on iOS --> <meta name="apple-mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-status-bar-style" content="black"> - <meta name="apple-mobile-web-app-title" content="Material Design Lite"> + <meta name="apple-mobile-web-app-status-bar-style" content="#4DB6AC"> + <meta name="apple-mobile-web-app-title" content="ARSnova"> <link rel="apple-touch-icon-precomposed" href="assets/images/ios-desktop.png"> <!-- Tile icon for Win8 (144x144 + tile color) --> @@ -27,8 +27,11 @@ <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&lang=en"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> + <link rel="manifest" href="manifest.webmanifest"> + <meta name="theme-color" content="#4DB6AC"> </head> <body> <app-root></app-root> + <noscript>Please enable JavaScript to continue using this application.</noscript> </body> </html> diff --git a/src/manifest.webmanifest b/src/manifest.webmanifest new file mode 100644 index 0000000000000000000000000000000000000000..d854eff0e44db20182bf1e9054f848daed87cb62 --- /dev/null +++ b/src/manifest.webmanifest @@ -0,0 +1,51 @@ +{ + "name": "ARSnova Lite", + "short_name": "ARSnova", + "theme_color": "#4DB6AC", + "background_color": "#B2DFDB", + "display": "standalone", + "scope": "/", + "start_url": "/home", + "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" + } + ] +} diff --git a/tsconfig.json b/tsconfig.json index 7168743c025e68e4c014f0a53db18e72fb9e7a53..8cd9a30b04f615bc3576445486579db9b974aafd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,7 @@ { "compileOnSave": false, "compilerOptions": { + "importHelpers": true, "outDir": "./dist/out-tsc", "sourceMap": true, "declaration": false,