├── launch.json
├── Cordova
├── jsconfig.json
├── .gitignore
├── run-browser.ps1
├── assets
│ ├── MiracleListLogo.png
│ └── MiracleListLogo_ohneText.png
├── .vscode
│ ├── plugins.json
│ ├── launch.json
│ └── simulate
│ │ ├── sim-host.json
│ │ └── app-host.json
├── platforms
│ └── platforms.json
├── run-android.ps1
├── plugins
│ ├── cordova-plugin-whitelist
│ │ ├── NOTICE
│ │ ├── package.json
│ │ ├── CONTRIBUTING.md
│ │ ├── plugin.xml
│ │ ├── RELEASENOTES.md
│ │ ├── doc
│ │ │ ├── zh
│ │ │ │ └── README.md
│ │ │ ├── ko
│ │ │ │ └── README.md
│ │ │ ├── ja
│ │ │ │ └── README.md
│ │ │ └── pl
│ │ │ │ └── README.md
│ │ └── src
│ │ │ └── android
│ │ │ └── WhitelistPlugin.java
│ ├── windows.json
│ ├── android.json
│ ├── browser.json
│ └── fetch.json
├── build-ng.ps1
├── build-browser.ps1
├── build-android.ps1
├── hooks
│ └── README.md
├── package.json
├── package.json.bak
├── config.xml
├── config.xml.bak
├── simulation
│ ├── sim-host.json
│ └── app-host.json
└── typings
│ └── cordova.d.ts
├── src
├── assets
│ ├── .gitkeep
│ ├── URL.json
│ ├── favicon.ico
│ ├── MiracleListLogo.jpg
│ ├── MiracleListLogo.png
│ ├── MiracleListLogo_ohneText.jpg
│ └── appsettings.json
├── Login
│ ├── Login.component.css
│ ├── Login.component.ts
│ ├── Login.component.html
│ └── Login.spec.ts
├── Start
│ ├── Start.component.css
│ └── Start.component.html
├── Status
│ ├── Status.component.css
│ ├── Status.component.html
│ └── Status.component.ts
├── TaskView
│ ├── TaskView.component.css
│ ├── TaskView.component.html
│ └── TaskView.component.ts
├── SubTaskList
│ ├── SubTaskList.component.css
│ ├── SubTaskList.component.html
│ └── SubTaskList.component.ts
├── cordova.js
├── favicon.ico
├── environments
│ ├── environment.prod.ts
│ └── environment.ts
├── TaskEdit
│ ├── TaskEdit.component.css
│ ├── TaskEdit.component.ts
│ └── TaskEdit.component.html
├── app
│ ├── app.component.css
│ ├── app.spec.ts
│ └── app.component.html
├── Util
│ ├── LineBreakPipe.ts
│ ├── ImportancePipe.ts
│ ├── ITV_AngularUtil.ts
│ ├── RoutingModule.ts
│ └── RouterAnimations.ts
├── typings.d.ts
├── Services
│ ├── MiracleListProxyExtensions.ts
│ ├── HttpClientInterceptor.ts
│ ├── AppLoadService.ts
│ ├── CommunicationService.ts
│ └── HttpInterceptor.ts
├── tsconfig.json
├── WORK
│ └── demo.spec.ts
├── web.config
├── main.ts
├── polyfills.ts
├── test.ts
├── index.html
└── styles.css
├── readme.temp
├── .vs
├── ProjectSettings.json
├── slnx.sqlite
├── MiracleListClient
│ └── v15
│ │ ├── .suo
│ │ └── Browse.VC.db
└── VSWorkspaceState.json
├── run-prod.ps1
├── .angulardoc.json
├── .ember-cli
├── Electron
├── src
│ ├── img
│ │ ├── icon.icns
│ │ ├── icon.ico
│ │ └── icon.png
│ ├── electron-webpack.json
│ ├── electron-preload.js
│ ├── electron-preload.ts
│ ├── jquery-fix.js
│ ├── jquery-fix.ts
│ ├── electron-traymenu.ts
│ ├── electron-traymenu.js
│ └── electron-appmenu.ts
├── run.ps1
├── copy+run.ps1
├── typings.d.ts
├── debug-main.ps1
├── build-ng+e.ps1
├── tsconfig.json
├── HelloworldElectron.ps1
├── create-windows-installer.ps1
├── copy-electronmain.ps1
├── deploy.ps1
└── package.json
├── acorn.cmd
├── e2e
├── app.po.ts
├── tsconfig.e2e.json
└── app.e2e-spec.ts
├── .editorconfig
├── .vscode
├── tasks.json
├── settings.json
└── launch.json
├── sha.js
├── tsconfig.json
├── .gitignore
├── Docker MiracleList.ps1
├── protractor.conf.js
├── .angular-cli.json
├── .angular-cli.json.bak
├── karma.conf.js
├── tslint.json
├── package.json
├── NG6-angular.json
├── README.md.bak
└── README.md
/launch.json:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Cordova/jsconfig.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/src/assets/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Login/Login.component.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Start/Start.component.css:
--------------------------------------------------------------------------------
1 | .Start {
2 |
3 | }
--------------------------------------------------------------------------------
/src/Status/Status.component.css:
--------------------------------------------------------------------------------
1 | .Status {
2 |
3 | }
--------------------------------------------------------------------------------
/readme.temp:
--------------------------------------------------------------------------------
1 | "../Electron/src/jquery-fix.js",
--------------------------------------------------------------------------------
/src/TaskView/TaskView.component.css:
--------------------------------------------------------------------------------
1 | .TaskView {
2 |
3 | }
--------------------------------------------------------------------------------
/.vs/ProjectSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "CurrentProjectSetting": null
3 | }
--------------------------------------------------------------------------------
/src/SubTaskList/SubTaskList.component.css:
--------------------------------------------------------------------------------
1 | .SubTaskList {
2 |
3 | }
--------------------------------------------------------------------------------
/Cordova/.gitignore:
--------------------------------------------------------------------------------
1 | platforms/Android
2 | platforms/windows
3 | platforms/Browser
4 | www
--------------------------------------------------------------------------------
/src/cordova.js:
--------------------------------------------------------------------------------
1 | // nur ein Platzhalter für den Fall, dass für Cordova kompiliert wird!
--------------------------------------------------------------------------------
/run-prod.ps1:
--------------------------------------------------------------------------------
1 | # npm install -g http-server
2 | ng build --prod
3 | http-server -c-1 dist
4 |
--------------------------------------------------------------------------------
/.angulardoc.json:
--------------------------------------------------------------------------------
1 | {
2 | "repoId": "8a2537c0-ca6c-4c7a-821f-3a9b29612d52",
3 | "lastSync": 0
4 | }
--------------------------------------------------------------------------------
/.vs/slnx.sqlite:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HSchwichtenberg/MiracleListAngular/HEAD/.vs/slnx.sqlite
--------------------------------------------------------------------------------
/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HSchwichtenberg/MiracleListAngular/HEAD/src/favicon.ico
--------------------------------------------------------------------------------
/Cordova/run-browser.ps1:
--------------------------------------------------------------------------------
1 | cd $PSScriptRoot\
2 | "-------> Starten im Brower..."
3 | cordova run browser
4 |
--------------------------------------------------------------------------------
/src/assets/URL.json:
--------------------------------------------------------------------------------
1 |
2 | {
3 | "API_BASE_URL": "https://miraclelistbackend-staging.azurewebsites.net"
4 | }
--------------------------------------------------------------------------------
/src/assets/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HSchwichtenberg/MiracleListAngular/HEAD/src/assets/favicon.ico
--------------------------------------------------------------------------------
/.ember-cli:
--------------------------------------------------------------------------------
1 | {
2 | "skipGit" : true,
3 | "port" : 4400,
4 | "liveReload" : true,
5 | "checkForUpdates" : false
6 | }
--------------------------------------------------------------------------------
/Electron/src/img/icon.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HSchwichtenberg/MiracleListAngular/HEAD/Electron/src/img/icon.icns
--------------------------------------------------------------------------------
/Electron/src/img/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HSchwichtenberg/MiracleListAngular/HEAD/Electron/src/img/icon.ico
--------------------------------------------------------------------------------
/Electron/src/img/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HSchwichtenberg/MiracleListAngular/HEAD/Electron/src/img/icon.png
--------------------------------------------------------------------------------
/Electron/run.ps1:
--------------------------------------------------------------------------------
1 | $erroractionpreference = "stop"
2 | "Starte Electron App..."
3 | electron $psscriptroot\..\temp_electron
4 |
--------------------------------------------------------------------------------
/.vs/MiracleListClient/v15/.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HSchwichtenberg/MiracleListAngular/HEAD/.vs/MiracleListClient/v15/.suo
--------------------------------------------------------------------------------
/Electron/copy+run.ps1:
--------------------------------------------------------------------------------
1 | $erroractionpreference = "stop"
2 | & "$PSScriptRoot\copy-electronmain.ps1"
3 | & "$PSScriptRoot\run.ps1"
4 |
--------------------------------------------------------------------------------
/src/assets/MiracleListLogo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HSchwichtenberg/MiracleListAngular/HEAD/src/assets/MiracleListLogo.jpg
--------------------------------------------------------------------------------
/src/assets/MiracleListLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HSchwichtenberg/MiracleListAngular/HEAD/src/assets/MiracleListLogo.png
--------------------------------------------------------------------------------
/Cordova/assets/MiracleListLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HSchwichtenberg/MiracleListAngular/HEAD/Cordova/assets/MiracleListLogo.png
--------------------------------------------------------------------------------
/Cordova/.vscode/plugins.json:
--------------------------------------------------------------------------------
1 | {"plugins":["cordova-plugin-whitelist","cordova-plugin-device","cordova-plugin-file","cordova-plugin-dialogs"]}
--------------------------------------------------------------------------------
/.vs/MiracleListClient/v15/Browse.VC.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HSchwichtenberg/MiracleListAngular/HEAD/.vs/MiracleListClient/v15/Browse.VC.db
--------------------------------------------------------------------------------
/Cordova/platforms/platforms.json:
--------------------------------------------------------------------------------
1 | {
2 | "browser": "4.1.0",
3 | "windows": "5.0.0",
4 | "android": "6.2.3",
5 | "ios": "4.4.0"
6 | }
--------------------------------------------------------------------------------
/Electron/typings.d.ts:
--------------------------------------------------------------------------------
1 | /* SystemJS module definition */
2 | declare var module: NodeModule;
3 | interface NodeModule {
4 | id: string;
5 | }
6 |
--------------------------------------------------------------------------------
/src/assets/MiracleListLogo_ohneText.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HSchwichtenberg/MiracleListAngular/HEAD/src/assets/MiracleListLogo_ohneText.jpg
--------------------------------------------------------------------------------
/Electron/debug-main.ps1:
--------------------------------------------------------------------------------
1 | if ((get-location).Path -notlike "*electron*") { cd "electron" }
2 | electron ..\temp_electron --inspect=12345 --debug-brk
3 |
--------------------------------------------------------------------------------
/Cordova/assets/MiracleListLogo_ohneText.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HSchwichtenberg/MiracleListAngular/HEAD/Cordova/assets/MiracleListLogo_ohneText.png
--------------------------------------------------------------------------------
/.vs/VSWorkspaceState.json:
--------------------------------------------------------------------------------
1 | {
2 | "ExpandedNodes": [
3 | "",
4 | "\\src\\Login"
5 | ],
6 | "SelectedNode": "\\src",
7 | "PreviewInSolutionExplorer": false
8 | }
--------------------------------------------------------------------------------
/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true,
3 | API_BASE_URL: 'https://miraclelistbackend-produktion.azurewebsites.net',
4 | };
5 |
--------------------------------------------------------------------------------
/Cordova/run-android.ps1:
--------------------------------------------------------------------------------
1 | cd $PSScriptRoot
2 | cordova platform version
3 | "-------> Android-Geräte:"
4 | cordova run android --list
5 | "-------> Starten auf Android..."
6 | cordova run android
7 |
--------------------------------------------------------------------------------
/Electron/src/electron-webpack.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": {
3 | "sourceDirectory": "H:/MiracleListClient/Electron"
4 | },
5 | "renderer": {
6 | "sourceDirectory": "H:/MiracleListClient/src"
7 | }
8 | }
--------------------------------------------------------------------------------
/acorn.cmd:
--------------------------------------------------------------------------------
1 | @IF EXIST "%~dp0\node.exe" (
2 | "%~dp0\node.exe" "%~dp0\node_modules\acorn\bin\acorn" %*
3 | ) ELSE (
4 | @SETLOCAL
5 | @SET PATHEXT=%PATHEXT:;.JS;=;%
6 | node "%~dp0\node_modules\acorn\bin\acorn" %*
7 | )
--------------------------------------------------------------------------------
/Cordova/plugins/cordova-plugin-whitelist/NOTICE:
--------------------------------------------------------------------------------
1 | Apache Cordova
2 | Copyright 2012 The Apache Software Foundation
3 |
4 | This product includes software developed at
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
--------------------------------------------------------------------------------
/Cordova/build-ng.ps1:
--------------------------------------------------------------------------------
1 | $erroractionpreference = "stop"
2 | $lok = Get-Location
3 | "Uebersetze Angular-App fuer Cordova nach /Cordova/www ..."
4 | cd $PSScriptRoot\..
5 | ng build --base-href ./ --output-path Cordova/www/
6 | cd $lok
7 |
--------------------------------------------------------------------------------
/Cordova/build-browser.ps1:
--------------------------------------------------------------------------------
1 | & "$PSScriptRoot\build-ng.ps1"
2 | if (-not(test-path $PSScriptRoot\www)) {
3 | Write-Warning "Kein WWW-Verzeichnis vorhanden!";
4 | return; }
5 | cd $PSScriptRoot
6 | & ".\run-browser.ps1"
7 | Set-Location $lok
8 |
--------------------------------------------------------------------------------
/src/TaskEdit/TaskEdit.component.css:
--------------------------------------------------------------------------------
1 | .ng-invalid:not(form) {
2 | border-left: 5px solid #a94442;
3 | /* red */
4 | }
5 |
6 |
7 | /*.ng-valid[required],
8 | .ng-valid.required {
9 | border-left: 5px solid #42A948;
10 | }
11 | */
--------------------------------------------------------------------------------
/src/app/app.component.css:
--------------------------------------------------------------------------------
1 | .MLcheckbox {
2 | width: 30px;
3 | height: 30px;
4 | display: inline;
5 | }
6 |
7 | .MLselected {
8 | background-color: #E0EEFA !important;
9 | }
10 |
11 | .scroll {
12 | overflow-y: auto;
13 | }
--------------------------------------------------------------------------------
/src/Util/LineBreakPipe.ts:
--------------------------------------------------------------------------------
1 | import { Pipe, PipeTransform } from '@angular/core';
2 | @Pipe({name: 'br', pure: true})
3 | export class LineBreakPipe implements PipeTransform {
4 | transform(s: string): string {
5 |
6 | return s.replace(/\n/g , " ");
7 | }
8 | }
--------------------------------------------------------------------------------
/e2e/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, element, by } from 'protractor';
2 |
3 | export class MiracleListClientPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getHeadline() {
9 | return element(by.css('start h2')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Electron/build-ng+e.ps1:
--------------------------------------------------------------------------------
1 | $erroractionpreference = "stop"
2 | $lok = Get-Location
3 | cd $PSScriptRoot\..
4 | "Übersetze Angular-App für Electron nach /temp_electron ..."
5 | ng build --output-path=temp_electron --base-href .
6 | Set-Location $lok
7 | & "$PSScriptRoot\copy+run.ps1"
8 |
--------------------------------------------------------------------------------
/src/typings.d.ts:
--------------------------------------------------------------------------------
1 | /// Importe für Electron
2 | ///
3 | declare var electron: Electron.AllElectron;
4 |
5 | /* SystemJS module definition */
6 | declare var module: NodeModule;
7 | interface NodeModule {
8 | id: string;
9 | }
--------------------------------------------------------------------------------
/Cordova/build-android.ps1:
--------------------------------------------------------------------------------
1 | $erroractionpreference = "stop"
2 | $lok = Get-Location
3 | & "$PSScriptRoot\build-ng.ps1"
4 | if (-not(test-path $PSScriptRoot\www)) {
5 | Write-Warning "Kein WWW-Verzeichnis vorhanden!";
6 | return; }
7 | & "$PSScriptRoot\run-android.ps1"
8 | Set-Location $lok
9 |
--------------------------------------------------------------------------------
/Electron/src/electron-preload.js:
--------------------------------------------------------------------------------
1 | console.log("preload.js", typeof require, typeof electron);
2 | if (typeof require !== "undefined") {
3 | var electron = require('electron');
4 | }
5 | console.log("preload.js END", typeof require, typeof electron);
6 | //# sourceMappingURL=electron-preload.js.map
--------------------------------------------------------------------------------
/Electron/src/electron-preload.ts:
--------------------------------------------------------------------------------
1 | console.log("preload.js", typeof require, typeof electron);
2 | if (typeof require !== "undefined") {
3 | // tslint:disable-next-line:no-var-keyword
4 | var electron = require('electron');
5 | }
6 | console.log("preload.js END", typeof require, typeof electron);
7 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 1
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/e2e",
5 | "baseUrl": "./",
6 | "module": "commonjs",
7 | "target": "es5",
8 | "types": [
9 | "jasmine",
10 | "jasminewd2",
11 | "node"
12 | ]
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | // See https://go.microsoft.com/fwlink/?LinkId=733558
3 | // for the documentation about the tasks.json format
4 | "version": "2.0.0",
5 | "tasks": [{
6 | "type": "typescript",
7 | "tsconfig": "electron\\tsconfig.json",
8 | "problemMatcher": [
9 | "$tsc"
10 | ]
11 | }]
12 | }
--------------------------------------------------------------------------------
/sha.js:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 |
4 | case `uname` in
5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 | esac
7 |
8 | if [ -x "$basedir/node" ]; then
9 | "$basedir/node" "$basedir/node_modules/sha.js/bin.js" "$@"
10 | ret=$?
11 | else
12 | node "$basedir/node_modules/sha.js/bin.js" "$@"
13 | ret=$?
14 | fi
15 | exit $ret
16 |
--------------------------------------------------------------------------------
/Electron/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": true,
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "target": "es6",
6 | "noImplicitAny": false,
7 | "removeComments": true,
8 | "preserveConstEnums": true,
9 | "sourceMap": true,
10 | "watch": true
11 | },
12 | "include": [
13 | "**/*"
14 | ],
15 | "exclude": [
16 | "node_modules"
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/src/Util/ImportancePipe.ts:
--------------------------------------------------------------------------------
1 | import { Pipe, PipeTransform } from '@angular/core';
2 | @Pipe({name: 'importance', pure: true})
3 | export class ImportancePipe implements PipeTransform {
4 | transform(value: number, kurz: boolean = true): string {
5 | var text = "";
6 | if (!kurz) text = "Importance: "
7 | switch(value)
8 | {
9 | case 0: return text+"A"
10 | case 1: return text+"B"
11 | default: return text+"C"
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "outDir": "./dist/out-tsc",
5 | "sourceMap": true,
6 | "declaration": false,
7 | "moduleResolution": "node",
8 | "emitDecoratorMetadata": true,
9 | "experimentalDecorators": true,
10 | "target": "es5",
11 | "typeRoots": [
12 | "node_modules/@types"
13 | ],
14 | "lib": [
15 | "es2017",
16 | "dom"
17 | ]
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Electron/HelloworldElectron.ps1:
--------------------------------------------------------------------------------
1 | if (-not (test-path $PSScriptRoot\..\temp_electron\node_modules))
2 | {
3 | "Erstelle Junction für Node-Module..."
4 | New-Item -ItemType Junction -Name node_modules -Value $PSScriptRoot\node_modules -Path $PSScriptRoot\..\temp_electron
5 | }
6 |
7 | rd ..\temp_electron\*.* -force -Recurse
8 |
9 | "Hello world!Click! " | Set-Content $PSScriptRoot\..\temp_electron\index.html
10 |
--------------------------------------------------------------------------------
/src/Services/MiracleListProxyExtensions.ts:
--------------------------------------------------------------------------------
1 | import * as generated from './MiracleListProxy';
2 |
3 | class Task extends generated.Task {
4 | get info() {
5 | return this.title + ": " + this.subTaskSet + " Teilaufgaben";
6 | }
7 | }
8 |
9 | class SubTask extends generated.SubTask {
10 | get info() {
11 | return this.title;
12 | }
13 | }
14 |
15 | class Category extends generated.Category {
16 | get info() {
17 | return this.name;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `angular-cli.json`.
5 |
6 | export const environment = {
7 | production: false,
8 | API_BASE_URL: 'https://miraclelistbackend.azurewebsites.net',
9 | };
10 |
--------------------------------------------------------------------------------
/src/assets/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "### API_BASE_URL": "Hier die URL Ihres Backends eintragen/",
3 | "API_BASE_URL_Test": "http://localhost:8889",
4 | "API_BASE_URL": "https://miraclelistbackend.azurewebsites.net",
5 |
6 | "### Client-ID": "Sie erhalten Ihre erhaltene ClientID unter http://miraclelistbackend.azurewebsites.net/",
7 | "ClientID": "9e444555-7238-4614-a490-d08b3cd0b560",
8 |
9 | "### ReleaseDate": "wird von Azure DevOps-Pipeline automatisch gesetzt",
10 | "ReleaseDate": "n/a"
11 | }
--------------------------------------------------------------------------------
/src/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "allowSyntheticDefaultImports": true,
4 | "baseUrl": "",
5 | "declaration": false,
6 | "emitDecoratorMetadata": true,
7 | "experimentalDecorators": true,
8 | "lib": ["es6", "dom"],
9 | "mapRoot": "./",
10 | "module": "es6",
11 | "moduleResolution": "node",
12 | "outDir": "../dist/out-tsc",
13 | "sourceMap": true,
14 | "target": "es5",
15 | "typeRoots": [
16 | "../node_modules/@types"
17 | ]
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Electron/src/jquery-fix.js:
--------------------------------------------------------------------------------
1 | const w = window;
2 | if (!w.$) {
3 | console.log("jQuery fix...!");
4 | if (typeof module === 'object') {
5 | w.module = module;
6 | module = undefined;
7 | }
8 | w.$ = w.jQuery = require('./jquery.min.js');
9 | if (w.module)
10 | module = w.module;
11 | if (typeof require !== "undefined") {
12 | console.log("########## require('electron')");
13 | var electron = require('electron');
14 | }
15 | console.log("jQuery fix END");
16 | }
17 | //# sourceMappingURL=jquery-fix.js.map
--------------------------------------------------------------------------------
/Cordova/plugins/windows.json:
--------------------------------------------------------------------------------
1 | {
2 | "prepare_queue": {
3 | "installed": [],
4 | "uninstalled": []
5 | },
6 | "config_munge": {
7 | "files": {}
8 | },
9 | "installed_plugins": {
10 | "cordova-plugin-whitelist": {
11 | "PACKAGE_NAME": "MiracleListCordova"
12 | },
13 | "cordova-plugin-device": {
14 | "PACKAGE_NAME": "MiracleListCordova"
15 | },
16 | "cordova-plugin-dialogs": {
17 | "PACKAGE_NAME": "MiracleList Cordova"
18 | }
19 | },
20 | "dependent_plugins": {}
21 | }
--------------------------------------------------------------------------------
/src/WORK/demo.spec.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 | // // Das sind nur Dummy-Tests.
4 |
5 |
6 | // describe('Test1', () => {
7 | // it('true is true', () => expect(true).toBe(true));
8 | // });
9 |
10 | // describe('Test2', () => {
11 | // it('true is true', () => expect(true).toBe(true));
12 | // });
13 |
14 | // describe('Test3', () => {
15 | // it('true is true', () => expect(true).toBe(true));
16 | // });
17 |
18 | // describe('Test4', () => {
19 | // it('true is true', () => expect(true).toBe(true));
20 | // });
21 |
22 | // describe('Test5', () => {
23 | // it('true is true', () => expect(true).toBe(true));
24 | // });
--------------------------------------------------------------------------------
/Electron/create-windows-installer.ps1:
--------------------------------------------------------------------------------
1 |
2 | $js = @"
3 | var electronInstaller = require('electron-winstaller');
4 |
5 | console.log('Start...');
6 |
7 | resultPromise = electronInstaller.createWindowsInstaller({
8 | appDirectory: 'H:\MiracleListClient\temp_electron2',
9 | outputDirectory: 'H:\MiracleListClient\dist_electron\MiracleListElectron-win32-x64-Installer',
10 | authors: 'Dr. Holger Schwichtenberg',
11 | exe: 'MiracleListElectron.exe'
12 | });
13 | console.log('Start2...');
14 |
15 | resultPromise.then(() => console.log('It worked!'), (e) => console.log('No dice: ' + e.message));
16 | "@
17 |
18 | $js
19 |
20 | node -e $js
21 |
--------------------------------------------------------------------------------
/src/Status/Status.component.html:
--------------------------------------------------------------------------------
1 |
Sample Application v{{communicationService.GetPackage().version}} / {{communicationService.GetPackage().date}} {{released}}
2 |
3 | Current User: {{this.communicationService.username}}
4 |
5 | {{serverStatus}} Screen: {{this.sizeInfo}}
--------------------------------------------------------------------------------
/Electron/copy-electronmain.ps1:
--------------------------------------------------------------------------------
1 | $erroractionpreference = "stop"
2 | $lok = Get-Location
3 | cd $PSScriptRoot
4 | "Kopiere package.json für Electron-Main-Process..."
5 | copy-item .\package.json ..\temp_electron -Force -Verbose
6 | "Kopiere JS/TS für Electron-Main-Process..."
7 | copy-item src\* ..\temp_electron -Force -Verbose -Recurse
8 |
9 | if (-not (test-path $PSScriptRoot\..\temp_electron\node_modules))
10 | {
11 | "Erstelle Junction für Node-Module..."
12 | New-Item -ItemType Junction -Name node_modules -Value $PSScriptRoot\node_modules -Path $PSScriptRoot\..\temp_electron
13 | }
14 | else
15 | {
16 | "Junction für Node-Module ist vorhanden!"
17 | }
18 |
19 | cd $lok
20 |
--------------------------------------------------------------------------------
/Electron/deploy.ps1:
--------------------------------------------------------------------------------
1 | $target = "dist_electron"
2 | $erroractionpreference = "stop"
3 | $lok = Get-Location
4 | cd $PSScriptRoot\..
5 | "--> Angular-Produktions-Build für Electron nach temp_electron..."
6 | ng build --target=production --environment=prod --output-path=temp_electron --base-href .
7 | & "$PSScriptRoot\copy-electronmain.ps1"
8 | cd $PSScriptRoot\..
9 | "--> Electron-Paket erstellen..."
10 | electron-packager temp_electron MiracleListElectron --platform=win32,linux --arch=x64 --out=$target/ --overwrite --icon=Electron/src/img/icon --asar #win32,darwin,linux
11 | "--> !!!FERTIG!!!"
12 | cd $lok
13 | & "$PSScriptRoot\..\$target\MiracleListElectron-win32-x64\MiracleListElectron.exe"
14 |
--------------------------------------------------------------------------------
/Electron/src/jquery-fix.ts:
--------------------------------------------------------------------------------
1 | //vgl. https://github.com/electron/electron/issues/254 und http://stackoverflow.com/questions/32621988/electron-jquery-is-not-defined
2 |
3 | const w = window;
4 | if (!w.$) {
5 | console.log("jQuery fix...!")
6 | if (typeof module === 'object') {
7 | w.module = module;
8 | module = undefined;
9 | }
10 | w.$ = w.jQuery = require('./jquery.min.js');
11 | if (w.module) module = w.module;
12 |
13 | if (typeof require !== "undefined") {
14 | console.log("########## require('electron')");
15 | // tslint:disable-next-line:no-var-keyword
16 | var electron = require('electron');
17 | }
18 | console.log("jQuery fix END")
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/Cordova/plugins/android.json:
--------------------------------------------------------------------------------
1 | {
2 | "prepare_queue": {
3 | "installed": [],
4 | "uninstalled": []
5 | },
6 | "config_munge": {
7 | "files": {}
8 | },
9 | "installed_plugins": {
10 | "cordova-plugin-device": {
11 | "PACKAGE_NAME": "de.itvisions.miraclelist"
12 | },
13 | "cordova-plugin-dialogs": {
14 | "PACKAGE_NAME": "de.itvisions.miraclelist"
15 | },
16 | "cordova-plugin-file": {
17 | "PACKAGE_NAME": "de.itvisions.miraclelist"
18 | },
19 | "cordova-plugin-whitelist": {
20 | "PACKAGE_NAME": "de.itvisions.miraclelist"
21 | }
22 | },
23 | "dependent_plugins": {
24 | "cordova-plugin-compat": {
25 | "PACKAGE_NAME": "de.itvisions.miraclelist"
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/Cordova/plugins/browser.json:
--------------------------------------------------------------------------------
1 | {
2 | "prepare_queue": {
3 | "installed": [],
4 | "uninstalled": []
5 | },
6 | "config_munge": {
7 | "files": {}
8 | },
9 | "installed_plugins": {
10 | "cordova-plugin-device": {
11 | "PACKAGE_NAME": "de.itvisions.miraclelist"
12 | },
13 | "cordova-plugin-dialogs": {
14 | "PACKAGE_NAME": "de.itvisions.miraclelist"
15 | },
16 | "cordova-plugin-file": {
17 | "PACKAGE_NAME": "de.itvisions.miraclelist"
18 | },
19 | "cordova-plugin-whitelist": {
20 | "PACKAGE_NAME": "de.itvisions.miraclelist"
21 | }
22 | },
23 | "dependent_plugins": {
24 | "cordova-plugin-compat": {
25 | "PACKAGE_NAME": "de.itvisions.miraclelist"
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/src/SubTaskList/SubTaskList.component.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "tslint.enable": true,
3 | "editor.fontSize": 18,
4 | "typescript.check.workspaceVersion": false,
5 | "editor.tabSize": 1,
6 | "editor.detectIndentation": false,
7 | "editor.wordWrap": true,
8 | "editor.tabCompletion": true,
9 | "files.exclude": {
10 | "**/*.js": { "when": "$(basename).ts" },
11 | "**/*.js.map": true,
12 | "dist*": true,
13 | //"temp*": true,
14 | "node_modules": true,
15 | "Electron/node_modules": true,
16 | "Cordova/node_modules": true,
17 | "Cordova/plugins": true,
18 | "Cordova/platforms": true,
19 | "xMLCordova": true
20 | },
21 | "angulardoc.repoId": "8a2537c0-ca6c-4c7a-821f-3a9b29612d52",
22 | "angulardoc.lastSync": 0
23 | }
--------------------------------------------------------------------------------
/Cordova/plugins/cordova-plugin-whitelist/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "cordova-plugin-whitelist",
3 | "version": "1.3.1",
4 | "description": "Cordova Whitelist Plugin",
5 | "cordova": {
6 | "platforms": [
7 | "android"
8 | ]
9 | },
10 | "repository": {
11 | "type": "git",
12 | "url": "https://github.com/apache/cordova-plugin-whitelist"
13 | },
14 | "keywords": [
15 | "cordova",
16 | "whitelist",
17 | "ecosystem:cordova",
18 | "cordova-android"
19 | ],
20 | "engines": {
21 | "cordovaDependencies": {
22 | "0.0.0": {
23 | "cordova-android": ">=4.0.0"
24 | },
25 | "2.0.0": {
26 | "cordova": ">100"
27 | }
28 | }
29 | },
30 | "author": "Apache Software Foundation",
31 | "license": "Apache-2.0"
32 | }
33 |
--------------------------------------------------------------------------------
/src/main.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
4 | import { enableProdMode } from '@angular/core';
5 | import { environment } from './environments/environment';
6 | import { AppModule } from './app.module';
7 | import { TRANSLATIONS, TRANSLATIONS_FORMAT } from '@angular/core'; // for i18n
8 |
9 | // import { AppModule } from './angular2-contextmenu/demo/app.module'
10 |
11 | if (environment.production) {
12 | enableProdMode();
13 | }
14 |
15 | // we use the webpack raw-loader to return the content as a string
16 | // const translations = require(`raw-loader!./locale/messages.en.xlf`)
17 |
18 | platformBrowserDynamic().bootstrapModule(AppModule,
19 | {
20 | // providers: [
21 | // {provide: TRANSLATIONS, useValue: translations},
22 | // {provide: TRANSLATIONS_FORMAT, useValue: 'xlf'}
23 | // ]
24 | });
25 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | #playgrounds
4 | /src/playground
5 | /src/tasktable
6 | /src/unused
7 |
8 | # compiled output
9 | /dist
10 | /dist*
11 | /temp*
12 | /tmp
13 |
14 |
15 | # map-files
16 | *.map
17 |
18 | # dependencies
19 | /Cordova/plugins/*
20 | /Cordova/platforms/*
21 | node_modules/
22 |
23 | # IDEs and editors
24 | /.idea
25 | .project
26 | .classpath
27 | .c9/
28 | *.launch
29 | .settings/
30 |
31 | # IDE - VSCode
32 | .vscode/*
33 | !.vscode/settings.json
34 | !.vscode/tasks.json
35 | !.vscode/launch.json
36 | !.vscode/extensions.json
37 |
38 | # misc
39 | /.sass-cache
40 | /connect.lock
41 | /coverage/*
42 | /libpeerconnection.log
43 | npm-debug.log
44 | testem.log
45 | /typings
46 | /testresults
47 |
48 | # e2e
49 | /e2e/*.js
50 | /e2e/*.map
51 |
52 | #System Files
53 | .DS_Store
54 | Thumbs.db
55 |
--------------------------------------------------------------------------------
/src/polyfills.ts:
--------------------------------------------------------------------------------
1 | // This file includes polyfills needed by Angular 2 and is loaded before
2 | // the app. You can add your own extra polyfills to this file.
3 | import 'core-js/es6/symbol';
4 | import 'core-js/es6/object';
5 | import 'core-js/es6/function';
6 | import 'core-js/es6/parse-int';
7 | import 'core-js/es6/parse-float';
8 | import 'core-js/es6/number';
9 | import 'core-js/es6/math';
10 | import 'core-js/es6/string';
11 | import 'core-js/es6/date';
12 | import 'core-js/es6/array';
13 | import 'core-js/es6/regexp';
14 | import 'core-js/es6/map';
15 | import 'core-js/es6/set';
16 | import 'core-js/es6/reflect';
17 |
18 | import 'core-js/es7/reflect';
19 |
20 |
21 | // Animations
22 | // Needed for: All but Chrome and Firefox, Not supported in IE9
23 | import 'web-animations-js';
24 |
25 | // https://github.com/angular/angular/issues/15586
26 | // https://github.com/angular/angular/issues/15586#issuecomment-292339628
27 | import 'zone.js/dist/zone';
--------------------------------------------------------------------------------
/Cordova/plugins/fetch.json:
--------------------------------------------------------------------------------
1 | {
2 | "cordova-plugin-whitelist": {
3 | "source": {
4 | "type": "registry",
5 | "id": "cordova-plugin-whitelist@1"
6 | },
7 | "is_top_level": true,
8 | "variables": {}
9 | },
10 | "cordova-plugin-device": {
11 | "source": {
12 | "type": "registry",
13 | "id": "cordova-plugin-device"
14 | },
15 | "is_top_level": true,
16 | "variables": {}
17 | },
18 | "cordova-plugin-file": {
19 | "source": {
20 | "type": "registry",
21 | "id": "cordova-plugin-file@4.3.3"
22 | },
23 | "is_top_level": true,
24 | "variables": {}
25 | },
26 | "cordova-plugin-dialogs": {
27 | "source": {
28 | "type": "registry",
29 | "id": "cordova-plugin-dialogs"
30 | },
31 | "is_top_level": true,
32 | "variables": {}
33 | }
34 | }
--------------------------------------------------------------------------------
/src/test.ts:
--------------------------------------------------------------------------------
1 |
2 | import 'zone.js/dist/long-stack-trace-zone';
3 | import 'zone.js/dist/proxy.js';
4 | import 'zone.js/dist/sync-test';
5 | import 'zone.js/dist/jasmine-patch';
6 | import 'zone.js/dist/async-test';
7 | import 'zone.js/dist/fake-async-test';
8 | import { getTestBed } from '@angular/core/testing';
9 | import {
10 | BrowserDynamicTestingModule,
11 | platformBrowserDynamicTesting
12 | } from '@angular/platform-browser-dynamic/testing';
13 |
14 | // Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
15 | declare var __karma__: any;
16 | declare var require: any;
17 |
18 | // Prevent Karma from running prematurely.
19 | __karma__.loaded = function () {};
20 |
21 | // First, initialize the Angular testing environment.
22 | getTestBed().initTestEnvironment(
23 | BrowserDynamicTestingModule,
24 | platformBrowserDynamicTesting()
25 | );
26 | // Then we find all the tests.
27 | let context = require.context('./', true, /\.spec\.ts$/);
28 | // And load the modules.
29 | context.keys().map(context);
30 | // Finally, start Karma to run the tests.
31 | __karma__.start();
32 |
--------------------------------------------------------------------------------
/Cordova/hooks/README.md:
--------------------------------------------------------------------------------
1 |
21 | # Cordova Hooks
22 |
23 | Cordova Hooks represent special scripts which could be added by application and plugin developers or even by your own build system to customize cordova commands. See Hooks Guide for more details: http://cordova.apache.org/docs/en/edge/guide_appdev_hooks_index.md.html#Hooks%20Guide.
24 |
--------------------------------------------------------------------------------
/src/app/app.spec.ts:
--------------------------------------------------------------------------------
1 | // import { AppComponent } from "./app.component";
2 | // import { ComponentFixture, TestBed } from "@angular/core/testing";
3 | // import { DebugElement } from "@angular/core";
4 | // import { By } from "@angular/platform-browser";
5 |
6 | // // Das sind bisher nur Dummy-Tests. Siehe https://angular.io/guide/testing
7 |
8 |
9 |
10 | // describe('AppComponent Test', () => {
11 |
12 | // let comp: AppComponent;
13 | // let fixture: ComponentFixture;
14 | // let de: DebugElement;
15 | // let el: HTMLElement;
16 | // beforeEach(() => {
17 | // TestBed.configureTestingModule({
18 | // declarations: [ AppComponent ], // declare the test component
19 | // });
20 |
21 | // fixture = TestBed.createComponent(AppComponent);
22 |
23 | // comp = fixture.componentInstance; // BannerComponent test instance
24 |
25 | // // query for the title by CSS element selector
26 | // // de = fixture.debugElement.query(By.css('h1'));
27 | // // el = de.nativeElement;
28 | // });
29 |
30 | // it('should display original title', () => {
31 | // // fixture.detectChanges();
32 | // expect(true).toBe(true);
33 | // // expect(el.textContent).toContain("xx");
34 | // });
35 | // });
36 |
37 |
38 |
--------------------------------------------------------------------------------
/src/Util/ITV_AngularUtil.ts:
--------------------------------------------------------------------------------
1 | // Angular-Standardkomponenten
2 | import { Component } from '@angular/core';
3 | import { Http } from '@angular/http';
4 | import { Observable } from 'rxjs/Rx';
5 | import { FormsModule } from '@angular/forms';
6 | import { Injectable } from '@angular/core';
7 |
8 | /// Hilfsklasse für Angular ab Version 2.0
9 | @Injectable()
10 | export class ITV_AngularUtil {
11 |
12 | /// empfängt HTTP-Dienst per DI
13 | constructor(private http: Http) {
14 | }
15 |
16 | public GetHttp(url: string) {
17 | // Daten von HTTP-Dienst laden
18 | console.log("GetHttp: " + url);
19 | return this.http
20 | .get(url)
21 | .map(resp => { console.log("GetHttp: OK!"); return resp.json() })
22 | .catch((error: any) => {
23 | console.log("!!! GetHttp:Fehler", error);
24 | return Observable.throw(error.json().error || 'Server error');
25 | })
26 | }
27 |
28 | public PostHttp(url: string, body) {
29 | // Daten zum HTTP-Dienst senden
30 | console.log("PostHttp: " + url);
31 | return this.http
32 | .post(url, body)
33 | .map(resp => { console.log("PostHttp: OK!"); return resp.json() })
34 | .catch((error: any) => {
35 | console.log("!!! PostHttp:Fehler", error);
36 | return Observable.throw(error.json().error || 'Server error');
37 | })
38 | }
39 | }
--------------------------------------------------------------------------------
/Docker MiracleList.ps1:
--------------------------------------------------------------------------------
1 | # MiracleList-Client als Docker-Container
2 |
3 | $ImageName = "itvisions/miraclelistclient:WindowsServerCore_v0.6" # repository name must be lowercase
4 | $ImageNameLatest = "itvisions/miraclelistclient:latest" # repository name must be lowercase
5 | $Containername = "MiracleList"
6 |
7 | get-container | where names -like "/miracle*" | Remove-Container
8 | get-containerimage | where repotags -like "*miracle*" | Remove-ContainerImage
9 | # Container erstellen
10 | docker run -d -p 8111:80 --name $Containername microsoft/iis
11 |
12 | # Container Inhalt
13 | docker exec $Containername cmd /c del C:\inetpub\wwwroot\*.* /q
14 | $Quelle = "H:\MiracleListClient\dist\*"
15 | $containerID = (Get-container $Containername ).ID # oder $containerID= docker inspect --format="{{.Id}}" IIS1
16 | $session = New-PSSession -ContainerId $containerID -RunAsAdministrator
17 | Copy-Item -ToSession $session $Quelle -Destination C:\inetpub\wwwroot -Recurse -Force -verbose
18 |
19 | explorer http://localhost:8111
20 |
21 | # windows does not support commit of a running container
22 | docker stop $Containername
23 |
24 | # Image erstellen
25 | docker commit $Containername $ImageName
26 | docker tag $ImageName $ImageNameLatest
27 |
28 | # Veröffentlichen
29 | docker login
30 | docker push $ImageName
31 | docker push $ImageNameLatest
32 |
--------------------------------------------------------------------------------
/Electron/src/electron-traymenu.ts:
--------------------------------------------------------------------------------
1 | import { app } from 'electron';
2 | import { dialog } from 'electron';
3 | import { Menu } from 'electron';
4 |
5 | /**
6 | * Hilfsklasse, die Menübaum für Tray-Menü erstellt
7 | */
8 | export class MiracleListTrayMenu {
9 | public static CreateMenu(win: Electron.BrowserWindow, env: any) {
10 | const contextMenu: Electron.Menu = Menu.buildFromTemplate([
11 | {
12 | label: 'Über diese Anwendung', click: () => {
13 | const options: Electron.MessageBoxOptions = {
14 | type: 'info',
15 | title: 'Cross-Plattform-Desktop-Variante der Beispielanwendung MiracleList',
16 | buttons: ['Ok'],
17 | message: 'Autor: Dr. Holger Schwichtenberg, www.IT-Visions.de\nDetails siehe Anwendungsmenü!\nSysteminformationen: ' + JSON.stringify(env, null, 4) + ''
18 | };
19 | dialog.showMessageBoxSync(options);
20 | }
21 | },
22 | {
23 | label: 'Verstecken', click: () => { win.minimize(); }
24 | },
25 | {
26 | label: 'Wiederherstellen', click: () => { win.restore(); }
27 | },
28 | {
29 | label: 'Maximieren', click: () => { win.maximize(); }
30 | },
31 | {
32 | label: 'Abmelden', click: () => { win.webContents.send('logout', { msg: '' }); }
33 | },
34 | {
35 | label: 'Beenden', click: () => { app.quit(); }
36 | },
37 | ]);
38 | return contextMenu;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Util/RoutingModule.ts:
--------------------------------------------------------------------------------
1 |
2 | // Angular Library-Importe
3 | import { NgModule } from '@angular/core';
4 | import { RouterModule, Routes } from '@angular/router';
5 | // Eigene Module
6 | import { TaskEditComponent } from "../TaskEdit/TaskEdit.component";
7 | import { TaskViewComponent } from "../TaskView/TaskView.component";
8 | import { LoginComponent } from "../Login/Login.component";
9 | import { AppComponent } from "../app/app.component";
10 | // import { PlaygroundComponent } from './../playground/playground.component';
11 | // import { TaskTableComponent } from '../TaskTable/TaskTable.component';
12 |
13 | // URLs festlegen
14 | const routes: Routes = [
15 | { path: '', component: LoginComponent },
16 | { path: 'app', component: AppComponent,
17 | children: [
18 | { path: 'taskview/:id', component: TaskViewComponent, outlet: "column3" },
19 | { path: 'taskedit/:id', component: TaskEditComponent, outlet: "column3" }
20 | ]
21 | }
22 | // ,
23 | // { path: 'test', component: PlaygroundComponent }, // ohne Parameter zuerst!
24 | // { path: 'test/:id1/:id2/:id3', component: PlaygroundComponent }
25 | // { path: 'table', component: TaskTableComponent },
26 | ];
27 |
28 | @NgModule({
29 | imports: [RouterModule.forRoot(routes,{ enableTracing: false})], // forRoot == Routing für das Hauptmodul
30 | exports: [RouterModule]
31 | })
32 | export class RoutingModule {
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/Cordova/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "io.cordova.miraclelist",
3 | "version": "0.6.5-Beta1",
4 | "displayName": "MiracleListCordova",
5 | "cordova": {
6 | "platforms": [
7 | "ios",
8 | "windows",
9 | "browser",
10 | "android"
11 | ],
12 | "plugins": {
13 | "cordova-plugin-whitelist": {},
14 | "cordova-plugin-device": {},
15 | "cordova-plugin-file": {},
16 | "cordova-plugin-dialogs": {}
17 | }
18 | },
19 | "dependencies": {
20 | "cordova-android": "^7.0.0",
21 | "cordova-browser": "^5.0.3",
22 | "cordova-common": "2.2.1",
23 | "cordova-ios": "^4.4.0",
24 | "cordova-plugin-device": "^1.1.7",
25 | "cordova-plugin-dialogs": "^1.3.4",
26 | "cordova-plugin-file": "^5.0.0",
27 | "cordova-plugin-whitelist": "1",
28 | "cordova-windows": "~5.0.0"
29 | },
30 | "scripts": {
31 | "restore": "npm install --no-bin-links",
32 | "build-ng": "cd .. && ng build --base-href ./ --output-path Cordova/www/ && cd Cordova",
33 | "build-ng-prod": "cd .. && ng build --target=production --environment=prod --output-path Cordova/www/ && cd Cordova",
34 | "browser": "cordova run browser",
35 | "win": "cordova run windows",
36 | "android": "cordova run android",
37 | "ios": "cordova run ios"
38 | }
39 | }
--------------------------------------------------------------------------------
/Cordova/package.json.bak:
--------------------------------------------------------------------------------
1 | {
2 | "name": "io.cordova.miraclelist",
3 | "version": "0.6.5-Beta1",
4 | "displayName": "MiracleListCordova",
5 | "cordova": {
6 | "platforms": [
7 | "ios",
8 | "windows",
9 | "browser",
10 | "android"
11 | ],
12 | "plugins": {
13 | "cordova-plugin-whitelist": {},
14 | "cordova-plugin-device": {},
15 | "cordova-plugin-file": {},
16 | "cordova-plugin-dialogs": {}
17 | }
18 | },
19 | "dependencies": {
20 | "cordova-android": "^7.0.0",
21 | "cordova-browser": "^5.0.3",
22 | "cordova-common": "2.2.1",
23 | "cordova-ios": "^4.4.0",
24 | "cordova-plugin-device": "^1.1.6",
25 | "cordova-plugin-dialogs": "^1.3.4",
26 | "cordova-plugin-file": "^5.0.0",
27 | "cordova-plugin-whitelist": "1",
28 | "cordova-windows": "~5.0.0"
29 | },
30 | "scripts": {
31 | "restore": "npm install --no-bin-links",
32 | "build-ng": "cd .. && ng build --base-href ./ --output-path Cordova/www/ && cd Cordova",
33 | "build-ng-prod": "cd .. && ng build --target=production --environment=prod --output-path Cordova/www/ && cd Cordova",
34 | "browser": "cordova run browser",
35 | "win": "cordova run windows",
36 | "android": "cordova run android",
37 | "ios": "cordova run ios"
38 | }
39 | }
--------------------------------------------------------------------------------
/src/Services/HttpClientInterceptor.ts:
--------------------------------------------------------------------------------
1 | // Interceptor für HttpClient zum Injizieren des Authentifizierungstokens
2 | // läuft ab Angular 4.3 für HttpClient-Dienst
3 | // https://medium.com/@ryanchenkie_40935/angular-authentication-using-the-http-client-and-http-interceptors-2f9d1540eb8
4 | import { Injectable } from '@angular/core';
5 | import {
6 | HttpRequest,
7 | HttpHandler,
8 | HttpEvent,
9 | HttpInterceptor
10 | } from '@angular/common/http';
11 |
12 | import { CommunicationService } from './CommunicationService';
13 | import { Observable } from 'rxjs/Observable';
14 |
15 | @Injectable()
16 | export class HttpClientInterceptor implements HttpInterceptor {
17 | constructor(public communicationService: CommunicationService) {}
18 | intercept(request: HttpRequest, next: HttpHandler): Observable> {
19 |
20 | // console.log("HTTP from ", request.url);
21 | request = request.clone({
22 | // url: request.url.replace("miraclelistbackend",this.communicationService.GetURL())
23 | });
24 |
25 | if (this.communicationService.token)
26 | {
27 | console.log("********* HttpInterceptor: Token injiziert: " + this.communicationService.token);
28 | request = request.clone({
29 | setHeaders: {
30 | "ML-AuthToken": `${this.communicationService.token}`
31 | }
32 | });
33 | }
34 | console.log("********* HttpInterceptor: Kein Token!");
35 | return next.handle(request);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/TaskView/TaskView.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Aufgabe
5 | {{task.title}}
6 |
7 |
8 |
9 |
10 | Bearbeiten
11 |
12 |
13 |
14 | Zurück
15 |
16 |
17 |
18 |
19 |
20 |
Wichtigkeit: {{task.importance | importance}}
21 |
22 |
today, 'text-warning': task.due==today, 'text-success': task.due
23 | Fällig am: {{task.due | amDateFormat: 'L'}}
24 |
25 | Aufwand: {{task.effort}}
26 |
27 |
28 |
32 |
--------------------------------------------------------------------------------
/Cordova/plugins/cordova-plugin-whitelist/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 |
21 |
22 | # Contributing to Apache Cordova
23 |
24 | Anyone can contribute to Cordova. And we need your contributions.
25 |
26 | There are multiple ways to contribute: report bugs, improve the docs, and
27 | contribute code.
28 |
29 | For instructions on this, start with the
30 | [contribution overview](http://cordova.apache.org/contribute/).
31 |
32 | The details are explained there, but the important items are:
33 | - Sign and submit an Apache ICLA (Contributor License Agreement).
34 | - Have a Jira issue open that corresponds to your contribution.
35 | - Run the tests so your patch doesn't break existing functionality.
36 |
37 | We look forward to your contributions!
38 |
--------------------------------------------------------------------------------
/src/Start/Start.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/e2e/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | //import { AppModule } from '../src/app.module';
2 | import { MiracleListClientPage } from './app.po';
3 | import { browser, element, by } from 'protractor';
4 |
5 | // Testcode mit Page Object
6 | describe('miracle-list-client App', function () {
7 | let page: MiracleListClientPage;
8 |
9 | beforeEach(() => {
10 | page = new MiracleListClientPage();
11 | });
12 |
13 | // Testcode mit Page Object
14 | it('Inhalt der Anmeldeseite', () => {
15 | page.navigateTo();
16 | expect(page.getHeadline()).toEqual('Benutzeranmeldung');
17 | });
18 |
19 | // Direkter Testcode ohne Page Object
20 | var anmeldename = "testuser";
21 | var kennwort = "geheim";
22 |
23 | it('Kompletter Anmeldevorgang', function () {
24 | browser.get('/');
25 | var headline = element(by.css('start h2'));
26 | expect(headline.getText()).toBe('Benutzeranmeldung');
27 |
28 | // teste Formular ohne Page Object
29 | element(by.id('name')).sendKeys(anmeldename);
30 | element(by.id('password')).sendKeys(kennwort);
31 | element(by.id('Anmelden')).click().then(
32 | ()=>{
33 |
34 | // hat sich die URL nun verändert?
35 | expect(browser.getCurrentUrl())
36 | .toBe( browser.baseUrl + '/app');});
37 |
38 | // ========== Zugriff auf Modell geht noch nicht in Angular 2 :-(
39 | // var e2 = element(by.model("this.communicationService.username"));
40 | // expect(e2).toEqual(anmeldename);
41 |
42 | // Prüfe, ob Benutzername auf dem Bildschirm steht
43 | var e2 = element(by.id("LoggedInUser"));
44 | expect(e2.getText()).toEqual("Current User: " + anmeldename);
45 |
46 | });
47 | });
48 |
49 | // console.log("e2:",e2);
50 | // browser.waitForAngular();
51 | // browser.sleep(5000);
52 |
--------------------------------------------------------------------------------
/src/Services/AppLoadService.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 | import { HttpClient } from '@angular/common/http';
3 | import 'rxjs/add/operator/toPromise';
4 | import { environment } from '../environments/environment';
5 |
6 | @Injectable()
7 | export class AppLoadService {
8 |
9 | public static Settings :any;
10 |
11 | constructor(private httpClient: HttpClient) { }
12 |
13 | initializeApp(): Promise {
14 | return new Promise((resolve, reject) => {
15 | console.log(`initializeApp:: inside promise`);
16 |
17 | setTimeout(() => {
18 | console.log(`initializeApp:: inside setTimeout`);
19 | // doing something
20 |
21 | resolve();
22 | }, 3000);
23 | });
24 | }
25 |
26 | async getSettings(): Promise {
27 | const filename = 'assets/appsettings.json';
28 |
29 | console.log(`getSettings: loading ${filename}...`);
30 |
31 | // AppLoadService.URL =environment[name];
32 | // console.log(`GetConfig: ${name} aus Environment=${AppLoadService.URL}`);
33 | const promise = await this.httpClient.get('assets/appsettings.json')
34 | .toPromise()
35 | .then(settings => {
36 | console.log(`getSettings: loaded`, settings);
37 | // copy to static member!
38 | AppLoadService.Settings = JSON.parse(JSON.stringify(settings));
39 | return settings;
40 | }).catch(function(e) { return null });
41 | // .finally(
42 | // function() {
43 | // if (!baseURL){
44 | // baseURL = environment["name"];
45 | // console.log(`GetConfig: ${name} aus Environment=${baseURL}`);
46 | // }
47 | // AppLoadService.URL = baseURL;
48 | // }
49 | // );
50 |
51 | return promise;
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/TaskView/TaskView.component.ts:
--------------------------------------------------------------------------------
1 |
2 | import { Component, OnInit } from '@angular/core';
3 | import { Input } from '@angular/core';
4 | import { Router, ActivatedRoute, Params } from '@angular/router';
5 | import { Task } from '../Services//MiracleListProxy';
6 | import { MiracleListProxy } from '../Services/MiracleListProxy';
7 | import { CommunicationService } from "../Services/CommunicationService"
8 |
9 | @Component({
10 | selector: 'TaskView',
11 | templateUrl: './TaskView.component.html'
12 | })
13 |
14 | export class TaskViewComponent implements OnInit {
15 | constructor(private miracleListProxy: MiracleListProxy,
16 | private communicationService: CommunicationService, private route: ActivatedRoute,
17 | ) {
18 | console.log("======= TaskViewComponent:Constructor");
19 | }
20 |
21 | ngOnInit() {
22 | console.log("======= TaskViewComponent:ngOnInit");
23 | // Routenparameter verarbeiten
24 | this.route.params.forEach((params: Params) => {
25 | let id = +params['id'];
26 | this.getTask(id);
27 |
28 | });
29 | }
30 |
31 | public task: Task;
32 |
33 | getTask(id: number) {
34 | console.log("TaskView:Task LADEN...", id)
35 | this.miracleListProxy.task(this.communicationService.token, id).subscribe(
36 | x => {
37 | this.task = x;
38 | console.log("TaskView:Task GELADEN", x)
39 | // informiere nun die übergeordnete Komponente über den aktuellen Task
40 | // wichtig, wenn direkter Ansprung per URL erfolgte
41 | this.communicationService.EmitTaskListUpdateEvent(this.task);
42 | });
43 | }
44 |
45 | gotoEdit() {
46 | this.communicationService.navigate(`/app/(column3:taskedit/${this.task.taskID})`); // Ansicht aufrufen
47 | }
48 |
49 | gotoTaskList()
50 | {
51 | this.communicationService.EmitTaskDetailCloseEvent(this.task);
52 | }
53 |
54 | reload(obj: any) {
55 | this.communicationService.EmitTaskListUpdateEvent(this.task);
56 | }
57 | }
--------------------------------------------------------------------------------
/Electron/src/electron-traymenu.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | exports.__esModule = true;
3 | var electron_1 = require("electron");
4 | var electron_2 = require("electron");
5 | var electron_3 = require("electron");
6 | /**
7 | * Hilfsklasse, die Menübaum für Tray-Menü erstellt
8 | */
9 | var MiracleListTrayMenu = /** @class */ (function () {
10 | function MiracleListTrayMenu() {
11 | }
12 | MiracleListTrayMenu.CreateMenu = function (win, env) {
13 | var contextMenu = electron_3.Menu.buildFromTemplate([
14 | {
15 | label: 'Über diese Anwendung', click: function () {
16 | var options = {
17 | type: 'info',
18 | title: 'Cross-Plattform-Desktop-Variante der Beispielanwendung MiracleList',
19 | buttons: ['Ok'],
20 | message: 'Autor: Dr. Holger Schwichtenberg, www.IT-Visions.de\nDetails siehe Anwendungsmenü!\nSysteminformationen: ' + JSON.stringify(env, null, 4) + ''
21 | };
22 | electron_2.dialog.showMessageBoxSync(options);
23 | }
24 | },
25 | {
26 | label: 'Verstecken', click: function () { win.minimize(); }
27 | },
28 | {
29 | label: 'Wiederherstellen', click: function () { win.restore(); }
30 | },
31 | {
32 | label: 'Maximieren', click: function () { win.maximize(); }
33 | },
34 | {
35 | label: 'Abmelden', click: function () { win.webContents.send('logout', { msg: '' }); }
36 | },
37 | {
38 | label: 'Beenden', click: function () { electron_1.app.quit(); }
39 | },
40 | ]);
41 | return contextMenu;
42 | };
43 | return MiracleListTrayMenu;
44 | }());
45 | exports.MiracleListTrayMenu = MiracleListTrayMenu;
46 |
--------------------------------------------------------------------------------
/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | MiracleListClient
10 |
11 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | Lade MiracleList...
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/src/SubTaskList/SubTaskList.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 | import { Input, Output, EventEmitter } from '@angular/core';
3 | import { Task, SubTask } from '../Services/MiracleListProxy';
4 | import { MiracleListProxy } from '../Services/MiracleListProxy';
5 |
6 | // Kommunikation
7 | import { CommunicationService } from "../Services/CommunicationService"
8 |
9 | @Component({
10 | selector: 'SubTaskList',
11 | templateUrl: './SubTaskList.component.html'
12 | })
13 |
14 | export class SubTaskListComponent implements OnInit {
15 |
16 | constructor(private miracleListProxy: MiracleListProxy, private communicationService: CommunicationService) {
17 | console.log("======= SubTaskList:Constructor", this.task);
18 | }
19 |
20 | ngOnInit() {
21 | // Startaktion
22 | console.log("======= SubTaskList:ngOnInit", this.task);
23 | }
24 |
25 | @Input()
26 | public task: Task;
27 |
28 | @Output()
29 | subTaskListChangedEvent = new EventEmitter();
30 |
31 | public newSubTaskTitle: string;
32 |
33 | createSubTask() {
34 | let st = new SubTask();
35 | st.subTaskID = 0;
36 | st.title = this.newSubTaskTitle;
37 | st.created = new Date();
38 | st.done = false;
39 | st.taskID = 0;
40 | this.task.subTaskSet.push(st);
41 | this.changeTask();
42 | }
43 |
44 | changeTask() {
45 | this.miracleListProxy.changeTask(this.communicationService.token, this.task).subscribe(
46 | x => {
47 | console.log("!!!Task GEÄNDERT", x)
48 | this.task = x;
49 | this.newSubTaskTitle = "";
50 | this.subTaskListChangedEvent.emit(this.task);
51 | });
52 | }
53 |
54 | removeSubTask(st: SubTask) {
55 | console.log("Subtask LÖSCHEN", st)
56 | let index = this.task.subTaskSet.indexOf(st);
57 | this.task.subTaskSet.splice(index, 1);
58 | this.miracleListProxy.changeTask(this.communicationService.token, this.task).subscribe(
59 | x => {
60 | console.log("Subtask GELÖSCHT", st)
61 | this.subTaskListChangedEvent.emit(this.task);
62 | });
63 | }
64 | }
--------------------------------------------------------------------------------
/src/styles.css:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 |
3 | @import "~ng-pick-datetime/assets/style/picker.min.css";
4 |
5 | /* https://www.npmjs.com/package/ng-pick-datetime */
6 |
7 | body {
8 | background: rgba(255, 221, 134, 1) !important;
9 | }
10 |
11 |
12 | /* @media screen and (max-width: 767px) {
13 | .MLPanel {
14 | padding-left: 2px;
15 | padding-right: 2px;
16 | }
17 | } */
18 |
19 | .MLPanel {
20 | padding-right: 2px;
21 | padding-left: 2px;
22 | }
23 |
24 | h4 {
25 | margin: 2px;
26 | }
27 |
28 |
29 | /*Ladeanimation. Quelle: http://tobiasahlin.com/spinkit/*/
30 |
31 | .spinner {
32 | margin: 100px auto;
33 | width: 50px;
34 | height: 40px;
35 | text-align: center;
36 | font-size: 10px;
37 | }
38 |
39 | .spinner>div {
40 | background-color: #333;
41 | height: 100%;
42 | width: 6px;
43 | display: inline-block;
44 | -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;
45 | animation: sk-stretchdelay 1.2s infinite ease-in-out;
46 | }
47 |
48 | .spinner .rect2 {
49 | -webkit-animation-delay: -1.1s;
50 | animation-delay: -1.1s;
51 | }
52 |
53 | .spinner .rect3 {
54 | -webkit-animation-delay: -1.0s;
55 | animation-delay: -1.0s;
56 | }
57 |
58 | .spinner .rect4 {
59 | -webkit-animation-delay: -0.9s;
60 | animation-delay: -0.9s;
61 | }
62 |
63 | .spinner .rect5 {
64 | -webkit-animation-delay: -0.8s;
65 | animation-delay: -0.8s;
66 | }
67 |
68 | @-webkit-keyframes sk-stretchdelay {
69 | 0%,
70 | 40%,
71 | 100% {
72 | -webkit-transform: scaleY(0.4)
73 | }
74 | 20% {
75 | -webkit-transform: scaleY(1.0)
76 | }
77 | }
78 |
79 | @keyframes sk-stretchdelay {
80 | 0%,
81 | 40%,
82 | 100% {
83 | transform: scaleY(0.4);
84 | -webkit-transform: scaleY(0.4);
85 | }
86 | 20% {
87 | transform: scaleY(1.0);
88 | -webkit-transform: scaleY(1.0);
89 | }
90 | }
--------------------------------------------------------------------------------
/protractor.conf.js:
--------------------------------------------------------------------------------
1 | // Protractor configuration file, see link for more information
2 | // https://github.com/angular/protractor/blob/master/lib/config.ts
3 |
4 | /*global jasmine */
5 | const { SpecReporter } = require('jasmine-spec-reporter');
6 |
7 | exports.config = {
8 | allScriptsTimeout: 11000,
9 | specs: [
10 | './e2e/**/*.e2e-spec.ts'
11 | ],
12 | capabilities: {
13 | 'browserName': 'chrome' /*firefox' /*internet explorer' /*chrome */
14 | /* Während Chrome und FireFox den Silenium WebDriver inzwischen direkt unterstützen, muss der Entwickler für Internet Explorer[https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver], Edge [https://www.microsoft.com/en-us/download/details.aspx?id=48212] und Opera [https://github.com/operasoftware/operachromiumdriver] vorher einen Treiber auf seinem System installieren.
15 | */
16 | },
17 | directConnect: true,
18 | baseUrl: 'http://localhost:4400/',
19 | framework: 'jasmine',
20 | jasmineNodeOpts: {
21 | showColors: true,
22 | defaultTimeoutInterval: 30000,
23 | print: function() {}
24 | },
25 | beforeLaunch: function() {
26 | require('ts-node').register({
27 | project: 'e2e/tsconfig.e2e.json'
28 | });
29 | },
30 | onPrepare: function() {
31 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
32 |
33 | var jasmineReporters = require('jasmine-reporters');
34 | var junitReporter = new jasmineReporters.JUnitXmlReporter({
35 |
36 | // setup the output path for the junit reports
37 | savePath: 'testresults/',
38 |
39 | // conslidate all true:
40 | // output/junitresults.xml
41 | //
42 | // conslidate all set to false:
43 | // output/junitresults-example1.xml
44 | // output/junitresults-example2.xml
45 | consolidateAll: true
46 |
47 | });
48 | jasmine.getEnv().addReporter(junitReporter);
49 | }
50 | };
--------------------------------------------------------------------------------
/Electron/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "miraclelistelectron",
3 | "version": "0.6.7-Beta1",
4 | "date": "03.09.2019",
5 | "main": "main.js",
6 | "dependencies": {
7 | "electron-settings": "^3.2.0",
8 | "moment": "^2.24.0",
9 | "username": "^5.1.0"
10 | },
11 | "devDependencies": {
12 | "@types/node": "^12.7.3",
13 | "@types/username": "^3.0.0",
14 | "@types/electron-settings": "^3.1.1",
15 | "electron": "6.0.7",
16 | "electron-builder": "^21.2.0",
17 |
18 | "electron-webpack": "2.7.4",
19 | "electron-webpack-ts": "^3.2.0",
20 | "electron-winstaller": "^4.0.0"
21 | },
22 | "scripts": {
23 | "restore": "npm install --no-bin-links",
24 | "///": "---------------------------- Skripte für Electron zum Entwickeln w = laufen auf windows m = laufen auf mac",
25 | "w-copy-electron": "xcopy src\\* ..\\temp_electron /s /e /y && copy package.json ..\\temp_electron",
26 | "m-copy-electron": "\"node_modules/.bin/copy\" \"/electron/*\" \"temp_electron\"",
27 | "m-build-electron": "ng build --output-path=temp_electron --base-href . && npm run m-copy-electron",
28 | "w-build-electron": "ng build --output-path=temp_electron --base-href . && npm run w-copy-electron",
29 | "m-electron": "npm run m-build-electron && electron temp_electron",
30 | "w-electron": "npm run w-build-electron && electron temp_electron",
31 | "m-electron-ohnengbuild": "npm run m-copy-electron && electron temp_electron",
32 | "w-electron-ohnengbuild": "npm run w-copy-electron && electron temp_electron",
33 | "w-electron-deploy": "npm run w-copy-electron && electron-packager temp_electron MiracleListElectron --platform=win32 --arch=x64 --out=dist_electron/ --overwrite --icon=src/assets/favicon.ico --asar",
34 | "w-electron-deploy-run": "npm run w-electron-deploy && start cmd /c \"dist_electron\\MiracleListElectron-win32-x64\\MiracleListElectron.exe\""
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/.angular-cli.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3 | "project": {
4 | "name": "miracle-list-client"
5 | },
6 | "apps": [{
7 | "root": "src",
8 | "outDir": "dist",
9 | "assets": [
10 | "assets",
11 | "favicon.ico", "cordova.js", "web.config"
12 | ],
13 | "index": "index.html",
14 | "main": "main.ts",
15 | "polyfills": "polyfills.ts",
16 | "test": "test.ts",
17 | "tsconfig": "tsconfig.json",
18 | "prefix": "app",
19 | "mobile": false,
20 | "scripts": [
21 | "../node_modules/jquery/dist/jquery.js",
22 | "../Electron/src/jquery-fix.js",
23 | "../node_modules/bootstrap/dist/js/bootstrap.js"
24 |
25 | ],
26 | "styles": [
27 | "../node_modules/bootstrap/dist/css/bootstrap.css",
28 | "../node_modules/bootstrap/dist/css/bootstrap-theme.css",
29 |
30 | "styles.css"
31 | ],
32 |
33 | "environmentSource": "environments/environment.ts",
34 | "environments": {
35 | "dev": "environments/environment.ts",
36 | "prod": "environments/environment.prod.ts"
37 | }
38 | }],
39 | "addons": [],
40 | "packages": [],
41 | "e2e": {
42 | "protractor": {
43 | "config": "./protractor.conf.js"
44 | }
45 | },
46 | "lint": [{
47 | "project": "src/tsconfig.app.json",
48 | "exclude": "**/node_modules/**"
49 | },
50 | {
51 | "project": "src/tsconfig.spec.json",
52 | "exclude": "**/node_modules/**"
53 | },
54 | {
55 | "project": "e2e/tsconfig.e2e.json",
56 | "exclude": "**/node_modules/**"
57 | }
58 | ],
59 | "test": {
60 | "karma": {
61 | "config": "./karma.conf.js"
62 | }
63 | },
64 | "defaults": {
65 | "styleExt": "css",
66 | "component": {
67 | "inlineTemplate": false,
68 | "spec": true
69 | }
70 | }
71 | }
--------------------------------------------------------------------------------
/Cordova/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | MiracleList Cordova
4 |
5 | Cordova-Client für die Aufgabenverwaltung "MiracleList"
6 |
7 |
8 | Dr. Holger Schwichtenberg
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/Cordova/config.xml.bak:
--------------------------------------------------------------------------------
1 |
2 |
3 | MiracleList Cordova
4 |
5 | Cordova-Client für die Aufgabenverwaltung "MiracleList"
6 |
7 |
8 | Dr. Holger Schwichtenberg
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/Cordova/plugins/cordova-plugin-whitelist/plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
24 | Whitelist
25 | Cordova Network Whitelist Plugin
26 | Apache 2.0
27 | cordova,whitelist,policy
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/.angular-cli.json.bak:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3 | "project": {
4 | "name": "miracle-list-client"
5 | },
6 | "apps": [{
7 | "root": "src",
8 | "outDir": "dist",
9 | "assets": [
10 | "assets",
11 | "favicon.ico", "cordova.js"
12 | ],
13 | "index": "index.html",
14 | "main": "main.ts",
15 | "polyfills": "polyfills.ts",
16 | "test": "test.ts",
17 | "tsconfig": "tsconfig.json",
18 | "prefix": "app",
19 | "mobile": false,
20 | "scripts": [
21 | "../node_modules/jQuery/dist/jQuery.js",
22 |
23 | "../node_modules/Bootstrap/dist/js/bootstrap.js",
24 | "../node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.js"
25 | ],
26 | "styles": [
27 | "../node_modules/Bootstrap/dist/css/bootstrap.css",
28 | "../node_modules/Bootstrap/dist/css/bootstrap-theme.css",
29 | "../node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker.css",
30 | "styles.css"
31 | ],
32 |
33 | "environmentSource": "environments/environment.ts",
34 | "environments": {
35 | "dev": "environments/environment.ts",
36 | "prod": "environments/environment.prod.ts"
37 | }
38 | }],
39 | "addons": [],
40 | "packages": [],
41 | "e2e": {
42 | "protractor": {
43 | "config": "./protractor.conf.js"
44 | }
45 | },
46 | "lint": [{
47 | "project": "src/tsconfig.app.json",
48 | "exclude": "**/node_modules/**"
49 | },
50 | {
51 | "project": "src/tsconfig.spec.json",
52 | "exclude": "**/node_modules/**"
53 | },
54 | {
55 | "project": "e2e/tsconfig.e2e.json",
56 | "exclude": "**/node_modules/**"
57 | }
58 | ],
59 | "test": {
60 | "karma": {
61 | "config": "./karma.conf.js"
62 | }
63 | },
64 | "defaults": {
65 | "styleExt": "css",
66 | "component": {
67 | "inlineTemplate": false,
68 | "spec": true
69 | }
70 | }
71 | }
--------------------------------------------------------------------------------
/src/TaskEdit/TaskEdit.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 | import { Input, Output, EventEmitter } from '@angular/core';
3 | import { Router, ActivatedRoute, Params } from '@angular/router';
4 | import { NgForm } from '@angular/forms';
5 | import { Task } from '../Services/MiracleListProxy';
6 | import { MiracleListProxy } from '../Services/MiracleListProxy';
7 | import { CommunicationService } from "../Services/CommunicationService"
8 |
9 | // Animationen
10 | import { slideToTop, slideToLeft, slideToRight, slideToBottom, fadeInAnimation } from '../Util/RouterAnimations';
11 |
12 | @Component({
13 | selector: 'TaskEdit',
14 | templateUrl: './TaskEdit.component.html',
15 | styleUrls:[ './TaskEdit.component.css'],
16 | animations: [fadeInAnimation()],
17 | host: { '[@routerTransition]': '' }
18 | })
19 | export class TaskEditComponent implements OnInit {
20 | constructor(private miracleListProxy: MiracleListProxy,
21 | private router: Router,
22 | private activatedRoute: ActivatedRoute,
23 | private communicationService: CommunicationService) {
24 | }
25 |
26 | ngOnInit() {
27 | var id = this.activatedRoute.snapshot.params["id"];
28 | this.getTask(id);
29 | // this.activatedRoute.params.forEach((params: Params) => {
30 | // let id = (params['id']);
31 | // this.getTask(id);
32 | // });
33 | }
34 |
35 | @Input()
36 | public task: Task;
37 |
38 | getTask(id: number) {
39 | console.log("TaskEdit:Task LADEN...", id)
40 | this.miracleListProxy.task(this.communicationService.token, id).subscribe(
41 | x => {
42 | this.task = x;
43 | console.log("TaskEdit:Task GELADEN", x)
44 | });
45 | }
46 |
47 | reload($x) {
48 | console.log("RELOAD!", $x);
49 | this.communicationService.EmitTaskListUpdateEvent(this.task);
50 | }
51 |
52 | cancel() {
53 | this.gotoView();
54 | }
55 |
56 | submit(form: NgForm) {
57 | if (form.invalid) return;
58 | console.log("Task ÄNDERN", this.task);
59 | this.miracleListProxy.changeTask(this.communicationService.token, this.task).subscribe(
60 | x => {
61 | console.log("Task GEÄNDERT", x)
62 | this.gotoView();
63 | });
64 | }
65 |
66 | private gotoView() {
67 | this.communicationService.navigate(`/app/(column3:taskview/${this.task.taskID})`); // Ansicht aufrufen
68 | this.communicationService.EmitTaskListUpdateEvent(this.task);
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/src/Login/Login.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit, NgZone, Inject, InjectionToken, Optional } from '@angular/core';
2 | import { CommunicationService } from '../Services/CommunicationService';
3 | import { Router } from '@angular/router';
4 | import { MiracleListProxy, LoginInfo } from '../Services/MiracleListProxy';
5 | import { Title } from '@angular/platform-browser';
6 |
7 | import { isDevMode } from '@angular/core';
8 | export const CLIENT_ID = new InjectionToken('CLIENT_ID');
9 |
10 | @Component({
11 | selector: 'Login',
12 | templateUrl: './Login.component.html'
13 | })
14 | export class LoginComponent implements OnInit {
15 |
16 | public clientID: string
17 |
18 | constructor(private miracleListProxy : MiracleListProxy, public communicationService: CommunicationService, private titleService: Title, private zone: NgZone, @Optional() @Inject(CLIENT_ID) cLIENT_ID?: string)
19 | {
20 | this.clientID = cLIENT_ID;
21 | this.communicationService.clientID = cLIENT_ID;
22 | console.log("======= LoginComponent:constructor. ClientID=" + cLIENT_ID);
23 | }
24 |
25 | ngOnInit(){
26 | // Startaktion
27 | // console.log("======= LoginComponent:ngOnInit");
28 | this.zone.run(() => {
29 | this.showDownloads = !(this.communicationService.isCordova() || this.communicationService.isElectron());
30 | });
31 | }
32 |
33 | public name: string = "";
34 | public password: string;
35 | public errorMsg = '';
36 |
37 | public showDownloads: boolean;
38 |
39 | login() {
40 |
41 | // Kennwort nicht loggen!!!
42 | console.log("LOGIN", this.name);
43 |
44 | if (!this.name || !this.password)
45 | {
46 | this.errorMsg = "Benutzername und Kennwort müssen ausgefüllt sein!";
47 | return;
48 | }
49 |
50 | this.errorMsg = "";
51 | let li = new LoginInfo();
52 | li.clientID = this.communicationService.clientID;
53 | li.username = this.name;
54 | li.password = this.password;
55 |
56 | this.miracleListProxy.login(li).subscribe(x=> {
57 |
58 | if (x == null || x.message) {
59 | console.log("login NICHT ERFOLGREICH",x);
60 | this.errorMsg = x ? x.message : 'Ungültige Anmeldung!';
61 | this.communicationService.token = "";
62 | }
63 | else {
64 | console.log("login ERFOLGREICH",x);
65 | this.communicationService.token = x.token;
66 | this.communicationService.username = this.name;
67 | this.errorMsg = "";
68 | this.communicationService.navigate("/app"); // Ansicht aufrufen
69 | this.titleService.setTitle(`MiracleListClient [${this.name}]` );
70 | }
71 | })
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/src/Login/Login.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Benutzeranmeldung
4 |
5 |
6 |
7 |
Dies ist eine Beispielanwendung für eine Single-Page-Webapplication (SPA) und hybride Cross-Platform-App zur Aufgabenverwaltung.
8 |
9 |
Zur Benutzeranmeldung geben Sie die Kombination aus Ihrer E-Mail-Adresse und einem beliebigen Kennwort ein. Wenn es für diese E-Mail-Adresse noch kein Benutzerkonto gibt, wird automatisch ein neues Benutzerkonto angelegt mit einigen Beispielaufgaben.
10 |
11 |
12 |
13 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
Downloads
42 |
43 |
49 |
--------------------------------------------------------------------------------
/src/Services/CommunicationService.ts:
--------------------------------------------------------------------------------
1 | import { Task } from './MiracleListProxy';
2 | import { Injectable, EventEmitter, NgZone, isDevMode, Injector, InjectionToken, Inject } from '@angular/core';
3 | import { Router } from '@angular/router';
4 | import { HttpClient } from '@angular/common/http';
5 | import { environment } from 'environments/environment.prod';
6 |
7 | @Injectable()
8 | export class CommunicationService {
9 |
10 | // Daten der Benutzeranmeldung
11 | public username: string = "";
12 | public token: string = "";
13 | public clientID: string = ""; // wird gesetzt von LoginComponent!
14 |
15 | constructor(private router: Router, private zone: NgZone)
16 | {
17 | console.log("==== CommunicationService ", router, zone);
18 |
19 | console.log("ClientID: ", this.clientID);
20 | if (isDevMode)
21 | {
22 | console.log("-----> DEVMODE!");
23 | // this.username = "test";
24 | // this.token = "test";
25 | }
26 | }
27 |
28 | // Client-Navigation per Router
29 | public navigate(url: string) {
30 | this.router.navigateByUrl(url);
31 | }
32 |
33 | // Ereignis für Ereigniskonsumenten
34 | TaskListUpdateEvent = new EventEmitter();
35 | TaskDetailCloseEvent = new EventEmitter();
36 |
37 | // Ereignisauslösung
38 | EmitTaskListUpdateEvent(t: Task) {
39 | this.TaskListUpdateEvent.emit(t);
40 | }
41 |
42 | // Ereignisauslösung
43 | EmitTaskDetailCloseEvent(t: Task) {
44 | this.TaskDetailCloseEvent.emit(t);
45 | }
46 |
47 | GetPackage() : any
48 | {
49 | // Versionsnummer auslesen
50 | return require('../../package.json');
51 | }
52 | // Liefert das vom Electron Main Prozess übergebe env-Objekt
53 | getElectronEnv(): any {
54 | if (! this.isElectron()) return "n/a";
55 | let env = (electron.remote.getCurrentWindow()).env;
56 | return env;
57 | }
58 |
59 | isElectron() : boolean
60 | {
61 | try{
62 | return electron !== undefined;
63 | }
64 | catch(ex)
65 | {
66 | return false;
67 | }
68 | }
69 |
70 | getElectronEnvString(): string {
71 | if (!this.isElectron()) return "n/a";
72 | let env = this.getElectronEnv();
73 | return (env.AppVersion + " auf " + env.OS);
74 | }
75 |
76 | isCordova() : boolean
77 | {
78 | console.log("--> Cordova=",(window).cordova);
79 | return ((window).cordova !== undefined);
80 | }
81 |
82 | getCordovaEnvString(): string {
83 | if (!this.isCordova()) return "n/a";
84 | let cordova = window.cordova;
85 | let device = window.device;
86 | return (cordova.version + " auf " + device.platform + " "
87 | + device.version + " (" + device.manufacturer + " "
88 | + device.model + ")");
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/Services/HttpInterceptor.ts:
--------------------------------------------------------------------------------
1 | // HttpInterceptor für Http zum Injizieren des Authentifizierungstokens durch Ableiten von der Http-Klasse
2 | // für die MiracleListProxy-Klasse, die NSwagGenerator erzeugt
3 | // Diese Klasse HttpInterceptor wird dann in app.module.ts per DI anstelle von Http verwendet
4 | // läuft ab Angular 2.0
5 | // https://scotch.io/@kashyapmukkamala/using-http-interceptor-with-angular2
6 |
7 | import { CommunicationService } from './CommunicationService';
8 | import { Injectable } from "@angular/core";
9 | import { ConnectionBackend, RequestOptions, Request, RequestOptionsArgs, Response, Http, Headers } from "@angular/http";
10 | import { Observable } from "rxjs/Rx";
11 | import { createWiresService } from 'selenium-webdriver/firefox';
12 |
13 | @Injectable()
14 | export class HttpInterceptor extends Http {
15 | constructor(private communicationService: CommunicationService, backend: ConnectionBackend, defaultOptions: RequestOptions) {
16 | super(backend, defaultOptions);
17 | }
18 |
19 | request(url: string | Request, options?: RequestOptionsArgs): Observable {
20 | // console.log("---------> request");
21 | return super.request(url, this.getRequestOptionArgs(options));
22 | }
23 |
24 | get(url: string, options?: RequestOptionsArgs): Observable {
25 | url = this.updateUrl(url);
26 | // console.log("---------> get");
27 | return super.get(url, this.getRequestOptionArgs(options));
28 | }
29 |
30 | post(url: string, body: string, options?: RequestOptionsArgs): Observable {
31 | url = this.updateUrl(url);
32 | return super.post(url, body, this.getRequestOptionArgs(options));
33 | }
34 |
35 | put(url: string, body: string, options?: RequestOptionsArgs): Observable {
36 | url = this.updateUrl(url);
37 | return super.put(url, body, this.getRequestOptionArgs(options));
38 | }
39 |
40 | delete(url: string, options?: RequestOptionsArgs): Observable {
41 | url = this.updateUrl(url);
42 | return super.delete(url, this.getRequestOptionArgs(options));
43 | }
44 |
45 | // keine Funktion aktuell. Könnte aber die Url verändern :-)
46 | private updateUrl(req: string) {
47 | // console.log("HTTP from ", req);
48 | // req = req.replace("miraclelistbackend",this.communicationService.GetURL())
49 | return req;
50 | }
51 |
52 | // Erweitert die http-Anfrage um Token
53 | private getRequestOptionArgs(options?: RequestOptionsArgs): RequestOptionsArgs {
54 |
55 | if (options == null) {
56 | options = new RequestOptions();
57 | }
58 | if (options.headers == null) {
59 | options.headers = new Headers();
60 | }
61 |
62 | if (this.communicationService.token) {
63 | // console.log("********* HttpInterceptor: Token injiziert: " + this.communicationService.token);
64 | options.headers.set('ML-AuthToken', this.communicationService.token);
65 | }
66 | else {
67 | // console.log("********* HttpInterceptor: Kein Token!");
68 | }
69 |
70 | return options;
71 | }
72 | }
--------------------------------------------------------------------------------
/karma.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration file, see link for more information
2 | // https://karma-runner.github.io/0.13/config/configuration-file.html
3 |
4 | module.exports = function(config) {
5 | config.set({
6 | basePath: '',
7 | frameworks: ['jasmine-jquery', 'jasmine', '@angular/cli'],
8 | plugins: [
9 | require('karma-phantomjs-launcher'),
10 | require('karma-junit-reporter'),
11 | require('karma-jasmine-jquery'),
12 | require('karma-jasmine'),
13 | require('karma-jasmine-html-reporter'),
14 | require('karma-coverage-istanbul-reporter'),
15 | require('karma-chrome-launcher'),
16 | require('@angular/cli/plugins/karma')
17 | ],
18 | client: {
19 | clearContext: false // leave Jasmine Spec Runner output visible in browser
20 | },
21 | files: [
22 | './node_modules/web-animations-js/web-animations.min.js', // https://github.com/ariya/phantomjs/issues/14222
23 |
24 | { pattern: './src/test.ts', watched: false }
25 | ],
26 | preprocessors: {
27 | './src/test.ts': ['@angular/cli']
28 | },
29 | mime: {
30 | 'text/x-typescript': ['ts', 'tsx']
31 | },
32 | coverageIstanbulReporter: {
33 | reports: ['html', 'lcovonly'],
34 | fixWebpackSourcePaths: true
35 | },
36 | angularCli: {
37 | environment: 'dev'
38 | },
39 | reporters: config.angularCli && config.angularCli.codeCoverage ? ['progress', 'coverage-istanbul', 'junit'] : ['progress', 'kjhtml', 'junit'],
40 | port: 9876,
41 | colors: true,
42 | logLevel: config.LOG_INFO,
43 | autoWatch: true,
44 | browsers: ['Chrome', 'PhantomJS'],
45 | singleRun: false,
46 |
47 | // https://github.com/jasmine/jasmine/issues/1413
48 | captureTimeout: 210000,
49 | browserDisconnectTolerance: 3,
50 | browserDisconnectTimeout : 210000,
51 | browserNoActivityTimeout : 210000,
52 |
53 | // the default configuration
54 | junitReporter: {
55 | outputDir: 'testresults', // results will be saved as $outputDir/$browserName.xml
56 | outputFile: 'unitests.xml', // if included, results will be saved as $outputDir/$browserName/$outputFile
57 | suite: '', // suite will become the package name attribute in xml testsuite element
58 | useBrowserName: false, // add browser name to report and classes names
59 | nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
60 | classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
61 | properties: {}, // key value pair of properties to add to the section of the report
62 | xmlVersion: null // use '1' if reporting to be per SonarQube 6.2 XML format
63 | }
64 | });
65 | };
--------------------------------------------------------------------------------
/src/Status/Status.component.ts:
--------------------------------------------------------------------------------
1 |
2 | import { MiracleListProxyV2, API_BASE_URL } from './../Services/MiracleListProxyV2';
3 | import { MiracleListProxy } from './../Services/MiracleListProxy';
4 | import { CommunicationService } from './../Services/CommunicationService';
5 | import { Component, OnInit, ViewContainerRef, HostListener, Inject } from '@angular/core';
6 | import * as moment from "moment";
7 | import { AppLoadService } from 'Services/AppLoadService';
8 |
9 | @Component({
10 | selector: 'Status',
11 | templateUrl: 'Status.component.html'
12 | })
13 |
14 | export class StatusComponent implements OnInit {
15 | sizeInfo: string;
16 | serverStatusDetails: any;
17 | serverAvailable?: boolean = null;
18 | serverStatus: string = "...lädt...";
19 | currentTime: string;
20 | serverStatusCount: number = 0;
21 | public released = "";
22 |
23 | constructor(private miracleListProxy: MiracleListProxy, private miracleListProxyV2: MiracleListProxyV2, public communicationService: CommunicationService, @Inject(API_BASE_URL) public baseUrl) {
24 | this.serverStatus = "Verbindungsaufbau zu " + this.baseUrl + "...";
25 | this.calcSizeInfo(window.screen.width);
26 | this.getServerStatus();
27 | console.log("ReleaseDate=", AppLoadService.Settings["ReleaseDate"]);
28 | if (AppLoadService.Settings["ReleaseDate"])
29 | {
30 | this.released = " / Released: "+ AppLoadService.Settings["ReleaseDate"];
31 | }
32 |
33 | }
34 | ngOnInit() { }
35 |
36 | // Reaktion auf Fenstergrößenänderung
37 | @HostListener('window:resize', ['$event'])
38 | onResize(event) {
39 | this.calcSizeInfo(event.target.innerWidth);
40 | }
41 |
42 | get isLoggedIn(): boolean {
43 | return (this.communicationService.username != null && this.communicationService.username !== "")
44 | }
45 |
46 | getServerStatus()
47 | {
48 | this.currentTime = moment().format('LTS');
49 | this.serverStatusCount++;
50 | let intervall = 10000;
51 | // console.log("getServerStatus...");
52 | // Serverstatus ermitteln
53 | this.miracleListProxyV2.about().subscribe(x=>
54 | {
55 | this.serverAvailable = true;
56 | this.serverStatusDetails = this.baseUrl + " [" + this.communicationService.clientID + "]: " + x;
57 | this.serverStatus = "Server OK!";
58 | }, x=> { this.serverStatus = "Server " + this.baseUrl + ": NICHT verfügbar!"; this.serverStatusDetails = this.baseUrl + " [" + this.communicationService.clientID + "]: " + x;
59 | this.serverAvailable = false;
60 | intervall = 5000; });
61 |
62 | console.log("Serverstatus #" + this.serverStatusCount +":", this.baseUrl + "/" + this.communicationService.clientID + ": " + this.serverStatusDetails);
63 | // alle x Sekunden aktualisieren
64 | // setTimeout(() => {
65 | // this.getServerStatus();
66 | // },intervall);
67 | }
68 |
69 | calcSizeInfo(width : number)
70 | {
71 | let size = width;
72 | let sizeName = "";
73 |
74 | switch (true) {
75 | case (size >= 1170): sizeName = "lg"; break;
76 | case (size >= 970): sizeName = "md"; break;
77 | case (size >= 750): sizeName = "sm"; break;
78 | default: sizeName = "xs"; break;
79 | }
80 |
81 | this.sizeInfo = size + "px (" + sizeName + ")";
82 | }
83 |
84 | }
85 |
--------------------------------------------------------------------------------
/src/TaskEdit/TaskEdit.component.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rulesDirectory": [
3 | "node_modules/codelyzer"
4 | ],
5 | "cliOptions": {
6 | "exclude": [
7 | "bin",
8 | "*/tslint.json"
9 | ]
10 | },
11 | "rules": {
12 | "class-name": true,
13 | "comment-format": [
14 | true,
15 | "check-space"
16 | ],
17 | "curly": false,
18 | "eofline": false,
19 | "forin": true,
20 | "indent": [
21 | true,
22 | "spaces"
23 | ],
24 | "label-position": true,
25 | "max-line-length": [
26 | false,
27 | 140
28 | ],
29 | "member-access": false,
30 | "member-ordering": [
31 | false
32 | ],
33 | "no-arg": true,
34 | "no-bitwise": true,
35 | "no-console": [
36 | true,
37 | "debug",
38 | "info",
39 | "time",
40 | "timeEnd",
41 | "trace"
42 | ],
43 | "no-construct": true,
44 | "no-debugger": true,
45 | "no-duplicate-variable": true,
46 | "no-empty": false,
47 | "no-eval": true,
48 | "no-inferrable-types": false,
49 | "no-shadowed-variable": true,
50 | "no-string-literal": false,
51 | "no-switch-case-fall-through": true,
52 | "no-trailing-whitespace": true,
53 | "no-unused-expression": true,
54 | "no-use-before-declare": true,
55 | "no-var-keyword": true,
56 | "object-literal-sort-keys": false,
57 | "one-line": [
58 | false,
59 | "check-open-brace",
60 | "check-catch",
61 | "check-else",
62 | "check-whitespace"
63 | ],
64 | "quotemark": [
65 | false,
66 | "single"
67 | ],
68 | "radix": true,
69 |
70 | "triple-equals": [
71 | true,
72 | "allow-null-check"
73 | ],
74 | "typedef-whitespace": [
75 | false,
76 | {
77 | "call-signature": "nospace",
78 | "index-signature": "nospace",
79 | "parameter": "nospace",
80 | "property-declaration": "nospace",
81 | "variable-declaration": "nospace"
82 | }
83 | ],
84 | "variable-name": false,
85 | "whitespace": [
86 | false,
87 | "check-branch",
88 | "check-decl",
89 | "check-operator",
90 | "check-separator",
91 | "check-type"
92 | ],
93 |
94 | "directive-selector": [false, "attribute", "app", "camelCase"],
95 | "component-selector": [false, "element", "app", "kebab-case"],
96 | "use-input-property-decorator": true,
97 | "use-output-property-decorator": true,
98 | "use-host-property-decorator": true,
99 | "no-input-rename": true,
100 | "no-output-rename": true,
101 | "use-life-cycle-interface": true,
102 | "use-pipe-transform-interface": true,
103 | "component-class-suffix": true,
104 | "directive-class-suffix": true,
105 | "no-access-missing-member": true,
106 | "templates-use-public": true,
107 | "invoke-injectable": true
108 | }
109 | }
--------------------------------------------------------------------------------
/Cordova/simulation/sim-host.json:
--------------------------------------------------------------------------------
1 | {"plugins":{"cordova-plugin-geolocation":"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-geolocation","exec":"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\exec","events":"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\events","cordova-plugin-device":"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-device","cordova-plugin-file":"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-file"},"files":{"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\sim-constants.js":1512597210268,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\argscheck.js":1512597210262,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\messages.js":1512597210265,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\exception.js":1512597210264,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\event.js":1512597210263,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\xhr-proxy.js":1512597210271,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\utils.js":1512597210269,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\db.js":1512597210266,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\telemetry-helper.js":1512597210270,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\third-party\\jquery.min.js":1512597210456,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\polyfills.js":1512597210272,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\third-party\\socket.io.js":1512597210460,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\third-party\\webcomponents.min.js":1512597210463,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\sim-host\\dialog.js":1512597210273,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\sim-host\\sim-status.js":1512597210276,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\sim-host\\ui\\sim-host.js":1512597210445,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-geolocation\\sim-host-handlers.js":1512597210303,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-device\\sim-host.js":1512597210326,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-geolocation\\sim-host.js":1512597210305,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\events\\sim-host.js":1512597210403,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-device\\sim-host-handlers.js":1512597210324,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\exec\\sim-host.js":1512597210408,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\exec\\sim-host-handlers.js":1512597210407,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\exec\\saved-sims.js":1512597210405,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\sim-host\\protocol\\socket.js":1512597210441,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\sim-host\\ui\\custom-elements.js":1512597210443,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-geolocation\\geo-model.js":1512597210302,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-geolocation\\PositionError.js":1512597210285,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-device\\device-model.js":1512597210323,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\devices\\os-versions.json":1512597209459,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\node_modules\\q\\q.js":1512597207557,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\node_modules\\process\\browser.js":1512597207364}}
--------------------------------------------------------------------------------
/Cordova/plugins/cordova-plugin-whitelist/RELEASENOTES.md:
--------------------------------------------------------------------------------
1 |
21 | # Release Notes
22 |
23 | ### 1.3.1 (Dec 07, 2016)
24 | * [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been submitted…"
25 | * Edit package.json license to match SPDX id
26 | * [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version.
27 |
28 | ### 1.3.0 (Sep 08, 2016)
29 | * [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies
30 | * Updated installation section
31 | * Plugin uses `Android Log class` and not `Cordova LOG class`
32 | * Add pull request template.
33 | * [CB-10866](https://issues.apache.org/jira/browse/CB-10866) Adding engine info to `package.json`
34 | * [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md
35 |
36 | ### 1.2.2 (Apr 15, 2016)
37 | * add note about redirects
38 | * [CB-10624](https://issues.apache.org/jira/browse/CB-10624) remove error message from `whitelist.js`, which leaves it empty
39 |
40 | ### 1.2.1 (Jan 15, 2016)
41 | * [CB-10194](https://issues.apache.org/jira/browse/CB-10194) info tag prints for ios when not applicable
42 |
43 | ### 1.2.0 (Nov 18, 2015)
44 | * removed **iOS** engine check from `plugin.xml`
45 | * [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest
46 | * [CB-9972](https://issues.apache.org/jira/browse/CB-9972) - Remove **iOS** whitelist
47 | * Updated the text, it should read 4.0.x and greater, since this plugin will be required for `cordova-android 5.0`
48 | * Fixing contribute link.
49 | * Updated `plugin.xml ` tag to remove warning about not needing this plugin if you are using the **iOS 9 SDK**
50 | * [CB-9738](https://issues.apache.org/jira/browse/CB-9738) - Disable whitelist use when runtime environment is **iOS 9**
51 | * [CB-9740](https://issues.apache.org/jira/browse/CB-9740) - Add `` tag describing whitelist plugin not needed on `cordova-ios` and cordova-android 3.x`
52 | * [CB-9568](https://issues.apache.org/jira/browse/CB-9568) - Update whitelist plugin to allow all network access by default
53 | * [CB-9337](https://issues.apache.org/jira/browse/CB-9337) - enable use of `` tags for native code network requests
54 |
55 | ### 1.1.0 (Jun 17, 2015)
56 | * [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-whitelist documentation translation: cordova-plugin-whitelist
57 | * fix npm md issue
58 | * Usage of CDVURLRequestFilter protocol.
59 | * [CB-9089](https://issues.apache.org/jira/browse/CB-9089) - iOS whitelist plugin does not compile
60 | * [CB-9090](https://issues.apache.org/jira/browse/CB-9090) - Enable whitelist plugin for cordova-ios 4.0.0
61 | * Fixed error in Content-Security-Policy example
62 |
63 | ### 1.0.0 (Mar 25, 2015)
64 | * [CB-8739](https://issues.apache.org/jira/browse/CB-8739) added missing license headers
65 | * Add @Override to CustomConfigXmlParser methods
66 | * Change ID to cordova-plugin-whitelist rather than reverse-DNS-style
67 | * Tweak CSP examples in README
68 | * [CB-8660](https://issues.apache.org/jira/browse/CB-8660) remove extra commas from package.json
69 |
--------------------------------------------------------------------------------
/Cordova/simulation/app-host.json:
--------------------------------------------------------------------------------
1 | {"plugins":{"cordova-plugin-geolocation":"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-geolocation","exec":"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\exec","events":"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\events","cordova-plugin-device":"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-device","cordova-plugin-file":"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-file"},"files":{"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\telemetry-helper.js":1512597210270,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\app-host\\app-host.js":1512597209179,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\exception.js":1512597210264,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\event.js":1512597210263,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\sim-constants.js":1512597210268,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\messages.js":1512597210265,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\third-party\\socket.io.js":1512597210460,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\third-party\\jquery.min.js":1512597210456,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\db.js":1512597210266,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\polyfills.js":1512597210272,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\xhr-proxy.js":1512597210271,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\argscheck.js":1512597210262,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\modules\\utils.js":1512597210269,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\third-party\\webcomponents.min.js":1512597210463,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-geolocation\\app-host-clobbers.js":1512597210286,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\events\\app-host.js":1512597210402,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-device\\app-host.js":1512597210322,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-file\\app-host-handlers.js":1512597210360,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\app-host\\live-reload-client.js":1512597209329,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\app-host\\touch-events.js":1512597209363,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-file\\app-host-non-webkit-handlers.js":1512597210362,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-geolocation\\PositionError.js":1512597210285,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-geolocation\\Position.js":1512597210284,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-file\\app-host-webkit-handlers.js":1512597210363,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\node_modules\\url\\url.js":1512597207598,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-file\\indexedDB.js":1512597210364,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-geolocation\\Coordinates.js":1512597210283,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-file\\MyFile.js":1512597210359,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\node_modules\\q\\q.js":1512597207557,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\node_modules\\url\\util.js":1512597208135,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\node_modules\\punycode\\punycode.js":1512597207185,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\node_modules\\querystring-es3\\index.js":1512597207335,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\node_modules\\process\\browser.js":1512597207364,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\node_modules\\querystring-es3\\decode.js":1512597206991,"h:\\x_Lokal\\npm\\node_modules\\cordova-simulate\\node_modules\\querystring-es3\\encode.js":1512597207182}}
--------------------------------------------------------------------------------
/Cordova/typings/cordova.d.ts:
--------------------------------------------------------------------------------
1 | // Type definitions for Apache Cordova
2 | // Project: http://cordova.apache.org
3 | // Definitions by: Microsoft Open Technologies Inc.
4 | // Definitions: https://github.com/borisyankov/DefinitelyTyped
5 | //
6 | // Copyright (c) Microsoft Open Technologies, Inc.
7 | // Licensed under the MIT license.
8 |
9 | interface Cordova {
10 | /** Invokes native functionality by specifying corresponding service name, action and optional parameters.
11 | * @param success A success callback function.
12 | * @param fail An error callback function.
13 | * @param service The service name to call on the native side (corresponds to a native class).
14 | * @param action The action name to call on the native side (generally corresponds to the native class method).
15 | * @param args An array of arguments to pass into the native environment.
16 | */
17 | exec(success: () => any, fail: () => any, service: string, action: string, args?: string[]): void;
18 | /** Gets the operating system name. */
19 | platformId: string;
20 | /** Gets Cordova framework version */
21 | version: string;
22 | /** Defines custom logic as a Cordova module. Other modules can later access it using module name provided. */
23 | define(moduleName: string, factory: (require: any, exports: any, module: any) => any): void;
24 | /** Access a Cordova module by name. */
25 | require(moduleName: string): any;
26 | /** Namespace for Cordova plugin functionality */
27 | plugins:CordovaPlugins;
28 | }
29 |
30 | interface CordovaPlugins {}
31 |
32 | interface Document {
33 | addEventListener(type: "deviceready", listener: (ev: Event) => any, useCapture?: boolean): void;
34 | addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
35 | addEventListener(type: "resume", listener: (ev: Event) => any, useCapture?: boolean): void;
36 | addEventListener(type: "backbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
37 | addEventListener(type: "menubutton", listener: (ev: Event) => any, useCapture?: boolean): void;
38 | addEventListener(type: "searchbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
39 | addEventListener(type: "startcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
40 | addEventListener(type: "endcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
41 | addEventListener(type: "volumedownbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
42 | addEventListener(type: "volumeupbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
43 |
44 | removeEventListener(type: "deviceready", listener: (ev: Event) => any, useCapture?: boolean): void;
45 | removeEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
46 | removeEventListener(type: "resume", listener: (ev: Event) => any, useCapture?: boolean): void;
47 | removeEventListener(type: "backbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
48 | removeEventListener(type: "menubutton", listener: (ev: Event) => any, useCapture?: boolean): void;
49 | removeEventListener(type: "searchbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
50 | removeEventListener(type: "startcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
51 | removeEventListener(type: "endcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
52 | removeEventListener(type: "volumedownbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
53 | removeEventListener(type: "volumeupbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
54 |
55 | addEventListener(type: string, listener: (ev: Event) => any, useCapture?: boolean): void;
56 | removeEventListener(type: string, listener: (ev: Event) => any, useCapture?: boolean): void;
57 | }
58 |
59 | interface Window {
60 | cordova:Cordova;
61 | }
62 |
63 | // cordova/argscheck module
64 | interface ArgsCheck {
65 | checkArgs(argsSpec: string, functionName: string, args: any[], callee?: any): void;
66 | getValue(value?: any, defaultValue?: any): any;
67 | enableChecks: boolean;
68 | }
69 |
70 | // cordova/urlutil module
71 | interface UrlUtil {
72 | makeAbsolute(url: string): string
73 | }
74 |
75 | /** Apache Cordova instance */
76 | declare var cordova: Cordova;
77 |
78 | declare module 'cordova' {
79 | export = cordova;
80 | }
81 |
--------------------------------------------------------------------------------
/Cordova/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": "Run Android on device",
9 | "type": "cordova",
10 | "request": "launch",
11 | "platform": "android",
12 | "target": "device",
13 | "port": 9222,
14 | "sourceMaps": true,
15 | "cwd": "${workspaceRoot}",
16 | "ionicLiveReload": false
17 | },
18 | {
19 | "name": "Run iOS on device",
20 | "type": "cordova",
21 | "request": "launch",
22 | "platform": "ios",
23 | "target": "device",
24 | "port": 9220,
25 | "sourceMaps": true,
26 | "cwd": "${workspaceRoot}",
27 | "ionicLiveReload": false
28 | },
29 | {
30 | "name": "Attach to running android on device",
31 | "type": "cordova",
32 | "request": "attach",
33 | "platform": "android",
34 | "target": "device",
35 | "port": 9222,
36 | "sourceMaps": true,
37 | "cwd": "${workspaceRoot}"
38 | },
39 | {
40 | "name": "Attach to running iOS on device",
41 | "type": "cordova",
42 | "request": "attach",
43 | "platform": "ios",
44 | "target": "device",
45 | "port": 9220,
46 | "sourceMaps": true,
47 | "cwd": "${workspaceRoot}"
48 | },
49 | {
50 | "name": "Run Android on emulator",
51 | "type": "cordova",
52 | "request": "launch",
53 | "platform": "android",
54 | "target": "emulator",
55 | "port": 9222,
56 | "sourceMaps": true,
57 | "cwd": "${workspaceRoot}",
58 | "ionicLiveReload": false
59 | },
60 | {
61 | "name": "Run iOS on simulator",
62 | "type": "cordova",
63 | "request": "launch",
64 | "platform": "ios",
65 | "target": "emulator",
66 | "port": 9220,
67 | "sourceMaps": true,
68 | "cwd": "${workspaceRoot}",
69 | "ionicLiveReload": false
70 | },
71 | {
72 | "name": "Attach to running android on emulator",
73 | "type": "cordova",
74 | "request": "attach",
75 | "platform": "android",
76 | "target": "emulator",
77 | "port": 9222,
78 | "sourceMaps": true,
79 | "cwd": "${workspaceRoot}"
80 | },
81 | {
82 | "name": "Attach to running iOS on simulator",
83 | "type": "cordova",
84 | "request": "attach",
85 | "platform": "ios",
86 | "target": "emulator",
87 | "port": 9220,
88 | "sourceMaps": true,
89 | "cwd": "${workspaceRoot}"
90 | },
91 | {
92 | "name": "Serve to the browser (ionic serve)",
93 | "type": "cordova",
94 | "request": "launch",
95 | "platform": "serve",
96 | "cwd": "${workspaceRoot}",
97 | "devServerAddress": "localhost",
98 | "sourceMaps": true,
99 | "ionicLiveReload": true
100 | },
101 | {
102 | "name": "Simulate Android in browser",
103 | "type": "cordova",
104 | "request": "launch",
105 | "platform": "android",
106 | "target": "chrome",
107 | "simulatePort": 8000,
108 | "livereload": true,
109 | "sourceMaps": true,
110 | "cwd": "${workspaceRoot}"
111 | },
112 | {
113 | "name": "Simulate iOS in browser",
114 | "type": "cordova",
115 | "request": "launch",
116 | "platform": "ios",
117 | "target": "chrome",
118 | "simulatePort": 8000,
119 | "livereload": true,
120 | "sourceMaps": true,
121 | "cwd": "${workspaceRoot}"
122 | },
123 | {
124 | "name": "Run Browser",
125 | "type": "cordova",
126 | "request": "launch",
127 | "platform": "browser",
128 | "target": "chrome",
129 | "simulatePort": 8000,
130 | "livereload": true,
131 | "sourceMaps": true,
132 | "cwd": "${workspaceRoot}"
133 | }
134 | ]
135 | }
--------------------------------------------------------------------------------
/src/Util/RouterAnimations.ts:
--------------------------------------------------------------------------------
1 | import {trigger, state, animate, style, transition} from '@angular/core';
2 |
3 | //quelle: http://jasonwatmore.com/post/2017/04/19/angular-2-4-router-animation-tutorial-example
4 |
5 | // trigger name for attaching this animation to an element using the [@triggerName] syntax
6 | export function fadeInAnimation() {
7 | return trigger('routerTransition', [
8 |
9 | // route 'enter' transition
10 | transition(':enter', [
11 |
12 | // css styles at start of transition
13 | style({ opacity: 0 }),
14 |
15 | // animation and styles at end of transition
16 | animate('.3s', style({ opacity: 1 }))
17 | ]),
18 | ]);
19 | }
20 |
21 | export function slideInOutAnimation() {
22 | return trigger('routerTransition', [
23 | // trigger name for attaching this animation to an element using the [@triggerName] syntax
24 |
25 |
26 | // end state styles for route container (host)
27 | state('*', style({
28 | // the view covers the whole screen with a semi tranparent background
29 | position: 'fixed',
30 | top: 0,
31 | left: 0,
32 | right: 0,
33 | bottom: 0,
34 | backgroundColor: 'rgba(0, 0, 0, 0.8)'
35 | })),
36 |
37 | // route 'enter' transition
38 | transition(':enter', [
39 |
40 | // styles at start of transition
41 | style({
42 | // start with the content positioned off the right of the screen,
43 | // -400% is required instead of -100% because the negative position adds to the width of the element
44 | right: '-400%',
45 |
46 | // start with background opacity set to 0 (invisible)
47 | backgroundColor: 'rgba(0, 0, 0, 0)'
48 | }),
49 |
50 | // animation and styles at end of transition
51 | animate('.5s ease-in-out', style({
52 | // transition the right position to 0 which slides the content into view
53 | right: 0,
54 |
55 | // transition the background opacity to 0.8 to fade it in
56 | backgroundColor: 'rgba(0, 0, 0, 0.8)'
57 | }))
58 | ]),
59 |
60 | // route 'leave' transition
61 | transition(':leave', [
62 | // animation and styles at end of transition
63 | animate('.5s ease-in-out', style({
64 | // transition the right position to -400% which slides the content out of view
65 | right: '-400%',
66 |
67 | // transition the background opacity to 0 to fade it out
68 | backgroundColor: 'rgba(0, 0, 0, 0)'
69 | }))
70 | ])
71 | ]);
72 | }
73 | // Quelle: https://embed.plnkr.co/PcRpcGK2duGw0HdaGaF5/?show=preview
74 |
75 |
76 | export function slideToLeft() {
77 | return trigger('routerTransition', [
78 | state('void', style({position:'fixed', width:'100%'}) ),
79 | state('*', style({position:'fixed', width:'100%'}) ),
80 | transition(':enter', [
81 | style({transform: 'translateX(100%)'}),
82 | animate('0.5s ease-in-out', style({transform: 'translateX(0%)'}))
83 | ]),
84 | transition(':leave', [
85 | style({transform: 'translateX(0%)'}),
86 | animate('0.5s ease-in-out', style({transform: 'translateX(-100%)'}))
87 | ])
88 | ]);
89 | }
90 |
91 | export function slideToRight() {
92 | return trigger('routerTransition', [
93 | state('void', style({position:'fixed', width:'100%'}) ),
94 | state('*', style({position:'fixed', width:'100%'}) ),
95 | transition(':enter', [
96 | style({transform: 'translateX(-100%)'}),
97 | animate('0.5s ease-in-out', style({transform: 'translateX(0%)'}))
98 | ]),
99 | transition(':leave', [
100 | style({transform: 'translateX(0%)'}),
101 | animate('0.5s ease-in-out', style({transform: 'translateX(100%)'}))
102 | ])
103 | ]);
104 | }
105 |
106 |
107 |
108 | export function slideToBottom() {
109 | return trigger('routerTransition', [
110 | state('void', style({position:'fixed', width:'100%', height:'90%'}) ),
111 | state('*', style({position:'fixed', width:'100%', height:'90%'}) ),
112 | transition(':enter', [
113 | style({transform: 'translateY(-100%)'}),
114 | animate('0.5s ease-in-out', style({transform: 'translateY(0%)'}))
115 | ]),
116 | transition(':leave', [
117 | style({transform: 'translateY(0%)'}),
118 | animate('0.5s ease-in-out', style({transform: 'translateY(100%)'}))
119 | ])
120 | ]);
121 | }
122 |
123 | export function slideToTop() {
124 | return trigger('routerTransition', [
125 | state('void', style({position:'fixed', width:'100%', height:'100%'}) ),
126 | state('*', style({position:'fixed', width:'100%', height:'100%'}) ),
127 | transition(':enter', [
128 | style({transform: 'translateY(100%)'}),
129 | animate('0.5s ease-in-out', style({transform: 'translateY(0%)'}))
130 | ]),
131 | transition(':leave', [
132 | style({transform: 'translateY(0%)'}),
133 | animate('0.5s ease-in-out', style({transform: 'translateY(-100%)'}))
134 | ])
135 | ]);
136 | }
137 |
--------------------------------------------------------------------------------
/Cordova/.vscode/simulate/sim-host.json:
--------------------------------------------------------------------------------
1 | {"plugins":{"cordova-plugin-geolocation":"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-geolocation","exec":"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\exec","events":"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\events","cordova-plugin-device":"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-device","cordova-plugin-file":"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-file"},"files":{"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\argscheck.js":1512467874950,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\messages.js":1512467874961,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\event.js":1512467874957,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\db.js":1512467874954,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\exception.js":1512467874958,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\xhr-proxy.js":1512467874980,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\polyfills.js":1512467874963,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\third-party\\jquery.min.js":1512467875412,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\telemetry-helper.js":1512467874972,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\utils.js":1512467874977,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\third-party\\socket.io.js":1512467875421,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\sim-constants.js":1512467874965,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\third-party\\webcomponents.min.js":1512467875431,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\sim-host\\dialog.js":1512467874967,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\sim-host\\ui\\sim-host.js":1512467875392,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\exec\\sim-host.js":1512467875305,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\exec\\sim-host-handlers.js":1512467875299,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\events\\sim-host.js":1512467875290,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-device\\sim-host.js":1512467875112,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\sim-host\\sim-status.js":1512467874969,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-device\\sim-host-handlers.js":1512467875106,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-geolocation\\sim-host-handlers.js":1512467875186,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-geolocation\\sim-host.js":1512467875193,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-geolocation\\geo-model.js":1512467875154,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-geolocation\\PositionError.js":1512467875185,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\sim-host\\ui\\custom-elements.js":1512467875361,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\exec\\saved-sims.js":1512467875292,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\sim-host\\protocol\\socket.js":1512467875355,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-device\\device-model.js":1512467875103,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\devices\\os-versions.json":1512467874395,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\q\\q.js":1512467881267,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\process\\browser.js":1512467879335}}
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "miracle-list-client",
3 | "version": "0.6.7-Beta1",
4 | "date": "03.09.2019",
5 | "license": "MIT",
6 | "angular-cli": {},
7 | "main": "electron-main.js",
8 | "scripts": {
9 | "ng": "ng",
10 | "restore": "npm install --no-bin-links",
11 | "start": "ng serve",
12 | "lint": "tslint \"src/**/*.ts\"",
13 | "//": "---------------------------- Skripte für Testen",
14 | "test": "ng test",
15 | "test-headless": "ng test --single-run=true --browsers=PhantomJS --reporters=progress,junit",
16 | "pree2e": "webdriver-manager update --standalone false --gecko false",
17 | "e2e": "protractor",
18 | "////": "---------------------------- Skripte für Cordova",
19 | "m-electron-deployall": "npm run m-build-electron && electron-packager temp_electron MiracleListElectron --platform=darwin,linux,win32 --arch=x64 --out=dist_electron/ --overwrite --icon=src/assets/favicon.ico --asar",
20 | "w-electron-deployall": "npm run w-build-electron && electron-packager temp_electron MiracleListElectron --platform=darwin,linux,win32 --arch=x64 --out=dist_electron/ --overwrite --icon=src/assets/favicon.ico --asar",
21 | "m-electron-deployallprod": "ng build --target=production --environment=prod --output-path=temp_electron --base-href . && npm run m-copy-electron && electron-packager temp_electron MiracleListElectron --platform=darwin,linux,win32 --arch=x64 --out=dist_electron/ --overwrite --icon=src/assets/favicon.ico --asar",
22 | "w-electron-deployallprod": "ng build --target=production --environment=prod --output-path=temp_electron --base-href . && npm run w-copy-electron && electron-packager temp_electron MiracleListElectron --platform=darwin,linux,win32 --arch=x64 --out=dist_electron/ --overwrite --icon=src/assets/favicon.ico --asar",
23 | "w-electron-packagelinux": "electron-packager temp_electron MiracleListElectron --platform=linux --arch=x64 --out=\\\\192.168.1.179/documents --overwrite --asar --icon=temp_electron/icon.png"
24 | },
25 | "private": true,
26 | "dependencies": {
27 | "//": {
28 | "@progress/kendo-angular-dialog": "^0.13.3",
29 | "@progress/kendo-angular-grid": "^0.13.1",
30 | "@progress/kendo-angular-intl": "^0.9.0",
31 | "@progress/kendo-data-query": "^0.3.5",
32 | "@progress/kendo-theme-default": "^2.12.8"
33 | },
34 | "@angular-devkit/core": "^0.3.1",
35 | "@angular/animations": "^5.2.2",
36 | "@angular/cdk": "^5.2.0",
37 | "@angular/common": "^5.2.2",
38 | "@angular/compiler": "^5.2.2",
39 | "@angular/compiler-cli": "^5.2.2",
40 | "@angular/core": "^5.2.2",
41 | "@angular/forms": "^5.2.2",
42 | "@angular/http": "^5.2.2",
43 | "@angular/platform-browser": "^5.2.2",
44 | "@angular/platform-browser-dynamic": "^5.2.2",
45 | "@angular/platform-server": "^5.2.2",
46 | "@angular/router": "^5.2.2",
47 | "@ngx-translate/core": "^9.1.1",
48 | "angular-date-value-accessor": "0.0.1",
49 | "angular2-moment": "^1.1.0",
50 | "bootstrap": "^3.3.7",
51 | "bootstrap-timepicker": "^0.5.2",
52 | "cldr-data": "^30.0.4",
53 | "core-js": "^2.4.1",
54 | "date-input-polyfill": "^2.12.0",
55 | "electron": "1.7.5",
56 | "electron-window": "^0.8.1",
57 | "jquery": "^3.1.1",
58 | "json-loader": "^0.5.4",
59 | "karma-jasmine-jquery": "^0.1.1",
60 | "moment": "^2.17.1",
61 | "moo-dateinput-polyfill": "^1.5.2",
62 | "ng-pick-datetime": "^5.2.6",
63 | "ng2-dnd": "^2.2.2",
64 | "ngx-contextmenu": "^4.1.1",
65 | "ngx-modialog": "^5.0.0",
66 | "rxjs": "^5.5.2",
67 | "ts-helpers": "^1.1.1",
68 | "web-animations-js": "^2.2.2",
69 | "zone.js": "^0.8.14"
70 | },
71 | "devDependencies": {
72 | "@angular/cli": "^1.5.6",
73 | "@angular/compiler-cli": "^4.2.4",
74 | "@angular/language-service": "^4.3.6",
75 | "@types/cordova": "0.0.34",
76 | "@types/cordova-plugin-device": "0.0.4",
77 | "@types/cordova-plugin-dialogs": "0.0.3",
78 | "@types/cordova-plugin-file": "0.0.3",
79 | "@types/jasmine": "~2.5.53",
80 | "@types/jasminewd2": "~2.0.2",
81 | "@types/jquery": "^2.0.39",
82 | "@types/moment": "~2.13.0",
83 | "@types/node": "~6.0.60",
84 | "@types/username": "^1.0.28",
85 | "codelyzer": "~3.1.1",
86 | "copy": "^0.3.0",
87 | "devtron": "^1.4.0",
88 | "jasmine-core": "~2.6.2",
89 | "jasmine-reporters": "^2.3.0",
90 | "jasmine-spec-reporter": "~4.1.0",
91 | "karma": "~1.7.0",
92 | "karma-chrome-launcher": "~2.1.1",
93 | "karma-cli": "~1.0.1",
94 | "karma-coverage-istanbul-reporter": "^1.2.1",
95 | "karma-jasmine": "~1.1.0",
96 | "karma-jasmine-html-reporter": "^0.2.2",
97 | "karma-junit-reporter": "^1.2.0",
98 | "karma-phantomjs-launcher": "^1.0.4",
99 | "phantomjs-prebuilt": "^2.1.16",
100 | "protractor": "~5.1.2",
101 | "ts-node": "~3.2.0",
102 | "tslint": "~5.3.2",
103 | "typescript": "^2.4.2"
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/NG6-angular.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3 | "version": 1,
4 | "newProjectRoot": "projects",
5 | "projects": {
6 | "miracle-list-client": {
7 | "root": "",
8 | "sourceRoot": "src",
9 | "projectType": "application",
10 | "architect": {
11 | "build": {
12 | "builder": "@angular-devkit/build-angular:browser",
13 | "options": {
14 | "outputPath": "dist",
15 | "index": "src/index.html",
16 | "main": "src/main.ts",
17 | "tsConfig": "src/tsconfig.json",
18 | "polyfills": "src/polyfills.ts",
19 | "assets": [
20 | "src/assets",
21 | "src/favicon.ico",
22 | "src/cordova.js"
23 | ],
24 | "styles": [
25 | "node_modules/bootstrap/dist/css/bootstrap.css",
26 | "node_modules/bootstrap/dist/css/bootstrap-theme.css",
27 | "node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker.css",
28 | "src/styles.css"
29 | ],
30 | "scripts": [
31 | "node_modules/jquery/dist/jquery.js",
32 | "Electron/src/jquery-fix.js",
33 | "node_modules/bootstrap/dist/js/bootstrap.js",
34 | "node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.js"
35 | ]
36 | },
37 | "configurations": {
38 | "production": {
39 | "optimization": true,
40 | "outputHashing": "all",
41 | "sourceMap": false,
42 | "extractCss": true,
43 | "namedChunks": false,
44 | "aot": true,
45 | "extractLicenses": true,
46 | "vendorChunk": false,
47 | "buildOptimizer": true,
48 | "fileReplacements": [
49 | {
50 | "replace": "src/environments/environment.ts",
51 | "with": "src/environments/environment.prod.ts"
52 | }
53 | ]
54 | }
55 | }
56 | },
57 | "serve": {
58 | "builder": "@angular-devkit/build-angular:dev-server",
59 | "options": {
60 | "browserTarget": "miracle-list-client:build"
61 | },
62 | "configurations": {
63 | "production": {
64 | "browserTarget": "miracle-list-client:build:production"
65 | }
66 | }
67 | },
68 | "extract-i18n": {
69 | "builder": "@angular-devkit/build-angular:extract-i18n",
70 | "options": {
71 | "browserTarget": "miracle-list-client:build"
72 | }
73 | },
74 | "test": {
75 | "builder": "@angular-devkit/build-angular:karma",
76 | "options": {
77 | "main": "src/test.ts",
78 | "karmaConfig": "./karma.conf.js",
79 | "polyfills": "src/polyfills.ts",
80 | "scripts": [
81 | "node_modules/jquery/dist/jquery.js",
82 | "Electron/src/jquery-fix.js",
83 | "node_modules/bootstrap/dist/js/bootstrap.js",
84 | "node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.js"
85 | ],
86 | "styles": [
87 | "node_modules/bootstrap/dist/css/bootstrap.css",
88 | "node_modules/bootstrap/dist/css/bootstrap-theme.css",
89 | "node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker.css",
90 | "src/styles.css"
91 | ],
92 | "assets": [
93 | "src/assets",
94 | "src/favicon.ico",
95 | "src/cordova.js"
96 | ]
97 | }
98 | },
99 | "lint": {
100 | "builder": "@angular-devkit/build-angular:tslint",
101 | "options": {
102 | "tsConfig": [
103 | "src/tsconfig.app.json",
104 | "src/tsconfig.spec.json"
105 | ],
106 | "exclude": [
107 | "**/node_modules/**"
108 | ]
109 | }
110 | }
111 | }
112 | },
113 | "miracle-list-client-e2e": {
114 | "root": "",
115 | "sourceRoot": "e2e",
116 | "projectType": "application",
117 | "architect": {
118 | "e2e": {
119 | "builder": "@angular-devkit/build-angular:protractor",
120 | "options": {
121 | "protractorConfig": "./protractor.conf.js",
122 | "devServerTarget": "miracle-list-client:serve"
123 | }
124 | },
125 | "lint": {
126 | "builder": "@angular-devkit/build-angular:tslint",
127 | "options": {
128 | "tsConfig": [
129 | "e2e/tsconfig.e2e.json"
130 | ],
131 | "exclude": [
132 | "**/node_modules/**"
133 | ]
134 | }
135 | }
136 | }
137 | }
138 | },
139 | "defaultProject": "miracle-list-client",
140 | "schematics": {
141 | "@schematics/angular:component": {
142 | "inlineTemplate": false,
143 | "spec": true,
144 | "prefix": "app",
145 | "styleext": "css"
146 | },
147 | "@schematics/angular:directive": {
148 | "prefix": "app"
149 | }
150 | }
151 | }
--------------------------------------------------------------------------------
/Electron/src/electron-appmenu.ts:
--------------------------------------------------------------------------------
1 | import { app, dialog, shell } from 'electron';
2 | const os = require('os');
3 | const path = require('path');
4 | const fs = require('fs');
5 | /**
6 | * Hilfsklasse, die Menübaum für Hauptmenü erstellt
7 | */
8 | export class MiracleListAppMenu {
9 | // Menü erstellen
10 | public static CreateMenu(win: Electron.BrowserWindow, env: any): Electron.MenuItemConstructorOptions[] {
11 | const menuTemplate: Electron.MenuItemConstructorOptions[] = [{
12 | label: 'App',
13 | submenu: [{
14 | label: 'Über diese Anwendung',
15 | accelerator: 'CmdOrCtrl+I',
16 | click: () => {
17 | win.webContents.send('about', {env: env});
18 | }
19 | },
20 | {
21 | label: 'Systeminfo',
22 | accelerator: 'CmdOrCtrl+S',
23 | click: () => {
24 | let options: Electron.MessageBoxOptions = {
25 | title: "Systeminfo",
26 | type: 'info',
27 | buttons: ['OK'],
28 | message: JSON.stringify(env, null, 1),
29 | };
30 | dialog.showMessageBox(win, options);
31 | }
32 | },
33 | {
34 | label: 'Website miraclelist.de',
35 | accelerator: 'CmdOrCtrl+W',
36 | click: () => {
37 | shell.openExternal('http://www.miraclelist.de')
38 | }
39 | },
40 | {
41 | label: 'Drucken',
42 | accelerator: 'CmdOrCtrl+D',
43 | click: () => {
44 | const pdfPath = path.join(os.tmpdir(), 'print.pdf');
45 | win.webContents.printToPDF({}, function (error, data) {
46 | if (error) throw error
47 | fs.writeFile(pdfPath, data, function (err) {
48 | if (err) {
49 | throw err
50 | }
51 | shell.openExternal('file://' + pdfPath);
52 | })
53 | })
54 | }
55 | },
56 | {
57 | label: 'Fehler (zum Test)',
58 | click: () => {
59 | throw new Error('Dies ist nur ein Testfehler');
60 | }
61 | },
62 | {
63 | label: 'Abmelden',
64 | click: () => {
65 | win.webContents.send('logout', {msg: ''});
66 | }
67 | },
68 | {
69 | label: 'Beenden',
70 | click: () => {
71 | app.quit();
72 | }
73 | }
74 | ]
75 | },
76 | {
77 | label: 'Edit',
78 | submenu: [{
79 | label: 'Undo',
80 | accelerator: 'CmdOrCtrl+Z',
81 | role: 'undo'
82 | }, {
83 | label: 'Redo',
84 | accelerator: 'Shift+CmdOrCtrl+Z',
85 | role: 'redo'
86 | }, {
87 | type: 'separator'
88 | }, {
89 | label: 'Ausschneiden',
90 | accelerator: 'CmdOrCtrl+X',
91 | role: 'cut'
92 | }, {
93 | label: 'Kopieren',
94 | accelerator: 'CmdOrCtrl+C',
95 | role: 'copy'
96 | }, {
97 | label: 'Einfügen',
98 | accelerator: 'CmdOrCtrl+V',
99 | role: 'paste'
100 | }
101 | // Problem mit electron 6.0.x
102 | // , {
103 | // label: 'Alles auswählen',
104 | // accelerator: 'CmdOrCtrl+A',
105 | // role: 'selectall'
106 | // }
107 | ]
108 | } // Ende Edit Menü
109 | ,
110 | {
111 | label: 'View',
112 | submenu: [
113 | // {
114 | // label: 'Reload',
115 | // accelerator: 'CmdOrCtrl+R',
116 | // click: function(item, focusedWindow) {
117 | // if (focusedWindow) {
118 | // // on reload, start fresh and close any old
119 | // // open secondary windows
120 | // if (focusedWindow.id === 1) {
121 | // BrowserWindow.getAllWindows().forEach(function(win) {
122 | // if (win.id > 1) {
123 | // win.close()
124 | // }
125 | // })
126 | // }
127 | // focusedWindow.reload()
128 | // }
129 | // }
130 | // },
131 | {
132 | label: 'Zwischem Vollbildmodus und normalen Modus wechseln. ',
133 | accelerator: (function () {
134 | if (process.platform === 'darwin') {
135 | return 'Ctrl+Command+F';
136 | } else {
137 | return 'F11';
138 | }
139 | })(),
140 | click: function (item, focusedWindow) {
141 | if (focusedWindow) {
142 | focusedWindow.setFullScreen(!focusedWindow.isFullScreen());
143 | }
144 | }
145 | },
146 | {
147 | label: 'Developer Tools Ein-/Ausblenden',
148 | accelerator: (function () {
149 | if (process.platform === 'darwin') {
150 | return 'Alt+Command+I';
151 | } else {
152 | return 'F12';
153 | }
154 | })(),
155 | click: function (item, focusedWindow: Electron.BrowserWindow) {
156 | if (focusedWindow) {
157 | focusedWindow.webContents.toggleDevTools();
158 | require('devtron').install()
159 | }
160 | }
161 | },
162 | {
163 | label: 'Dokumente anzeigen',
164 | accelerator: (function () {
165 | if (process.platform === 'darwin') {
166 | return 'Ctrl+Command+D';
167 | } else {
168 | return 'F11';
169 | }
170 | })(),
171 | click: function (item, focusedWindow) {
172 | if (focusedWindow) {
173 | console.log("Öffne Ordner", app.getPath("documents"));
174 | shell.showItemInFolder(app.getPath("documents")+ "/xy");
175 | }
176 | }
177 | },
178 | ]
179 | } // Ende View Menü
180 |
181 | ];
182 |
183 | return menuTemplate;
184 | }
185 | }
186 |
--------------------------------------------------------------------------------
/Cordova/.vscode/simulate/app-host.json:
--------------------------------------------------------------------------------
1 | {"plugins":{"cordova-plugin-geolocation":"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-geolocation","exec":"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\exec","events":"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\events","cordova-plugin-device":"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-device","cordova-plugin-file":"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-file"},"files":{"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\app-host\\app-host.js":1512467874379,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\db.js":1512467874954,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\telemetry-helper.js":1512467874972,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\argscheck.js":1512467874950,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\exception.js":1512467874958,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\messages.js":1512467874961,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\utils.js":1512467874977,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\event.js":1512467874957,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\sim-constants.js":1512467874965,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\polyfills.js":1512467874963,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\modules\\xhr-proxy.js":1512467874980,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\third-party\\jquery.min.js":1512467875412,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\third-party\\socket.io.js":1512467875421,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\third-party\\webcomponents.min.js":1512467875431,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-geolocation\\app-host-clobbers.js":1512467875147,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-device\\app-host.js":1512467875099,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-file\\app-host-handlers.js":1512467875128,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\events\\app-host.js":1512467875282,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\app-host\\live-reload-client.js":1512467874382,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\app-host\\touch-events.js":1512467874391,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-geolocation\\Position.js":1512467875183,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-geolocation\\PositionError.js":1512467875185,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-file\\app-host-non-webkit-handlers.js":1512467875134,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-file\\app-host-webkit-handlers.js":1512467875138,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\url\\url.js":1512467880043,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-file\\MyFile.js":1512467875144,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-geolocation\\Coordinates.js":1512467875151,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\cordova-simulate\\src\\plugins\\cordova-plugin-file\\indexedDB.js":1512467875141,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\q\\q.js":1512467881267,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\punycode\\punycode.js":1512467879346,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\url\\util.js":1512467880044,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\querystring-es3\\index.js":1512467879353,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\querystring-es3\\encode.js":1512467879351,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\querystring-es3\\decode.js":1512467879349,"C:\\Users\\hs\\.vscode\\extensions\\vsmobile.cordova-tools-1.3.1\\node_modules\\process\\browser.js":1512467879335}}
--------------------------------------------------------------------------------
/src/Login/Login.spec.ts:
--------------------------------------------------------------------------------
1 | import { LoginComponent } from "./Login.component";
2 | import { ComponentFixture, TestBed, tick, fakeAsync } from "@angular/core/testing";
3 | import { DebugElement, NgZone } from "@angular/core";
4 | import { By } from "@angular/platform-browser";
5 | import { FormsModule } from '@angular/forms';
6 | import { MiracleListProxy } from "Services/MiracleListProxy";
7 | // import { HttpClient, HttpHandler } from "@angular/common/http"; --> nicht gebraucht, da Fake-Poxy verwendet!
8 | import { CommunicationService } from "Services/CommunicationService";
9 | import { Router, Routes } from "@angular/router";
10 | // import { RoutingModule } from "Util/RoutingModule";
11 | import { AppModule } from "app.module";
12 | import { APP_BASE_HREF } from "@angular/common";
13 | import { Location } from '@angular/common';
14 | import { RouterTestingModule } from "@angular/router/testing";
15 | import { AppComponent } from "app/app.component";
16 | import { TaskViewComponent } from "TaskView/TaskView.Component";
17 | import { TaskEditComponent } from "TaskEdit/TaskEdit.Component";
18 | import { LoginInfo } from "Services/MiracleListProxyV2";
19 | import { Observable } from "rxjs/Observable";
20 | // Das sind bisher nur Dummy-Tests. Siehe https://angular.io/guide/testing
21 |
22 | const LOGINERRORTEXT = "Login Error";
23 |
24 | /** Fake-Proxy, der nur die eine verwendete Methode implementiert */
25 | class MiracleListFakeProxy {
26 | login(loginInfo?: LoginInfo | null | undefined): Observable {
27 | var r = new LoginInfo();
28 |
29 | if (loginInfo.username === "test" && loginInfo.password === 'test') {
30 | r.token = "test";
31 | r.message = ""; // leer = OK!
32 | console.log("FAKE-PROXY: OK with " + loginInfo.username + "/" + loginInfo.password);
33 | }
34 | else {
35 | r.message = LOGINERRORTEXT;
36 | console.log("FAKE-PROXY: NOT OK with " + loginInfo.username + "/" + loginInfo.password);
37 | }
38 | return Observable.create(observer => {
39 | observer.next(r);
40 | observer.complete();
41 | });
42 | }
43 | }
44 |
45 | export function CommunicationServiceFactory(router: Router, zone: NgZone) { return new CommunicationService(router, zone); }
46 |
47 | describe('LoginComponent Test', () => {
48 |
49 | const routes: Routes = [
50 | { path: '', component: LoginComponent },
51 | {
52 | path: 'app', component: AppComponent
53 |
54 | }];
55 |
56 | let comp: LoginComponent;
57 | let fixture: ComponentFixture;
58 | let de: DebugElement;
59 | let el: HTMLElement;
60 | let location: Location;
61 | let router: Router;
62 |
63 | beforeEach(() => {
64 | TestBed.configureTestingModule({
65 | declarations: [], // declare the test component
66 | imports: [AppModule, FormsModule, RouterTestingModule.withRoutes(routes)], // used Angular Modules
67 | providers: [ // Services / Dependency Injection
68 | {
69 | provide: MiracleListProxy,
70 | useClass: MiracleListFakeProxy
71 | },
72 | // HttpClient, HttpHandler, --> nicht gebraucht, da Fake-Poxy verwendet!
73 | {
74 | provide: CommunicationService,
75 | useFactory: CommunicationServiceFactory,
76 | deps: [Router, NgZone]
77 | }, { provide: APP_BASE_HREF, useValue: '/' }]
78 | });
79 |
80 | fixture = TestBed.createComponent(LoginComponent);
81 |
82 | comp = fixture.componentInstance; // BannerComponent test instance
83 |
84 | router = TestBed.get(Router);
85 | // query for the title by CSS element selector
86 |
87 | });
88 |
89 | it('title', () => {
90 | fixture.detectChanges();
91 | el = fixture.debugElement.query(By.css('h2')).nativeElement;
92 | expect(el.textContent).toContain("Benutzeranmeldung");
93 | });
94 |
95 | it('name and password be empty', () => {
96 | fixture.detectChanges();
97 | var tb1 = fixture.debugElement.query(By.css('#name')).nativeElement;
98 | expect(tb1.value).toEqual("");
99 | var tb2 = fixture.debugElement.query(By.css('#password')).nativeElement;
100 | expect(tb2.value).toEqual("");
101 | });
102 |
103 | it('missing password cause error', () => {
104 | checkError("test", "");
105 | });
106 |
107 | it('missing name cause error', () => {
108 | checkError("", "test");
109 | });
110 |
111 | it('routing', fakeAsync(() => {
112 | router.navigate(['app']);
113 | tick();
114 | location = TestBed.get(Location);
115 | expect(location.path()).toBe('/app');
116 | }));
117 |
118 | // it('Login mit korrekten Daten', fakeAsync(() => {
119 | // fixture.detectChanges();
120 | // comp.name = "test";
121 | // comp.password = "test";
122 | // comp.login();
123 | // fixture.detectChanges();
124 | // content("errorMsg", "");
125 | // tick();
126 | // location = TestBed.get(Location);
127 | // expect(location.path()).toBe('/app');
128 | // }));
129 |
130 | it('Login mit falschen Daten', fakeAsync(() => {
131 | fixture.detectChanges();
132 | comp.name = "test";
133 | comp.password = "xxx";
134 | comp.login();
135 | fixture.detectChanges();
136 | content("errorMsg", LOGINERRORTEXT);
137 | tick();
138 | location = TestBed.get(Location);
139 | expect(location.path()).toBe('');
140 | }));
141 |
142 | function checkError(name: string, password: string) {
143 | fixture.detectChanges();
144 | comp.name = name;
145 | comp.password = password;
146 | comp.login();
147 | fixture.detectChanges();
148 | content("errorMsg", "Benutzername und Kennwort müssen ausgefüllt sein!");
149 |
150 | }
151 |
152 | function content(id: string, content: string) {
153 | var errorMsg = fixture.debugElement.query(By.css('#' + id)).nativeElement;
154 | expect(errorMsg.textContent).toContain(content);
155 | }
156 |
157 |
158 | });
159 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [{
7 | "name": "Run Android on device",
8 | "type": "cordova",
9 | "request": "launch",
10 | "platform": "android",
11 | "target": "device",
12 | "port": 9222,
13 | "sourceMaps": true,
14 | "cwd": "${workspaceRoot}/Cordova",
15 | "ionicLiveReload": false
16 | },
17 | {
18 | "name": "Run iOS on device",
19 | "type": "cordova",
20 | "request": "launch",
21 | "platform": "ios",
22 | "target": "device",
23 | "port": 9220,
24 | "sourceMaps": true,
25 | "cwd": "${workspaceRoot}",
26 | "ionicLiveReload": false
27 | },
28 | {
29 | "name": "Attach to running android on device",
30 | "type": "cordova",
31 | "request": "attach",
32 | "platform": "android",
33 | "target": "device",
34 | "port": 9222,
35 | "sourceMaps": true,
36 | "cwd": "${workspaceRoot}"
37 | },
38 | {
39 | "name": "Attach to running iOS on device",
40 | "type": "cordova",
41 | "request": "attach",
42 | "platform": "ios",
43 | "target": "device",
44 | "port": 9220,
45 | "sourceMaps": true,
46 | "cwd": "${workspaceRoot}"
47 | },
48 | {
49 | "name": "Run Android on emulator",
50 | "type": "cordova",
51 | "request": "launch",
52 | "platform": "android",
53 | "target": "emulator",
54 | "port": 9222,
55 | "sourceMaps": true,
56 | "cwd": "${workspaceRoot}",
57 | "ionicLiveReload": false
58 | },
59 | {
60 | "name": "Run iOS on simulator",
61 | "type": "cordova",
62 | "request": "launch",
63 | "platform": "ios",
64 | "target": "emulator",
65 | "port": 9220,
66 | "sourceMaps": true,
67 | "cwd": "${workspaceRoot}",
68 | "ionicLiveReload": false
69 | },
70 | {
71 | "name": "Attach to running android on emulator",
72 | "type": "cordova",
73 | "request": "attach",
74 | "platform": "android",
75 | "target": "emulator",
76 | "port": 9222,
77 | "sourceMaps": true,
78 | "cwd": "${workspaceRoot}"
79 | },
80 | {
81 | "name": "Attach to running iOS on simulator",
82 | "type": "cordova",
83 | "request": "attach",
84 | "platform": "ios",
85 | "target": "emulator",
86 | "port": 9220,
87 | "sourceMaps": true,
88 | "cwd": "${workspaceRoot}"
89 | },
90 | {
91 | "name": "Serve to the browser (ionic serve)",
92 | "type": "cordova",
93 | "request": "launch",
94 | "platform": "serve",
95 | "cwd": "${workspaceRoot}",
96 | "devServerAddress": "localhost",
97 | "sourceMaps": true,
98 | "ionicLiveReload": true
99 | },
100 | {
101 | "name": "Simulate Android in browser",
102 | "type": "cordova",
103 | "request": "launch",
104 | "platform": "android",
105 | "target": "chrome",
106 | "simulatePort": 8000,
107 | "livereload": true,
108 | "sourceMaps": true,
109 | "cwd": "${workspaceRoot}"
110 | },
111 | {
112 | "name": "Simulate iOS in browser",
113 | "type": "cordova",
114 | "request": "launch",
115 | "platform": "ios",
116 | "target": "chrome",
117 | "simulatePort": 8000,
118 | "livereload": true,
119 | "sourceMaps": true,
120 | "cwd": "${workspaceRoot}"
121 | },
122 | {
123 | "name": "Run Browser",
124 | "type": "cordova",
125 | "request": "launch",
126 | "platform": "browser",
127 | "target": "chrome",
128 | "simulatePort": 8000,
129 | "livereload": true,
130 | "sourceMaps": true,
131 | "cwd": "${workspaceRoot}/Cordova"
132 | },
133 |
134 |
135 | {
136 | "name": "Launch Chrome against localhost",
137 | "type": "chrome",
138 | "request": "launch",
139 | "url": "http://localhost:8080",
140 | "webRoot": "${workspaceRoot}"
141 | },
142 | {
143 | "name": "Attach to Chrome",
144 | "type": "chrome",
145 | "request": "attach",
146 | "port": 9222,
147 | "webRoot": "${workspaceRoot}"
148 | },
149 | {
150 | "name": "Debug Electron Main Process",
151 | "type": "node",
152 | "request": "launch",
153 | "cwd": "${workspaceRoot}/temp_electron/",
154 | "program": "${workspaceRoot}/temp_electron/main.js",
155 | "runtimeExecutable": "${workspaceRoot}/electron/node_modules/.bin/electron",
156 | "windows": {
157 | "runtimeExecutable": "${workspaceRoot}/electron/node_modules/.bin/electron.cmd"
158 | },
159 | "sourceMaps": true,
160 | "args": ["."]
161 | }
162 | ]
163 | }
--------------------------------------------------------------------------------
/README.md.bak:
--------------------------------------------------------------------------------
1 | # MiracleListClient
2 |
3 | Dies ist eine Beispielanwendung für eine Cross-Platform-Anwendung auf Basis einer Single-Page-Webapplication (SPA). MiracleList dient der Aufgabenverwaltung.
4 |
5 | Version: 0.6.5-Beta3 vom 17.02.2018
6 | Webadressen:
7 |
15 | Eingesetzte Techniken:
16 |
17 | Backend: .NET Core, C#, ASP.NET Core WebAPI, Entity Framework Core, SQL Azure, Azure Web App, Swagger, Application Insights
18 | Frontend: HTML, CSS, TypeScript, Angular, Bootstrap, MomentJS, angular2-moment, ngx-contextmenu, ngx-modal, ngx-translate
19 |
20 | Versionsgeschichte:
21 |
22 | 0.1: Basisversion mit Aufgaben anlegen und bearbeiten
23 | 0.2: Benutzerverwaltung, Kategorien verwalten
24 | 0.3: Suchfunktion, fällige Aufgaben
25 | 0.4: Aufwand als Zusatzeigenschaft
26 | 0.5: Electron-Client
27 | 0.6: Cordova-Client, Aufgaben sind sortierbar
28 | 0.6.1: Verbesserte Navigation auf kleinen Displays
29 | 0.6.2: Umstellung auf API v2 mit HttpInjector
30 | 0.6.3: Ständige Aktualisierung des Server-Status, zusätzliche Menüpunkt in Electron-App
31 | 0.6.4: Dateisystemexport in Cordova-App
32 | 0.6.5: Umstellung auf Angular 5.2.2
33 |
34 |
35 | --------------------------------------------------------
36 | # Package Restore
37 |
38 | Die notwendigen NPM-Module (ca. 500 MB) sind nicht enthalten. Sie müssen diese mit `npm install` wiederherstellen!
39 |
40 | Dieser Befehl muss 3x ausgeführt werden
41 | - im Hauptverzeichnis
42 | - im Verzeichnis /Electron für die speziellen Node-Pakete für Electron
43 | - im Verzeichnis /Cordova für die speziellen Node-Pakete für Cordova
44 | --------------------------------------------------------
45 |
46 | # Hilfe zum Electron-Client
47 |
48 | Voraussetzungen:
49 | `npm install electron`
50 | for use from cli
51 | `npm install electron-packager -g`
52 | for use in npm scripts
53 | `npm install --save-dev electron-packager`
54 |
55 | Übersetzen und starten: `npm run w-electron` (w für AUSFÜHRUNG auf Windows, m für Mac)
56 |
57 | Pakete erstellen: `npm run w-electron-deployallprod`
58 |
59 | --------------------------------------------------------
60 |
61 | # Hilfe zum Cordova-Client
62 |
63 | Cordova global installieren: `install -g cordova`
64 |
65 | Angular-Webanwendung ins Verzeichnis "Cordova/www" übersetzen: `npm run build-cordova`
66 |
67 | Verzeichnis wechseln `cd .\Cordova\`
68 |
69 | Platform hinzufügen: `cordova platform add android` usw.
70 |
71 | Übersetzen: `cordova build android` usw.
72 |
73 | Starten: `cordova run browser` oder `cordova run windows` oder `cordova run android -device` usw.
74 |
75 | Geräteliste: `cordova run android --list`
76 |
77 | Optional: Plug-In ergänzen: `cordova plugin add cordova-plugin-device`
78 |
79 | # Angular-CLI
80 |
81 | Dieses Projekt wurde mit [angular-cli](https://github.com/angular/angular-cli) erzeugt mit Version 1.0.0-beta.24. Es wurde später auf Angular-CLi v1.3.0 aktualisiert.
82 |
83 | Es folgt die Original-Readme-Datei von Angular-CLI
84 |
85 | ## Development server
86 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
87 |
88 | ## Code scaffolding
89 |
90 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class/module`.
91 |
92 | ## Build
93 |
94 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
95 |
96 | ng build --target=production --environment=prod
97 |
98 | ## Running unit tests
99 |
100 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
101 |
102 | ## Running end-to-end tests
103 |
104 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
105 | Before running the tests make sure you are serving the app via `ng serve`.
106 |
107 | ## Deploying to Github Pages
108 |
109 | Run `ng github-pages:deploy` to deploy to Github Pages.
110 |
111 | ## Further help
112 |
113 | To get more help on the `angular-cli` use `ng help` or go check out the [Angular-CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
114 |
--------------------------------------------------------------------------------
/Cordova/plugins/cordova-plugin-whitelist/doc/zh/README.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # cordova-plugin-whitelist
21 |
22 | 這個外掛程式實現一個用於導航在科爾多瓦 4.0 應用程式 web 視圖的白名單策略
23 |
24 | ## 支援的科爾多瓦平臺
25 |
26 | * Android 4.0.0 或以上
27 | * iOS 4.0.0 或以上
28 |
29 | ## 導航白名單
30 |
31 | 控制 web 視圖本身可以導航到的 Url。適用于頂級導航只。
32 |
33 | 怪癖: 在 Android 上它也適用于 iframe 的非-結計畫。
34 |
35 | 預設情況下,只有到`file://` Url 導航允許。若要允許其他其他 Url,必須將``標籤添加到您的`config.xml`:
36 |
37 |
38 |
39 |
40 |
42 |
43 |
44 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | ## 科爾多瓦-外掛程式-白名單
56 |
57 | 控制應用程式允許讓系統打開的 Url。 預設情況下,沒有外部 Url 允許。
58 |
59 | 在 android 系統,這相當於發送類型 BROWSEABLE 的意圖。
60 |
61 | 此白名單並不適用于只超連結和對`window.open ()`調用的外掛程式.
62 |
63 | 在`config.xml`中添加``標籤,像這樣:
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
87 |
88 |
89 |
90 | ## 網路請求白名單
91 |
92 | 網路請求的控制項 (圖像,XHRs 等) 允許 (通過科爾多瓦本機掛鉤)。
93 |
94 | 注意: 我們建議你使用內容的安全性原則 (見下文),這是更安全。 此白名單大多是為 webviews 不支援 CSP 的歷史。
95 |
96 | 在`config.xml`中添加``標記,像這樣:
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 | 沒有任何``標籤,只到`file://` Url 允許請求。 但是,預設的科爾多瓦應用程式包括`` ,預設情況。
116 |
117 | 怪癖: Android 還允許對 HTTPs://ssl.gstatic.com/accessibility/javascript/android/ 請求預設情況下,因為這是對講正常所需。
118 |
119 | ### 內容安全政策
120 |
121 | 網路請求的控制項 (圖像,XHRs 等) 允許 (通過 web 視圖直接)。
122 |
123 | 對 Android 和 iOS,網路請求白名單 (見上文) 是不能夠過濾所有類型的請求 (例如`` & Websocket 未被阻止)。 那麼,除了白名單中,你應使用[內容安全性原則](http://content-security-policy.com/) `< 元 >`標記您的所有頁面。
124 |
125 | 在 android 系統,對 CSP 系統 web 視圖的支援開始奇巧 (但是是上使用 web 視圖人行橫道上的所有版本可用)。
126 |
127 | 下面是一些示例 CSP 聲明為`.html`頁面:
128 |
129 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/Cordova/plugins/cordova-plugin-whitelist/doc/ko/README.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # cordova-plugin-whitelist
21 |
22 | 이 플러그인 구현 코르도바 4.0 응용 프로그램 webview를 탐색에 대 한 허용 정책
23 |
24 | ## 지원된 코르도바 플랫폼
25 |
26 | * 안 드 로이드 4.0.0 이상
27 | * iOS 4.0.0 이상
28 |
29 | ## 탐색 허용
30 |
31 | WebView 자체가 탐색할 수 있는 Url을 제어 합니다. 최상위 탐색에만 적용 됩니다.
32 |
33 | 단점: 안 드 로이드에도 적용 됩니다 iframe에 대 한 비-프로토콜인 계획.
34 |
35 | 기본적으로 탐색 `file://` Url에만 사용할 수 있습니다. 다른 다른 Url을 허용 하려면 `config.xml`에 `< allow-navigation >` 태그를 추가 해야 합니다.
36 |
37 |
38 |
39 |
40 |
42 |
43 |
44 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | ## 의도 허용
56 |
57 | App 시스템 열을 게 허용 되는 Url을 제어 합니다. 기본적으로 외부 Url은 사용할 수 있습니다.
58 |
59 | 안 드 로이드에이 형식의 BROWSEABLE 의도 보내는 것 같습니다.
60 |
61 | 이 허용 된 플러그인, 하이퍼링크 및 `window.open ()` 호출에 적용 되지 않습니다..
62 |
63 | `Config.xml`에이 같은 `< allow-intent >` 태그를 추가 합니다.
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
87 |
88 |
89 |
90 | ## 네트워크 요청 허용
91 |
92 | 요청을 네트워크 컨트롤 (이미지, XHRs, 등) (코르도바 네이티브 후크)를 통해 할 수 있습니다.
93 |
94 | 참고: 당신이 사용 콘텐츠 보안 정책 (아래 참조), 더 안전한 것이 좋습니다. 이 허용은 CSP를 지원 하지 않는 webviews에 대 한 역사적.
95 |
96 | `Config.xml`에이 같은 `< access >` 태그를 추가 합니다.
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 | 어떤 `< access >` 태그 없이 요청 `file://` Url 사용할 수 있습니다. 그러나 기본 코르도바 응용 프로그램을 포함 하는, `< access origin="*" >` 기본적으로.
116 |
117 | 특질: 안 드 로이드 또한 수 있습니다 요청을 https://ssl.gstatic.com/accessibility/javascript/android/ 기본적으로 필요 제대로 작동 하려면 의견 이므로.
118 |
119 | ### 콘텐츠 보안 정책
120 |
121 | 요청을 네트워크 컨트롤 (이미지, XHRs, 등) (webview 직접)를 통해 할 수 있습니다.
122 |
123 | 안 드 로이드와 iOS에 네트워크 요청 허용 (위 참조)는 모든 종류의 요청 (예: `< 비디오 >` & WebSockets 차단 되지 않습니다)를 필터링 할 수 없습니다. 그래서, 허용, 뿐만 아니라 귀하의 모든 페이지에 [콘텐츠 보안 정책](http://content-security-policy.com/) `< meta >` 태그를 사용 해야 합니다.
124 |
125 | 안 드 로이드, 시스템 webview 내에서 CSP에 대 한 지원을 KitKat 시작 (하지만 횡단 보도 WebView를 사용 하 여 모든 버전에서 사용할 수).
126 |
127 | 다음은 `.html` 페이지에 대 한 몇 가지 예제 CSP 선언입니다.
128 |
129 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/Cordova/plugins/cordova-plugin-whitelist/doc/ja/README.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # cordova-plugin-whitelist
21 |
22 | このプラグイン実装コルドバ 4.0 アプリケーション webview をナビゲートするためのホワイト リスト ポリシー
23 |
24 | ## サポートされているコルドバのプラットフォーム
25 |
26 | * アンドロイド 4.0.0 以上
27 | * iOS 4.0.0 以上
28 |
29 | ## ナビゲーションのホワイト リスト
30 |
31 | WebView 自体に移動に Url を制御します。最上位ナビゲーションのみに適用されます。
32 |
33 | 癖: Android にもに適用されますの iframe 非-[http スキーム。
34 |
35 | 既定では、ナビゲーション、 `file://`の Url にのみ許可されます。その他の他の Url を許可するように、 `config.xml`に``タグを追加する必要があります。
36 |
37 |
38 |
39 |
40 |
42 |
43 |
44 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | ## インテントのホワイト リスト
56 |
57 | どの Url を開くようにシステムを聞いて、アプリに許可を制御します。 既定では、外部 Url 許可されません。
58 |
59 | 人造人間、これは型 BROWSEABLE の意図を送信することに相当します。
60 |
61 | このホワイト リストはプラグインのみハイパーリンクおよび`window.open()`への呼び出しには適用されません。.
62 |
63 | `Config.xml`内の``タグは、このようなを追加します。
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
87 |
88 |
89 |
90 | ## ネットワーク要求のホワイト リスト
91 |
92 | ネットワーク要求コントロール (画像、XHRs 等) (コルドバ ネイティブ フック) を介して行われることが。
93 |
94 | 注: より安全なコンテンツ セキュリティ ポリシー (下記参照) を使用してお勧めします。 このホワイト リストほとんどの CSP をサポートしていない web 表示のために歴史的です。
95 |
96 | `Config.xml`内のこのような``タグを追加します。
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 | ``タグ、なし`file://` Url に要求のみを許可します。 ただし、既定のコルドバ アプリケーションが含まれています``デフォルトで。
116 |
117 | 気まぐれ: アンドロイドも要求できます https://ssl.gstatic.com/accessibility/javascript/android/デフォルトでは、トークが正常に機能するために必要ですので。
118 |
119 | ### コンテンツのセキュリティ ポリシー
120 |
121 | ネットワーク要求コントロール (画像、XHRs 等) (直接 webview) を介して行われることが。
122 |
123 | Android と iOS は、ネットワーク要求ホワイト リスト (上記参照) はすべての種類の要求 (例: `< ビデオ >` & Websocket がふさがれていない) をフィルター処理できません。 だから、ホワイト リストに加えてすべてのページに[コンテンツ セキュリティ ポリシー](http://content-security-policy.com/) `< meta >`タグを使用する必要があります。
124 |
125 | Android 上システム webview 内 CSP サポート キットカットから始まります (しかし横断歩道 WebView を使用してすべてのバージョンで利用可能です)。
126 |
127 | `.Html`ページのいくつかの例 CSP の宣言は次のとおりです。
128 |
129 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
22 |
23 |
24 |
25 |
26 |
{{taskSet.length}} Tasks in {{category.name}}
27 |
28 |
29 |
30 |
31 |
32 |
34 | {{ t.title }}
35 | {{t.importance | importance}}
36 | {{getUndoneSubTaskSet(t).length}} due Subtasks
37 | today}"
38 | title="{{t.due}}">due {{t.due | amTimeAgo}}
39 |
40 |
41 |
42 |
43 |
44 |
Suchergebnisse in {{categorySetWithTaskSet.length}} Kategorien
45 |
46 |
47 |
48 |
49 |
50 |
52 | {{ t.title }}
53 | {{t.importance | importance}}
54 | {{getUndoneSubTaskSet(t).length}} offene Teilaufgaben
55 | today}">fällig {{t.due | amTimeAgo}}
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | Lösche Kategorie: {{item.name}}
66 |
67 |
68 |
69 |
70 |
71 | Edit Task: {{item.title}}
72 |
73 |
74 | Remove Tasks: {{item.title}}
75 |
76 |
77 |
78 |
79 |
80 |
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # MiracleListClient
2 |
3 | Dies ist eine Beispielanwendung für eine Cross-Platform-Anwendung auf Basis einer Single-Page-Webapplication (SPA). MiracleList dient der Aufgabenverwaltung.
4 |
5 | Version: 0.6.7-Beta1 vom 03.09.2019
6 | Live-Systeme in der Cloud:
7 |
15 | Quellcode:
16 |
21 | Eingesetzte Techniken:
22 |
23 | Backend: .NET Core, C#, ASP.NET Core WebAPI, Entity Framework Core, SQL Azure, Azure Web App, Swagger, Application Insights
24 | Frontend: HTML, CSS, TypeScript, Angular, Bootstrap, MomentJS, angular2-moment, ngx-contextmenu, ngx-modialog, ngx-translate, ng-pick-datetime, ng2-dnd
25 |
26 | Versionsgeschichte:
27 |
28 | 0.1: Basisversion mit Aufgaben anlegen und bearbeiten
29 | 0.2: Benutzerverwaltung, Kategorien verwalten
30 | 0.3: Suchfunktion, fällige Aufgaben
31 | 0.4: Aufwand als Zusatzeigenschaft
32 | 0.5: Electron-Client
33 | 0.6: Cordova-Client, Aufgaben sind sortierbar
34 | 0.6.1: Verbesserte Navigation auf kleinen Displays
35 | 0.6.2: Umstellung auf API v2 mit HttpInjector
36 | 0.6.3: Ständige Aktualisierung des Server-Status, zusätzliche Menüpunkt in Electron-App
37 | 0.6.4: Dateisystemexport in Cordova-App
38 | 0.6.5: Umstellung auf Angular 5.2.2
39 | 0.6.6: Anzeige Release Date
40 | 0.6.7: Umstellung auf Electron 6.0.7
41 |
42 |
43 | --------------------------------------------------------
44 | # Package Restore
45 |
46 | Die notwendigen NPM-Module (ca. 500 MB) sind nicht enthalten. Sie müssen diese mit `npm install` wiederherstellen!
47 |
48 | Dieser Befehl muss 3x ausgeführt werden
49 | - im Hauptverzeichnis
50 | - im Verzeichnis /Electron für die speziellen Node-Pakete für Electron
51 | - im Verzeichnis /Cordova für die speziellen Node-Pakete für Cordova
52 | --------------------------------------------------------
53 |
54 | # Hilfe zum Electron-Client
55 |
56 | Voraussetzungen:
57 | `npm install electron`
58 | for use from cli
59 | `npm install electron-packager -g`
60 | for use in npm scripts
61 | `npm install --save-dev electron-packager`
62 |
63 | Übersetzen und starten: `npm run w-electron` (w für AUSFÜHRUNG auf Windows, m für Mac)
64 |
65 | Pakete erstellen: `npm run w-electron-deployallprod`
66 |
67 | --------------------------------------------------------
68 |
69 | # Hilfe zum Cordova-Client
70 |
71 | Cordova global installieren: `install -g cordova`
72 |
73 | Verzeichnis wechseln `cd ./Cordova/`
74 |
75 | Angular-Webanwendung ins Verzeichnis "Cordova/www" übersetzen: `npm run build-ng` oder `npm run build-ng-prod`
76 |
77 | Platform hinzufügen: `cordova platform add android` usw.
78 |
79 | Übersetzen: `cordova build android` usw.
80 |
81 | Starten: `cordova run browser` oder `cordova run windows` oder `cordova run android -device` usw.
82 |
83 | Geräteliste: `cordova run android --list`
84 |
85 | Optional: Plug-In ergänzen: `cordova plugin add cordova-plugin-device`
86 |
87 | # Angular-CLI
88 |
89 | Dieses Projekt wurde mit [angular-cli](https://github.com/angular/angular-cli) erzeugt mit Version 1.0.0-beta.24. Es wurde später auf Angular-CLi v1.5.x aktualisiert.
90 |
91 | Es folgt die Original-Readme-Datei von Angular-CLI
92 |
93 | ## Development server
94 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
95 |
96 | ## Code scaffolding
97 |
98 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class/module`.
99 |
100 | ## Build
101 |
102 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
103 |
104 | ng build --target=production --environment=prod
105 |
106 | ## Running unit tests
107 |
108 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
109 |
110 | ## Running end-to-end tests
111 |
112 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
113 | Before running the tests make sure you are serving the app via `ng serve`.
114 |
115 | ## Deploying to Github Pages
116 |
117 | Run `ng github-pages:deploy` to deploy to Github Pages.
118 |
119 | ## Further help
120 |
121 | To get more help on the `angular-cli` use `ng help` or go check out the [Angular-CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
122 |
123 | ## Produktionsbuild und Hosting
124 | ng build --prod
125 | http-server ./dist
126 |
--------------------------------------------------------------------------------
/Cordova/plugins/cordova-plugin-whitelist/src/android/WhitelistPlugin.java:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | package org.apache.cordova.whitelist;
21 |
22 | import org.apache.cordova.CordovaPlugin;
23 | import org.apache.cordova.ConfigXmlParser;
24 | import org.apache.cordova.LOG;
25 | import org.apache.cordova.Whitelist;
26 | import org.xmlpull.v1.XmlPullParser;
27 |
28 | import android.content.Context;
29 |
30 | public class WhitelistPlugin extends CordovaPlugin {
31 | private static final String LOG_TAG = "WhitelistPlugin";
32 | private Whitelist allowedNavigations;
33 | private Whitelist allowedIntents;
34 | private Whitelist allowedRequests;
35 |
36 | // Used when instantiated via reflection by PluginManager
37 | public WhitelistPlugin() {
38 | }
39 | // These can be used by embedders to allow Java-configuration of whitelists.
40 | public WhitelistPlugin(Context context) {
41 | this(new Whitelist(), new Whitelist(), null);
42 | new CustomConfigXmlParser().parse(context);
43 | }
44 | public WhitelistPlugin(XmlPullParser xmlParser) {
45 | this(new Whitelist(), new Whitelist(), null);
46 | new CustomConfigXmlParser().parse(xmlParser);
47 | }
48 | public WhitelistPlugin(Whitelist allowedNavigations, Whitelist allowedIntents, Whitelist allowedRequests) {
49 | if (allowedRequests == null) {
50 | allowedRequests = new Whitelist();
51 | allowedRequests.addWhiteListEntry("file:///*", false);
52 | allowedRequests.addWhiteListEntry("data:*", false);
53 | }
54 | this.allowedNavigations = allowedNavigations;
55 | this.allowedIntents = allowedIntents;
56 | this.allowedRequests = allowedRequests;
57 | }
58 | @Override
59 | public void pluginInitialize() {
60 | if (allowedNavigations == null) {
61 | allowedNavigations = new Whitelist();
62 | allowedIntents = new Whitelist();
63 | allowedRequests = new Whitelist();
64 | new CustomConfigXmlParser().parse(webView.getContext());
65 | }
66 | }
67 |
68 | private class CustomConfigXmlParser extends ConfigXmlParser {
69 | @Override
70 | public void handleStartTag(XmlPullParser xml) {
71 | String strNode = xml.getName();
72 | if (strNode.equals("content")) {
73 | String startPage = xml.getAttributeValue(null, "src");
74 | allowedNavigations.addWhiteListEntry(startPage, false);
75 | } else if (strNode.equals("allow-navigation")) {
76 | String origin = xml.getAttributeValue(null, "href");
77 | if ("*".equals(origin)) {
78 | allowedNavigations.addWhiteListEntry("http://*/*", false);
79 | allowedNavigations.addWhiteListEntry("https://*/*", false);
80 | allowedNavigations.addWhiteListEntry("data:*", false);
81 | } else {
82 | allowedNavigations.addWhiteListEntry(origin, false);
83 | }
84 | } else if (strNode.equals("allow-intent")) {
85 | String origin = xml.getAttributeValue(null, "href");
86 | allowedIntents.addWhiteListEntry(origin, false);
87 | } else if (strNode.equals("access")) {
88 | String origin = xml.getAttributeValue(null, "origin");
89 | String subdomains = xml.getAttributeValue(null, "subdomains");
90 | boolean external = (xml.getAttributeValue(null, "launch-external") != null);
91 | if (origin != null) {
92 | if (external) {
93 | LOG.w(LOG_TAG, "Found within config.xml. Please use instead.");
94 | allowedIntents.addWhiteListEntry(origin, (subdomains != null) && (subdomains.compareToIgnoreCase("true") == 0));
95 | } else {
96 | if ("*".equals(origin)) {
97 | allowedRequests.addWhiteListEntry("http://*/*", false);
98 | allowedRequests.addWhiteListEntry("https://*/*", false);
99 | } else {
100 | allowedRequests.addWhiteListEntry(origin, (subdomains != null) && (subdomains.compareToIgnoreCase("true") == 0));
101 | }
102 | }
103 | }
104 | }
105 | }
106 | @Override
107 | public void handleEndTag(XmlPullParser xml) {
108 | }
109 | }
110 |
111 | @Override
112 | public Boolean shouldAllowNavigation(String url) {
113 | if (allowedNavigations.isUrlWhiteListed(url)) {
114 | return true;
115 | }
116 | return null; // Default policy
117 | }
118 |
119 | @Override
120 | public Boolean shouldAllowRequest(String url) {
121 | if (Boolean.TRUE == shouldAllowNavigation(url)) {
122 | return true;
123 | }
124 | if (allowedRequests.isUrlWhiteListed(url)) {
125 | return true;
126 | }
127 | return null; // Default policy
128 | }
129 |
130 | @Override
131 | public Boolean shouldOpenExternalUrl(String url) {
132 | if (allowedIntents.isUrlWhiteListed(url)) {
133 | return true;
134 | }
135 | return null; // Default policy
136 | }
137 |
138 | public Whitelist getAllowedNavigations() {
139 | return allowedNavigations;
140 | }
141 |
142 | public void setAllowedNavigations(Whitelist allowedNavigations) {
143 | this.allowedNavigations = allowedNavigations;
144 | }
145 |
146 | public Whitelist getAllowedIntents() {
147 | return allowedIntents;
148 | }
149 |
150 | public void setAllowedIntents(Whitelist allowedIntents) {
151 | this.allowedIntents = allowedIntents;
152 | }
153 |
154 | public Whitelist getAllowedRequests() {
155 | return allowedRequests;
156 | }
157 |
158 | public void setAllowedRequests(Whitelist allowedRequests) {
159 | this.allowedRequests = allowedRequests;
160 | }
161 | }
162 |
--------------------------------------------------------------------------------
/Cordova/plugins/cordova-plugin-whitelist/doc/pl/README.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # cordova-plugin-whitelist
21 |
22 | Ten plugin wdraża polityki białej nawigacja widoku sieci Web aplikacji na Cordova 4.0
23 |
24 | ## Cordova obsługiwanych platform
25 |
26 | * Android 4.0.0 lub powyżej
27 | * iOS 4.0.0 lub powyżej
28 |
29 | ## Biała lista nawigacji
30 |
31 | Kontroluje, których adresy URL widoku sieci Web, samej można nawigować do. Dotyczy tylko najwyższego poziomu nawigacje.
32 |
33 | Dziwactwa: na Android to dotyczy także IFRAME do nie-http (s) systemów.
34 |
35 | Domyślnie, nawigacje tylko do URLi `file://` , są dozwolone. Aby zezwolić na inne adresy URL, należy dodać Tagi `< allow-navigation >` do pliku `config.xml`:
36 |
37 |
38 |
39 |
40 |
42 |
43 |
44 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | ## Zamiarem biała
56 |
57 | Kontroluje, których adresy URL aplikacji jest możliwość zapytać systemem otwierania. Domyślnie nie ma zewnętrznych adresów URL są dozwolone.
58 |
59 | Na Android to przyrównuje do wysyłania zamiarem typu BROWSEABLE.
60 |
61 | Ta biała nie ma zastosowania do pluginów, tylko hiperłącza i wywołania `window.open()`.
62 |
63 | W `pliku config.xml`dodawanie tagów `< allow-intent >` , jak to:
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
87 |
88 |
89 |
90 | ## Sieci wniosek biała
91 |
92 | Formanty, które sieci żądań (obrazy, XHRs, itp.) mogą być wykonane (za pośrednictwem cordova rodzimych haki).
93 |
94 | Uwaga: Zalecamy, że używasz treści polityki bezpieczeństwa (patrz poniżej), który jest bardziej bezpieczne. Ta Biała jest głównie historyczne dla webviews, które nie obsługują CSP.
95 |
96 | W `pliku config.xml`dodawanie tagów `< access >` , jak to:
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 | Bez żadnych tagów `< access >` dozwolone są tylko żądania do URLi `file://` . Jednak domyślnie Cordova aplikacja zawiera `< access origin = "*" >` domyślnie.
116 |
117 | Cokół: Android pozwala również żądania do https://ssl.gstatic.com/accessibility/javascript/android/ domyślnie, ponieważ jest to wymagane dla TalkBack wobec funkcja poprawnie.
118 |
119 | ### Zasady zabezpieczeń zawartości
120 |
121 | Formanty, które sieci żądań (obrazy, XHRs, itp.) mogą być wykonane (za pomocą widoku sieci Web bezpośrednio).
122 |
123 | Na Androida i iOS biała żądanie sieci (patrz wyżej) nie jest w stanie filtrować wszystkie rodzaje wniosków (np. `< video >` & WebSockets nie są zablokowane). Tak oprócz białej listy, należy użyć tagu `< meta >` [Treści polityki bezpieczeństwa](http://content-security-policy.com/) na wszystkich stronach.
124 |
125 | Na Android wsparcie dla CSP w ramach systemu widoku sieci Web zaczyna KitKat (ale jest dostępne we wszystkich wersjach przy użyciu widoku sieci Web przejście dla pieszych).
126 |
127 | Oto niektóre przykład CSP deklaracje dla strony `HTML` :
128 |
129 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------