Compare commits
No commits in common. "9a8184e7d52fb7043104f465e2500246ed04fe2c" and "cc6d60951c29db5e8a8f81d658c5d6dfef5c6c4b" have entirely different histories.
9a8184e7d5
...
cc6d60951c
@ -1,5 +1,5 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<widget android-versionCode="17" id="link.silas.wordrotator" version="1.2.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
<widget android-versionCode="1" id="link.silas.wordrotator" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||||
<name>WordRotator</name>
|
<name>WordRotator</name>
|
||||||
<description>
|
<description>
|
||||||
A word-game
|
A word-game
|
||||||
|
|||||||
1974
orga/level_data.sql
1974
orga/level_data.sql
File diff suppressed because it is too large
Load Diff
56
package.json
56
package.json
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "wordrotator",
|
"name": "wordrotator",
|
||||||
"displayName": "WordRotator",
|
"displayName": "WordRotator",
|
||||||
"version": "1.3.0",
|
"version": "1.2.0",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"server": "ts-node src/server/index.ts",
|
"server": "ts-node src/server/index.ts",
|
||||||
@ -17,12 +17,13 @@
|
|||||||
"typeorm": "ts-node ./node_modules/typeorm/cli -f ./ormconfig.ts"
|
"typeorm": "ts-node ./node_modules/typeorm/cli -f ./ormconfig.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/node": "^14.14.27",
|
"@types/node": "^14.11.8",
|
||||||
"body-parser": "^1.19.0",
|
"body-parser": "^1.19.0",
|
||||||
"cordova-android": "^9.0.0",
|
"cordova-android": "^9.0.0",
|
||||||
"cordova-browser": "^6.0.0",
|
"cordova-browser": "^6.0.0",
|
||||||
"cordova-ios": "^6.1.1",
|
"cordova-ios": "^6.1.1",
|
||||||
"cordova-sites": "git+https://github.com/Ainias/cordova-sites.git#0.7.10",
|
"cordova-plugin-share": "^0.1.3",
|
||||||
|
"cordova-sites": "git+https://github.com/Ainias/cordova-sites.git#0.6.5",
|
||||||
"cordova-sites-database": "git+https://github.com/Ainias/cordova-sites-database.git#0.4.4",
|
"cordova-sites-database": "git+https://github.com/Ainias/cordova-sites-database.git#0.4.4",
|
||||||
"cordova-sites-easy-sync": "git+https://github.com/Ainias/cordova-sites-easy-sync.git#0.6.7",
|
"cordova-sites-easy-sync": "git+https://github.com/Ainias/cordova-sites-easy-sync.git#0.6.7",
|
||||||
"cordova-sites-user-management": "git+https://github.com/Ainias/cordova-sites-user-management.git#0.5.4",
|
"cordova-sites-user-management": "git+https://github.com/Ainias/cordova-sites-user-management.git#0.5.4",
|
||||||
@ -30,28 +31,32 @@
|
|||||||
"cs-event-manager": "git+https://git@github.com/Ainias/event-manager.git#0.2",
|
"cs-event-manager": "git+https://git@github.com/Ainias/event-manager.git#0.2",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"js-helper": "git+https://github.com/Ainias/js-helper.git#0.6.6",
|
"foundation-sites": "^6.6.3",
|
||||||
|
"js-helper": "git+https://github.com/Ainias/js-helper.git#0.4.1",
|
||||||
"jsonwebtoken": "^8.5.1",
|
"jsonwebtoken": "^8.5.1",
|
||||||
|
"localforage": "^1.9.0",
|
||||||
"mysql": "^2.18.1",
|
"mysql": "^2.18.1",
|
||||||
"nodemailer": "^6.4.14",
|
"nodemailer": "^6.4.14",
|
||||||
"ts-node": "9.1.1",
|
"sql.js": "1.3.2",
|
||||||
"typeorm": "^0.2.31",
|
"ts-node": "9.0.0",
|
||||||
"typescript": "^4.1.5"
|
"typeorm": "^0.2.28",
|
||||||
|
"ts-loader": "^8.0.5",
|
||||||
|
"typescript": "^4.0.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.13.15",
|
"@babel/core": "^7.12.1",
|
||||||
"@babel/plugin-transform-runtime": "^7.13.15",
|
"@babel/plugin-transform-runtime": "^7.12.1",
|
||||||
"@babel/polyfill": "^7.12.1",
|
"@babel/polyfill": "^7.12.1",
|
||||||
"@babel/preset-env": "^7.13.15",
|
"@babel/preset-env": "^7.12.1",
|
||||||
"@wdio/appium-service": "^7.4.2",
|
"@wdio/appium-service": "^6.6.3",
|
||||||
"@wdio/cli": "^7.4.6",
|
"@wdio/cli": "^6.6.6",
|
||||||
"@wdio/jasmine-framework": "^7.4.6",
|
"@wdio/jasmine-framework": "^6.6.6",
|
||||||
"@wdio/local-runner": "^7.4.6",
|
"@wdio/local-runner": "^6.6.6",
|
||||||
"@wdio/selenium-standalone-service": "^7.4.2",
|
"@wdio/selenium-standalone-service": "^6.6.5",
|
||||||
"@wdio/spec-reporter": "^7.4.3",
|
"@wdio/spec-reporter": "^6.6.6",
|
||||||
"appium": "1.20.2",
|
"appium": "1.15.1",
|
||||||
"appium-doctor": "^1.16.0",
|
"appium-doctor": "^1.15.3",
|
||||||
"autoprefixer": "^10.2.5",
|
"autoprefixer": "^10.0.1",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
"babel-preset-env": "^1.7.0",
|
"babel-preset-env": "^1.7.0",
|
||||||
"clean-webpack-plugin": "^3.0.0",
|
"clean-webpack-plugin": "^3.0.0",
|
||||||
@ -59,7 +64,6 @@
|
|||||||
"cordova-plugin-device": "^2.0.3",
|
"cordova-plugin-device": "^2.0.3",
|
||||||
"cordova-plugin-file": "^6.0.2",
|
"cordova-plugin-file": "^6.0.2",
|
||||||
"cordova-plugin-nativestorage": "^2.3.2",
|
"cordova-plugin-nativestorage": "^2.3.2",
|
||||||
"cordova-plugin-share": "^0.1.3",
|
|
||||||
"cordova-plugin-tts": "^0.2.3",
|
"cordova-plugin-tts": "^0.2.3",
|
||||||
"cordova-plugin-webpack": "^1.0.5",
|
"cordova-plugin-webpack": "^1.0.5",
|
||||||
"cordova-plugin-whitelist": "^1.3.4",
|
"cordova-plugin-whitelist": "^1.3.4",
|
||||||
@ -67,18 +71,14 @@
|
|||||||
"css-loader": "^5.0.0",
|
"css-loader": "^5.0.0",
|
||||||
"extract-loader": "^5.1.0",
|
"extract-loader": "^5.1.0",
|
||||||
"file-loader": "^6.1.1",
|
"file-loader": "^6.1.1",
|
||||||
"foundation-sites": "^6.6.3",
|
|
||||||
"html-loader": "^1.3.2",
|
"html-loader": "^1.3.2",
|
||||||
"html-webpack-plugin": "^4.5.0",
|
"html-webpack-plugin": "^4.5.0",
|
||||||
"jasmine": "^3.7.0",
|
"jasmine": "^3.6.2",
|
||||||
"localforage": "^1.9.0",
|
"node-sass": "^4.14.1",
|
||||||
"node-sass": "^5.0.0",
|
"postcss-loader": "^4.0.4",
|
||||||
"postcss-loader": "^5.2.0",
|
|
||||||
"sass-loader": "^10.0.3",
|
"sass-loader": "^10.0.3",
|
||||||
"sql.js": "1.3.2",
|
|
||||||
"terser-webpack-plugin": "^5.0.0",
|
"terser-webpack-plugin": "^5.0.0",
|
||||||
"ts-loader": "^8.0.17",
|
"webpack": "^5.1.2",
|
||||||
"webpack": "^4.46.0",
|
|
||||||
"webpack-cli": "^3.3.12",
|
"webpack-cli": "^3.3.12",
|
||||||
"webpack-dev-server": "^3.11.0",
|
"webpack-dev-server": "^3.11.0",
|
||||||
"workbox-precaching": "^5.1.4",
|
"workbox-precaching": "^5.1.4",
|
||||||
|
|||||||
8
src/client/globals.d.ts
vendored
Normal file
8
src/client/globals.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
declare var require: {
|
||||||
|
<T>(path: string): T;
|
||||||
|
(paths: string[], callback: (...modules: any[]) => void): void;
|
||||||
|
ensure: (
|
||||||
|
paths: string[],
|
||||||
|
callback: (require: <T>(path: string) => T) => void
|
||||||
|
) => void;
|
||||||
|
};
|
||||||
@ -17,10 +17,6 @@
|
|||||||
<span class="slider"></span>
|
<span class="slider"></span>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<div class='grid-x setting-row' id='tutorial-button'>
|
|
||||||
<span class='columns small-6 translation'>tutorial</span>
|
|
||||||
<span class='columns small-6 text-right translation'>></span>
|
|
||||||
</div>
|
|
||||||
<div class='grid-x setting-row' id='credits-button'>
|
<div class='grid-x setting-row' id='credits-button'>
|
||||||
<span class='columns small-6 translation' >credits</span>
|
<span class='columns small-6 translation' >credits</span>
|
||||||
<span class='columns small-6 text-right translation'>></span>
|
<span class='columns small-6 text-right translation'>></span>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<div>
|
<div>
|
||||||
<p class="translation" data-translation="credits-text"></p>
|
<p class="translation" data-translation="credits-sister-text"></p>
|
||||||
<p class="translation" data-translation="credits-coin-text" data-translation-args='["https://www.freesfx.co.uk/"]'></p>
|
<p class="translation" data-translation="credits-coin-text" data-translation-args='["https://www.freesfx.co.uk/"]'></p>
|
||||||
<p class="translation" data-translation="credits-music-text" data-translation-args='["https://audeeyah.de", "http://creativecommons.org/licenses/by/4.0/"]'></p>
|
<p class="translation" data-translation="credits-music-text" data-translation-args='["https://audeeyah.de", "http://creativecommons.org/licenses/by/4.0/"]'></p>
|
||||||
</div>
|
</div>
|
||||||
@ -6,6 +6,6 @@
|
|||||||
Deutschland
|
Deutschland
|
||||||
</p>
|
</p>
|
||||||
<p>E-Mail: <a href="mailto:wordRotator@silas.link">wordRotator@silas.link</a><br />
|
<p>E-Mail: <a href="mailto:wordRotator@silas.link">wordRotator@silas.link</a><br />
|
||||||
<a href = "?s=contact" class = "link">Kontaktformular</a>
|
<a href = "?s=contact" class = "link" target="_blank">Kontaktformular</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -1,3 +1,17 @@
|
|||||||
<div class="height-100">
|
<div>
|
||||||
<div id = "wordRotatorSettings" class="height-100" ></div>
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<div id = "wordRotatorSettings"></div>
|
||||||
</div>
|
</div>
|
||||||
@ -1,39 +0,0 @@
|
|||||||
<article id=tutorial-site>
|
|
||||||
<section>
|
|
||||||
<div id='segment-leaf-template' class='segment segment-leaf'>
|
|
||||||
<div class='leaf-element'></div>
|
|
||||||
</div>
|
|
||||||
<div id='segment-parent-template' class='segment segment-parent'>
|
|
||||||
<div class='child-container'></div>
|
|
||||||
</div>
|
|
||||||
<div id='segment-row-template' class='segment segment-row'>
|
|
||||||
<div class='child-container'></div>
|
|
||||||
</div>
|
|
||||||
<div id='segment-column-template' class='segment segment-column'>
|
|
||||||
<div class='child-container'></div>
|
|
||||||
</div>
|
|
||||||
<div id='segment-triangle-template' class='segment segment-triangle'>
|
|
||||||
<div class='child-container'></div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section id="tutorial-1">
|
|
||||||
<div class="tutorial-text translation">tutorial-1</div>
|
|
||||||
<div class="level-container"></div>
|
|
||||||
</section>
|
|
||||||
<section id="tutorial-2">
|
|
||||||
<div class="tutorial-text translation">tutorial-2</div>
|
|
||||||
<div class="tutorial-wrapper">
|
|
||||||
<button class="help-action">
|
|
||||||
<img src="../../img/help.png" class="action-image">
|
|
||||||
</button>
|
|
||||||
<div class="level-container"></div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section id="tutorial-3">
|
|
||||||
<div class="tutorial-text translation">tutorial-3</div>
|
|
||||||
<div class="tutorial-wrapper">
|
|
||||||
<div id='tutorial-pointer'></div>
|
|
||||||
<div class="level-container"></div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</article>
|
|
||||||
@ -22,7 +22,7 @@
|
|||||||
<script src="scripts/sql-wasm.js"></script>
|
<script src="scripts/sql-wasm.js"></script>
|
||||||
<script src="scripts/localforage.js"></script>
|
<script src="scripts/localforage.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body class="theme-blue">
|
<body class="default">
|
||||||
<div id="toast-container">
|
<div id="toast-container">
|
||||||
<div class='toast toast-template' style="opacity: 0">
|
<div class='toast toast-template' style="opacity: 0">
|
||||||
<span class='message'></span>
|
<span class='message'></span>
|
||||||
|
|||||||
@ -1,15 +1,14 @@
|
|||||||
import {TutorialSite} from "../Sites/TutorialSite";
|
|
||||||
|
|
||||||
const view = require("../../html/fragment/settings.html");
|
|
||||||
|
|
||||||
import {CreditsSite} from "../Sites/CreditsSite";
|
import {CreditsSite} from "../Sites/CreditsSite";
|
||||||
import {PrivacyPolicySite} from "../Sites/PrivacyPolicySite";
|
import {PrivacyPolicySite} from "../Sites/PrivacyPolicySite";
|
||||||
import {ImpressumSite} from "../Sites/ImpressumSite";
|
import {ImpressumSite} from "../Sites/ImpressumSite";
|
||||||
import {NativeStoragePromise} from "cordova-sites/dist/client/js/NativeStoragePromise";
|
import {NativeStoragePromise} from "cordova-sites/dist/client/js/NativeStoragePromise";
|
||||||
import {AbstractFragment} from "cordova-sites/dist/client/js/Context/AbstractFragment";
|
import {AbstractFragment} from "cordova-sites/dist/client/js/Context/AbstractFragment";
|
||||||
|
|
||||||
|
import view from "../../html/fragment/settings.html";
|
||||||
import {LevelData} from "../../../shared/model/LevelData";
|
import {LevelData} from "../../../shared/model/LevelData";
|
||||||
import {LastSyncDates} from "cordova-sites-easy-sync/dist/client/LastSyncDates";
|
import {LastSyncDates} from "cordova-sites-easy-sync/dist/client/LastSyncDates";
|
||||||
import {SoundManager} from "cordova-sites/dist/client/js/Sound/SoundManager";
|
import {SoundManager} from "cordova-sites/dist/client/js/Sound/SoundManager";
|
||||||
|
import {Toast} from "cordova-sites/dist/client/js/Toast/Toast";
|
||||||
import {Matomo} from "cordova-sites/dist/client/js/Legacy/Matomo";
|
import {Matomo} from "cordova-sites/dist/client/js/Legacy/Matomo";
|
||||||
import {LevelPlayed} from "../model/LevelPlayed";
|
import {LevelPlayed} from "../model/LevelPlayed";
|
||||||
import {ContactSite} from "../Sites/ContactSite";
|
import {ContactSite} from "../Sites/ContactSite";
|
||||||
@ -33,7 +32,7 @@ export class WordRotatorSettingFragment extends AbstractFragment {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (location.hostname.includes("beta") || location.hostname.includes("127.0.0.1") || location.hostname.includes("localhost")) {
|
if (location.hostname.includes("beta") || location.hostname.includes("127.0.0.1") || location.hostname.includes("localhost")) {
|
||||||
// this.findBy("#reset-levels").classList.remove("hidden");
|
this.findBy("#reset-levels").classList.remove("hidden");
|
||||||
}
|
}
|
||||||
|
|
||||||
let playMusicButton = this.findBy("#play-music");
|
let playMusicButton = this.findBy("#play-music");
|
||||||
@ -67,9 +66,6 @@ export class WordRotatorSettingFragment extends AbstractFragment {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.findBy("#tutorial-button").addEventListener("click", () => {
|
|
||||||
this.getSite().startSite(TutorialSite);
|
|
||||||
});
|
|
||||||
this.findBy("#credits-button").addEventListener("click", () => {
|
this.findBy("#credits-button").addEventListener("click", () => {
|
||||||
this.getSite().startSite(CreditsSite);
|
this.getSite().startSite(CreditsSite);
|
||||||
});
|
});
|
||||||
@ -83,14 +79,13 @@ export class WordRotatorSettingFragment extends AbstractFragment {
|
|||||||
this.findBy("#impressum-button").addEventListener("click", () => {
|
this.findBy("#impressum-button").addEventListener("click", () => {
|
||||||
this.getSite().startSite(ImpressumSite);
|
this.getSite().startSite(ImpressumSite);
|
||||||
});
|
});
|
||||||
// @ts-ignore
|
this.findBy("#version-info").innerText = window["version"];
|
||||||
this.findBy("#version-info").innerText = __VERSION__;
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
onStart(args) {
|
onStart() {
|
||||||
Matomo.update("Settings Sites");
|
Matomo.update("Settings Sites");
|
||||||
return super.onStart(args);
|
super.onStart();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,5 +1,5 @@
|
|||||||
const view = require("../../html/sites/contactSite.html");
|
|
||||||
|
|
||||||
|
import view from "../../html/sites/contactSite.html"
|
||||||
import {App} from "cordova-sites/dist/client/js/App";
|
import {App} from "cordova-sites/dist/client/js/App";
|
||||||
import {Form} from "cordova-sites/dist/client/js/Form";
|
import {Form} from "cordova-sites/dist/client/js/Form";
|
||||||
import {DataManager} from "cordova-sites/dist/client/js/DataManager";
|
import {DataManager} from "cordova-sites/dist/client/js/DataManager";
|
||||||
@ -15,7 +15,6 @@ export class ContactSite extends MenuSite {
|
|||||||
onViewLoaded() {
|
onViewLoaded() {
|
||||||
let res = super.onViewLoaded();
|
let res = super.onViewLoaded();
|
||||||
|
|
||||||
// @ts-ignore
|
|
||||||
this.findBy("#contactText").appendChild(Translator.makePersistentTranslation("contact text", [__CONTACT_EMAIL__]))
|
this.findBy("#contactText").appendChild(Translator.makePersistentTranslation("contact text", [__CONTACT_EMAIL__]))
|
||||||
|
|
||||||
new Form(this.findBy("#contact-form"), async values => {
|
new Form(this.findBy("#contact-form"), async values => {
|
||||||
19
src/client/js/Sites/CreditsSite.js
Normal file
19
src/client/js/Sites/CreditsSite.js
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import {WordRotatorBaseSite} from "./WordRotatorBaseSite";
|
||||||
|
|
||||||
|
import view from "../../html/sites/credits.html"
|
||||||
|
import {App} from "cordova-sites/dist/client/js/App";
|
||||||
|
|
||||||
|
export class CreditsSite extends WordRotatorBaseSite{
|
||||||
|
constructor(siteManager) {
|
||||||
|
super(siteManager, view);
|
||||||
|
}
|
||||||
|
|
||||||
|
onStart(args) {
|
||||||
|
// Matomo.update("Credits Sites");
|
||||||
|
return super.onStart(args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
App.addInitialization(app => {
|
||||||
|
app.addDeepLink("credits", CreditsSite);
|
||||||
|
});
|
||||||
@ -1,13 +0,0 @@
|
|||||||
const view = require("../../html/sites/credits.html");
|
|
||||||
import {App} from "cordova-sites/dist/client/js/App";
|
|
||||||
import {MenuSite} from "cordova-sites/dist/client";
|
|
||||||
|
|
||||||
export class CreditsSite extends MenuSite{
|
|
||||||
constructor(siteManager) {
|
|
||||||
super(siteManager, view);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
App.addInitialization(app => {
|
|
||||||
app.addDeepLink("credits", CreditsSite);
|
|
||||||
});
|
|
||||||
@ -1,15 +1,13 @@
|
|||||||
import {UserMenuAction, UserSite} from "cordova-sites-user-management/dist/client";
|
import {UserMenuAction, UserSite} from "cordova-sites-user-management/dist/client";
|
||||||
|
|
||||||
const view = require("../../html/sites/deleteLevels.html");
|
import view from "../../html/sites/deleteLevels.html"
|
||||||
|
import {WordRotatorBaseSite} from "./WordRotatorBaseSite";
|
||||||
import {App} from "cordova-sites/dist/client/js/App";
|
import {App} from "cordova-sites/dist/client/js/App";
|
||||||
import {NavbarFragment} from "cordova-sites/dist/client/js/Context/Menu/NavbarFragment";
|
import {NavbarFragment} from "cordova-sites/dist/client/js/Context/Menu/NavbarFragment";
|
||||||
import {DataManager} from "cordova-sites/dist/client/js/DataManager";
|
import {DataManager} from "cordova-sites/dist/client/js/DataManager";
|
||||||
import {MenuSite} from "cordova-sites/dist/client";
|
|
||||||
|
|
||||||
|
|
||||||
export class DeleteWordsSite extends MenuSite {
|
export class DeleteWordsSite extends WordRotatorBaseSite {
|
||||||
private words: any;
|
|
||||||
|
|
||||||
constructor(siteManager) {
|
constructor(siteManager) {
|
||||||
super(siteManager, view);
|
super(siteManager, view);
|
||||||
this.addDelegate(new UserSite(this, "admin"))
|
this.addDelegate(new UserSite(this, "admin"))
|
||||||
@ -18,12 +16,11 @@ export class DeleteWordsSite extends MenuSite {
|
|||||||
async onConstruct(args) {
|
async onConstruct(args) {
|
||||||
let res = super.onConstruct(args);
|
let res = super.onConstruct(args);
|
||||||
this.words = (await DataManager.load("getDoubleUsedWordsAction"))["result"];
|
this.words = (await DataManager.load("getDoubleUsedWordsAction"))["result"];
|
||||||
console.log("word", this.words);
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
onViewLoaded() {
|
onViewLoaded() {
|
||||||
const res = super.onViewLoaded();
|
super.onViewLoaded();
|
||||||
|
|
||||||
let levelTemplate = this.findBy("#level-template");
|
let levelTemplate = this.findBy("#level-template");
|
||||||
let wordTemplate = this.findBy("#word-template");
|
let wordTemplate = this.findBy("#word-template");
|
||||||
@ -57,8 +54,6 @@ export class DeleteWordsSite extends MenuSite {
|
|||||||
}
|
}
|
||||||
wordContainer.appendChild(wordElem);
|
wordContainer.appendChild(wordElem);
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
14
src/client/js/Sites/EndSite.js
Normal file
14
src/client/js/Sites/EndSite.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import {WordRotatorBaseSite} from "./WordRotatorBaseSite";
|
||||||
|
|
||||||
|
import view from "../../html/sites/end.html"
|
||||||
|
|
||||||
|
export class EndSite extends WordRotatorBaseSite{
|
||||||
|
constructor(siteManager) {
|
||||||
|
super(siteManager, view);
|
||||||
|
}
|
||||||
|
|
||||||
|
onStart(args) {
|
||||||
|
// Matomo.update("End Sites");
|
||||||
|
return super.onStart(args);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,8 +0,0 @@
|
|||||||
const view = require("../../html/sites/end.html");
|
|
||||||
import {MenuSite} from "cordova-sites/dist/client";
|
|
||||||
|
|
||||||
export class EndSite extends MenuSite{
|
|
||||||
constructor(siteManager) {
|
|
||||||
super(siteManager, view);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,8 +1,9 @@
|
|||||||
const view = require("../../html/sites/impressum.html");
|
import {WordRotatorBaseSite} from "./WordRotatorBaseSite";
|
||||||
import {App} from "cordova-sites/dist/client/js/App";
|
|
||||||
import {MenuSite} from "cordova-sites/dist/client";
|
|
||||||
|
|
||||||
export class ImpressumSite extends MenuSite{
|
import view from "../../html/sites/impressum.html"
|
||||||
|
import {App} from "cordova-sites/dist/client/js/App";
|
||||||
|
|
||||||
|
export class ImpressumSite extends WordRotatorBaseSite{
|
||||||
constructor(siteManager) {
|
constructor(siteManager) {
|
||||||
super(siteManager, view);
|
super(siteManager, view);
|
||||||
}
|
}
|
||||||
@ -1,12 +1,9 @@
|
|||||||
import {Level} from "../wordrotator/Level/Level";
|
|
||||||
|
|
||||||
const helpIcon = require("../../img/help.png").default;
|
|
||||||
const view = require("../../html/sites/level.html");
|
|
||||||
const coinSound = require("../../sound/single_coin_fall_on_concrete_.mp3").default;
|
|
||||||
|
|
||||||
import {TemplateContainer} from "../wordrotator/Segment/TemplateContainer";
|
import {TemplateContainer} from "../wordrotator/Segment/TemplateContainer";
|
||||||
import {LevelHelper} from "../wordrotator/Level/LevelHelper";
|
import {LevelHelper} from "../wordrotator/Level/LevelHelper";
|
||||||
import {EndSite} from "./EndSite";
|
import {EndSite} from "./EndSite";
|
||||||
|
import {WordRotatorBaseSite} from "./WordRotatorBaseSite";
|
||||||
|
|
||||||
|
import helpIcon from "../../img/help.png";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
MenuAction,
|
MenuAction,
|
||||||
@ -16,40 +13,19 @@ import {
|
|||||||
NativeStoragePromise,
|
NativeStoragePromise,
|
||||||
} from "cordova-sites/dist/client";
|
} from "cordova-sites/dist/client";
|
||||||
|
|
||||||
|
import view from "../../html/sites/level.html"
|
||||||
import {Helper} from "js-helper/dist/shared/Helper";
|
import {Helper} from "js-helper/dist/shared/Helper";
|
||||||
import {LevelData} from "../../../shared/model/LevelData";
|
import {LevelData} from "../../../shared/model/LevelData";
|
||||||
import {LevelPlayed} from "../model/LevelPlayed";
|
import {LevelPlayed} from "../model/LevelPlayed";
|
||||||
import {ViewHelper} from "js-helper/dist/client/ViewHelper";
|
import {ViewHelper} from "js-helper/dist/client/ViewHelper";
|
||||||
|
|
||||||
|
import coinSound from "../../sound/single_coin_fall_on_concrete_.mp3";
|
||||||
import {SoundManager} from "cordova-sites/dist/client/js/Sound/SoundManager";
|
import {SoundManager} from "cordova-sites/dist/client/js/Sound/SoundManager";
|
||||||
import {MenuSite} from "cordova-sites/dist/client/js/Context/MenuSite";
|
|
||||||
|
|
||||||
export class LevelSite extends MenuSite {
|
|
||||||
|
|
||||||
public static readonly RENDERER_TYPES = [20, 40, 60, 80, 81, 82, 83, 100, 110, 111, 112, 120, 140, 160];
|
|
||||||
public static readonly TUTORIAL = {
|
|
||||||
FIRST_LEVEL: 67,
|
|
||||||
SECOND_LEVEL: 15,
|
|
||||||
BIG_SEGMENT_LEVEL: 1921
|
|
||||||
};
|
|
||||||
|
|
||||||
private coinAction: MenuAction;
|
|
||||||
private levelCounterAction: MenuAction;
|
|
||||||
private levelCounter: number;
|
|
||||||
private levelScaler: () => void;
|
|
||||||
private wonParams: { aborted: boolean; coinCounterTimer: any };
|
|
||||||
private coinPromise: Promise<any>;
|
|
||||||
private continueButtonScaler: () => Promise<unknown>;
|
|
||||||
private wonTextScaler: () => Promise<unknown>;
|
|
||||||
private wonText: HTMLElement;
|
|
||||||
private templateContainer: TemplateContainer;
|
|
||||||
private coinTemplate: HTMLElement;
|
|
||||||
private coinContainer: HTMLElement;
|
|
||||||
private level: Level;
|
|
||||||
|
|
||||||
|
export class LevelSite extends WordRotatorBaseSite {
|
||||||
constructor(siteManager) {
|
constructor(siteManager) {
|
||||||
super(siteManager, view);
|
super(siteManager, view);
|
||||||
// this.getNavbarFragment().setBackgroundImage(null);
|
this._navbarFragment.setBackgroundImage(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
async onCreateMenu(navbar) {
|
async onCreateMenu(navbar) {
|
||||||
@ -58,7 +34,7 @@ export class LevelSite extends MenuSite {
|
|||||||
let coinAction = new MenuAction(Helper.nonNull(await NativeStoragePromise.getItem("coins"), "0"), () => {
|
let coinAction = new MenuAction(Helper.nonNull(await NativeStoragePromise.getItem("coins"), "0"), () => {
|
||||||
}, MenuAction.SHOW_ALWAYS, 900);
|
}, MenuAction.SHOW_ALWAYS, 900);
|
||||||
coinAction._shouldTranslate = false;
|
coinAction._shouldTranslate = false;
|
||||||
coinAction.setLiClass("coin-counter img");
|
coinAction._liClass = "coin-counter";
|
||||||
navbar.addAction(coinAction);
|
navbar.addAction(coinAction);
|
||||||
this.coinAction = coinAction;
|
this.coinAction = coinAction;
|
||||||
|
|
||||||
@ -82,7 +58,7 @@ export class LevelSite extends MenuSite {
|
|||||||
|
|
||||||
async onConstruct(args) {
|
async onConstruct(args) {
|
||||||
this.levelCounter = Helper.nonNull(await NativeStoragePromise.getItem("levelCounter"), 1);
|
this.levelCounter = Helper.nonNull(await NativeStoragePromise.getItem("levelCounter"), 1);
|
||||||
// this.levelCounter = 9999;
|
// this.levelCounter = 987;
|
||||||
this.levelScaler = () => {
|
this.levelScaler = () => {
|
||||||
};
|
};
|
||||||
this.wonParams = {
|
this.wonParams = {
|
||||||
@ -94,7 +70,7 @@ export class LevelSite extends MenuSite {
|
|||||||
let soundManager = SoundManager.getInstance();
|
let soundManager = SoundManager.getInstance();
|
||||||
soundManager.set({
|
soundManager.set({
|
||||||
audio: coinSound,
|
audio: coinSound,
|
||||||
muted: ((await NativeStoragePromise.getItem("play-sound", "1")) !== "1"),
|
muted: (NativeStoragePromise.getItem("play-sound", "1") !== "1"),
|
||||||
volume: 0.7
|
volume: 0.7
|
||||||
}, SoundManager.CHANNELS.SOUND);
|
}, SoundManager.CHANNELS.SOUND);
|
||||||
|
|
||||||
@ -180,9 +156,10 @@ export class LevelSite extends MenuSite {
|
|||||||
let levelSegment = this.findBy("#level");
|
let levelSegment = this.findBy("#level");
|
||||||
ViewHelper.removeAllChildren(levelSegment).appendChild(level.getRootSegment().getElement());
|
ViewHelper.removeAllChildren(levelSegment).appendChild(level.getRootSegment().getElement());
|
||||||
let scaleHelper = new ScaleHelper();
|
let scaleHelper = new ScaleHelper();
|
||||||
this.levelScaler = await scaleHelper.scaleTo(1, levelSegment, levelSegment.parentElement, false, false, 1, level.words[0].length * 1.5, null, 0);
|
this.levelScaler = await scaleHelper.scaleToFull(levelSegment, levelSegment.parentElement, false, false, 1, level.words[0].length * 1.5, null, 0);
|
||||||
|
|
||||||
this.level = level;
|
this.level = level;
|
||||||
|
// let res = this.tutorial();
|
||||||
Matomo.push(["trackEvent", "LevelSite", "LoadLastLevel"]);
|
Matomo.push(["trackEvent", "LevelSite", "LoadLastLevel"]);
|
||||||
this.level.checkHasWon();
|
this.level.checkHasWon();
|
||||||
return;
|
return;
|
||||||
@ -232,8 +209,8 @@ export class LevelSite extends MenuSite {
|
|||||||
return this.nextLevel();
|
return this.nextLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
level.getWonPromise().then(async () => {
|
level.getWonPromise().then(() => {
|
||||||
await this.levelWon(level);
|
this.levelWon(level);
|
||||||
});
|
});
|
||||||
|
|
||||||
level.createSegments();
|
level.createSegments();
|
||||||
@ -273,8 +250,6 @@ export class LevelSite extends MenuSite {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async onStart(args) {
|
async onStart(args) {
|
||||||
this.setTitle("WR");
|
|
||||||
|
|
||||||
Matomo.update("Level Sites");
|
Matomo.update("Level Sites");
|
||||||
let res = super.onStart(args);
|
let res = super.onStart(args);
|
||||||
|
|
||||||
@ -325,7 +300,7 @@ export class LevelSite extends MenuSite {
|
|||||||
coinsBefore = parseInt(Helper.nonNull(await NativeStoragePromise.getItem("coins"), "0"));
|
coinsBefore = parseInt(Helper.nonNull(await NativeStoragePromise.getItem("coins"), "0"));
|
||||||
await NativeStoragePromise.setItem("coins", coinsBefore + parseInt(coinsPerLevel));
|
await NativeStoragePromise.setItem("coins", coinsBefore + parseInt(coinsPerLevel));
|
||||||
}).then(async () => {
|
}).then(async () => {
|
||||||
return Promise.all([new Promise<void>((r) => {
|
return Promise.all([new Promise((r) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
//TODO animationen einbauen
|
//TODO animationen einbauen
|
||||||
continueButton.style.opacity = 1;
|
continueButton.style.opacity = 1;
|
||||||
@ -341,26 +316,26 @@ export class LevelSite extends MenuSite {
|
|||||||
this.wonParams.aborted = false;
|
this.wonParams.aborted = false;
|
||||||
|
|
||||||
for (let i = 0; i < coinsPerLevel; i++) {
|
for (let i = 0; i < coinsPerLevel; i++) {
|
||||||
let coinElem = <HTMLElement>this.coinTemplate.cloneNode(true);
|
let coinElem = this.coinTemplate.cloneNode(true);
|
||||||
this.coinContainer.appendChild(coinElem);
|
this.coinContainer.appendChild(coinElem);
|
||||||
this.coinPromise = this.coinPromise.then(() => {
|
this.coinPromise = this.coinPromise.then(() => {
|
||||||
return new Promise<void>(r => {
|
return new Promise(r => {
|
||||||
let timeout = 350;
|
let timeout = 350;
|
||||||
if (!this.wonParams.aborted) {
|
if (!this.wonParams.aborted) {
|
||||||
//TODO animationen einbauen
|
//TODO animationen einbauen
|
||||||
|
coinElem.style.opacity = 1;
|
||||||
coinElem.style.opacity = "1";
|
// coinElem.fadeIn(timeout / 1000);
|
||||||
soundManager.play(SoundManager.CHANNELS.SOUND);
|
soundManager.play(SoundManager.CHANNELS.SOUND);
|
||||||
|
|
||||||
this.wonParams.coinCounterTimer = setTimeout(() => {
|
this.wonParams.coinCounterTimer = setTimeout(() => {
|
||||||
if (!this.wonParams.aborted) {
|
if (!this.wonParams.aborted) {
|
||||||
this.coinAction.setName(++coinsBefore);
|
this.coinAction.setName(++coinsBefore);
|
||||||
|
// this.coinAction.redraw();
|
||||||
}
|
}
|
||||||
}, timeout / 2);
|
}, timeout / 2);
|
||||||
} else {
|
} else {
|
||||||
r();
|
r();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Always do the next promise for garbage collection
|
//Always do the next promise for garbage collection
|
||||||
setTimeout(r, timeout);
|
setTimeout(r, timeout);
|
||||||
})
|
})
|
||||||
@ -421,8 +396,6 @@ export class LevelSite extends MenuSite {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async tutorial() {
|
async tutorial() {
|
||||||
const tutorialScale = 0.01;
|
|
||||||
|
|
||||||
if (this.level.id === LevelSite.TUTORIAL.FIRST_LEVEL) {
|
if (this.level.id === LevelSite.TUTORIAL.FIRST_LEVEL) {
|
||||||
let currentStep = Helper.nonNull(await NativeStoragePromise.getItem("tutorial-step"), "1");
|
let currentStep = Helper.nonNull(await NativeStoragePromise.getItem("tutorial-step"), "1");
|
||||||
|
|
||||||
@ -438,10 +411,10 @@ export class LevelSite extends MenuSite {
|
|||||||
this.tutorial();
|
this.tutorial();
|
||||||
});
|
});
|
||||||
|
|
||||||
// let textElem = this.findBy(".tutorial-text .step-1");
|
let textElem = this.findBy(".tutorial-text .step-1");
|
||||||
|
|
||||||
await this.levelScaler();
|
await this.levelScaler();
|
||||||
// scaleHelper.scaleTo(tutorialScale, textElem, textElem.parentElement, null, true, 2, 2);
|
scaleHelper.scaleToFull(textElem, textElem.parentElement, null, true, 1, 2);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -458,12 +431,13 @@ export class LevelSite extends MenuSite {
|
|||||||
this.coinAction.setName(Helper.nonNull(await NativeStoragePromise.getItem("coins"), "0"));
|
this.coinAction.setName(Helper.nonNull(await NativeStoragePromise.getItem("coins"), "0"));
|
||||||
// this.coinAction.redraw();
|
// this.coinAction.redraw();
|
||||||
});
|
});
|
||||||
|
// this.levelScaler();
|
||||||
});
|
});
|
||||||
|
|
||||||
// let textElem = this.findBy(".tutorial-text .step-2");
|
let textElem = this.findBy(".tutorial-text .step-2");
|
||||||
|
|
||||||
await this.levelScaler();
|
await this.levelScaler();
|
||||||
// scaleHelper.scaleTo(tutorialScale, textElem, textElem.parentElement, null, true, 1, 2);
|
scaleHelper.scaleToFull(textElem, textElem.parentElement, null, true, 1, 2);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -490,10 +464,10 @@ export class LevelSite extends MenuSite {
|
|||||||
};
|
};
|
||||||
this.findBy(".help-action").addEventListener("click", eventListener);
|
this.findBy(".help-action").addEventListener("click", eventListener);
|
||||||
|
|
||||||
// let textElem = this.findBy(".tutorial-text .step-3");
|
let textElem = this.findBy(".tutorial-text .step-3");
|
||||||
|
|
||||||
await this.levelScaler();
|
await this.levelScaler();
|
||||||
// scaleHelper.scaleTo(tutorialScale, textElem, textElem.parentElement, null, true, 1, 2);
|
scaleHelper.scaleToFull(textElem, textElem.parentElement, null, true, 1, 2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
@ -526,11 +500,10 @@ export class LevelSite extends MenuSite {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// let textElem = this.findBy(".tutorial-text .step-4");
|
let textElem = this.findBy(".tutorial-text .step-4");
|
||||||
|
|
||||||
await this.levelScaler();
|
await this.levelScaler();
|
||||||
// debugger;
|
scaleHelper.scaleToFull(textElem, textElem.parentElement, null, true, 1, 2);
|
||||||
// scaleHelper.scaleTo(tutorialScale, textElem, textElem.parentElement, null, true, 1, 2);
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -541,3 +514,11 @@ export class LevelSite extends MenuSite {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LevelSite.RENDERER_TYPES = [20, 40, 60, 80, 81, 82, 83, 100, 110, 111, 112, 120, 140, 160];
|
||||||
|
// LevelSite.RENDERER_TYPES = [120, 140, 160];
|
||||||
|
LevelSite.TUTORIAL = {
|
||||||
|
FIRST_LEVEL: 67,
|
||||||
|
SECOND_LEVEL: 15,
|
||||||
|
BIG_SEGMENT_LEVEL: 1921
|
||||||
|
};
|
||||||
@ -1,11 +1,10 @@
|
|||||||
const settingsIcon = require("../../img/settings.png").default;
|
import {WordRotatorBaseSite} from "./WordRotatorBaseSite";
|
||||||
const view = require("../../html/sites/menu.html");
|
import {App, Toast, DataManager, ScaleHelper} from "cordova-sites/dist/client";
|
||||||
|
|
||||||
import {App, Toast, DataManager, ScaleHelper, MenuSite} from "cordova-sites/dist/client";
|
|
||||||
import {Helper} from "js-helper/dist/shared";
|
import {Helper} from "js-helper/dist/shared";
|
||||||
import {LevelSite} from "./LevelSite";
|
import {LevelSite} from "./LevelSite";
|
||||||
import {TemplateContainer} from "../wordrotator/Segment/TemplateContainer";
|
import {TemplateContainer} from "../wordrotator/Segment/TemplateContainer";
|
||||||
import {MainMenuLevel} from "../wordrotator/Level/MainMenuLevel";
|
import {MainMenuLevel} from "../wordrotator/Level/MainMenuLevel";
|
||||||
|
import view from "../../html/sites/menu.html"
|
||||||
import {NativeStoragePromise} from "cordova-sites/dist/client";
|
import {NativeStoragePromise} from "cordova-sites/dist/client";
|
||||||
import {ViewHelper} from "js-helper/dist/client/ViewHelper";
|
import {ViewHelper} from "js-helper/dist/client/ViewHelper";
|
||||||
import {LevelPlayed} from "../model/LevelPlayed";
|
import {LevelPlayed} from "../model/LevelPlayed";
|
||||||
@ -18,19 +17,14 @@ import {Matomo} from "cordova-sites/dist/client/js/Legacy/Matomo";
|
|||||||
import {MenuAction} from "cordova-sites/dist/client/js/Context/Menu/MenuAction/MenuAction";
|
import {MenuAction} from "cordova-sites/dist/client/js/Context/Menu/MenuAction/MenuAction";
|
||||||
import {SettingsSite} from "./SettingsSite";
|
import {SettingsSite} from "./SettingsSite";
|
||||||
|
|
||||||
export class MainMenuSite extends MenuSite {
|
import settingsIcon from "../../img/settings.png";
|
||||||
static app: App;
|
|
||||||
|
|
||||||
private loadLevelPromise: Promise<any>;
|
|
||||||
private listener: () => void;
|
|
||||||
private templateContainer: TemplateContainer;
|
|
||||||
private randomRotateTimeout;
|
|
||||||
|
|
||||||
|
export class MainMenuSite extends WordRotatorBaseSite {
|
||||||
constructor(siteManager) {
|
constructor(siteManager) {
|
||||||
super(siteManager, view);
|
super(siteManager, view);
|
||||||
this.loadLevelPromise = new SyncJob().sync([LevelData]).catch(e => console.error(e));
|
this.loadLevelPromise = new SyncJob().sync([LevelData]).catch(e => console.error(e));
|
||||||
this.listener = null;
|
this.listener = null;
|
||||||
this.getNavbarFragment().setCanGoBack(false);
|
this._navbarFragment.setCanGoBack(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
onCreateMenu(navbar) {
|
onCreateMenu(navbar) {
|
||||||
@ -42,73 +36,6 @@ export class MainMenuSite extends MenuSite {
|
|||||||
return navbar;
|
return navbar;
|
||||||
}
|
}
|
||||||
|
|
||||||
async onViewLoaded() {
|
|
||||||
const res = super.onViewLoaded();
|
|
||||||
|
|
||||||
let playButton = this.findBy("#play-button");
|
|
||||||
playButton.addEventListener("click", () => {
|
|
||||||
// Matomo.push(["trackEvent", "MainMenu", "startButton"]);
|
|
||||||
this.startLevelSite();
|
|
||||||
});
|
|
||||||
|
|
||||||
let leafSegmentTemplate = this.findBy("#segment-leaf-template");
|
|
||||||
let parentSegmentTemplate = this.findBy("#segment-parent-template");
|
|
||||||
let rowSegmentTemplate = this.findBy("#segment-row-template");
|
|
||||||
let triangleTemplate = this.findBy("#segment-triangle-template");
|
|
||||||
|
|
||||||
leafSegmentTemplate.id = null;
|
|
||||||
parentSegmentTemplate.id = null;
|
|
||||||
rowSegmentTemplate.id = null;
|
|
||||||
triangleTemplate.id = null;
|
|
||||||
|
|
||||||
leafSegmentTemplate.remove();
|
|
||||||
parentSegmentTemplate.remove();
|
|
||||||
rowSegmentTemplate.remove();
|
|
||||||
triangleTemplate.remove();
|
|
||||||
|
|
||||||
this.templateContainer = new TemplateContainer(leafSegmentTemplate, parentSegmentTemplate, rowSegmentTemplate, triangleTemplate);
|
|
||||||
|
|
||||||
//TODO?
|
|
||||||
// if (Helper.nonNull(MainMenuSite.app._cookieClosePromise)) {
|
|
||||||
// MainMenuSite.app._cookieClosePromise.then(() => {
|
|
||||||
// if (this.listener) {
|
|
||||||
// this.listener();
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
let soundManager = SoundManager.getInstance();
|
|
||||||
|
|
||||||
let playMusicButton = this.findBy("#play-music");
|
|
||||||
playMusicButton.checked = (await NativeStoragePromise.getItem("play-music", "1") === "1");
|
|
||||||
playMusicButton.addEventListener("change", async () => {
|
|
||||||
await NativeStoragePromise.setItem("play-music", (playMusicButton.checked) ? "1" : "0");
|
|
||||||
soundManager.set({muted: !playMusicButton.checked}, SoundManager.CHANNELS.MUSIC);
|
|
||||||
if (playMusicButton.checked) {
|
|
||||||
await soundManager.play(SoundManager.CHANNELS.MUSIC);
|
|
||||||
}
|
|
||||||
|
|
||||||
//TODO [MIG] Matomo
|
|
||||||
Matomo.push(["trackEvent", "MainMenu", "PlayMusic", "Play Music", (playMusicButton.checked) ? 1 : 0]);
|
|
||||||
});
|
|
||||||
|
|
||||||
let playSoundButton = this.findBy("#play-sound");
|
|
||||||
playSoundButton.checked = (await NativeStoragePromise.getItem("play-sound", "1") === "1");
|
|
||||||
playSoundButton.addEventListener("change", async () => {
|
|
||||||
await NativeStoragePromise.setItem("play-sound", (playSoundButton.checked) ? "1" : "0");
|
|
||||||
soundManager.set({muted: !playSoundButton.checked}, SoundManager.CHANNELS.SOUND);
|
|
||||||
|
|
||||||
//TODO [MIG] Matomo
|
|
||||||
Matomo.push(["trackEvent", "MainMenu", "PlaySound", "Play Sound", (playSoundButton.checked) ? 1 : 0]);
|
|
||||||
});
|
|
||||||
|
|
||||||
this.findBy("#share-button").addEventListener("click", () => {
|
|
||||||
new ShareManager().share(Translator.getInstance().translate("share-text", [window.location]));
|
|
||||||
});
|
|
||||||
return res;
|
|
||||||
// this.findBy("#share-buttons").appendChild(ShareManager.generateDefaultShareElement("https://wordrotator.silas.link"));
|
|
||||||
}
|
|
||||||
|
|
||||||
async onStart(args) {
|
async onStart(args) {
|
||||||
// Matomo.update("Menu Sites");
|
// Matomo.update("Menu Sites");
|
||||||
let res = super.onStart(args);
|
let res = super.onStart(args);
|
||||||
@ -170,10 +97,10 @@ export class MainMenuSite extends MenuSite {
|
|||||||
|
|
||||||
let levelStyle = getComputedStyle(levelSegment);
|
let levelStyle = getComputedStyle(levelSegment);
|
||||||
playButton.style.width = levelStyle.getPropertyValue("width");
|
playButton.style.width = levelStyle.getPropertyValue("width");
|
||||||
scaleHelper.scaleTo(0.65, playButton.children[0], playButton, null, null, null, 4, null, false);
|
scaleHelper.scaleToFull(playButton.children[0], playButton, null, null, null, 4, null, false);
|
||||||
|
|
||||||
await scaleHelper.scaleTo(0.1, levelNumber.parentElement, levelNumber.parentElement.parentElement, null, null, null, 10, null, false);
|
await scaleHelper.scaleTo(0.2, levelNumber.parentElement, levelNumber.parentElement.parentElement, null, null, null, 10, null, false);
|
||||||
scaleHelper.scaleTo(1, levelNumber, levelNumber.parentElement, false, false, 5, null, null, false);
|
scaleHelper.scaleToFull(levelNumber, levelNumber.parentElement, false, false, 8, null, null, false);
|
||||||
};
|
};
|
||||||
|
|
||||||
// this.listener();
|
// this.listener();
|
||||||
@ -193,7 +120,7 @@ export class MainMenuSite extends MenuSite {
|
|||||||
async startLevelSite() {
|
async startLevelSite() {
|
||||||
SoundManager.getInstance().resumeContext();
|
SoundManager.getInstance().resumeContext();
|
||||||
|
|
||||||
this.startSite(LevelSite, Promise.race([this.loadLevelPromise, new Promise<void>(async resolve => {
|
this.startSite(LevelSite, Promise.race([this.loadLevelPromise, new Promise(async resolve => {
|
||||||
let levelData = await LevelPlayed.getNextLevelData(LevelSite.RENDERER_TYPES);
|
let levelData = await LevelPlayed.getNextLevelData(LevelSite.RENDERER_TYPES);
|
||||||
if (levelData !== null) {
|
if (levelData !== null) {
|
||||||
resolve();
|
resolve();
|
||||||
@ -201,64 +128,130 @@ export class MainMenuSite extends MenuSite {
|
|||||||
})]));
|
})]));
|
||||||
}
|
}
|
||||||
|
|
||||||
onPause() {
|
async onFirstStart() {
|
||||||
|
super.onFirstStart();
|
||||||
|
|
||||||
|
let playButton = this.findBy("#play-button");
|
||||||
|
playButton.addEventListener("click", () => {
|
||||||
|
// Matomo.push(["trackEvent", "MainMenu", "startButton"]);
|
||||||
|
this.startLevelSite();
|
||||||
|
});
|
||||||
|
|
||||||
|
let leafSegmentTemplate = this.findBy("#segment-leaf-template");
|
||||||
|
let parentSegmentTemplate = this.findBy("#segment-parent-template");
|
||||||
|
let rowSegmentTemplate = this.findBy("#segment-row-template");
|
||||||
|
let triangleTemplate = this.findBy("#segment-triangle-template");
|
||||||
|
|
||||||
|
leafSegmentTemplate.id = null;
|
||||||
|
parentSegmentTemplate.id = null;
|
||||||
|
rowSegmentTemplate.id = null;
|
||||||
|
triangleTemplate.id = null;
|
||||||
|
|
||||||
|
leafSegmentTemplate.remove();
|
||||||
|
parentSegmentTemplate.remove();
|
||||||
|
rowSegmentTemplate.remove();
|
||||||
|
triangleTemplate.remove();
|
||||||
|
|
||||||
|
this.templateContainer = new TemplateContainer(leafSegmentTemplate, parentSegmentTemplate, rowSegmentTemplate, triangleTemplate);
|
||||||
|
|
||||||
|
if (Helper.nonNull(MainMenuSite.app._cookieClosePromise)) {
|
||||||
|
MainMenuSite.app._cookieClosePromise.then(() => {
|
||||||
|
if (this.listener) {
|
||||||
|
this.listener();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
let soundManager = SoundManager.getInstance();
|
||||||
|
|
||||||
|
let playMusicButton = this.findBy("#play-music");
|
||||||
|
playMusicButton.checked = (await NativeStoragePromise.getItem("play-music", "1") === "1");
|
||||||
|
playMusicButton.addEventListener("change", async () => {
|
||||||
|
await NativeStoragePromise.setItem("play-music", (playMusicButton.checked) ? "1" : "0");
|
||||||
|
soundManager.set({muted: !playMusicButton.checked}, SoundManager.CHANNELS.MUSIC);
|
||||||
|
if (playMusicButton.checked) {
|
||||||
|
soundManager.play(SoundManager.CHANNELS.MUSIC);
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO [MIG] Matomo
|
||||||
|
Matomo.push(["trackEvent", "MainMenu", "PlayMusic", "Play Music", (playMusicButton.checked) ? 1 : 0]);
|
||||||
|
});
|
||||||
|
|
||||||
|
let playSoundButton = this.findBy("#play-sound");
|
||||||
|
playSoundButton.checked = (await NativeStoragePromise.getItem("play-sound", "1") === "1");
|
||||||
|
playSoundButton.addEventListener("change", async () => {
|
||||||
|
await NativeStoragePromise.setItem("play-sound", (playSoundButton.checked) ? "1" : "0");
|
||||||
|
soundManager.set({muted: !playSoundButton.checked}, SoundManager.CHANNELS.SOUND);
|
||||||
|
|
||||||
|
//TODO [MIG] Matomo
|
||||||
|
Matomo.push(["trackEvent", "MainMenu", "PlaySound", "Play Sound", (playSoundButton.checked) ? 1 : 0]);
|
||||||
|
});
|
||||||
|
|
||||||
|
this.findBy("#share-button").addEventListener("click", () => {
|
||||||
|
new ShareManager().share(Translator.getInstance().translate("share-text", [window.location]));
|
||||||
|
});
|
||||||
|
// this.findBy("#share-buttons").appendChild(ShareManager.generateDefaultShareElement("https://wordrotator.silas.link"));
|
||||||
|
}
|
||||||
|
|
||||||
|
onPause(args) {
|
||||||
clearTimeout(this.randomRotateTimeout);
|
clearTimeout(this.randomRotateTimeout);
|
||||||
window.removeEventListener("resize", this.listener);
|
window.removeEventListener("resize", this.listener);
|
||||||
return super.onPause();
|
return super.onPause(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
// async loadLevels() {
|
async loadLevels() {
|
||||||
// try {
|
try {
|
||||||
// const db = await WordRotatorDb.getInstance();
|
const db = await WordRotatorDb.getInstance();
|
||||||
// const dateLastSync = Helper.nonNull(await db.loadDateLastSync(), 0);
|
const dateLastSync = Helper.nonNull(await db.loadDateLastSync(), 0);
|
||||||
// // const dateLastSync = Helper.nonNull(localStorage.getItem("date-last-sync"), 0);
|
// const dateLastSync = Helper.nonNull(localStorage.getItem("date-last-sync"), 0);
|
||||||
//
|
|
||||||
// // let numberLevels = db.countLevels();
|
// let numberLevels = db.countLevels();
|
||||||
// let newLastSync = null;
|
let newLastSync = null;
|
||||||
// let maxRuns = 1;
|
let maxRuns = 1;
|
||||||
// let levelPromises = [];
|
let levelPromises = [];
|
||||||
// for (let run = 0; run < maxRuns; run++) {
|
for (let run = 0; run < maxRuns; run++) {
|
||||||
// let res = await DataManager.load("wordRotator/levels" + DataManager.buildQuery({
|
let res = await DataManager.load("wordRotator/levels" + DataManager.buildQuery({
|
||||||
// "currentRun": run,
|
"currentRun": run,
|
||||||
// "dateLastSync": dateLastSync
|
"dateLastSync": dateLastSync
|
||||||
// }));
|
}));
|
||||||
// if (!res["success"]) {
|
if (!res["success"]) {
|
||||||
|
if (await db.loadNextLevel(LevelSite.RENDERER_TYPES) === null) {
|
||||||
|
new Toast("sync-error", 6000).show();
|
||||||
|
}
|
||||||
|
newLastSync = null;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
res = res["result"];
|
||||||
|
newLastSync = Helper.nonNull(newLastSync, res["currentSyncDate"]);
|
||||||
|
maxRuns = res["maxRuns"];
|
||||||
|
|
||||||
|
let levels = res["levels"];
|
||||||
|
for (let i = 0; i < levels.length; i++) {
|
||||||
|
let currentLevel = levels[i];
|
||||||
|
levelPromises.push(db.loadLevel(levels[i]["id"]).then(level => {
|
||||||
|
currentLevel["played"] = (Helper.nonNull(Helper.nonNull(level, {}).played, false));
|
||||||
|
return currentLevel;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let levels = await Promise.all(levelPromises);
|
||||||
|
await db.saveManyLevels(levels);
|
||||||
|
|
||||||
|
if (newLastSync != null && newLastSync !== "null") {
|
||||||
|
await NativeStoragePromise.setItem("date-last-sync", newLastSync);
|
||||||
|
db.saveDateLastSync(newLastSync);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(e){
|
||||||
// if (await db.loadNextLevel(LevelSite.RENDERER_TYPES) === null) {
|
// if (await db.loadNextLevel(LevelSite.RENDERER_TYPES) === null) {
|
||||||
// new Toast("sync-error", 6000).show();
|
new Toast("sync-error", 6000);
|
||||||
// }
|
|
||||||
// newLastSync = null;
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// res = res["result"];
|
|
||||||
// newLastSync = Helper.nonNull(newLastSync, res["currentSyncDate"]);
|
|
||||||
// maxRuns = res["maxRuns"];
|
|
||||||
//
|
|
||||||
// let levels = res["levels"];
|
|
||||||
// for (let i = 0; i < levels.length; i++) {
|
|
||||||
// let currentLevel = levels[i];
|
|
||||||
// levelPromises.push(db.loadLevel(levels[i]["id"]).then(level => {
|
|
||||||
// currentLevel["played"] = (Helper.nonNull(Helper.nonNull(level, {}).played, false));
|
|
||||||
// return currentLevel;
|
|
||||||
// }));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// let levels = await Promise.all(levelPromises);
|
|
||||||
// await db.saveManyLevels(levels);
|
|
||||||
//
|
|
||||||
// if (newLastSync != null && newLastSync !== "null") {
|
|
||||||
// await NativeStoragePromise.setItem("date-last-sync", newLastSync);
|
|
||||||
// db.saveDateLastSync(newLastSync);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// catch(e){
|
|
||||||
// // if (await db.loadNextLevel(LevelSite.RENDERER_TYPES) === null) {
|
|
||||||
// new Toast("sync-error", 6000);
|
|
||||||
// // }
|
|
||||||
// console.error(e);
|
|
||||||
// }
|
|
||||||
// }
|
// }
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MainMenuSite.app = null;
|
||||||
App.addInitialization(app => {
|
App.addInitialization(app => {
|
||||||
MainMenuSite.app = app;
|
MainMenuSite.app = app;
|
||||||
});
|
});
|
||||||
@ -1,9 +1,10 @@
|
|||||||
const view = require("../../html/sites/privacyPolicy.html");
|
import {WordRotatorBaseSite} from "./WordRotatorBaseSite";
|
||||||
|
|
||||||
|
import view from "../../html/sites/privacyPolicy.html"
|
||||||
import {App} from "cordova-sites/dist/client/js/App";
|
import {App} from "cordova-sites/dist/client/js/App";
|
||||||
import {Matomo} from "cordova-sites/dist/client/js/Legacy/Matomo";
|
import {Matomo} from "cordova-sites/dist/client/js/Legacy/Matomo";
|
||||||
import {MenuSite} from "cordova-sites/dist/client";
|
|
||||||
|
|
||||||
export class PrivacyPolicySite extends MenuSite {
|
export class PrivacyPolicySite extends WordRotatorBaseSite {
|
||||||
constructor(siteManager) {
|
constructor(siteManager) {
|
||||||
super(siteManager,view);
|
super(siteManager,view);
|
||||||
}
|
}
|
||||||
@ -1,19 +1,17 @@
|
|||||||
|
|
||||||
const view = require("../../html/sites/selectWords.html");
|
import view from "../../html/sites/selectWords.html"
|
||||||
|
import {WordRotatorBaseSite} from "./WordRotatorBaseSite";
|
||||||
import {UserMenuAction, UserSite} from "cordova-sites-user-management/dist/client";
|
import {UserMenuAction, UserSite} from "cordova-sites-user-management/dist/client";
|
||||||
import {NavbarFragment} from "cordova-sites/dist/client/js/Context/Menu/NavbarFragment";
|
import {NavbarFragment} from "cordova-sites/dist/client/js/Context/Menu/NavbarFragment";
|
||||||
import {App} from "cordova-sites/dist/client/js/App";
|
import {App} from "cordova-sites/dist/client/js/App";
|
||||||
import {DataManager} from "cordova-sites/dist/client/js/DataManager";
|
import {DataManager} from "cordova-sites/dist/dist/client/js/DataManager";
|
||||||
import {ViewHelper} from "js-helper/dist/client/ViewHelper";
|
import {ViewHelper} from "js-helper/dist/client/ViewHelper";
|
||||||
import {MenuSite} from "cordova-sites/dist/client";
|
|
||||||
|
|
||||||
export class SelectWordsSite extends MenuSite{
|
export class SelectWordsSite extends WordRotatorBaseSite{
|
||||||
private stats: any;
|
|
||||||
private words: any;
|
|
||||||
|
|
||||||
constructor(siteManager) {
|
constructor(siteManager) {
|
||||||
super(siteManager, view);
|
super(siteManager, view);
|
||||||
this.addDelegate(new UserSite(this, "select-words"))
|
this.addDelegate(new UserSite("select-words"))
|
||||||
}
|
}
|
||||||
|
|
||||||
async onConstruct(args) {
|
async onConstruct(args) {
|
||||||
@ -1,4 +1,5 @@
|
|||||||
const view = require("../../html/sites/settingsSite.html");
|
|
||||||
|
import view from "../../html/sites/settingsSite.html"
|
||||||
import {MenuSite} from "cordova-sites/dist/client/js/Context/MenuSite";
|
import {MenuSite} from "cordova-sites/dist/client/js/Context/MenuSite";
|
||||||
import {WordRotatorSettingFragment} from "../Fragment/WordRotatorSettingFragment";
|
import {WordRotatorSettingFragment} from "../Fragment/WordRotatorSettingFragment";
|
||||||
import {App} from "cordova-sites/dist/client/js/App";
|
import {App} from "cordova-sites/dist/client/js/App";
|
||||||
@ -1,132 +0,0 @@
|
|||||||
import {Matomo, MenuSite, NativeStoragePromise, ScaleHelper, Toast} from "cordova-sites/dist/client";
|
|
||||||
import {App} from "cordova-sites/dist/client/js/App";
|
|
||||||
import {LevelPlayed} from "../model/LevelPlayed";
|
|
||||||
import {Helper} from "js-helper/dist/shared/Helper";
|
|
||||||
import {LevelHelper} from "../wordrotator/Level/LevelHelper";
|
|
||||||
import {ViewHelper} from "js-helper/dist/client/ViewHelper";
|
|
||||||
import {LevelData} from "../../../shared/model/LevelData";
|
|
||||||
import {TemplateContainer} from "../wordrotator/Segment/TemplateContainer";
|
|
||||||
import {LevelSite} from "./LevelSite";
|
|
||||||
import {SyncJob} from "cordova-sites-easy-sync/dist/client";
|
|
||||||
import {Level} from "../wordrotator/Level/Level";
|
|
||||||
|
|
||||||
const view = require("../../html/sites/tutorialSite.html");
|
|
||||||
|
|
||||||
export class TutorialSite extends MenuSite {
|
|
||||||
private templateContainer: TemplateContainer;
|
|
||||||
|
|
||||||
constructor(siteManager: any) {
|
|
||||||
super(siteManager, view);
|
|
||||||
}
|
|
||||||
|
|
||||||
async onConstruct(constructParameters: any): Promise<any[]> {
|
|
||||||
const res = super.onConstruct(constructParameters);
|
|
||||||
await Promise.race([new SyncJob().sync([LevelData]).catch(e => console.error(e)), new Promise<void>(async resolve => {
|
|
||||||
let levelData = await LevelData.findById(LevelSite.TUTORIAL.FIRST_LEVEL);
|
|
||||||
if (levelData !== null) {
|
|
||||||
resolve();
|
|
||||||
}
|
|
||||||
})]);
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
async onViewLoaded(): Promise<any[]> {
|
|
||||||
const res = super.onViewLoaded();
|
|
||||||
|
|
||||||
let leafSegmentTemplate = this.findBy("#segment-leaf-template");
|
|
||||||
let parentSegmentTemplate = this.findBy("#segment-parent-template");
|
|
||||||
let rowSegmentTemplate = this.findBy("#segment-row-template");
|
|
||||||
let triangleTemplate = this.findBy("#segment-triangle-template");
|
|
||||||
let columnTemplate = this.findBy("#segment-column-template");
|
|
||||||
|
|
||||||
leafSegmentTemplate.removeAttribute("id");
|
|
||||||
parentSegmentTemplate.removeAttribute("id");
|
|
||||||
rowSegmentTemplate.removeAttribute("id");
|
|
||||||
triangleTemplate.removeAttribute("id");
|
|
||||||
columnTemplate.removeAttribute("id");
|
|
||||||
|
|
||||||
leafSegmentTemplate.remove();
|
|
||||||
parentSegmentTemplate.remove();
|
|
||||||
rowSegmentTemplate.remove();
|
|
||||||
triangleTemplate.remove();
|
|
||||||
columnTemplate.remove();
|
|
||||||
|
|
||||||
this.templateContainer = new TemplateContainer(leafSegmentTemplate, parentSegmentTemplate, rowSegmentTemplate, triangleTemplate, columnTemplate);
|
|
||||||
|
|
||||||
const tutorial1Container = this.findBy("#tutorial-1 .level-container");
|
|
||||||
const tutorial2Container = this.findBy("#tutorial-2 .level-container");
|
|
||||||
const tutorial3Container = this.findBy("#tutorial-3 .level-container");
|
|
||||||
|
|
||||||
const level1 = await this.loadLevel(LevelSite.TUTORIAL.FIRST_LEVEL);
|
|
||||||
const level2 = await this.loadLevel(LevelSite.TUTORIAL.SECOND_LEVEL);
|
|
||||||
const level3 = await this.loadLevel(LevelSite.TUTORIAL.BIG_SEGMENT_LEVEL);
|
|
||||||
|
|
||||||
level1.setSaveAsCurrentAfterCheckWon(false);
|
|
||||||
level2.setSaveAsCurrentAfterCheckWon(false);
|
|
||||||
level3.setSaveAsCurrentAfterCheckWon(false);
|
|
||||||
|
|
||||||
tutorial1Container.appendChild(level1.getRootSegment().getElement());
|
|
||||||
tutorial2Container.appendChild(level2.getRootSegment().getElement());
|
|
||||||
tutorial3Container.appendChild(level3.getRootSegment().getElement());
|
|
||||||
|
|
||||||
let pointer = this.findBy("#tutorial-pointer");
|
|
||||||
pointer.remove();
|
|
||||||
|
|
||||||
let rotatableSegments = level3.getRotatableSegments();
|
|
||||||
let pointerSegment = rotatableSegments[2];
|
|
||||||
pointerSegment.element.appendChild(pointer);
|
|
||||||
|
|
||||||
this.find(".help-action").addEventListener("click", () => {
|
|
||||||
TutorialSite.help(level2);
|
|
||||||
})
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
static async help(level: Level) {
|
|
||||||
let rotatables = level.getRotatableSegments();
|
|
||||||
rotatables = rotatables.filter((segment) => {
|
|
||||||
return (!segment.isSolved(false));
|
|
||||||
});
|
|
||||||
|
|
||||||
if (rotatables.length === 0){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let index = Math.floor(Math.random() * rotatables.length);
|
|
||||||
|
|
||||||
let segmentToHelp = rotatables[index];
|
|
||||||
while (segmentToHelp.rotation !== 0) {
|
|
||||||
segmentToHelp.rotate();
|
|
||||||
}
|
|
||||||
segmentToHelp.setIsRotatable(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
async loadLevel(id) {
|
|
||||||
try {
|
|
||||||
let levelData = await LevelData.findById(id);
|
|
||||||
const level = LevelHelper.inflateLevel(levelData, this.templateContainer);
|
|
||||||
|
|
||||||
level.getWonPromise().then(() => {
|
|
||||||
console.log("level won!");
|
|
||||||
new Toast("you solved the tutorial level!").show();
|
|
||||||
//TODO
|
|
||||||
// this.levelWon(level);
|
|
||||||
});
|
|
||||||
|
|
||||||
level.createSegments();
|
|
||||||
level.getRootSegment()._updateElement();
|
|
||||||
|
|
||||||
return level;
|
|
||||||
} catch (e) {
|
|
||||||
console.log("Fehler!");
|
|
||||||
console.error(e);
|
|
||||||
// this.startEndSite();
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
App.addInitialization(app => {
|
|
||||||
app.addDeepLink("tutorial", TutorialSite);
|
|
||||||
})
|
|
||||||
12
src/client/js/Sites/WordRotatorBaseSite.js
Normal file
12
src/client/js/Sites/WordRotatorBaseSite.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import {MenuSite} from "cordova-sites/dist/client";
|
||||||
|
|
||||||
|
export class WordRotatorBaseSite extends MenuSite {
|
||||||
|
|
||||||
|
async onViewLoaded() {
|
||||||
|
let res = super.onViewLoaded();
|
||||||
|
await this.onFirstStart();
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
async onFirstStart(){}
|
||||||
|
}
|
||||||
@ -2,7 +2,6 @@ import {BaseModel} from "cordova-sites-database/dist/BaseModel";
|
|||||||
import {BaseDatabase} from "cordova-sites-database/dist/cordova-sites-database";
|
import {BaseDatabase} from "cordova-sites-database/dist/cordova-sites-database";
|
||||||
import {LevelData} from "../../../shared/model/LevelData";
|
import {LevelData} from "../../../shared/model/LevelData";
|
||||||
import {Helper} from "js-helper/dist/shared/Helper";
|
import {Helper} from "js-helper/dist/shared/Helper";
|
||||||
import {SelectQueryBuilder} from "typeorm";
|
|
||||||
|
|
||||||
export class LevelPlayed extends BaseModel {
|
export class LevelPlayed extends BaseModel {
|
||||||
|
|
||||||
@ -21,7 +20,7 @@ export class LevelPlayed extends BaseModel {
|
|||||||
target: LevelData.getSchemaName(),
|
target: LevelData.getSchemaName(),
|
||||||
type: "one-to-one",
|
type: "one-to-one",
|
||||||
joinColumn: true,
|
joinColumn: true,
|
||||||
// cascade: true,
|
cascade: true,
|
||||||
};
|
};
|
||||||
return relations;
|
return relations;
|
||||||
}
|
}
|
||||||
@ -36,7 +35,7 @@ export class LevelPlayed extends BaseModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static async getNextLevelData(renderer){
|
static async getNextLevelData(renderer){
|
||||||
let qb = <SelectQueryBuilder<LevelData>>await this._database.createQueryBuilder(LevelData);
|
let qb = await this._database.createQueryBuilder(LevelData);
|
||||||
|
|
||||||
qb = qb.select("COUNT(*) as count, difficulty")
|
qb = qb.select("COUNT(*) as count, difficulty")
|
||||||
.leftJoin(LevelPlayed, "levelPlayed", "levelPlayed.levelData = LevelData.id")
|
.leftJoin(LevelPlayed, "levelPlayed", "levelPlayed.levelData = LevelData.id")
|
||||||
@ -62,7 +61,7 @@ export class LevelPlayed extends BaseModel {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
qb = <SelectQueryBuilder<LevelData>>await this._database.createQueryBuilder(LevelData);
|
qb = await this._database.createQueryBuilder(LevelData);
|
||||||
qb = qb
|
qb = qb
|
||||||
.leftJoin(LevelPlayed, "levelPlayed", "levelPlayed.levelData = LevelData.id")
|
.leftJoin(LevelPlayed, "levelPlayed", "levelPlayed.levelData = LevelData.id")
|
||||||
.where("(deleted = 0 OR deleted = 'false')")
|
.where("(deleted = 0 OR deleted = 'false')")
|
||||||
|
|||||||
@ -16,8 +16,6 @@ export class Level {
|
|||||||
this.hasWon = false;
|
this.hasWon = false;
|
||||||
this.id = null;
|
this.id = null;
|
||||||
|
|
||||||
this.saveAsCurrentAfterCheckWon = true;
|
|
||||||
|
|
||||||
this.wonResolver = null;
|
this.wonResolver = null;
|
||||||
this.giveUpResolver = null;
|
this.giveUpResolver = null;
|
||||||
|
|
||||||
@ -124,16 +122,10 @@ export class Level {
|
|||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (this.saveAsCurrentAfterCheckWon) {
|
|
||||||
this.saveAsCurrentLevel();
|
this.saveAsCurrentLevel();
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
setSaveAsCurrentAfterCheckWon(shouldSave){
|
|
||||||
this.saveAsCurrentAfterCheckWon = (shouldSave === true);
|
|
||||||
}
|
|
||||||
|
|
||||||
getWonPromise() {
|
getWonPromise() {
|
||||||
return this.wonPromise;
|
return this.wonPromise;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,25 +12,8 @@ import {SimpleFourWordsLevel10_3} from "./SimpleFourWordsLevel10_3";
|
|||||||
import {TwoSegmentFourWordsLevel10_0_3} from "./TwoSegmentFourWordsLevel10_0_3";
|
import {TwoSegmentFourWordsLevel10_0_3} from "./TwoSegmentFourWordsLevel10_0_3";
|
||||||
import {TwoSegmentFourWordsLevel10_1_3} from "./TwoSegmentFourWordsLevel10_1_3";
|
import {TwoSegmentFourWordsLevel10_1_3} from "./TwoSegmentFourWordsLevel10_1_3";
|
||||||
import {TwoSegmentFourWordsLevel10_0_2} from "./TwoSegmentFourWordsLevel10_0_2";
|
import {TwoSegmentFourWordsLevel10_0_2} from "./TwoSegmentFourWordsLevel10_0_2";
|
||||||
import {Level} from "./Level";
|
|
||||||
|
|
||||||
export class LevelHelper {
|
export class LevelHelper {
|
||||||
public static readonly types = {
|
|
||||||
20: SimpleLevel,
|
|
||||||
40: RowLevel8,
|
|
||||||
60: RowLevel10,
|
|
||||||
80: SimpleFourWordsLevel10_0,
|
|
||||||
81: SimpleFourWordsLevel10_1,
|
|
||||||
82: SimpleFourWordsLevel10_2,
|
|
||||||
83: SimpleFourWordsLevel10_3,
|
|
||||||
100: SixWordsRowLevel8,
|
|
||||||
110: TwoSegmentFourWordsLevel10_0_3,
|
|
||||||
111: TwoSegmentFourWordsLevel10_1_3,
|
|
||||||
112: TwoSegmentFourWordsLevel10_0_2,
|
|
||||||
120: FourWordsLevel8,
|
|
||||||
140: SixWordsRowLevel12,
|
|
||||||
160: FourWordsLevel12,
|
|
||||||
};
|
|
||||||
static setLevelType(typeId, level) {
|
static setLevelType(typeId, level) {
|
||||||
LevelHelper.types[typeId] = level;
|
LevelHelper.types[typeId] = level;
|
||||||
}
|
}
|
||||||
@ -39,7 +22,7 @@ export class LevelHelper {
|
|||||||
return LevelHelper.types[type];
|
return LevelHelper.types[type];
|
||||||
}
|
}
|
||||||
|
|
||||||
static inflateLevel(levelData, templateContainer): Level {
|
static inflateLevel(levelData, templateContainer) {
|
||||||
let level = new (LevelHelper.types[levelData["renderer"]])(templateContainer);
|
let level = new (LevelHelper.types[levelData["renderer"]])(templateContainer);
|
||||||
level.setWords(JSON.parse(levelData["words"].replace(/"/g, '"')));
|
level.setWords(JSON.parse(levelData["words"].replace(/"/g, '"')));
|
||||||
level.setId(levelData["id"]);
|
level.setId(levelData["id"]);
|
||||||
@ -56,3 +39,20 @@ export class LevelHelper {
|
|||||||
return level;
|
return level;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LevelHelper.types = {
|
||||||
|
20: SimpleLevel,
|
||||||
|
40: RowLevel8,
|
||||||
|
60: RowLevel10,
|
||||||
|
80: SimpleFourWordsLevel10_0,
|
||||||
|
81: SimpleFourWordsLevel10_1,
|
||||||
|
82: SimpleFourWordsLevel10_2,
|
||||||
|
83: SimpleFourWordsLevel10_3,
|
||||||
|
100: SixWordsRowLevel8,
|
||||||
|
110: TwoSegmentFourWordsLevel10_0_3,
|
||||||
|
111: TwoSegmentFourWordsLevel10_1_3,
|
||||||
|
112: TwoSegmentFourWordsLevel10_0_2,
|
||||||
|
120: FourWordsLevel8,
|
||||||
|
140: SixWordsRowLevel12,
|
||||||
|
160: FourWordsLevel12,
|
||||||
|
};
|
||||||
0
src/client/sass/_mainMenu.scss
Normal file
0
src/client/sass/_mainMenu.scss
Normal file
@ -1,51 +0,0 @@
|
|||||||
nav.top-bar {
|
|
||||||
padding: 0;
|
|
||||||
|
|
||||||
@each $breakpoint, $value in $margins {
|
|
||||||
@include breakpoint($breakpoint) {
|
|
||||||
margin-left: -$value;
|
|
||||||
margin-right: -$value;
|
|
||||||
//width: calc(100% + #{4*$value});
|
|
||||||
//max-width: calc(100% + #{4*$value});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.with-image .background-img {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.background-img {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
> .grid-container {
|
|
||||||
background: inherit;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
//padding-right: 0;
|
|
||||||
|
|
||||||
> .grid-padding-x {
|
|
||||||
display: block;
|
|
||||||
padding: 0.5rem;
|
|
||||||
margin: 0;
|
|
||||||
padding-right: 0;
|
|
||||||
|
|
||||||
> .small-12{
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ul > li {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
&.level-counter {
|
|
||||||
margin-top: 0.2rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,99 +0,0 @@
|
|||||||
|
|
||||||
// Blue
|
|
||||||
//$primaryColor: #427081;
|
|
||||||
//$secondaryColor: #4d575a;
|
|
||||||
//$accentColor: #e3ab6e;
|
|
||||||
//$textColor: white;
|
|
||||||
//$svgColor: black;
|
|
||||||
|
|
||||||
//Blue different Accent
|
|
||||||
$primaryColor: #427081;
|
|
||||||
$secondaryColor: #4d575a;
|
|
||||||
$accentColor: #d3e7eb;
|
|
||||||
$textColor: white;
|
|
||||||
$svgColor: black;
|
|
||||||
|
|
||||||
// Blau Invers
|
|
||||||
//$primaryColor: #4d575a;
|
|
||||||
//$secondaryColor: #427081;
|
|
||||||
//$accentColor: #e3ab6e;
|
|
||||||
//$textColor: white;
|
|
||||||
//$svgColor: black;
|
|
||||||
|
|
||||||
// Grün
|
|
||||||
//$primaryColor: #6b8778;
|
|
||||||
//$secondaryColor: #012f25;
|
|
||||||
//$accentColor: #c2ceca;
|
|
||||||
//$textColor: white;
|
|
||||||
//$svgColor: black;
|
|
||||||
|
|
||||||
// Grün 2
|
|
||||||
//$primaryColor: #234c42;
|
|
||||||
//$secondaryColor: #012f25;
|
|
||||||
//$accentColor: #b8acaa;
|
|
||||||
//$textColor: white;
|
|
||||||
//$svgColor: black;
|
|
||||||
|
|
||||||
// Grün invers
|
|
||||||
//$primaryColor: #012f25;
|
|
||||||
//$secondaryColor: #234c42;
|
|
||||||
//$accentColor: #b8acaa;
|
|
||||||
//$textColor: white;
|
|
||||||
//$svgColor: white;
|
|
||||||
|
|
||||||
// Grün invers andere Accent
|
|
||||||
//$primaryColor: #012f25;
|
|
||||||
//$secondaryColor: #234c42;
|
|
||||||
//$accentColor: #6b8778;
|
|
||||||
//$textColor: white;
|
|
||||||
//$svgColor: white;
|
|
||||||
|
|
||||||
body.theme-blue{
|
|
||||||
background: $primaryColor;
|
|
||||||
color: $textColor;
|
|
||||||
|
|
||||||
.toast .message{
|
|
||||||
background: $secondaryColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav.top-bar, nav.top-bar.with-image, nav.top-bar.with-image.solid{
|
|
||||||
background: $secondaryColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button{
|
|
||||||
background: $secondaryColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
.switch input:checked + .slider{
|
|
||||||
background: $accentColor;
|
|
||||||
}
|
|
||||||
#level-number-container{
|
|
||||||
background: $primaryColor;
|
|
||||||
}
|
|
||||||
svg {
|
|
||||||
color: $svgColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.menu li a {
|
|
||||||
color: $textColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
a{
|
|
||||||
color: $accentColor;
|
|
||||||
&.hidden-link{
|
|
||||||
color: $textColor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#site > :not(.won) .segment.locked {
|
|
||||||
//background-color: $accentColor;
|
|
||||||
//background-color: $secondaryColor;
|
|
||||||
background-color: #00000030;
|
|
||||||
//background-color: #81acb5;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tutorial-pointer{
|
|
||||||
background: $accentColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -23,13 +23,11 @@
|
|||||||
.tutorial-blanket {
|
.tutorial-blanket {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tutorial-text {
|
.tutorial-text {
|
||||||
color: white;
|
color: white;
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
transition: none !important;
|
transition: none !important;
|
||||||
|
|
||||||
* {
|
* {
|
||||||
transition: none !important;
|
transition: none !important;
|
||||||
}
|
}
|
||||||
@ -40,12 +38,10 @@
|
|||||||
.segment-row {
|
.segment-row {
|
||||||
position: inherit;
|
position: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.segment-parent:nth-child(3), .segment-parent:nth-child(3).rotating {
|
.segment-parent:nth-child(3), .segment-parent:nth-child(3).rotating {
|
||||||
z-index: 9900 !important;
|
z-index: 9900 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tutorial-text .step-1 {
|
.tutorial-text .step-1 {
|
||||||
display: initial;
|
display: initial;
|
||||||
z-index: 9900 !important;
|
z-index: 9900 !important;
|
||||||
@ -57,7 +53,6 @@
|
|||||||
#level {
|
#level {
|
||||||
z-index: 9900 !important;
|
z-index: 9900 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tutorial-text .step-2 {
|
.tutorial-text .step-2 {
|
||||||
display: initial;
|
display: initial;
|
||||||
z-index: 9900 !important;
|
z-index: 9900 !important;
|
||||||
@ -87,7 +82,6 @@
|
|||||||
box-shadow: 0 0 10px 5px #fff;
|
box-shadow: 0 0 10px 5px #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.step-4 {
|
&.step-4 {
|
||||||
.tutorial-text .step-4 {
|
.tutorial-text .step-4 {
|
||||||
display: initial;
|
display: initial;
|
||||||
@ -98,11 +92,9 @@
|
|||||||
#level {
|
#level {
|
||||||
.segment-row {
|
.segment-row {
|
||||||
position: inherit;
|
position: inherit;
|
||||||
|
|
||||||
> .child-container {
|
> .child-container {
|
||||||
.segment-parent.layer-2, > .segment-parent.layer-2.rotating {
|
.segment-parent.layer-2, > .segment-parent.layer-2.rotating {
|
||||||
z-index: 9900 !important;
|
z-index: 9900 !important;
|
||||||
|
|
||||||
#tutorial-pointer {
|
#tutorial-pointer {
|
||||||
width: 0.6em;
|
width: 0.6em;
|
||||||
height: 0.6em;
|
height: 0.6em;
|
||||||
@ -127,38 +119,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#tutorial-site {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-evenly;
|
|
||||||
flex-direction: column;
|
|
||||||
|
|
||||||
#tutorial-1, #tutorial-2, #tutorial-3{
|
|
||||||
text-align: center;
|
|
||||||
margin-top: 0.7rem;
|
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tutorial-2 .help-action{
|
|
||||||
width: 100%;
|
|
||||||
margin-bottom: 0.3rem;
|
|
||||||
}
|
|
||||||
#tutorial-3 .tutorial-wrapper{
|
|
||||||
position: relative;
|
|
||||||
#tutorial-pointer {
|
|
||||||
width: 0.6em;
|
|
||||||
height: 0.6em;
|
|
||||||
|
|
||||||
border-radius: 50%;
|
|
||||||
|
|
||||||
left: 75%;
|
|
||||||
position: absolute;
|
|
||||||
top: 75%;
|
|
||||||
z-index: 1;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
|
|
||||||
animation: tutorialPointer 2s infinite;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
394
src/client/sass/_wordRotator_old.scss
Normal file
394
src/client/sass/_wordRotator_old.scss
Normal file
@ -0,0 +1,394 @@
|
|||||||
|
@import "settings";
|
||||||
|
@import "lib/_actionBar.scss";
|
||||||
|
@import "lib/_form.scss";
|
||||||
|
@import "lib/_listjs.scss";
|
||||||
|
@import "lib/_modal.scss";
|
||||||
|
@import "lib/_rotate.scss";
|
||||||
|
@import "lib/_share.scss";
|
||||||
|
@import "lib/_tabs.scss";
|
||||||
|
@import "lib/_core.scss";
|
||||||
|
@import "lib/_flashMessenger.scss";
|
||||||
|
@import "lib/_framework.scss";
|
||||||
|
@import "lib/_pwaAssets.scss";
|
||||||
|
@import "lib/_settingsSite.scss";
|
||||||
|
@import "lib/_style.scss";
|
||||||
|
@import "lib/_theme.scss";
|
||||||
|
|
||||||
|
@import "tutorial";
|
||||||
|
@import "wordrotatorTheme";
|
||||||
|
|
||||||
|
//ActionBar
|
||||||
|
nav.top-bar.title-bar {
|
||||||
|
padding: 0.3rem 0.6rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#logo {
|
||||||
|
max-width: 2rem;
|
||||||
|
transition: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#action-bar .top-bar-right .menu .action.img a {
|
||||||
|
padding-bottom: 0;
|
||||||
|
img {
|
||||||
|
max-height: 1.8rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu, .dropdown.menu {
|
||||||
|
a {
|
||||||
|
padding: 0.2rem 0.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#level-number-container {
|
||||||
|
z-index: 1;
|
||||||
|
transition: none;
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
border: 3px solid white;
|
||||||
|
border-radius: 50%;
|
||||||
|
visibility: hidden;
|
||||||
|
display: table-cell;
|
||||||
|
|
||||||
|
height: 35px;
|
||||||
|
width: 35px;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
|
||||||
|
&.visible {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
&.in-main-menu {
|
||||||
|
background: white;
|
||||||
|
border-color: black;
|
||||||
|
|
||||||
|
height: 1em;
|
||||||
|
width: 1em;
|
||||||
|
min-height: 1em;
|
||||||
|
min-width: 1em;
|
||||||
|
max-height: 1em;
|
||||||
|
max-width: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#level-number {
|
||||||
|
transition: none;
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$coinTowerDimension: 28px;
|
||||||
|
//coin element
|
||||||
|
.coin-counter {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
font-size: 1.6rem;
|
||||||
|
@include breakpoint(small down) {
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
:after {
|
||||||
|
background-image: url('../img/coinTower.png');
|
||||||
|
background-size: $coinTowerDimension $coinTowerDimension;
|
||||||
|
width: $coinTowerDimension;
|
||||||
|
height: $coinTowerDimension;
|
||||||
|
display: inline-block;
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#coin-container {
|
||||||
|
line-height: 1;
|
||||||
|
.coin {
|
||||||
|
margin-left: 3px;
|
||||||
|
margin-right: 3px;
|
||||||
|
max-width: 20px;
|
||||||
|
display: inline-block;
|
||||||
|
@include breakpoint(smedium) {
|
||||||
|
max-width: 25px;
|
||||||
|
}
|
||||||
|
@include breakpoint(medium) {
|
||||||
|
max-width: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Segments
|
||||||
|
|
||||||
|
@for $i from 1 through length($rotationDegrees) {
|
||||||
|
$startDegree: ((nth($rotationDegrees, $i)+270)%360);
|
||||||
|
|
||||||
|
@keyframes rotate-#{nth($rotationDegrees, $i)} {
|
||||||
|
0% {
|
||||||
|
//transform: rotate(#{$startDegree}deg);
|
||||||
|
transform: #{map-get($degreeMatrix, $startDegree)};
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
//transform: rotate(#{nth($rotationDegrees, $i)}deg);
|
||||||
|
transform: #{map-get($degreeMatrix, nth($rotationDegrees, $i))};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes rotate-reverse-#{nth($rotationDegrees, $i)} {
|
||||||
|
0% {
|
||||||
|
//transform: rotate(#{(nth($rotationDegrees, $i))+90}deg);
|
||||||
|
transform: #{map-get($degreeMatrix, nth($rotationDegrees, $i)+90)}
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
//transform: rotate(#{$startDegree+90}deg);
|
||||||
|
transform: #{map-get($degreeMatrix, $startDegree+90)};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.segment:not(.segment-row):not(.segment-triangle) {
|
||||||
|
&.rotating {
|
||||||
|
z-index: 10 !important;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
@for $i from 1 through length($rotationDegrees) {
|
||||||
|
&.rotate-#{nth($rotationDegrees, $i)} {
|
||||||
|
animation-name: rotate-#{nth($rotationDegrees, $i)};
|
||||||
|
animation-duration: $animationDuration;
|
||||||
|
animation-fill-mode: forwards;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
|
||||||
|
> .child-container {
|
||||||
|
> .segment {
|
||||||
|
animation-name: rotate-#{450- nth($rotationDegrees, $i)};
|
||||||
|
animation-duration: $animationDuration;
|
||||||
|
animation-fill-mode: forwards;
|
||||||
|
animation-direction: reverse;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
|
||||||
|
@for $j from 1 through length($rotationDegrees) {
|
||||||
|
$animationName: ((nth($rotationDegrees, $j)- nth($rotationDegrees, $i)+360)%360)+90;
|
||||||
|
&.rotate-#{nth($rotationDegrees, $j)} {
|
||||||
|
animation-name: rotate-#{$animationName};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.reverse {
|
||||||
|
//animation-name: rotate-reverse-#{(nth($rotationDegrees, $i))%360+90};
|
||||||
|
animation-name: rotate-reverse-#{nth($rotationDegrees, $i)};
|
||||||
|
> .child-container {
|
||||||
|
> .segment {
|
||||||
|
//animation-name: rotate-reverse-#{360- (nth($rotationDegrees, $i)%360)};
|
||||||
|
animation-name: rotate-reverse-#{(540- nth($rotationDegrees, $i))%360+90};
|
||||||
|
@for $j from 1 through length($rotationDegrees) {
|
||||||
|
$animationName: ((nth($rotationDegrees, $j)- nth($rotationDegrees, $i)+360)%360)+90;
|
||||||
|
&.rotate-#{nth($rotationDegrees, $j)} {
|
||||||
|
animation-name: rotate-reverse-#{($animationName+90)%360+90};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(.rotating) {
|
||||||
|
@for $i from 1 through length($rotationDegrees) {
|
||||||
|
&.rotate-#{nth($rotationDegrees, $i)} {
|
||||||
|
transform: rotate(#{nth($rotationDegrees, $i)}deg);
|
||||||
|
background-color: inherit;
|
||||||
|
z-index: 1;
|
||||||
|
> .child-container {
|
||||||
|
> .segment {
|
||||||
|
transform: rotate(#{360- nth($rotationDegrees, $i)}deg);
|
||||||
|
background-color: inherit;
|
||||||
|
z-index: 1;
|
||||||
|
|
||||||
|
@for $j from 1 through length($rotationDegrees) {
|
||||||
|
$animationName: ((nth($rotationDegrees, $j)- nth($rotationDegrees, $i)+360)%360);
|
||||||
|
@if $animationName==0 {
|
||||||
|
$animationName: 360;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.rotate-#{nth($rotationDegrees, $j)} {
|
||||||
|
transform: rotate(#{$animationName}deg);
|
||||||
|
background-color: inherit;
|
||||||
|
z-index: 1;
|
||||||
|
|
||||||
|
&.rotating {
|
||||||
|
animation-name: rotate-#{$animationName};
|
||||||
|
animation-duration: $animationDuration;
|
||||||
|
animation-fill-mode: forwards;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
|
||||||
|
&.reverse {
|
||||||
|
animation-name: rotate-reverse-#{$animationName};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#level {
|
||||||
|
user-select: none;
|
||||||
|
white-space: nowrap;
|
||||||
|
transition: none;
|
||||||
|
max-width: 100%;
|
||||||
|
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
|
||||||
|
//width: 100%;
|
||||||
|
|
||||||
|
* {
|
||||||
|
transition: none;
|
||||||
|
}
|
||||||
|
overflow-y: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
.segment {
|
||||||
|
vertical-align: top;
|
||||||
|
white-space: initial;
|
||||||
|
cursor: pointer;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center;
|
||||||
|
position: relative;
|
||||||
|
transition: none;
|
||||||
|
user-select: none;
|
||||||
|
z-index: 1;
|
||||||
|
background-color: inherit;
|
||||||
|
line-height: 0;
|
||||||
|
|
||||||
|
&.segment-row {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
animation: none !important;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.segment-leaf {
|
||||||
|
background-color: transparent !important;
|
||||||
|
min-width: 1em;
|
||||||
|
padding: 0.8em;
|
||||||
|
&:before {
|
||||||
|
content: " ";
|
||||||
|
display: block;
|
||||||
|
padding-top: 100%;
|
||||||
|
}
|
||||||
|
.leaf-element {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
line-height: 1.5em;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.segment-parent {
|
||||||
|
border: solid 1px #a9a9a9;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 1px;
|
||||||
|
|
||||||
|
&.layer-2 {
|
||||||
|
border: solid 3px #000000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.segment-triangle {
|
||||||
|
> .child-container {
|
||||||
|
> .segment-parent {
|
||||||
|
//border: solid 3px #000000;
|
||||||
|
//position: relative;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Won-screen
|
||||||
|
#site-content > :not(.won) {
|
||||||
|
.show-when-won {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.level-container {
|
||||||
|
//flex: 1;
|
||||||
|
transition: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.won {
|
||||||
|
.level-container {
|
||||||
|
//height: 60%;
|
||||||
|
}
|
||||||
|
.show-when-won {
|
||||||
|
//visibility: initial;
|
||||||
|
}
|
||||||
|
.show-while-playing {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-right {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
#continue-button {
|
||||||
|
margin-bottom: 2px;
|
||||||
|
@include breakpoint(small down) {
|
||||||
|
margin-bottom: 0;
|
||||||
|
padding: 0.3em .6em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#play-button {
|
||||||
|
@include breakpoint(small down) {
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#help-button {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0.4em 0.4em;
|
||||||
|
max-width: 3em;
|
||||||
|
@include breakpoint(smedium down) {
|
||||||
|
padding: 0.2em 0.2em;
|
||||||
|
max-width: 2em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-height-1 {
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
overscroll-behavior: contain;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#site-content {
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
div.mainContainer{
|
||||||
|
overflow-x: hidden;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//#img-sound:before {
|
||||||
|
// content: "";
|
||||||
|
// max-width: 1.4em;
|
||||||
|
// background: url('../img/speaker.svg')
|
||||||
|
//}
|
||||||
|
|
||||||
|
.clickable{
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
#share-button svg{
|
||||||
|
cursor: pointer;
|
||||||
|
max-width: 1.5rem;
|
||||||
|
}
|
||||||
@ -73,16 +73,9 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.default {
|
&.default {
|
||||||
//background: #07076d;
|
background: url('../img/background.png');
|
||||||
background: #0f0f49;
|
background-size: cover;
|
||||||
//background: #1c1c44;
|
background-position: center;
|
||||||
color: white;
|
|
||||||
* {
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
//background: url('../img/background.png');
|
|
||||||
//background-size: cover;
|
|
||||||
//background-position: center;
|
|
||||||
|
|
||||||
#level-number-container {
|
#level-number-container {
|
||||||
&.in-main-menu {
|
&.in-main-menu {
|
||||||
@ -151,13 +144,17 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//.setting-row:not(.hidden) {
|
label {
|
||||||
// line-height: 1;
|
font-size: 1em !important;
|
||||||
// padding-top: 0.5em;
|
}
|
||||||
// padding-bottom: 0.5em;
|
|
||||||
// width: 100%;
|
.setting-row:not(.hidden) {
|
||||||
// cursor: pointer;
|
line-height: 1;
|
||||||
// background: rgba(195, 195, 195, 0.13);
|
padding-top: 0.5em;
|
||||||
// //display: inline-block;
|
padding-bottom: 0.5em;
|
||||||
//}
|
width: 100%;
|
||||||
|
cursor: pointer;
|
||||||
|
background: rgba(195, 195, 195, 0.13);
|
||||||
|
//display: inline-block;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
67
src/client/sass/foundation.scss
vendored
Normal file
67
src/client/sass/foundation.scss
vendored
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
@import "../../node_modules/foundation-sites/scss/foundation";
|
||||||
|
@import "settings";
|
||||||
|
|
||||||
|
@include foundation-global-styles;
|
||||||
|
@include foundation-visibility-classes;
|
||||||
|
@include foundation-grid;
|
||||||
|
@include foundation-forms;
|
||||||
|
//@include foundation-flex-grid;
|
||||||
|
//@include foundation-flex-classes;
|
||||||
|
@include foundation-button;
|
||||||
|
@include foundation-top-bar;
|
||||||
|
|
||||||
|
@include foundation-menu;
|
||||||
|
@include foundation-menu-icon;
|
||||||
|
|
||||||
|
@include foundation-prototype-overflow;
|
||||||
|
|
||||||
|
@include foundation-dropdown;
|
||||||
|
@include foundation-dropdown-menu;
|
||||||
|
@include foundation-accordion;
|
||||||
|
@include foundation-accordion-menu;
|
||||||
|
|
||||||
|
@include foundation-prototype-spacing;
|
||||||
|
|
||||||
|
//@include foundation-everything;
|
||||||
|
|
||||||
|
.top-bar-title {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row:not(.expanded) .row {
|
||||||
|
max-width: 100%;
|
||||||
|
margin-right: 0;
|
||||||
|
margin-left: 0;
|
||||||
|
.column, .columns {
|
||||||
|
&.no-padding-left {
|
||||||
|
padding-left: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.no-padding-right {
|
||||||
|
padding-right: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $size in $breakpoints {
|
||||||
|
&.#{nth($size, 1)}-first {
|
||||||
|
@include breakpoint(nth($size, 1)) {
|
||||||
|
padding-left: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.#{nth($size, 1)}-last {
|
||||||
|
@include breakpoint(nth($size, 1)) {
|
||||||
|
padding-right: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.row.low-padding {
|
||||||
|
.column, .columns {
|
||||||
|
//&:not(:first-child)
|
||||||
|
//{
|
||||||
|
//}
|
||||||
|
padding-left: 0.15rem;
|
||||||
|
padding-right: 0.15rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,7 +1,8 @@
|
|||||||
@import "../../../node_modules/foundation-sites/scss/foundation";
|
@import "../../../node_modules/foundation-sites/scss/foundation";
|
||||||
|
|
||||||
//Settings nach foundation für mixins in settings
|
//Settings nach foundation für mixins in settings
|
||||||
@import "settings";
|
@import "wordRotator";
|
||||||
|
@import "animations";
|
||||||
|
|
||||||
//Include foundation before other styles, so that other one can override foundation
|
//Include foundation before other styles, so that other one can override foundation
|
||||||
@include foundation-everything;
|
@include foundation-everything;
|
||||||
@ -11,10 +12,6 @@
|
|||||||
@import "../../../node_modules/cordova-sites-user-management/cordova-sites-user-management";
|
@import "../../../node_modules/cordova-sites-user-management/cordova-sites-user-management";
|
||||||
|
|
||||||
//Anderes nach Settings, damit Settings bereits angewendet werden
|
//Anderes nach Settings, damit Settings bereits angewendet werden
|
||||||
@import "wordRotator";
|
|
||||||
@import "animations";
|
|
||||||
@import "navbarOverride";
|
|
||||||
@import "themeBlue";
|
|
||||||
|
|
||||||
.translation{}
|
.translation{}
|
||||||
|
|
||||||
@ -184,12 +181,6 @@ a.hidden-link {
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
> .grid-x{
|
|
||||||
overflow: auto;
|
|
||||||
margin-top: 0.5rem;
|
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
#main-content {
|
#main-content {
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
|
|||||||
250
src/client/sass/lib/_actionBar.scss
Normal file
250
src/client/sass/lib/_actionBar.scss
Normal file
@ -0,0 +1,250 @@
|
|||||||
|
@import "../../../node_modules/foundation-sites/scss/foundation";
|
||||||
|
|
||||||
|
nav.top-bar.title-bar {
|
||||||
|
padding: 0.3rem 0.6rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#logo {
|
||||||
|
max-width: 2rem;
|
||||||
|
transition: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu, .dropdown.menu {
|
||||||
|
a {
|
||||||
|
padding: 0.2rem 0.5rem;
|
||||||
|
}
|
||||||
|
> li > a {
|
||||||
|
background-color: transparent;
|
||||||
|
padding: 0.2rem 0.7rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-bar-title
|
||||||
|
{
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
#action-bar {
|
||||||
|
.close-listener {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: transparent;
|
||||||
|
z-index: 9000;
|
||||||
|
}
|
||||||
|
#responsive-menu {
|
||||||
|
.top-bar-right {
|
||||||
|
position: relative;
|
||||||
|
text-align: right;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.top-bar-right {
|
||||||
|
width: auto;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.menu {
|
||||||
|
&.action-bar {
|
||||||
|
a {
|
||||||
|
img + span {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.action {
|
||||||
|
position: relative;
|
||||||
|
z-index: 9000;
|
||||||
|
&.is-dropdown-submenu-parent{
|
||||||
|
z-index: 9001;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
@include breakpoint(small down) {
|
||||||
|
&.smedium {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@include breakpoint(smedium down) {
|
||||||
|
li {
|
||||||
|
display: table-cell;
|
||||||
|
}
|
||||||
|
&.medium {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@include breakpoint(medium down) {
|
||||||
|
&.large {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.never {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.hidden {
|
||||||
|
display: inline-block;
|
||||||
|
//float: right;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 9000;
|
||||||
|
border: 1px solid rgb(202, 202, 202);
|
||||||
|
padding: 0.2rem;
|
||||||
|
transform: translateX(-100%);
|
||||||
|
text-align: left;
|
||||||
|
|
||||||
|
.action {
|
||||||
|
&.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
&.is-dropdown-submenu-parent {
|
||||||
|
z-index: 9001;
|
||||||
|
ul.is-dropdown-submenu {
|
||||||
|
top: auto;
|
||||||
|
> li.action, > .close-listener {
|
||||||
|
z-index: 9001;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
> a:after {
|
||||||
|
display: block;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border: 6px inset;
|
||||||
|
content: "";
|
||||||
|
border-bottom-width: 0;
|
||||||
|
border-top-style: solid;
|
||||||
|
border-color: #ffffff transparent transparent;
|
||||||
|
right: 5px;
|
||||||
|
left: auto;
|
||||||
|
margin-top: -3px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
white-space: nowrap;
|
||||||
|
img {
|
||||||
|
display: none;
|
||||||
|
+ span {
|
||||||
|
display: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@include breakpoint(medium) {
|
||||||
|
&.medium {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@include breakpoint(smedium) {
|
||||||
|
&.smedium {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@include breakpoint(large) {
|
||||||
|
&.large {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@include breakpoint(small down) {
|
||||||
|
&.smedium {
|
||||||
|
display: block;
|
||||||
|
&.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@include breakpoint(smedium down) {
|
||||||
|
&.medium {
|
||||||
|
display: block;
|
||||||
|
&.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@include breakpoint(medium down) {
|
||||||
|
&.large {
|
||||||
|
display: block;
|
||||||
|
&.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.never {
|
||||||
|
display: block;
|
||||||
|
&.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.always {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.action {
|
||||||
|
z-index: 100;
|
||||||
|
@include breakpoint(smedium down) {
|
||||||
|
a {
|
||||||
|
width: 100%;
|
||||||
|
//text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@include breakpoint(smedium down) {
|
||||||
|
a {
|
||||||
|
padding-left: 0.68rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@include breakpoint(small down) {
|
||||||
|
a {
|
||||||
|
padding-left: 0.236rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(.is-dropdown-submenu-parent) {
|
||||||
|
@include breakpoint(smedium down) {
|
||||||
|
a {
|
||||||
|
padding-right: 0.68rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@include breakpoint(small down) {
|
||||||
|
a {
|
||||||
|
padding-right: 0.236rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.img a {
|
||||||
|
padding-top: 0;
|
||||||
|
padding-bottom: 0;
|
||||||
|
img {
|
||||||
|
vertical-align: inherit;
|
||||||
|
max-height: 1.8rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
> li > ul.is-dropdown-submenu {
|
||||||
|
min-width: 0;
|
||||||
|
.action {
|
||||||
|
display: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
> li.opens-right > ul.is-dropdown-submenu {
|
||||||
|
right: auto;
|
||||||
|
left: auto;
|
||||||
|
a {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown.menu > li.is-dropdown-submenu-parent > a:after {
|
||||||
|
border-color: #ffffff transparent transparent;
|
||||||
|
}
|
||||||
@ -8,7 +8,7 @@ html {
|
|||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
//font-size: 18px;
|
font-size: 18px;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
86
src/client/sass/lib/_form.scss
Normal file
86
src/client/sass/lib/_form.scss
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
|
||||||
|
form {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sending {
|
||||||
|
.sending-loader {
|
||||||
|
position: absolute;
|
||||||
|
background-color: rgba(125, 125, 125, 0.3);
|
||||||
|
display: block;
|
||||||
|
pointer-events: all;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 10;
|
||||||
|
.loader {
|
||||||
|
position: absolute
|
||||||
|
}
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sending-loader {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
//input.notEmpty:invalid {
|
||||||
|
// background-color: lightcoral;
|
||||||
|
//}
|
||||||
|
|
||||||
|
label {
|
||||||
|
position: relative;
|
||||||
|
[type='text'], [type='password'], [type='date'], [type='datetime'], [type='datetime-local'], [type='month'], [type='week'], [type='email'], [type='number'], [type='search'], [type='tel'], [type='time'], [type='url'], [type='color'], textarea, input[type=text], input:not([type]) {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 2.4375rem;
|
||||||
|
padding: 0.5rem;
|
||||||
|
box-shadow: none !important;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 1.5;
|
||||||
|
border: none;
|
||||||
|
//border-bottom: solid black;
|
||||||
|
outline: 0;
|
||||||
|
margin: 0 0 15px;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
border: none;
|
||||||
|
box-shadow: none !important;
|
||||||
|
//border-bottom: solid black;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus, &.notEmpty:not(:focus) {
|
||||||
|
~ span {
|
||||||
|
top: -11px;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
font-size: 11px;
|
||||||
|
opacity: 1;
|
||||||
|
//color: black;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
~ span {
|
||||||
|
position: absolute;
|
||||||
|
pointer-events: none;
|
||||||
|
left: 10px;
|
||||||
|
bottom: 10px;
|
||||||
|
top: 7px;
|
||||||
|
transition: 0.2s ease all;
|
||||||
|
//color: #626262;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
textarea {
|
||||||
|
height: 10rem;
|
||||||
|
//border: 1px solid rgba(136, 136, 136, 0.31);
|
||||||
|
//box-shadow: 0 0 3px 2px hsla(0, 0%, 53%, .31) !important;
|
||||||
|
border-top-right-radius: 3px;
|
||||||
|
border-top-left-radius: 3px;
|
||||||
|
}
|
||||||
|
[type="checkbox"].before-text {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
621
src/client/sass/lib/_foundationSettings.scss
Normal file
621
src/client/sass/lib/_foundationSettings.scss
Normal file
@ -0,0 +1,621 @@
|
|||||||
|
// Foundation for Sites Settings
|
||||||
|
// -----------------------------
|
||||||
|
//
|
||||||
|
// Table of Contents:
|
||||||
|
//
|
||||||
|
// 1. Global
|
||||||
|
// 2. Breakpoints
|
||||||
|
// 3. The Grid
|
||||||
|
// 4. Base Typography
|
||||||
|
// 5. Typography Helpers
|
||||||
|
// 6. Abide
|
||||||
|
// 7. Accordion
|
||||||
|
// 8. Accordion Menu
|
||||||
|
// 9. Badge
|
||||||
|
// 10. Breadcrumbs
|
||||||
|
// 11. Button
|
||||||
|
// 12. Button Group
|
||||||
|
// 13. Callout
|
||||||
|
// 14. Card
|
||||||
|
// 15. Close Button
|
||||||
|
// 16. Drilldown
|
||||||
|
// 17. Dropdown
|
||||||
|
// 18. Dropdown Menu
|
||||||
|
// 19. Forms
|
||||||
|
// 20. Label
|
||||||
|
// 21. Media Object
|
||||||
|
// 22. Menu
|
||||||
|
// 23. Meter
|
||||||
|
// 24. Off-canvas
|
||||||
|
// 25. Orbit
|
||||||
|
// 26. Pagination
|
||||||
|
// 27. Progress Bar
|
||||||
|
// 28. Responsive Embed
|
||||||
|
// 29. Reveal
|
||||||
|
// 30. Slider
|
||||||
|
// 31. Switch
|
||||||
|
// 32. Table
|
||||||
|
// 33. Tabs
|
||||||
|
// 34. Thumbnail
|
||||||
|
// 35. Title Bar
|
||||||
|
// 36. Tooltip
|
||||||
|
// 37. Top Bar
|
||||||
|
|
||||||
|
@import '../../../node_modules/foundation-sites/scss/util/util';
|
||||||
|
|
||||||
|
// 1. Global
|
||||||
|
// ---------
|
||||||
|
|
||||||
|
$global-font-size: 100%;
|
||||||
|
$global-width: rem-calc(1200);
|
||||||
|
$global-lineheight: 1.5;
|
||||||
|
$foundation-palette: (
|
||||||
|
primary: #1779ba,
|
||||||
|
secondary: #767676,
|
||||||
|
success: #3adb76,
|
||||||
|
warning: #ffae00,
|
||||||
|
alert: #cc4b37,
|
||||||
|
);
|
||||||
|
$light-gray: #e6e6e6;
|
||||||
|
$medium-gray: #cacaca;
|
||||||
|
$dark-gray: #8a8a8a;
|
||||||
|
$black: #0a0a0a;
|
||||||
|
$white: #fefefe;
|
||||||
|
$body-background: $white;
|
||||||
|
$body-font-color: $black;
|
||||||
|
$body-font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;
|
||||||
|
$body-antialiased: true;
|
||||||
|
$global-margin: 1rem;
|
||||||
|
$global-padding: 1rem;
|
||||||
|
$global-weight-normal: normal;
|
||||||
|
$global-weight-bold: bold;
|
||||||
|
$global-radius: 0;
|
||||||
|
$global-text-direction: ltr;
|
||||||
|
$global-flexbox: false;
|
||||||
|
$print-transparent-backgrounds: true;
|
||||||
|
|
||||||
|
@include add-foundation-colors;
|
||||||
|
|
||||||
|
// 2. Breakpoints
|
||||||
|
// --------------
|
||||||
|
|
||||||
|
$breakpoints: (
|
||||||
|
small:0,
|
||||||
|
smedium: 400px,
|
||||||
|
medium: 640px,
|
||||||
|
large: 1024px,
|
||||||
|
xlarge: 1200px,
|
||||||
|
xxlarge: 1440px,
|
||||||
|
);
|
||||||
|
$print-breakpoint: large;
|
||||||
|
$breakpoint-classes: (small smedium medium large);
|
||||||
|
|
||||||
|
// 3. The Grid
|
||||||
|
// -----------
|
||||||
|
|
||||||
|
$grid-row-width: $global-width;
|
||||||
|
$grid-column-count: 12;
|
||||||
|
$grid-column-gutter: (
|
||||||
|
small: 20px,
|
||||||
|
medium: 30px,
|
||||||
|
);
|
||||||
|
$grid-column-align-edge: true;
|
||||||
|
$block-grid-max: 8;
|
||||||
|
|
||||||
|
// 4. Base Typography
|
||||||
|
// ------------------
|
||||||
|
|
||||||
|
$header-font-family: $body-font-family;
|
||||||
|
$header-font-weight: $global-weight-normal;
|
||||||
|
$header-font-style: normal;
|
||||||
|
$font-family-monospace: Consolas, 'Liberation Mono', Courier, monospace;
|
||||||
|
$header-color: inherit;
|
||||||
|
$header-lineheight: 1.4;
|
||||||
|
$header-margin-bottom: 0.5rem;
|
||||||
|
$header-styles: (
|
||||||
|
small: (
|
||||||
|
'h1': ('font-size': 24),
|
||||||
|
'h2': ('font-size': 20),
|
||||||
|
'h3': ('font-size': 19),
|
||||||
|
'h4': ('font-size': 18),
|
||||||
|
'h5': ('font-size': 17),
|
||||||
|
'h6': ('font-size': 16),
|
||||||
|
),
|
||||||
|
medium: (
|
||||||
|
'h1': ('font-size': 48),
|
||||||
|
'h2': ('font-size': 40),
|
||||||
|
'h3': ('font-size': 31),
|
||||||
|
'h4': ('font-size': 25),
|
||||||
|
'h5': ('font-size': 20),
|
||||||
|
'h6': ('font-size': 16),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
$header-text-rendering: optimizeLegibility;
|
||||||
|
$small-font-size: 80%;
|
||||||
|
$header-small-font-color: $medium-gray;
|
||||||
|
$paragraph-lineheight: 1.6;
|
||||||
|
$paragraph-margin-bottom: 1rem;
|
||||||
|
$paragraph-text-rendering: optimizeLegibility;
|
||||||
|
$code-color: $black;
|
||||||
|
$code-font-family: $font-family-monospace;
|
||||||
|
$code-font-weight: $global-weight-normal;
|
||||||
|
$code-background: $light-gray;
|
||||||
|
$code-border: 1px solid $medium-gray;
|
||||||
|
$code-padding: rem-calc(2 5 1);
|
||||||
|
$anchor-color: $primary-color;
|
||||||
|
$anchor-color-hover: scale-color($anchor-color, $lightness: -14%);
|
||||||
|
$anchor-text-decoration: none;
|
||||||
|
$anchor-text-decoration-hover: none;
|
||||||
|
$hr-width: $global-width;
|
||||||
|
$hr-border: 1px solid $medium-gray;
|
||||||
|
$hr-margin: rem-calc(20) auto;
|
||||||
|
$list-lineheight: $paragraph-lineheight;
|
||||||
|
$list-margin-bottom: $paragraph-margin-bottom;
|
||||||
|
$list-style-type: disc;
|
||||||
|
$list-style-position: outside;
|
||||||
|
$list-side-margin: 1.25rem;
|
||||||
|
$list-nested-side-margin: 1.25rem;
|
||||||
|
$defnlist-margin-bottom: 1rem;
|
||||||
|
$defnlist-term-weight: $global-weight-bold;
|
||||||
|
$defnlist-term-margin-bottom: 0.3rem;
|
||||||
|
$blockquote-color: $dark-gray;
|
||||||
|
$blockquote-padding: rem-calc(9 20 0 19);
|
||||||
|
$blockquote-border: 1px solid $medium-gray;
|
||||||
|
$cite-font-size: rem-calc(13);
|
||||||
|
$cite-color: $dark-gray;
|
||||||
|
$cite-pseudo-content: '\2014 \0020';
|
||||||
|
$keystroke-font: $font-family-monospace;
|
||||||
|
$keystroke-color: $black;
|
||||||
|
$keystroke-background: $light-gray;
|
||||||
|
$keystroke-padding: rem-calc(2 4 0);
|
||||||
|
$keystroke-radius: $global-radius;
|
||||||
|
$abbr-underline: 1px dotted $black;
|
||||||
|
|
||||||
|
// 5. Typography Helpers
|
||||||
|
// ---------------------
|
||||||
|
|
||||||
|
$lead-font-size: $global-font-size * 1.25;
|
||||||
|
$lead-lineheight: 1.6;
|
||||||
|
$subheader-lineheight: 1.4;
|
||||||
|
$subheader-color: $dark-gray;
|
||||||
|
$subheader-font-weight: $global-weight-normal;
|
||||||
|
$subheader-margin-top: 0.2rem;
|
||||||
|
$subheader-margin-bottom: 0.5rem;
|
||||||
|
$stat-font-size: 2.5rem;
|
||||||
|
|
||||||
|
// 6. Abide
|
||||||
|
// --------
|
||||||
|
|
||||||
|
$abide-inputs: true;
|
||||||
|
$abide-labels: true;
|
||||||
|
$input-background-invalid: get-color(alert);
|
||||||
|
$form-label-color-invalid: get-color(alert);
|
||||||
|
$input-error-color: get-color(alert);
|
||||||
|
$input-error-font-size: rem-calc(12);
|
||||||
|
$input-error-font-weight: $global-weight-bold;
|
||||||
|
|
||||||
|
// 7. Accordion
|
||||||
|
// ------------
|
||||||
|
|
||||||
|
$accordion-background: $white;
|
||||||
|
$accordion-plusminus: true;
|
||||||
|
$accordion-title-font-size: rem-calc(12);
|
||||||
|
$accordion-item-color: $primary-color;
|
||||||
|
$accordion-item-background-hover: $light-gray;
|
||||||
|
$accordion-item-padding: 1.25rem 1rem;
|
||||||
|
$accordion-content-background: $white;
|
||||||
|
$accordion-content-border: 1px solid $light-gray;
|
||||||
|
$accordion-content-color: $body-font-color;
|
||||||
|
$accordion-content-padding: 1rem;
|
||||||
|
|
||||||
|
// 8. Accordion Menu
|
||||||
|
// -----------------
|
||||||
|
|
||||||
|
$accordionmenu-arrows: true;
|
||||||
|
$accordionmenu-arrow-color: $primary-color;
|
||||||
|
$accordionmenu-arrow-size: 6px;
|
||||||
|
|
||||||
|
// 9. Badge
|
||||||
|
// --------
|
||||||
|
|
||||||
|
$badge-background: $primary-color;
|
||||||
|
$badge-color: $white;
|
||||||
|
$badge-color-alt: $black;
|
||||||
|
$badge-palette: $foundation-palette;
|
||||||
|
$badge-padding: 0.3em;
|
||||||
|
$badge-minwidth: 2.1em;
|
||||||
|
$badge-font-size: 0.6rem;
|
||||||
|
|
||||||
|
// 10. Breadcrumbs
|
||||||
|
// ---------------
|
||||||
|
|
||||||
|
$breadcrumbs-margin: 0 0 $global-margin 0;
|
||||||
|
$breadcrumbs-item-font-size: rem-calc(11);
|
||||||
|
$breadcrumbs-item-color: $primary-color;
|
||||||
|
$breadcrumbs-item-color-current: $black;
|
||||||
|
$breadcrumbs-item-color-disabled: $medium-gray;
|
||||||
|
$breadcrumbs-item-margin: 0.75rem;
|
||||||
|
$breadcrumbs-item-uppercase: true;
|
||||||
|
$breadcrumbs-item-slash: true;
|
||||||
|
|
||||||
|
// 11. Button
|
||||||
|
// ----------
|
||||||
|
|
||||||
|
$button-padding: 0.85em 1em;
|
||||||
|
$button-margin: 0 0 $global-margin 0;
|
||||||
|
$button-fill: solid;
|
||||||
|
$button-background: $primary-color;
|
||||||
|
$button-background-hover: scale-color($button-background, $lightness: -15%);
|
||||||
|
$button-color: $white;
|
||||||
|
$button-color-alt: $black;
|
||||||
|
$button-radius: $global-radius;
|
||||||
|
$button-sizes: (
|
||||||
|
tiny: 0.6rem,
|
||||||
|
small: 0.75rem,
|
||||||
|
default: 0.9rem,
|
||||||
|
large: 1.25rem,
|
||||||
|
);
|
||||||
|
$button-palette: $foundation-palette;
|
||||||
|
$button-opacity-disabled: 0.25;
|
||||||
|
$button-background-hover-lightness: -20%;
|
||||||
|
$button-hollow-hover-lightness: -50%;
|
||||||
|
$button-transition: background-color 0.25s ease-out, color 0.25s ease-out;
|
||||||
|
|
||||||
|
// 12. Button Group
|
||||||
|
// ----------------
|
||||||
|
|
||||||
|
$buttongroup-margin: 1rem;
|
||||||
|
$buttongroup-spacing: 1px;
|
||||||
|
$buttongroup-child-selector: '.button';
|
||||||
|
$buttongroup-expand-max: 6;
|
||||||
|
$buttongroup-radius-on-each: true;
|
||||||
|
|
||||||
|
// 13. Callout
|
||||||
|
// -----------
|
||||||
|
|
||||||
|
$callout-background: $white;
|
||||||
|
$callout-background-fade: 85%;
|
||||||
|
$callout-border: 1px solid rgba($black, 0.25);
|
||||||
|
$callout-margin: 0 0 1rem 0;
|
||||||
|
$callout-padding: 1rem;
|
||||||
|
$callout-font-color: $body-font-color;
|
||||||
|
$callout-font-color-alt: $body-background;
|
||||||
|
$callout-radius: $global-radius;
|
||||||
|
$callout-link-tint: 30%;
|
||||||
|
|
||||||
|
// 14. Card
|
||||||
|
// --------
|
||||||
|
|
||||||
|
$card-background: $white;
|
||||||
|
$card-font-color: $body-font-color;
|
||||||
|
$card-divider-background: $light-gray;
|
||||||
|
$card-border: 1px solid $light-gray;
|
||||||
|
$card-shadow: none;
|
||||||
|
$card-border-radius: $global-radius;
|
||||||
|
$card-padding: $global-padding;
|
||||||
|
$card-margin: $global-margin;
|
||||||
|
|
||||||
|
// 15. Close Button
|
||||||
|
// ----------------
|
||||||
|
|
||||||
|
$closebutton-position: right top;
|
||||||
|
$closebutton-offset-horizontal: (
|
||||||
|
small: 0.66rem,
|
||||||
|
medium: 1rem,
|
||||||
|
);
|
||||||
|
$closebutton-offset-vertical: (
|
||||||
|
small: 0.33em,
|
||||||
|
medium: 0.5rem,
|
||||||
|
);
|
||||||
|
$closebutton-size: (
|
||||||
|
small: 1.5em,
|
||||||
|
medium: 2em,
|
||||||
|
);
|
||||||
|
$closebutton-lineheight: 1;
|
||||||
|
$closebutton-color: $dark-gray;
|
||||||
|
$closebutton-color-hover: $black;
|
||||||
|
|
||||||
|
// 16. Drilldown
|
||||||
|
// -------------
|
||||||
|
|
||||||
|
$drilldown-transition: transform 0.15s linear;
|
||||||
|
$drilldown-arrows: true;
|
||||||
|
$drilldown-arrow-color: $primary-color;
|
||||||
|
$drilldown-arrow-size: 6px;
|
||||||
|
$drilldown-background: $white;
|
||||||
|
|
||||||
|
// 17. Dropdown
|
||||||
|
// ------------
|
||||||
|
|
||||||
|
$dropdown-padding: 1rem;
|
||||||
|
$dropdown-background: $body-background;
|
||||||
|
$dropdown-border: 1px solid $medium-gray;
|
||||||
|
$dropdown-font-size: 1rem;
|
||||||
|
$dropdown-width: 300px;
|
||||||
|
$dropdown-radius: $global-radius;
|
||||||
|
$dropdown-sizes: (
|
||||||
|
tiny: 100px,
|
||||||
|
small: 200px,
|
||||||
|
large: 400px,
|
||||||
|
);
|
||||||
|
|
||||||
|
// 18. Dropdown Menu
|
||||||
|
// -----------------
|
||||||
|
|
||||||
|
$dropdownmenu-arrows: true;
|
||||||
|
$dropdownmenu-arrow-color: $anchor-color;
|
||||||
|
$dropdownmenu-arrow-size: 6px;
|
||||||
|
$dropdownmenu-min-width: 200px;
|
||||||
|
$dropdownmenu-background: $white;
|
||||||
|
$dropdownmenu-border: 1px solid $medium-gray;
|
||||||
|
|
||||||
|
// 19. Forms
|
||||||
|
// ---------
|
||||||
|
|
||||||
|
$fieldset-border: 1px solid $medium-gray;
|
||||||
|
$fieldset-padding: rem-calc(20);
|
||||||
|
$fieldset-margin: rem-calc(18 0);
|
||||||
|
$legend-padding: rem-calc(0 3);
|
||||||
|
$form-spacing: rem-calc(16);
|
||||||
|
$helptext-color: $black;
|
||||||
|
$helptext-font-size: rem-calc(13);
|
||||||
|
$helptext-font-style: italic;
|
||||||
|
$input-prefix-color: $black;
|
||||||
|
$input-prefix-background: $light-gray;
|
||||||
|
$input-prefix-border: 1px solid $medium-gray;
|
||||||
|
$input-prefix-padding: 1rem;
|
||||||
|
$form-label-color: $black;
|
||||||
|
$form-label-font-size: rem-calc(14);
|
||||||
|
$form-label-font-weight: $global-weight-normal;
|
||||||
|
$form-label-line-height: 1.8;
|
||||||
|
$select-background: $white;
|
||||||
|
$select-triangle-color: $dark-gray;
|
||||||
|
$select-radius: $global-radius;
|
||||||
|
$input-color: $black;
|
||||||
|
$input-placeholder-color: $medium-gray;
|
||||||
|
$input-font-family: inherit;
|
||||||
|
$input-font-size: rem-calc(16);
|
||||||
|
$input-font-weight: $global-weight-normal;
|
||||||
|
$input-background: $white;
|
||||||
|
$input-background-focus: $white;
|
||||||
|
$input-background-disabled: $light-gray;
|
||||||
|
$input-border: 1px solid $medium-gray;
|
||||||
|
$input-border-focus: 1px solid $dark-gray;
|
||||||
|
$input-shadow: inset 0 1px 2px rgba($black, 0.1);
|
||||||
|
$input-shadow-focus: 0 0 5px $medium-gray;
|
||||||
|
$input-cursor-disabled: not-allowed;
|
||||||
|
$input-transition: box-shadow 0.5s, border-color 0.25s ease-in-out;
|
||||||
|
$input-number-spinners: true;
|
||||||
|
$input-radius: $global-radius;
|
||||||
|
$form-button-radius: $global-radius;
|
||||||
|
|
||||||
|
// 20. Label
|
||||||
|
// ---------
|
||||||
|
|
||||||
|
$label-background: $primary-color;
|
||||||
|
$label-color: $white;
|
||||||
|
$label-color-alt: $black;
|
||||||
|
$label-palette: $foundation-palette;
|
||||||
|
$label-font-size: 0.8rem;
|
||||||
|
$label-padding: 0.33333rem 0.5rem;
|
||||||
|
$label-radius: $global-radius;
|
||||||
|
|
||||||
|
// 21. Media Object
|
||||||
|
// ----------------
|
||||||
|
|
||||||
|
$mediaobject-margin-bottom: $global-margin;
|
||||||
|
$mediaobject-section-padding: $global-padding;
|
||||||
|
$mediaobject-image-width-stacked: 100%;
|
||||||
|
|
||||||
|
// 22. Menu
|
||||||
|
// --------
|
||||||
|
|
||||||
|
$menu-margin: 0;
|
||||||
|
$menu-margin-nested: 1rem;
|
||||||
|
$menu-item-padding: 0.7rem 1rem;
|
||||||
|
$menu-item-color-active: $white;
|
||||||
|
$menu-item-background-active: get-color(primary);
|
||||||
|
$menu-icon-spacing: 0.25rem;
|
||||||
|
$menu-item-background-hover: $light-gray;
|
||||||
|
$menu-border: $light-gray;
|
||||||
|
|
||||||
|
// 23. Meter
|
||||||
|
// ---------
|
||||||
|
|
||||||
|
$meter-height: 1rem;
|
||||||
|
$meter-radius: $global-radius;
|
||||||
|
$meter-background: $medium-gray;
|
||||||
|
$meter-fill-good: $success-color;
|
||||||
|
$meter-fill-medium: $warning-color;
|
||||||
|
$meter-fill-bad: $alert-color;
|
||||||
|
|
||||||
|
// 24. Off-canvas
|
||||||
|
// --------------
|
||||||
|
|
||||||
|
$offcanvas-size: 250px;
|
||||||
|
$offcanvas-vertical-size: 250px;
|
||||||
|
$offcanvas-background: $light-gray;
|
||||||
|
$offcanvas-shadow: 0 0 10px rgba($black, 0.7);
|
||||||
|
$offcanvas-push-zindex: 1;
|
||||||
|
$offcanvas-overlap-zindex: 10;
|
||||||
|
$offcanvas-reveal-zindex: 1;
|
||||||
|
$offcanvas-transition-length: 0.5s;
|
||||||
|
$offcanvas-transition-timing: ease;
|
||||||
|
$offcanvas-fixed-reveal: true;
|
||||||
|
$offcanvas-exit-background: rgba($white, 0.25);
|
||||||
|
$maincontent-class: 'off-canvas-content';
|
||||||
|
|
||||||
|
// 25. Orbit
|
||||||
|
// ---------
|
||||||
|
|
||||||
|
$orbit-bullet-background: $medium-gray;
|
||||||
|
$orbit-bullet-background-active: $dark-gray;
|
||||||
|
$orbit-bullet-diameter: 1.2rem;
|
||||||
|
$orbit-bullet-margin: 0.1rem;
|
||||||
|
$orbit-bullet-margin-top: 0.8rem;
|
||||||
|
$orbit-bullet-margin-bottom: 0.8rem;
|
||||||
|
$orbit-caption-background: rgba($black, 0.5);
|
||||||
|
$orbit-caption-padding: 1rem;
|
||||||
|
$orbit-control-background-hover: rgba($black, 0.5);
|
||||||
|
$orbit-control-padding: 1rem;
|
||||||
|
$orbit-control-zindex: 10;
|
||||||
|
|
||||||
|
// 26. Pagination
|
||||||
|
// --------------
|
||||||
|
|
||||||
|
$pagination-font-size: rem-calc(14);
|
||||||
|
$pagination-margin-bottom: $global-margin;
|
||||||
|
$pagination-item-color: $black;
|
||||||
|
$pagination-item-padding: rem-calc(3 10);
|
||||||
|
$pagination-item-spacing: rem-calc(1);
|
||||||
|
$pagination-radius: $global-radius;
|
||||||
|
$pagination-item-background-hover: $light-gray;
|
||||||
|
$pagination-item-background-current: $primary-color;
|
||||||
|
$pagination-item-color-current: $white;
|
||||||
|
$pagination-item-color-disabled: $medium-gray;
|
||||||
|
$pagination-ellipsis-color: $black;
|
||||||
|
$pagination-mobile-items: false;
|
||||||
|
$pagination-mobile-current-item: false;
|
||||||
|
$pagination-arrows: true;
|
||||||
|
|
||||||
|
// 27. Progress Bar
|
||||||
|
// ----------------
|
||||||
|
|
||||||
|
$progress-height: 1rem;
|
||||||
|
$progress-background: $medium-gray;
|
||||||
|
$progress-margin-bottom: $global-margin;
|
||||||
|
$progress-meter-background: $primary-color;
|
||||||
|
$progress-radius: $global-radius;
|
||||||
|
|
||||||
|
// 28. Responsive Embed
|
||||||
|
// --------------------
|
||||||
|
|
||||||
|
$responsive-embed-margin-bottom: rem-calc(16);
|
||||||
|
$responsive-embed-ratios: (
|
||||||
|
default: 4 by 3,
|
||||||
|
widescreen: 16 by 9,
|
||||||
|
);
|
||||||
|
|
||||||
|
// 29. Reveal
|
||||||
|
// ----------
|
||||||
|
|
||||||
|
$reveal-background: $white;
|
||||||
|
$reveal-width: 600px;
|
||||||
|
$reveal-max-width: $global-width;
|
||||||
|
$reveal-padding: $global-padding;
|
||||||
|
$reveal-border: 1px solid $medium-gray;
|
||||||
|
$reveal-radius: $global-radius;
|
||||||
|
$reveal-zindex: 1005;
|
||||||
|
$reveal-overlay-background: rgba($black, 0.45);
|
||||||
|
|
||||||
|
// 30. Slider
|
||||||
|
// ----------
|
||||||
|
|
||||||
|
$slider-width-vertical: 0.5rem;
|
||||||
|
$slider-transition: all 0.2s ease-in-out;
|
||||||
|
$slider-height: 0.5rem;
|
||||||
|
$slider-background: $light-gray;
|
||||||
|
$slider-fill-background: $medium-gray;
|
||||||
|
$slider-handle-height: 1.4rem;
|
||||||
|
$slider-handle-width: 1.4rem;
|
||||||
|
$slider-handle-background: $primary-color;
|
||||||
|
$slider-opacity-disabled: 0.25;
|
||||||
|
$slider-radius: $global-radius;
|
||||||
|
|
||||||
|
// 31. Switch
|
||||||
|
// ----------
|
||||||
|
|
||||||
|
$switch-background: $medium-gray;
|
||||||
|
$switch-background-active: $primary-color;
|
||||||
|
$switch-height: 2rem;
|
||||||
|
$switch-height-tiny: 1.5rem;
|
||||||
|
$switch-height-small: 1.75rem;
|
||||||
|
$switch-height-large: 2.5rem;
|
||||||
|
$switch-radius: $global-radius;
|
||||||
|
$switch-margin: $global-margin;
|
||||||
|
$switch-paddle-background: $white;
|
||||||
|
$switch-paddle-offset: 0.25rem;
|
||||||
|
$switch-paddle-radius: $global-radius;
|
||||||
|
$switch-paddle-transition: all 0.25s ease-out;
|
||||||
|
|
||||||
|
// 32. Table
|
||||||
|
// ---------
|
||||||
|
|
||||||
|
$table-background: $white;
|
||||||
|
$table-color-scale: 5%;
|
||||||
|
$table-border: 1px solid smart-scale($table-background, $table-color-scale);
|
||||||
|
$table-padding: rem-calc(8 10 10);
|
||||||
|
$table-hover-scale: 2%;
|
||||||
|
$table-row-hover: darken($table-background, $table-hover-scale);
|
||||||
|
$table-row-stripe-hover: darken($table-background, $table-color-scale + $table-hover-scale);
|
||||||
|
$table-is-striped: true;
|
||||||
|
$table-striped-background: smart-scale($table-background, $table-color-scale);
|
||||||
|
$table-stripe: even;
|
||||||
|
$table-head-background: smart-scale($table-background, $table-color-scale / 2);
|
||||||
|
$table-head-row-hover: darken($table-head-background, $table-hover-scale);
|
||||||
|
$table-foot-background: smart-scale($table-background, $table-color-scale);
|
||||||
|
$table-foot-row-hover: darken($table-foot-background, $table-hover-scale);
|
||||||
|
$table-head-font-color: $body-font-color;
|
||||||
|
$table-foot-font-color: $body-font-color;
|
||||||
|
$show-header-for-stacked: false;
|
||||||
|
|
||||||
|
// 33. Tabs
|
||||||
|
// --------
|
||||||
|
|
||||||
|
$tab-margin: 0;
|
||||||
|
$tab-background: $white;
|
||||||
|
$tab-color: $primary-color;
|
||||||
|
$tab-background-active: $light-gray;
|
||||||
|
$tab-active-color: $primary-color;
|
||||||
|
$tab-item-font-size: rem-calc(12);
|
||||||
|
$tab-item-background-hover: $white;
|
||||||
|
$tab-item-padding: 1.25rem 1.5rem;
|
||||||
|
$tab-expand-max: 6;
|
||||||
|
$tab-content-background: $white;
|
||||||
|
$tab-content-border: $light-gray;
|
||||||
|
$tab-content-color: $body-font-color;
|
||||||
|
$tab-content-padding: 1rem;
|
||||||
|
|
||||||
|
// 34. Thumbnail
|
||||||
|
// -------------
|
||||||
|
|
||||||
|
$thumbnail-border: solid 4px $white;
|
||||||
|
$thumbnail-margin-bottom: $global-margin;
|
||||||
|
$thumbnail-shadow: 0 0 0 1px rgba($black, 0.2);
|
||||||
|
$thumbnail-shadow-hover: 0 0 6px 1px rgba($primary-color, 0.5);
|
||||||
|
$thumbnail-transition: box-shadow 200ms ease-out;
|
||||||
|
$thumbnail-radius: $global-radius;
|
||||||
|
|
||||||
|
// 35. Title Bar
|
||||||
|
// -------------
|
||||||
|
|
||||||
|
$titlebar-background: $black;
|
||||||
|
$titlebar-color: $white;
|
||||||
|
$titlebar-padding: 0.5rem;
|
||||||
|
$titlebar-text-font-weight: bold;
|
||||||
|
$titlebar-icon-color: $white;
|
||||||
|
$titlebar-icon-color-hover: $medium-gray;
|
||||||
|
$titlebar-icon-spacing: 0.25rem;
|
||||||
|
|
||||||
|
// 36. Tooltip
|
||||||
|
// -----------
|
||||||
|
|
||||||
|
$has-tip-font-weight: $global-weight-bold;
|
||||||
|
$has-tip-border-bottom: dotted 1px $dark-gray;
|
||||||
|
$tooltip-background-color: $black;
|
||||||
|
$tooltip-color: $white;
|
||||||
|
$tooltip-padding: 0.75rem;
|
||||||
|
$tooltip-font-size: $small-font-size;
|
||||||
|
$tooltip-pip-width: 0.75rem;
|
||||||
|
$tooltip-pip-height: $tooltip-pip-width * 0.866;
|
||||||
|
$tooltip-radius: $global-radius;
|
||||||
|
|
||||||
|
// 37. Top Bar
|
||||||
|
// -----------
|
||||||
|
|
||||||
|
$topbar-padding: 0.5rem;
|
||||||
|
$topbar-background: $light-gray;
|
||||||
|
$topbar-submenu-background: $topbar-background;
|
||||||
|
$topbar-title-spacing: 0.5rem 1rem 0.5rem 0;
|
||||||
|
$topbar-input-width: 200px;
|
||||||
|
$topbar-unstack-breakpoint: medium;
|
||||||
54
src/client/sass/lib/_listjs.scss
Normal file
54
src/client/sass/lib/_listjs.scss
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
.listjs {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
label {
|
||||||
|
display: inline-block;
|
||||||
|
input {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
thead, tfoot {
|
||||||
|
tr th {
|
||||||
|
text-align: left;
|
||||||
|
&.sort{
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tbody.list {
|
||||||
|
tr:first-child td {
|
||||||
|
border-top: solid 1px #696969;
|
||||||
|
}
|
||||||
|
tr:last-child td {
|
||||||
|
border-bottom: solid 1px #696969;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr td {
|
||||||
|
border-top: solid 1px #c8c8c8;
|
||||||
|
padding: 0.3rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ul.pagination {
|
||||||
|
float: right;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0;
|
||||||
|
li {
|
||||||
|
display: inline-block;
|
||||||
|
padding-left: 5px;
|
||||||
|
padding-right: 5px;
|
||||||
|
text-decoration: underline;
|
||||||
|
|
||||||
|
&.active, &.disabled {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.page {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
91
src/client/sass/lib/_modal.scss
Normal file
91
src/client/sass/lib/_modal.scss
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
|
||||||
|
.background {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 1000000;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
//background-color: rgb(0, 0, 0); /* Fallback color */
|
||||||
|
background-color: rgba(55, 55, 55, 0.6);
|
||||||
|
|
||||||
|
.modal {
|
||||||
|
position: relative;
|
||||||
|
top: 50%;
|
||||||
|
//left: 10%;
|
||||||
|
//right: 10%;
|
||||||
|
margin: auto;
|
||||||
|
width: 80%;
|
||||||
|
|
||||||
|
//background-color: #fefefe;
|
||||||
|
|
||||||
|
transform: translateY(-50%);
|
||||||
|
padding: 0.5rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
max-height: 80%;
|
||||||
|
max-width: nth(nth($breakpoints, 4),2);
|
||||||
|
|
||||||
|
&.small-margin {
|
||||||
|
@include breakpoint(medium down) {
|
||||||
|
width: 90%;
|
||||||
|
}
|
||||||
|
@include breakpoint(small down) {
|
||||||
|
width: 95%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $size in $breakpoints
|
||||||
|
{
|
||||||
|
&.max-#{nth($size, 1)}
|
||||||
|
{
|
||||||
|
max-width: nth($size, 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-weight: bold;
|
||||||
|
padding-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-container {
|
||||||
|
overflow-y: auto;
|
||||||
|
max-height: 100%;
|
||||||
|
|
||||||
|
.loader{
|
||||||
|
position:static;
|
||||||
|
transform: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.close {
|
||||||
|
text-align: right;
|
||||||
|
//color: #aaa;
|
||||||
|
float: right;
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 1;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
//color: black;
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-button-container {
|
||||||
|
padding-top: 0.5rem;
|
||||||
|
.button {
|
||||||
|
margin-left: 0.2rem;
|
||||||
|
margin-bottom: 0 !important;
|
||||||
|
padding: 0.6em 0.8em;
|
||||||
|
@include breakpoint(small down) {
|
||||||
|
margin-left: 0.1rem;
|
||||||
|
padding: 0.3em 0.5em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
7
src/client/sass/lib/_pwaAssets.scss
Normal file
7
src/client/sass/lib/_pwaAssets.scss
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
.no-transition{
|
||||||
|
transition: none !important;
|
||||||
|
* {
|
||||||
|
transition: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -13,7 +13,6 @@
|
|||||||
#settings-fragments {
|
#settings-fragments {
|
||||||
> * {
|
> * {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
@ -25,7 +24,6 @@
|
|||||||
.switch {
|
.switch {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: initial;
|
|
||||||
|
|
||||||
@include breakpoint(small down){
|
@include breakpoint(small down){
|
||||||
font-size: 0.6em;
|
font-size: 0.6em;
|
||||||
@ -33,23 +31,19 @@
|
|||||||
@include breakpoint(smedium down){
|
@include breakpoint(smedium down){
|
||||||
font-size: 0.7em;
|
font-size: 0.7em;
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
|
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
&:checked + .slider{
|
&:checked + .slider{
|
||||||
//background-color: #2196F3;
|
//background-color: #2196F3;
|
||||||
&:before{
|
&:before{
|
||||||
transform: translateX(1.5em);
|
transform: translateX(1.5em);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:focus + .slider{
|
&:focus + .slider{
|
||||||
//box-shadow: 0 0 1px #2196F3;
|
//box-shadow: 0 0 1px #2196F3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.slider {
|
.slider {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -61,7 +55,6 @@
|
|||||||
transition: .4s;
|
transition: .4s;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
|
|
||||||
&:before{
|
&:before{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
content: "";
|
content: "";
|
||||||
@ -74,38 +67,30 @@
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
img, svg{
|
img, svg{
|
||||||
width: 1.4em;
|
width: 1.4em;
|
||||||
display: inline;
|
display: inline;
|
||||||
vertical-align: initial;
|
vertical-align: initial;
|
||||||
|
|
||||||
path{
|
path{
|
||||||
stroke-color: inherit;
|
stroke-color: inherit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
label{
|
label{
|
||||||
font-size: 1em !important;
|
font-size: 1em !important;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.setting-row:not(.hidden){
|
.setting-row:not(.hidden){
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
display: flex;
|
padding-top: 0.5em;
|
||||||
padding: 0.5rem 0.4rem;
|
padding-bottom: 0.5em;
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: rgba(195, 195, 195, 0.13);
|
background: rgba(195, 195, 195, 0.13);
|
||||||
|
//display: inline-block;
|
||||||
|
|
||||||
> * {
|
input[type=checkbox]
|
||||||
flex: 1;
|
{
|
||||||
}
|
|
||||||
|
|
||||||
input[type=checkbox] {
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,11 @@
|
|||||||
//@import "lib/_rotate.scss";
|
@import "settings";
|
||||||
|
@import "lib/_rotate.scss";
|
||||||
@import "lib/_share.scss";
|
@import "lib/_share.scss";
|
||||||
//@import "lib/_tabs.scss";
|
@import "lib/_tabs.scss";
|
||||||
@import "lib/_core.scss";
|
@import "lib/_core.scss";
|
||||||
//@import "lib/_flashMessenger.scss";
|
@import "lib/_flashMessenger.scss";
|
||||||
//@import "lib/_framework.scss";
|
@import "lib/_framework.scss";
|
||||||
|
@import "lib/_pwaAssets.scss";
|
||||||
@import "lib/_settingsSite.scss";
|
@import "lib/_settingsSite.scss";
|
||||||
@import "lib/_style.scss";
|
@import "lib/_style.scss";
|
||||||
@import "lib/_theme.scss";
|
@import "lib/_theme.scss";
|
||||||
@ -11,14 +13,19 @@
|
|||||||
@import "wordrotatorTheme";
|
@import "wordrotatorTheme";
|
||||||
|
|
||||||
|
|
||||||
$text-shadow: 0 0.2rem 0.2rem #464646, 0.6rem 0.8rem 0.4rem #00000090;
|
$text-shadow: /*
|
||||||
|
0 0 3px #787878,
|
||||||
|
0 0 10px #000000;
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
0 3px 3px #787878,
|
||||||
|
15px 15px 8px #000000
|
||||||
|
*/
|
||||||
|
0 0.2rem 0.2rem #464646, 0.6rem 0.8rem 0.4rem #00000090;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.no-transition{
|
|
||||||
transition: none !important;
|
|
||||||
* {
|
|
||||||
transition: none !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//ActionBar
|
//ActionBar
|
||||||
nav.top-bar.title-bar {
|
nav.top-bar.title-bar {
|
||||||
@ -81,19 +88,20 @@ nav.top-bar.title-bar {
|
|||||||
|
|
||||||
&.level-counter {
|
&.level-counter {
|
||||||
position: fixed !important;
|
position: fixed !important;
|
||||||
font-size: 1.8rem;
|
font-size: 2rem;
|
||||||
|
|
||||||
&.num-10 {
|
&.num-10 {
|
||||||
font-size: 1.3rem;
|
font-size: 1.4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.num-100 {
|
&.num-100 {
|
||||||
font-size: 0.9rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.num-1000 {
|
&.num-1000 {
|
||||||
font-size: 0.65rem;
|
font-size: 0.7rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.in-main-menu {
|
&.in-main-menu {
|
||||||
@ -347,7 +355,7 @@ $coinTowerDimension: 28px;
|
|||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|
||||||
//text-shadow: $text-shadow;
|
text-shadow: $text-shadow;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -417,7 +425,7 @@ $coinTowerDimension: 28px;
|
|||||||
|
|
||||||
#play-button {
|
#play-button {
|
||||||
@include breakpoint(small down) {
|
@include breakpoint(small down) {
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 2px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
"choose-theme-dialog-title": "Theme auswählen:",
|
"choose-theme-dialog-title": "Theme auswählen:",
|
||||||
"install": "Installieren",
|
"install": "Installieren",
|
||||||
"share-dialog": "Teilen:",
|
"share-dialog": "Teilen:",
|
||||||
"credits-text": "Ein großer Dank geht an Hanna, denn ohne sie sähe die App nicht so aus, wie sie aussieht. Danke für deine guten Vorschlä und Ratschläge für das Design!",
|
"credits-sister-text": "Ich danke meiner Lieblingsschwester, denn ohne Sie würde diese App nicht so aussehen, wie sie aussieht (wahrscheinlich eher schlechter :p)",
|
||||||
"credits-coin-text": "Sound:<br/>Der Münz-Sound ist von der Webseite <a href = '{0}' target='_blank' rel='noopener' class = 'link'>{0}</a>. Alle Rechte für diesen Münz-Sound gehören <a target='_blank' rel='noopener' href = '{0}' class = 'link'>{0}</a>.",
|
"credits-coin-text": "Sound:<br/>Der Münz-Sound ist von der Webseite <a href = '{0}' target='_blank' rel='noopener' class = 'link'>{0}</a>. Alle Rechte für diesen Münz-Sound gehören <a target='_blank' rel='noopener' href = '{0}' class = 'link'>{0}</a>.",
|
||||||
"credits-music-text": "Musik:<br/>Bright And Beautiful - GEMAfreie Musik von <a href = '{0}' target='_blank' rel='noopener' class = 'link'>{0}</a><br/>Licensed under Creative Commons: By Attribution 4.0 International (CC BY 4.0)<br/><a href = '{1}' target='_blank' rel='noopener' class = 'link'>{1}</a><br/>Angepasst (geschnitten) für diese App",
|
"credits-music-text": "Musik:<br/>Bright And Beautiful - GEMAfreie Musik von <a href = '{0}' target='_blank' rel='noopener' class = 'link'>{0}</a><br/>Licensed under Creative Commons: By Attribution 4.0 International (CC BY 4.0)<br/><a href = '{1}' target='_blank' rel='noopener' class = 'link'>{1}</a><br/>Angepasst (geschnitten) für diese App",
|
||||||
"storage-info": "Fortschritt {0} dauerhaft gespeichert",
|
"storage-info": "Fortschritt {0} dauerhaft gespeichert",
|
||||||
@ -48,12 +48,5 @@
|
|||||||
"privacy policy accepted": " akzeptiert",
|
"privacy policy accepted": " akzeptiert",
|
||||||
"message": "Nachricht",
|
"message": "Nachricht",
|
||||||
"send": "Senden",
|
"send": "Senden",
|
||||||
"the message was sent": "Die Nachricht wurde gesendet.",
|
"the message was sent": "Die Nachricht wurde gesendet."
|
||||||
"wr": "WR",
|
|
||||||
|
|
||||||
"tutorial": "Spielregeln",
|
|
||||||
"tutorial-1": "Klicke auf ein Feld, um dieses rotieren zu lassen! Um zu gewinnen, drehe die Segmente so, dass du zwei Wörter lesen kannst.",
|
|
||||||
"tutorial-2": "Die Hilfe löst ein Segment, kostet aber 25 Münzen. Du erhältst 5 Münzen pro gewonnenes Level.",
|
|
||||||
"tutorial-3": "Große Segmente drehst du, indem du diese ziehst.",
|
|
||||||
"you solved the tutorial level!": "Du hast das Tutorial-Level gelöst!"
|
|
||||||
}
|
}
|
||||||
File diff suppressed because one or more lines are too long
39
src/server/public/bundle.js.LICENSE.txt
Normal file
39
src/server/public/bundle.js.LICENSE.txt
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/*!
|
||||||
|
* The buffer module from node.js, for the browser.
|
||||||
|
*
|
||||||
|
* @author Feross Aboukhadijeh <https://feross.org>
|
||||||
|
* @license MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*! *****************************************************************************
|
||||||
|
Copyright (C) Microsoft. All rights reserved.
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||||
|
this file except in compliance with the License. You may obtain a copy of the
|
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions
|
||||||
|
and limitations under the License.
|
||||||
|
***************************************************************************** */
|
||||||
|
|
||||||
|
/*! *****************************************************************************
|
||||||
|
Copyright (c) Microsoft Corporation.
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
purpose with or without fee is hereby granted.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
|
PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
***************************************************************************** */
|
||||||
1
src/server/public/bundle.js.map
Normal file
1
src/server/public/bundle.js.map
Normal file
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<widget android-versionCode="17" id="link.silas.wordrotator" version="1.2.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
<widget android-versionCode="1" id="link.silas.wordrotator" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||||
<name>WordRotator</name>
|
<name>WordRotator</name>
|
||||||
<description>
|
<description>
|
||||||
A word-game
|
A word-game
|
||||||
|
|||||||
86
src/server/public/cordova_plugins.js
vendored
86
src/server/public/cordova_plugins.js
vendored
@ -246,84 +246,6 @@ module.exports = [
|
|||||||
"id": "cordova-sqlite-storage.SQLiteProxy",
|
"id": "cordova-sqlite-storage.SQLiteProxy",
|
||||||
"pluginId": "cordova-sqlite-storage",
|
"pluginId": "cordova-sqlite-storage",
|
||||||
"runs": true
|
"runs": true
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "plugins/cordova-plugin-statusbar/www/statusbar.js",
|
|
||||||
"id": "cordova-plugin-statusbar.statusbar",
|
|
||||||
"pluginId": "cordova-plugin-statusbar",
|
|
||||||
"clobbers": [
|
|
||||||
"window.StatusBar"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "plugins/cordova-plugin-statusbar/src/browser/StatusBarProxy.js",
|
|
||||||
"id": "cordova-plugin-statusbar.StatusBarProxy",
|
|
||||||
"pluginId": "cordova-plugin-statusbar",
|
|
||||||
"runs": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "plugins/cordova-plugin-calendar/www/Calendar.js",
|
|
||||||
"id": "cordova-plugin-calendar.Calendar",
|
|
||||||
"pluginId": "cordova-plugin-calendar",
|
|
||||||
"clobbers": [
|
|
||||||
"Calendar"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "plugins/cordova-plugin-badge/www/badge.js",
|
|
||||||
"id": "cordova-plugin-badge.Badge",
|
|
||||||
"pluginId": "cordova-plugin-badge",
|
|
||||||
"clobbers": [
|
|
||||||
"cordova.plugins.notification.badge"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "plugins/cordova-plugin-badge/src/browser/favico.min.js",
|
|
||||||
"id": "cordova-plugin-badge.Badge.Favico",
|
|
||||||
"pluginId": "cordova-plugin-badge",
|
|
||||||
"clobbers": [
|
|
||||||
"cordova.plugins.notification.badge.Favico"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "plugins/cordova-plugin-badge/src/browser/BadgeProxy.js",
|
|
||||||
"id": "cordova-plugin-badge.Badge.Proxy",
|
|
||||||
"pluginId": "cordova-plugin-badge",
|
|
||||||
"runs": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "plugins/cordova-plugin-local-notification/www/local-notification.js",
|
|
||||||
"id": "cordova-plugin-local-notification.LocalNotification",
|
|
||||||
"pluginId": "cordova-plugin-local-notification",
|
|
||||||
"clobbers": [
|
|
||||||
"cordova.plugins.notification.local"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "plugins/cordova-plugin-local-notification/www/local-notification-core.js",
|
|
||||||
"id": "cordova-plugin-local-notification.LocalNotification.Core",
|
|
||||||
"pluginId": "cordova-plugin-local-notification",
|
|
||||||
"clobbers": [
|
|
||||||
"cordova.plugins.notification.local.core",
|
|
||||||
"plugin.notification.local.core"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "plugins/cordova-plugin-local-notification/www/local-notification-util.js",
|
|
||||||
"id": "cordova-plugin-local-notification.LocalNotification.Util",
|
|
||||||
"pluginId": "cordova-plugin-local-notification",
|
|
||||||
"merges": [
|
|
||||||
"cordova.plugins.notification.local.core",
|
|
||||||
"plugin.notification.local.core"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "plugins/cordova-plugin-background-fetch/www/BackgroundFetch.js",
|
|
||||||
"id": "cordova-plugin-background-fetch.BackgroundFetch",
|
|
||||||
"pluginId": "cordova-plugin-background-fetch",
|
|
||||||
"clobbers": [
|
|
||||||
"window.BackgroundFetch"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
module.exports.metadata =
|
module.exports.metadata =
|
||||||
@ -335,13 +257,7 @@ module.exports.metadata =
|
|||||||
"cordova-plugin-tts": "0.2.3",
|
"cordova-plugin-tts": "0.2.3",
|
||||||
"cordova-plugin-device": "2.0.3",
|
"cordova-plugin-device": "2.0.3",
|
||||||
"cordova-plugin-file": "6.0.2",
|
"cordova-plugin-file": "6.0.2",
|
||||||
"cordova-sqlite-storage": "5.1.0",
|
"cordova-sqlite-storage": "5.1.0"
|
||||||
"cordova-plugin-statusbar": "2.4.3",
|
|
||||||
"cordova-plugin-calendar": "5.1.5",
|
|
||||||
"cordova-plugin-badge": "0.8.8",
|
|
||||||
"cordova-plugin-local-notification": "0.9.0-beta.2",
|
|
||||||
"cordova-plugin-background-fetch": "6.1.1",
|
|
||||||
"cordova-plugin-wkwebview-file-xhr": "3.0.0"
|
|
||||||
}
|
}
|
||||||
// BOTTOM OF METADATA
|
// BOTTOM OF METADATA
|
||||||
});
|
});
|
||||||
@ -1,24 +1 @@
|
|||||||
<div class="window-container">
|
<div class="window-container"> <div class="flex-container"> <span class="window-resize edge nw" data-direction="-1,-1"> </span> <span class="window-resize top grow" data-direction="0,-1"> </span> <span class="window-resize edge ne" data-direction="1,-1"> </span> </div> <div class="flex-container grow overflow-hidden"> <div class="window-resize left" data-direction="-1,0"> </div> <div class="grow flex-container flex-dir-column"> <h4 id="title"> </h4> <div class="window grow"> <span id="child-view"></span> </div> </div> <div class="window-resize right" data-direction="1,0"> </div> </div> <div class="flex-container"> <div class="window-resize edge sw" data-direction="-1,1"> </div> <div class="window-resize bottom grow" data-direction="0,1"> </div> <div class="window-resize edge se" data-direction="1,1"> </div> </div> </div>
|
||||||
<div class="flex-container">
|
|
||||||
<span class="window-resize edge nw" data-direction="-1,-1"> </span>
|
|
||||||
<span class="window-resize top grow" data-direction="0,-1"> </span>
|
|
||||||
<span class="window-resize edge ne" data-direction="1,-1"> </span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex-container grow overflow-hidden">
|
|
||||||
<div class="window-resize left" data-direction="-1,0"> </div>
|
|
||||||
<div class="grow flex-container flex-dir-column max-width-100">
|
|
||||||
<div class="flex-container"><h4 id="title" class="grow"> </h4></div>
|
|
||||||
<div class="window">
|
|
||||||
<span id="child-view"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="window-resize right" data-direction="1,0"> </div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex-container">
|
|
||||||
<div class="window-resize edge sw" data-direction="-1,1"> </div>
|
|
||||||
<div class="window-resize bottom grow" data-direction="0,1"> </div>
|
|
||||||
<div class="window-resize edge se" data-direction="1,1"> </div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@ -1,59 +1 @@
|
|||||||
<div class="flex-container alphabetic-list">
|
<div class="flex-container alphabetic-list"> <article class="grow alphabetic-list-container"> <span class="alphabet-section A"></span> <span class="alphabet-section B"></span> <span class="alphabet-section C"></span> <span class="alphabet-section D"></span> <span class="alphabet-section E"></span> <span class="alphabet-section F"></span> <span class="alphabet-section G"></span> <span class="alphabet-section H"></span> <span class="alphabet-section I"></span> <span class="alphabet-section J"></span> <span class="alphabet-section K"></span> <span class="alphabet-section L"></span> <span class="alphabet-section M"></span> <span class="alphabet-section N"></span> <span class="alphabet-section O"></span> <span class="alphabet-section P"></span> <span class="alphabet-section Q"></span> <span class="alphabet-section R"></span> <span class="alphabet-section S"></span> <span class="alphabet-section T"></span> <span class="alphabet-section U"></span> <span class="alphabet-section V"></span> <span class="alphabet-section W"></span> <span class="alphabet-section X"></span> <span class="alphabet-section Y"></span> <span class="alphabet-section Z"></span> </article> <span class="alphabetic-list-sidealphabet"> <span class="alphabet-scroll-to" data-letter="A">A</span> <span class="alphabet-scroll-to" data-letter="B">B</span> <span class="alphabet-scroll-to" data-letter="C">C</span> <span class="alphabet-scroll-to" data-letter="D">D</span> <span class="alphabet-scroll-to" data-letter="E">E</span> <span class="alphabet-scroll-to" data-letter="F">F</span> <span class="alphabet-scroll-to" data-letter="G">G</span> <span class="alphabet-scroll-to" data-letter="H">H</span> <span class="alphabet-scroll-to" data-letter="I">I</span> <span class="alphabet-scroll-to" data-letter="J">J</span> <span class="alphabet-scroll-to" data-letter="K">K</span> <span class="alphabet-scroll-to" data-letter="L">L</span> <span class="alphabet-scroll-to" data-letter="M">M</span> <span class="alphabet-scroll-to" data-letter="N">N</span> <span class="alphabet-scroll-to" data-letter="O">O</span> <span class="alphabet-scroll-to" data-letter="P">P</span> <span class="alphabet-scroll-to" data-letter="Q">Q</span> <span class="alphabet-scroll-to" data-letter="R">R</span> <span class="alphabet-scroll-to" data-letter="S">S</span> <span class="alphabet-scroll-to" data-letter="T">T</span> <span class="alphabet-scroll-to" data-letter="U">U</span> <span class="alphabet-scroll-to" data-letter="V">V</span> <span class="alphabet-scroll-to" data-letter="W">W</span> <span class="alphabet-scroll-to" data-letter="X">X</span> <span class="alphabet-scroll-to" data-letter="Y">Y</span> <span class="alphabet-scroll-to" data-letter="Z">Z</span> </span> </div>
|
||||||
<article class="grow alphabetic-list-container">
|
|
||||||
<span id ='alphabetic-list-heading'></span>
|
|
||||||
<span class='alphabet-section A'></span>
|
|
||||||
<span class='alphabet-section B'></span>
|
|
||||||
<span class='alphabet-section C'></span>
|
|
||||||
<span class='alphabet-section D'></span>
|
|
||||||
<span class='alphabet-section E'></span>
|
|
||||||
<span class='alphabet-section F'></span>
|
|
||||||
<span class='alphabet-section G'></span>
|
|
||||||
<span class='alphabet-section H'></span>
|
|
||||||
<span class='alphabet-section I'></span>
|
|
||||||
<span class='alphabet-section J'></span>
|
|
||||||
<span class='alphabet-section K'></span>
|
|
||||||
<span class='alphabet-section L'></span>
|
|
||||||
<span class='alphabet-section M'></span>
|
|
||||||
<span class='alphabet-section N'></span>
|
|
||||||
<span class='alphabet-section O'></span>
|
|
||||||
<span class='alphabet-section P'></span>
|
|
||||||
<span class='alphabet-section Q'></span>
|
|
||||||
<span class='alphabet-section R'></span>
|
|
||||||
<span class='alphabet-section S'></span>
|
|
||||||
<span class='alphabet-section T'></span>
|
|
||||||
<span class='alphabet-section U'></span>
|
|
||||||
<span class='alphabet-section V'></span>
|
|
||||||
<span class='alphabet-section W'></span>
|
|
||||||
<span class='alphabet-section X'></span>
|
|
||||||
<span class='alphabet-section Y'></span>
|
|
||||||
<span class='alphabet-section Z'></span>
|
|
||||||
</article>
|
|
||||||
<span class="alphabetic-list-sidealphabet">
|
|
||||||
<span class="alphabet-scroll-to" data-letter="A">A</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="B">B</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="C">C</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="D">D</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="E">E</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="F">F</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="G">G</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="H">H</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="I">I</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="J">J</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="K">K</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="L">L</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="M">M</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="N">N</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="O">O</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="P">P</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="Q">Q</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="R">R</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="S">S</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="T">T</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="U">U</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="V">V</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="W">W</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="X">X</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="Y">Y</span>
|
|
||||||
<span class="alphabet-scroll-to" data-letter="Z">Z</span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
@ -1,17 +1 @@
|
|||||||
<div>
|
<div> <h1 id="username"></h1> <div class="grid-x"> <div class="small-6" id="has-role-container"> <div class="grid-x has-role" id="has-role-template"> <span class="small-10 role-name"></span> <button class="small-2 button remove-role">-></button> </div> </div> <div class="small-6" id="available-role-container"> <div class="grid-x has-role" id="available-role-template"> <button class="small-2 add-role button"><-</button> <span class="small-10 role-name"></span> </div> </div> </div> </div>
|
||||||
<h1 id = "username"></h1>
|
|
||||||
<div class="grid-x">
|
|
||||||
<div class="small-6" id = "has-role-container">
|
|
||||||
<div class="grid-x has-role" id = "has-role-template">
|
|
||||||
<span class="small-10 role-name"></span>
|
|
||||||
<button class="small-2 button remove-role">-></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="small-6" id = "available-role-container">
|
|
||||||
<div class="grid-x has-role" id = "available-role-template">
|
|
||||||
<button class="small-2 add-role button"><-</button>
|
|
||||||
<span class="small-10 role-name"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@ -1,7 +1 @@
|
|||||||
<div>
|
<div> <div id="choose-container"> <div id="choose-value-template" class="choose-dialog-value-row grid-x"> <div class="choose-dialog-value column small-12"></div> </div> </div> </div>
|
||||||
<div id='choose-container'>
|
|
||||||
<div id='choose-value-template' class = 'choose-dialog-value-row grid-x'>
|
|
||||||
<div class='choose-dialog-value column small-12'></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@ -1,21 +1 @@
|
|||||||
<h1 class = "translation">contact</h1>
|
<h1 class="translation">contact</h1> <p id="contactText"> </p> <form class="grid-x" id="contact-form"> <label class="small-12 medium-6 right"> <input type="checkbox" value="1" required name="policy"> <span> <a class="link translation" href="/?s=privacyPolicy">privacy-policy</a> <span class="translation">privacy policy accepted</span> </span> </label> <label class="small-12 medium-6"> <input type="email" required name="email"> <span class="translation">e-mail</span> </label> <label class="small-12"> <textarea required name="message"></textarea> <span class="translation">message</span> </label> <button class="small-12 button translation">send</button> </form>
|
||||||
<p id = "contactText">
|
|
||||||
</p>
|
|
||||||
<form class="grid-x" id = "contact-form">
|
|
||||||
<label class="small-12 medium-6 right">
|
|
||||||
<input type="checkbox" value="1" required name="policy">
|
|
||||||
<span>
|
|
||||||
<a class = "link translation" href="/?s=privacyPolicy">privacy-policy</a>
|
|
||||||
<span class = "translation">privacy policy accepted</span>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
<label class = "small-12 medium-6">
|
|
||||||
<input type="email" required name="email">
|
|
||||||
<span class="translation">e-mail</span>
|
|
||||||
</label>
|
|
||||||
<label class="small-12">
|
|
||||||
<textarea required name="message"></textarea>
|
|
||||||
<span class="translation">message</span>
|
|
||||||
</label>
|
|
||||||
<button class="small-12 button translation">send</button>
|
|
||||||
</form>
|
|
||||||
@ -1,7 +1 @@
|
|||||||
<div class="grid-x grid-padding-x grid-padding-y grow grid-container" id="main-content-container">
|
<div class="grid-x grid-padding-x grid-padding-y grow grid-container" id="main-content-container"> <div class="cell small-12 max-height-100" id="main-content"> <span id="site-content"> </span> </div> </div>
|
||||||
<div class="cell small-12 max-height-100" id="main-content">
|
|
||||||
<!--site-_content wird ersetzt, daher keine wirklichen attribute-->
|
|
||||||
<span id="site-content">
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@ -1,5 +1 @@
|
|||||||
<div>
|
<div> <p class="translation" data-translation="credits-sister-text"></p> <p class="translation" data-translation="credits-coin-text" data-translation-args='["https://www.freesfx.co.uk/"]'></p> <p class="translation" data-translation="credits-music-text" data-translation-args='["https://audeeyah.de", "http://creativecommons.org/licenses/by/4.0/"]'></p> </div>
|
||||||
<p class="translation" data-translation="credits-text"></p>
|
|
||||||
<p class="translation" data-translation="credits-coin-text" data-translation-args='["https://www.freesfx.co.uk/"]'></p>
|
|
||||||
<p class="translation" data-translation="credits-music-text" data-translation-args='["https://audeeyah.de", "http://creativecommons.org/licenses/by/4.0/"]'></p>
|
|
||||||
</div>
|
|
||||||
@ -1,3 +1 @@
|
|||||||
<div class = 'max-height flex-center'>
|
<div class="max-height flex-center"> <div data-translation="game-ended" class="center translation"></div> </div>
|
||||||
<div data-translation="game-ended" class = 'center translation'></div>
|
|
||||||
</div>
|
|
||||||
@ -1,26 +1 @@
|
|||||||
<article >
|
<article> <section id="forgot-password"> <h2 class="translation">password forgotten</h2> <form id="forgot-password-form"> <label> <input type="text" name="email" required> <span class="translation">Email</span> </label> <button class="translation button">Request new password</button> </form> </section> <section id="reset-password" class="hidden"> <h2 class="translation">reset password</h2> <form id="reset-password-form"> <label> <input type="password" name="password1" required> <span class="translation">Password</span> </label> <label> <input type="password" name="password2" required> <span class="translation">Repeat Password</span> </label> <button class="translation button">Reset password</button> </form> </section> </article>
|
||||||
<section id = "forgot-password">
|
|
||||||
<h2 class="translation">password forgotten</h2>
|
|
||||||
<form id="forgot-password-form">
|
|
||||||
<label>
|
|
||||||
<input type="text" name='email' required>
|
|
||||||
<span class="translation">Email</span>
|
|
||||||
</label>
|
|
||||||
<button class="translation button">Request new password</button>
|
|
||||||
</form>
|
|
||||||
</section>
|
|
||||||
<section id = "reset-password" class="hidden">
|
|
||||||
<h2 class="translation">reset password</h2>
|
|
||||||
<form id="reset-password-form">
|
|
||||||
<label>
|
|
||||||
<input type="password" name='password1' required>
|
|
||||||
<span class="translation">Password</span>
|
|
||||||
</label>
|
|
||||||
<label>
|
|
||||||
<input type="password" name='password2' required>
|
|
||||||
<span class="translation">Repeat Password</span>
|
|
||||||
</label>
|
|
||||||
<button class="translation button">Reset password</button>
|
|
||||||
</form>
|
|
||||||
</section>
|
|
||||||
</article>
|
|
||||||
@ -1,11 +1 @@
|
|||||||
<div>
|
<div> <h2>Impressum</h2> <p>Silas Günther<br/> Mariabrunnstraße 48<br/> 52064 Aachen<br/> Deutschland </p> <p>E-Mail: <a href="mailto:wordRotator@silas.link">wordRotator@silas.link</a><br/> <a href="?s=contact" class="link" target="_blank">Kontaktformular</a> </p> </div>
|
||||||
<h2>Impressum</h2>
|
|
||||||
<p>Silas Günther<br />
|
|
||||||
Mariabrunnstraße 48<br />
|
|
||||||
52064 Aachen<br/>
|
|
||||||
Deutschland
|
|
||||||
</p>
|
|
||||||
<p>E-Mail: <a href="mailto:wordRotator@silas.link">wordRotator@silas.link</a><br/>
|
|
||||||
<a href = "?s=contact" class = "link">Kontaktformular</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
@ -1,54 +1 @@
|
|||||||
<div class='max-height overflow-hidden'>
|
<div class="max-height overflow-hidden"> <div id="segment-leaf-template" class="segment segment-leaf"> <div class="leaf-element"></div> </div> <div id="segment-parent-template" class="segment segment-parent"> <div class="child-container"></div> </div> <div id="segment-row-template" class="segment segment-row"> <div class="child-container"></div> </div> <div id="segment-column-template" class="segment segment-column"> <div class="child-container"></div> </div> <div id="segment-triangle-template" class="segment segment-triangle"> <div class="child-container"></div> </div> <div id="tutorial-pointer"></div> <div class="max-height fill-me"> <div class="height-20 no-transition tutorial-text center flex-center hidden"> <div class="step-1 hidden translation" data-translation="tutorial-step-1"></div> <div class="step-2 hidden translation" data-translation="tutorial-step-2"></div> <div class="step-3 hidden translation" data-translation="tutorial-step-3"></div> <div class="step-4 hidden translation" data-translation="tutorial-step-4"></div> </div> <div class="height-20 show-when-won center flex-center fill-me" style="min-height:45px"> <div class="grow max-width"> <b class="translation" data-translation="won" id="won-text"></b> </div> <div id="coin-container"> <div id="coin-template" class="coin" style="opacity:0"> <img src="img/coin.png"/> </div> </div> </div> <div class="flex-center level-container grow"> <div id="level"> </div> </div> <div class="show-when-won flex-center height-20"> <button class="button max-width translation" id="continue-button" data-translation="continue"></button> </div> </div> <div class="tutorial-blanket"></div> </div>
|
||||||
<!-- Templates for segments-->
|
|
||||||
<div id='segment-leaf-template' class='segment segment-leaf'>
|
|
||||||
<div class='leaf-element'></div>
|
|
||||||
</div>
|
|
||||||
<div id='segment-parent-template' class='segment segment-parent'>
|
|
||||||
<div class='child-container'></div>
|
|
||||||
</div>
|
|
||||||
<div id='segment-row-template' class='segment segment-row'>
|
|
||||||
<div class='child-container'></div>
|
|
||||||
</div>
|
|
||||||
<div id='segment-column-template' class='segment segment-column'>
|
|
||||||
<div class='child-container'></div>
|
|
||||||
</div>
|
|
||||||
<div id='segment-triangle-template' class='segment segment-triangle'>
|
|
||||||
<div class='child-container'></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id = 'tutorial-pointer'></div>
|
|
||||||
<!-- Site Content -->
|
|
||||||
<div class='max-height fill-me'>
|
|
||||||
<!-- <div class="text-right max-width">-->
|
|
||||||
<!-- <button class="button show-while-playing" id='help-button'>-->
|
|
||||||
<!-- <img src = "../../img/help.png"/>-->
|
|
||||||
<!-- </button>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<div class = 'height-20 no-transition tutorial-text center flex-center hidden'>
|
|
||||||
<div class = 'step-1 hidden translation' data-translation="tutorial-step-1"></div>
|
|
||||||
<div class = 'step-2 hidden translation' data-translation="tutorial-step-2"></div>
|
|
||||||
<div class = 'step-3 hidden translation' data-translation="tutorial-step-3"></div>
|
|
||||||
<div class = 'step-4 hidden translation' data-translation="tutorial-step-4"></div>
|
|
||||||
</div>
|
|
||||||
<div class='height-20 show-when-won center flex-center fill-me' style = 'min-height: 45px'>
|
|
||||||
<div class = 'grow max-width'>
|
|
||||||
<b class="translation" data-translation="won" id="won-text"></b>
|
|
||||||
</div>
|
|
||||||
<div id='coin-container'>
|
|
||||||
<div id='coin-template' class='coin' style="opacity: 0">
|
|
||||||
<img src='img/coin.png'/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex-center level-container grow">
|
|
||||||
<div id='level'>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class='show-when-won flex-center height-20'>
|
|
||||||
<button class='button max-width translation' id='continue-button' data-translation="continue"></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class = 'tutorial-blanket'></div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
@ -1,21 +1 @@
|
|||||||
<article >
|
<article> <section> <h2 class="translation">Login</h2> <form id="login-form"> <label> <input type="text" name="email" required> <span class="translation">Email</span> </label> <label> <input type="password" name="password" required> <span class="translation">password</span> </label> <label> <input type="checkbox" checked="checked" name="saveLogin"> <span class="translation">stay logged in</span> </label> <button class="translation button">Login</button> </form> <button class="translation link" id="forgot-pw">Passwort vergessen?</button> </section> </article>
|
||||||
<section>
|
|
||||||
<h2 class="translation">Login</h2>
|
|
||||||
<form id="login-form">
|
|
||||||
<label>
|
|
||||||
<input type="text" name='email' required>
|
|
||||||
<span class="translation">Email</span>
|
|
||||||
</label>
|
|
||||||
<label>
|
|
||||||
<input type="password" name='password' required>
|
|
||||||
<span class="translation">password</span>
|
|
||||||
</label>
|
|
||||||
<label>
|
|
||||||
<input type="checkbox" checked name='saveLogin'>
|
|
||||||
<span class="translation">stay logged in</span>
|
|
||||||
</label>
|
|
||||||
<button class="translation button">Login</button>
|
|
||||||
</form>
|
|
||||||
<button class="translation link" id = "forgot-pw">Passwort vergessen?</button>
|
|
||||||
</section>
|
|
||||||
</article>
|
|
||||||
@ -1,39 +1 @@
|
|||||||
<div class='max-height flex-center'>
|
<div class="max-height flex-center"> <div id="segment-leaf-template" class="segment segment-leaf"> <div class="leaf-element"></div> </div> <div id="segment-parent-template" class="segment segment-parent"> <div class="child-container"></div> </div> <div id="segment-row-template" class="segment segment-row"> <div class="child-container"></div> </div> <div id="segment-triangle-template" class="segment segment-triangle"> <div class="child-container"></div> </div> <div class="height-60 max-width flex-center relative-level-number"> <div id="level"></div> <span id="level-number-container" class="visible in-main-menu"> <span id="level-number">1</span> </span> </div> <div class="height-30 flex-center fill-me"> <button class="button grow text-center" id="play-button"><span class="translation" data-translation="play"></span></button> <div class="max-width line-height-1 fill-me vertical"> <label class="switch"> <div data-view="img/speaker.svg"></div> <input type="checkbox" class="setting" id="play-sound"> <span class="slider"></span> </label> <div class="grow center" id="share-button"><span data-view="img/share.svg"></span></div> <label class="switch right"> <div data-view="img/music.svg"></div> <input type="checkbox" class="setting" id="play-music"> <span class="slider"></span> </label> </div> </div> </div>
|
||||||
<!--<b>WordRotator</b>-->
|
|
||||||
|
|
||||||
<div id='segment-leaf-template' class='segment segment-leaf'>
|
|
||||||
<div class='leaf-element'></div>
|
|
||||||
</div>
|
|
||||||
<div id='segment-parent-template' class='segment segment-parent'>
|
|
||||||
<div class='child-container'></div>
|
|
||||||
</div>
|
|
||||||
<div id='segment-row-template' class='segment segment-row'>
|
|
||||||
<div class='child-container'></div>
|
|
||||||
</div>
|
|
||||||
<div id='segment-triangle-template' class='segment segment-triangle'>
|
|
||||||
<div class='child-container'></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class='height-60 max-width flex-center relative-level-number'>
|
|
||||||
<div id='level'></div>
|
|
||||||
<span id='level-number-container' class='visible in-main-menu'>
|
|
||||||
<span id='level-number'>1</span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class='height-30 flex-center fill-me'>
|
|
||||||
<button class='button grow text-center' id='play-button'><span class="translation" data-translation="play"></span></button>
|
|
||||||
<div class='max-width line-height-1 fill-me vertical'>
|
|
||||||
<label class="switch">
|
|
||||||
<div data-view="img/speaker.svg"></div>
|
|
||||||
<input type="checkbox" class="setting" id="play-sound">
|
|
||||||
<span class="slider"></span>
|
|
||||||
</label>
|
|
||||||
<div class="grow center" id = "share-button"><span data-view="img/share.svg"></span></div>
|
|
||||||
<label class="switch right">
|
|
||||||
<div data-view="img/music.svg"></div>
|
|
||||||
<input type="checkbox" class="setting" id="play-music">
|
|
||||||
<span class="slider"></span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@ -1,12 +1 @@
|
|||||||
<!--<div class="flex-dir-column flex-container height-100">-->
|
<div class="grid-container flex-dir-column flex-container height-100" id="main-content-container"> <span id="navbar-fragment"></span> <div class="grid-x grid-padding-x grid-padding-y grow max-height-100"> <div class="cell small-12" id="main-content"> <span id="site-content"> </span> </div> </div> </div>
|
||||||
<div class="grid-container flex-dir-column flex-container height-100" id="main-content-container">
|
|
||||||
<span id="navbar-fragment"></span>
|
|
||||||
<div class="grid-x grid-padding-x grid-padding-y grow max-height-100">
|
|
||||||
<div class="cell small-12" id="main-content">
|
|
||||||
<!--site-_content wird ersetzt, daher keine wirklichen attribute-->
|
|
||||||
<span id="site-content">
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!--</div>-->
|
|
||||||
@ -1,37 +1 @@
|
|||||||
<nav class="top-bar">
|
<nav class="top-bar"> <img class="background-img"> <span class="grid-container width-100"> <span class="grid-padding-x"> <span class="small-12 cell"> <div class="hidden back-button"> <img data-view="img/arrowLeft.svg" alt="back"> </div> <div class="hidden logo"> <img class="logo-img"> </div> <div class="top-bar-title grow"> <strong> <a class="hidden-link" href="?"> <span class="" id="title-element-container"></span> </a> </strong> </div> <div id="navbar-close-listener-container" style="display:none"> <div id="navbar-close-listener"></div> </div> <ul class="dropdown menu horizontal navbar-menu" id="navbar-menu-visible"> <div id="navbar-menu-visible-close-listener"></div> </ul> <span id="responsive-menu-toggle" class="right"> <button class="menu-icon" type="button" data-toggle=""></button> </span> <div id="responsive-menu"> <ul class="menu vertical accordion-menu navbar-menu hidden-menu" id="navbar-menu-hidden"> </ul> </div> </span> </span> </span> </nav>
|
||||||
<img class="background-img">
|
|
||||||
<span class="grid-container width-100">
|
|
||||||
<span class="grid-padding-x ">
|
|
||||||
<span class="small-12 cell">
|
|
||||||
<div class="hidden back-button">
|
|
||||||
<img data-view="img/arrowLeft.svg" alt="back">
|
|
||||||
</div>
|
|
||||||
<div class="hidden logo">
|
|
||||||
<img class = "logo-img">
|
|
||||||
</div>
|
|
||||||
<div class="top-bar-title grow">
|
|
||||||
<strong>
|
|
||||||
<a class="hidden-link" href="?">
|
|
||||||
<span class="" id='title-element-container'></span>
|
|
||||||
</a>
|
|
||||||
</strong>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id='navbar-close-listener-container' style="display: none">
|
|
||||||
<div id='navbar-close-listener'></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<ul class="dropdown menu horizontal navbar-menu" id='navbar-menu-visible'>
|
|
||||||
<div id='navbar-menu-visible-close-listener'></div>
|
|
||||||
</ul>
|
|
||||||
<span id="responsive-menu-toggle" class="right">
|
|
||||||
<button class="menu-icon" type="button" data-toggle=""></button>
|
|
||||||
</span>
|
|
||||||
<div id="responsive-menu">
|
|
||||||
<ul class="menu vertical accordion-menu navbar-menu hidden-menu" id="navbar-menu-hidden">
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</nav>
|
|
||||||
@ -1,9 +1 @@
|
|||||||
<br/>
|
<br/> <br/> <br/> <br/> <br/> <h2 class="translation">Not allowed</h2> <p class="translation">You don't have the rights to do this!</p> <p class="translation">If you are not logged in, please log in and try again.</p>
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
<h2 class="translation">Not allowed</h2>
|
|
||||||
<p class="translation">You don't have the rights to do this!</p>
|
|
||||||
<p class="translation">If you are not logged in, please log in and try again.</p>
|
|
||||||
File diff suppressed because one or more lines are too long
@ -1,28 +1 @@
|
|||||||
<article >
|
<article> <section> <h2 class="translation">registration</h2> <form id="registration-form"> <label> <input type="text" name="email" required> <span class="translation">Email</span> </label> <label> <input type="text" name="username" required> <span class="translation">username</span> </label> <label> <input type="password" name="password" required> <span class="translation">password</span> </label> <label> <input type="password" name="password2" required> <span class="translation">retype password</span> </label> <label> <input type="checkbox" name="agbAccepted" required> <span class="translation">I have read and accepted the terms and conditions.</span> </label> <button class="translation button">registration</button> </form> </section> </article>
|
||||||
<section>
|
|
||||||
<h2 class="translation">registration</h2>
|
|
||||||
<form id = "registration-form">
|
|
||||||
<label>
|
|
||||||
<input type="text" name='email' required>
|
|
||||||
<span class="translation">Email</span>
|
|
||||||
</label>
|
|
||||||
<label>
|
|
||||||
<input type="text" name='username' required>
|
|
||||||
<span class="translation">username</span>
|
|
||||||
</label>
|
|
||||||
<label>
|
|
||||||
<input type="password" name='password' required>
|
|
||||||
<span class="translation">password</span>
|
|
||||||
</label>
|
|
||||||
<label>
|
|
||||||
<input type="password" name='password2' required>
|
|
||||||
<span class="translation">retype password</span>
|
|
||||||
</label>
|
|
||||||
<label>
|
|
||||||
<input type="checkbox" name='agbAccepted' required>
|
|
||||||
<span class="translation">I have read and accepted the terms and conditions.</span>
|
|
||||||
</label>
|
|
||||||
<button class="translation button">registration</button>
|
|
||||||
</form>
|
|
||||||
</section>
|
|
||||||
</article>
|
|
||||||
@ -1,10 +1 @@
|
|||||||
<div>
|
<div> <form id="user-search"> <input type="text" id="username-input"> </form> <div id="user-container"> <div id="user-template"> <span class="name"></span> </div> </div> </div>
|
||||||
<form id = "user-search">
|
|
||||||
<input type = "text" id = "username-input">
|
|
||||||
</form>
|
|
||||||
<div id = "user-container">
|
|
||||||
<div id = "user-template">
|
|
||||||
<span class = "name"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@ -1,61 +1 @@
|
|||||||
<div class='max-height fill-me'>
|
<div class="max-height fill-me"> <div class="grid-x max-width grow flex-center"> <div class="columns small-centered small-12 smedium-11 medium-9 large-7"> <label class="switch grid-x setting-row"> <span class="columns small-6 translation">sound</span> <span class="columns small-6 text-right"> <input type="checkbox" class="setting" id="play-sound" name="play-sound" value="1" data-default="1"> <span class="slider"></span> </span> </label> <label class="switch grid-x setting-row"> <span class="columns small-6 translation">music</span> <span class="columns small-6 text-right"> <input type="checkbox" class="setting" id="play-music" name="play-music" value="1" data-default="1"> <span class="slider"></span> </span> </label> <div class="grid-x setting-row" id="credits-button"> <span class="columns small-6 translation">credits</span> <span class="columns small-6 text-right translation">></span> </div> <div class="grid-x setting-row" id="privacy-policy-button"> <span class="columns small-6 translation">privacy-policy</span> <span class="columns small-6 text-right translation">></span> </div> <div class="grid-x setting-row" id="impressum-button"> <span class="columns small-6 translation">impressum</span> <span class="columns small-6 text-right translation">></span> </div> <div class="grid-x setting-row" id="contact-button"> <span class="columns small-6 translation">contact</span> <span class="columns small-6 text-right translation">></span> </div> <label class="switch grid-x setting-row"> <span class="columns small-6 translation">track</span> <span class="columns small-6 text-right"> <input type="checkbox" class="setting" id="track-switch" name="matomoShouldTrack" value="1" data-default="1" data-raw="1"> <span class="slider"></span> </span> </label> <div class="grid-x setting-row hidden"> <span class="column small-10" id="storage-info"></span> <span class="columns small-2 text-right translation">></span> </div> <div class="grid-x setting-row"> <span class="column small-6 translation">version-label</span> <span class="column small-6 text-right" id="version-info"></span> </div> <button id="reset-levels" class="button hidden">reset-levels</button> </div> </div> </div>
|
||||||
<div class='grid-x max-width grow flex-center'>
|
|
||||||
<div class='columns small-centered small-12 smedium-11 medium-9 large-7'>
|
|
||||||
<label class="switch grid-x setting-row">
|
|
||||||
<span class='columns small-6 translation'>sound</span>
|
|
||||||
<span class='columns small-6 text-right'>
|
|
||||||
<input type="checkbox" class="setting" id="play-sound" name='play-sound' value="1"
|
|
||||||
data-default="1">
|
|
||||||
<span class="slider"></span>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
<label class="switch grid-x setting-row">
|
|
||||||
<span class='columns small-6 translation' >music</span>
|
|
||||||
<span class='columns small-6 text-right'>
|
|
||||||
<input type="checkbox" class="setting" id="play-music" name='play-music' value="1"
|
|
||||||
data-default="1">
|
|
||||||
<span class="slider"></span>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
<div class='grid-x setting-row' id='tutorial-button'>
|
|
||||||
<span class='columns small-6 translation'>tutorial</span>
|
|
||||||
<span class='columns small-6 text-right translation'>></span>
|
|
||||||
</div>
|
|
||||||
<div class='grid-x setting-row' id='credits-button'>
|
|
||||||
<span class='columns small-6 translation' >credits</span>
|
|
||||||
<span class='columns small-6 text-right translation'>></span>
|
|
||||||
</div>
|
|
||||||
<div class='grid-x setting-row' id='privacy-policy-button'>
|
|
||||||
<span class='columns small-6 translation'>privacy-policy</span>
|
|
||||||
<span class='columns small-6 text-right translation'>></span>
|
|
||||||
</div>
|
|
||||||
<div class='grid-x setting-row' id='impressum-button'>
|
|
||||||
<span class='columns small-6 translation' >impressum</span>
|
|
||||||
<span class='columns small-6 text-right translation'>></span>
|
|
||||||
</div>
|
|
||||||
<div class='grid-x setting-row' id='contact-button'>
|
|
||||||
<span class='columns small-6 translation'>contact</span>
|
|
||||||
<span class='columns small-6 text-right translation'>></span>
|
|
||||||
</div>
|
|
||||||
<label class="switch grid-x setting-row">
|
|
||||||
<span class='columns small-6 translation'>track</span>
|
|
||||||
<span class='columns small-6 text-right'>
|
|
||||||
<input type="checkbox" class="setting" id="track-switch" name='matomoShouldTrack' value="1"
|
|
||||||
data-default="1" data-raw="1">
|
|
||||||
<span class="slider"></span>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
<div class='grid-x setting-row hidden' >
|
|
||||||
<span class = "column small-10" id='storage-info'></span>
|
|
||||||
<span class='columns small-2 text-right translation'>></span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class='grid-x setting-row' >
|
|
||||||
<span class = "column small-6 translation">version-label</span>
|
|
||||||
<span class = "column small-6 text-right" id='version-info'></span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button id='reset-levels' class="button hidden">reset-levels</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@ -1,3 +1 @@
|
|||||||
<div class="height-100">
|
<div> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <div id="wordRotatorSettings"></div> </div>
|
||||||
<div id = "wordRotatorSettings" class="height-100" ></div>
|
|
||||||
</div>
|
|
||||||
@ -1,9 +1 @@
|
|||||||
<div class = 'max-width center'>
|
<div class="max-width center"> <a class="share-icon" id="whatsapp-share"> <img data-view="img/whatsapp.svg"> </a> <a class="share-icon" id="telegram-share"> <img data-view="img/telegram.svg"> </a> </div>
|
||||||
<a class="share-icon" id = "whatsapp-share">
|
|
||||||
<img data-view="img/whatsapp.svg">
|
|
||||||
</a>
|
|
||||||
<a class="share-icon" id = "telegram-share">
|
|
||||||
<img data-view="img/telegram.svg">
|
|
||||||
</a>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
@ -1,9 +1 @@
|
|||||||
<div class="tab-fragment">
|
<div class="tab-fragment"> <div class="tab-names flex-container flex-dir-row"> <div class="tab-button tab-button-template"></div> <div class="grow border-bottom"> </div> </div> <div class="tab-content"> <div class="tab-site tab-site-template"></div> </div> </div>
|
||||||
<div class="tab-names flex-container flex-dir-row">
|
|
||||||
<div class="tab-button tab-button-template"></div>
|
|
||||||
<div class="grow border-bottom"> </div>
|
|
||||||
</div>
|
|
||||||
<div class="tab-content">
|
|
||||||
<div class="tab-site tab-site-template active"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@ -1,39 +0,0 @@
|
|||||||
<article id=tutorial-site>
|
|
||||||
<section>
|
|
||||||
<div id='segment-leaf-template' class='segment segment-leaf'>
|
|
||||||
<div class='leaf-element'></div>
|
|
||||||
</div>
|
|
||||||
<div id='segment-parent-template' class='segment segment-parent'>
|
|
||||||
<div class='child-container'></div>
|
|
||||||
</div>
|
|
||||||
<div id='segment-row-template' class='segment segment-row'>
|
|
||||||
<div class='child-container'></div>
|
|
||||||
</div>
|
|
||||||
<div id='segment-column-template' class='segment segment-column'>
|
|
||||||
<div class='child-container'></div>
|
|
||||||
</div>
|
|
||||||
<div id='segment-triangle-template' class='segment segment-triangle'>
|
|
||||||
<div class='child-container'></div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section id="tutorial-1">
|
|
||||||
<div class="tutorial-text translation">tutorial-1</div>
|
|
||||||
<div class="level-container"></div>
|
|
||||||
</section>
|
|
||||||
<section id="tutorial-2">
|
|
||||||
<div class="tutorial-text translation">tutorial-2</div>
|
|
||||||
<div class="tutorial-wrapper">
|
|
||||||
<button class="help-action">
|
|
||||||
<img src="img/help.png" class="action-image">
|
|
||||||
</button>
|
|
||||||
<div class="level-container"></div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section id="tutorial-3">
|
|
||||||
<div class="tutorial-text translation">tutorial-3</div>
|
|
||||||
<div class="tutorial-wrapper">
|
|
||||||
<div id='tutorial-pointer'></div>
|
|
||||||
<div class="level-container"></div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</article>
|
|
||||||
BIN
src/server/public/img/background.png
Normal file
BIN
src/server/public/img/background.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 494 KiB |
File diff suppressed because one or more lines are too long
@ -1,42 +1 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html><html><head><link rel="icon" type="image/png" href="img/logo.png"><meta charset="utf-8"/><meta name="format-detection" content="telephone=no"><meta name="msapplication-tap-highlight" content="no"><meta name="viewport" content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width"><meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: cdvfile: * 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; img-src 'self' * data: cdvfile: content:; script-src 'self' data: 'unsafe-eval'" ;><meta class="foundation-mq"><link rel="stylesheet" href="index.css"><title>WordRotator</title><script src="scripts/sql-wasm.js"></script><script src="scripts/localforage.js"></script></head><body class="default"><div id="toast-container"><div class="toast toast-template" style="opacity:0"><span class="message"></span></div></div><div id="site"><div class="loader overlay"><svg viewBox="0 0 32 32" width="32" height="32"><circle class="spinner" cx="16" cy="16" r="14" fill="none" style="stroke:#000"></circle></svg></div></div><script src="cordova.js"></script><script src="bundle.js"></script></body></html>
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<link rel="icon" type="image/png" href="img/logo.png">
|
|
||||||
<meta charset="utf-8"/>
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<meta name="msapplication-tap-highlight" content="no">
|
|
||||||
<meta name="viewport"
|
|
||||||
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
|
|
||||||
|
|
||||||
<meta http-equiv="Content-Security-Policy"
|
|
||||||
content="default-src 'self' data: gap: cdvfile: * 'unsafe-eval';
|
|
||||||
style-src 'self' 'unsafe-inline';
|
|
||||||
media-src *; img-src 'self' * data: cdvfile: content:;
|
|
||||||
script-src 'self' data: 'unsafe-eval'" ;>
|
|
||||||
|
|
||||||
<!--Element, mit dem Foundation die ViewQueries mitteilt-->
|
|
||||||
<meta class='foundation-mq'>
|
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="index.css">
|
|
||||||
<title>WordRotator</title>
|
|
||||||
<script src="scripts/sql-wasm.js"></script>
|
|
||||||
<script src="scripts/localforage.js"></script>
|
|
||||||
</head>
|
|
||||||
<body class="theme-blue">
|
|
||||||
<div id="toast-container">
|
|
||||||
<div class='toast toast-template' style="opacity: 0">
|
|
||||||
<span class='message'></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id='site'>
|
|
||||||
<div class="loader overlay">
|
|
||||||
<svg viewBox="0 0 32 32" width="32" height="32">
|
|
||||||
<circle class="spinner" cx="16" cy="16" r="14" fill="none" style="stroke: black;"></circle>
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--<script src='https://vjs.zencdn.net/7.4.1/video.js'></script>-->
|
|
||||||
<script type="text/javascript" src="cordova.js"></script>
|
|
||||||
<script src="bundle.js"></script></body>
|
|
||||||
</html>
|
|
||||||
@ -1,95 +0,0 @@
|
|||||||
cordova.define("cordova-plugin-background-fetch.BackgroundFetch", function(require, exports, module) { /***
|
|
||||||
* Custom Cordova Background Fetch plugin.
|
|
||||||
* @author <chris@transistorsoft.com>
|
|
||||||
* iOS native-side is largely based upon http://www.mindsizzlers.com/2011/07/ios-background-location/
|
|
||||||
*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
var exec = require("cordova/exec");
|
|
||||||
|
|
||||||
var EMPTY_FN = function() {}
|
|
||||||
|
|
||||||
var MODULE = "BackgroundFetch";
|
|
||||||
module.exports = {
|
|
||||||
STATUS_RESTRICTED: 0,
|
|
||||||
STATUS_DENIED: 1,
|
|
||||||
STATUS_AVAILABLE: 2,
|
|
||||||
|
|
||||||
FETCH_RESULT_NEW_DATA: 0,
|
|
||||||
FETCH_RESULT_NO_DATA: 1,
|
|
||||||
FETCH_RESULT_FAILED: 2,
|
|
||||||
|
|
||||||
NETWORK_TYPE_NONE: 0,
|
|
||||||
NETWORK_TYPE_ANY: 1,
|
|
||||||
NETWORK_TYPE_UNMETERED: 2,
|
|
||||||
NETWORK_TYPE_NOT_ROAMING: 3,
|
|
||||||
NETWORK_TYPE_CELLULAR: 4,
|
|
||||||
|
|
||||||
configure: function(callback, failure, config) {
|
|
||||||
if (typeof(callback) !== 'function') {
|
|
||||||
throw "BackgroundFetch configure error: You must provide a callback function as 1st argument";
|
|
||||||
}
|
|
||||||
config = config || {};
|
|
||||||
failure = failure || EMPTY_FN;
|
|
||||||
exec(callback, failure, MODULE, 'configure', [config]);
|
|
||||||
},
|
|
||||||
|
|
||||||
finish: function(taskId, success, failure) {
|
|
||||||
if (typeof(taskId) !== 'string') {
|
|
||||||
throw "BackgroundGeolocation.finish now requires a String taskId as first argument";
|
|
||||||
}
|
|
||||||
success = success || EMPTY_FN;
|
|
||||||
failure = failure || EMPTY_FN;
|
|
||||||
exec(success, failure, MODULE, 'finish',[taskId]);
|
|
||||||
},
|
|
||||||
|
|
||||||
start: function(success, failure) {
|
|
||||||
success = success || EMPTY_FN;
|
|
||||||
failure = failure || EMPTY_FN;
|
|
||||||
exec(success, failure, MODULE, 'start',[]);
|
|
||||||
},
|
|
||||||
|
|
||||||
stop: function(success, failure) {
|
|
||||||
success = success || EMPTY_FN;
|
|
||||||
failure = failure || EMPTY_FN;
|
|
||||||
exec(success, failure, MODULE, 'stop', []);
|
|
||||||
},
|
|
||||||
|
|
||||||
scheduleTask: function(config, success, failure) {
|
|
||||||
if (typeof(config) !== 'object') throw "[BackgroundFetch stopTask] ERROR: The 1st argument to scheduleTask is a config {}";
|
|
||||||
success = success || EMPTY_FN;
|
|
||||||
failure = failure || EMPTY_FN;
|
|
||||||
exec(success, failure, MODULE, 'scheduleTask', [config]);
|
|
||||||
},
|
|
||||||
|
|
||||||
stopTask: function(taskId, success, failure) {
|
|
||||||
if (typeof(taskId) !== 'string') throw "[BackgroundFetch stopTask] ERROR: The 1st argument must be a taskId:String";
|
|
||||||
success = success || EMPTY_FN;
|
|
||||||
failure = failure || EMPTY_FN;
|
|
||||||
exec(success, failure, MODULE, 'stop', [taskId]);
|
|
||||||
},
|
|
||||||
|
|
||||||
status: function(success, failure) {
|
|
||||||
success = success || EMPTY_FN;
|
|
||||||
failure = failure || EMPTY_FN;
|
|
||||||
exec(success, failure, MODULE, 'status',[]);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
});
|
|
||||||
@ -1,117 +0,0 @@
|
|||||||
cordova.define("cordova-plugin-badge.Badge.Proxy", function(require, exports, module) { /*
|
|
||||||
* This file contains Original Code and/or Modifications of Original Code
|
|
||||||
* as defined in and that are subject to the Apache License
|
|
||||||
* Version 2.0 (the 'License'). You may not use this file except in
|
|
||||||
* compliance with the License. Please obtain a copy of the License at
|
|
||||||
* http://opensource.org/licenses/Apache-2.0/ and read it before using this
|
|
||||||
* file.
|
|
||||||
*
|
|
||||||
* The Original Code and all software distributed under the License are
|
|
||||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
|
||||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
|
||||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
|
||||||
* Please see the License for the specific language governing rights and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Instance of the Favico.js libary
|
|
||||||
exports.favico = new cordova.plugins.notification.badge.Favico({
|
|
||||||
animation: 'none'
|
|
||||||
});
|
|
||||||
|
|
||||||
// Holds the current badge number
|
|
||||||
var BADGE_KEY = 'cordova_badge_number';
|
|
||||||
// Holds the saved badge config
|
|
||||||
var CONFIG_KEY = 'APPBadgeConfigKey';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clears the badge of the app icon.
|
|
||||||
*
|
|
||||||
* @param [ Function ] success Success callback
|
|
||||||
* @param [ Function ] error Error callback
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.clear = function (success, error) {
|
|
||||||
exports.set(success, error, [0]);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the badge of the app icon.
|
|
||||||
*
|
|
||||||
* @param [ Function ] success Success callback
|
|
||||||
* @param [ Function ] error Error callback
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.get = function (success, error) {
|
|
||||||
var badge = localStorage[BADGE_KEY];
|
|
||||||
|
|
||||||
success(badge || 0);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the badge of the app icon.
|
|
||||||
*
|
|
||||||
* @param [ Function ] success Success callback
|
|
||||||
* @param [ Function ] error Error callback
|
|
||||||
* @param [ Int ] badge The badge number
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.set = function (success, error, args) {
|
|
||||||
var badge = args[0];
|
|
||||||
|
|
||||||
exports.saveBadge(badge);
|
|
||||||
exports.favico.badge(badge);
|
|
||||||
|
|
||||||
success(badge);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Save the badge config.
|
|
||||||
*
|
|
||||||
* @param [ Function ] success Success callback
|
|
||||||
* @param [ Function ] error Error callback
|
|
||||||
* @param [ Int ] config The config map
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.save = function (success, error, args) {
|
|
||||||
var config = args[0] || null,
|
|
||||||
json = JSON.stringify(config);
|
|
||||||
|
|
||||||
localStorage[CONFIG_KEY] = json;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Load the badge config.
|
|
||||||
*
|
|
||||||
* @param [ Function ] success Success callback
|
|
||||||
* @param [ Function ] error Error callback
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.load = function (success, error) {
|
|
||||||
var json = localStorage[CONFIG_KEY],
|
|
||||||
config = JSON.parse(json || null);
|
|
||||||
|
|
||||||
success(config);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Persist the badge of the app icon so that `getBadge` is able to return the
|
|
||||||
* badge number back to the client.
|
|
||||||
*
|
|
||||||
* @param [ Int ] badge The badge number
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.saveBadge = function (badge) {
|
|
||||||
localStorage[BADGE_KEY] = badge;
|
|
||||||
};
|
|
||||||
|
|
||||||
cordova.commandProxy.add('Badge', exports);
|
|
||||||
|
|
||||||
});
|
|
||||||
File diff suppressed because one or more lines are too long
@ -1,281 +0,0 @@
|
|||||||
cordova.define("cordova-plugin-badge.Badge", function(require, exports, module) { /*
|
|
||||||
* This file contains Original Code and/or Modifications of Original Code
|
|
||||||
* as defined in and that are subject to the Apache License
|
|
||||||
* Version 2.0 (the 'License'). You may not use this file except in
|
|
||||||
* compliance with the License. Please obtain a copy of the License at
|
|
||||||
* http://opensource.org/licenses/Apache-2.0/ and read it before using this
|
|
||||||
* file.
|
|
||||||
*
|
|
||||||
* The Original Code and all software distributed under the License are
|
|
||||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
|
||||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
|
||||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
|
||||||
* Please see the License for the specific language governing rights and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
var exec = require('cordova/exec'),
|
|
||||||
channel = require('cordova/channel'),
|
|
||||||
ua = navigator.userAgent.toLowerCase(),
|
|
||||||
isIOS = ua.indexOf('ipad') > -1 || ua.indexOf('iphone') > -1,
|
|
||||||
isMac = ua.indexOf('macintosh') > -1,
|
|
||||||
isWin = window.Windows !== undefined,
|
|
||||||
isAndroid = !isWin && ua.indexOf('android') > -1,
|
|
||||||
isWinPC = isWin && Windows.System.Profile.AnalyticsInfo.versionInfo.deviceFamily.includes('Desktop'),
|
|
||||||
isDesktop = isMac || isWinPC;
|
|
||||||
|
|
||||||
// Default settings
|
|
||||||
exports._config = { indicator: 'badge', autoClear: false };
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clears the badge number.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The callback function to be execute later.
|
|
||||||
* @param [ Function ] scope Optional scope for the callback function.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.clear = function (callback, scope) {
|
|
||||||
this.exec('clear', null, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the badge number.
|
|
||||||
*
|
|
||||||
* @param [ Int ] badge The new badge number.
|
|
||||||
* @param [ Function ] callback The callback function to be execute later.
|
|
||||||
* @param [ Function ] scope Optional scope for the callback function.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.set = function (badge, callback, scope) {
|
|
||||||
var args = [parseInt(badge) || 0];
|
|
||||||
|
|
||||||
this.requestPermission(function (granted) {
|
|
||||||
if (granted) {
|
|
||||||
this.exec('set', args, callback, scope);
|
|
||||||
}
|
|
||||||
}, this);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the badge of the app icon.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The callback function to be execute later.
|
|
||||||
* @param [ Function ] scope Optional scope for the callback function.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.get = function (callback, scope) {
|
|
||||||
this.exec('get', null, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Increases the badge number.
|
|
||||||
*
|
|
||||||
* @param [ Int ] count Number to add to the badge number.
|
|
||||||
* @param [ Function ] callback The callback function to be execute later.
|
|
||||||
* @param [ Function ] scope Optional scope for the callback function.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.increase = function (count, callback, scope) {
|
|
||||||
this.get(function (badge) {
|
|
||||||
this.set(badge + (count || 1), callback, scope);
|
|
||||||
}, this);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Decreases the badge number.
|
|
||||||
*
|
|
||||||
* @param [ Int ] count Number to substract to the badge number.
|
|
||||||
* @param [ Function ] callback The callback function to be execute later.
|
|
||||||
* @param [ Function ] scope Optional scope for the callback function.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.decrease = function (count, callback, scope) {
|
|
||||||
this.get(function (badge) {
|
|
||||||
this.set(Math.max(0, badge - (count || 1)), callback, scope);
|
|
||||||
}, this);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check support to show badges.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The callback function to be execute later.
|
|
||||||
* @param [ Function ] scope Optional scope for the callback function.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.isSupported = function (callback, scope) {
|
|
||||||
if (isAndroid) {
|
|
||||||
this.exec('check', null, callback, scope);
|
|
||||||
} else {
|
|
||||||
this.createCallbackFn(callback, scope)(true);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check permission to show badges.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The callback function to be execute later.
|
|
||||||
* @param [ Function ] scope Optional scope for the callback function.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.hasPermission = function (callback, scope) {
|
|
||||||
if (isIOS) {
|
|
||||||
this.exec('check', null, callback, scope);
|
|
||||||
} else {
|
|
||||||
this.createCallbackFn(callback, scope)(true);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Request permission to show badges.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The callback function to be execute later.
|
|
||||||
* @param [ Function ] scope Optional scope for the callback function.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.requestPermission = function (callback, scope) {
|
|
||||||
if (isIOS) {
|
|
||||||
this.exec('request', null, callback, scope);
|
|
||||||
} else {
|
|
||||||
this.createCallbackFn(callback, scope)(true);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Configures the plugin's platform options.
|
|
||||||
*
|
|
||||||
* @param [ Hash ] object Optional config settings.
|
|
||||||
*
|
|
||||||
* @return [ Hash ] The merged config settings.
|
|
||||||
*/
|
|
||||||
exports.configure = function (config) {
|
|
||||||
this.mergeConfig(config);
|
|
||||||
this.exec('save', this._config);
|
|
||||||
|
|
||||||
return this._config;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Merge the config values with the current ones.
|
|
||||||
*
|
|
||||||
* @param [ Hash ] object Optional config settings.
|
|
||||||
*
|
|
||||||
* @return [ Hash ] The merged config settings.
|
|
||||||
*/
|
|
||||||
exports.mergeConfig = function (config) {
|
|
||||||
return Object.assign(this._config, config);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create callback, which will be executed within a specific scope.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The callback function to be execute later.
|
|
||||||
* @param [ Function ] scope Optional scope for the callback function.
|
|
||||||
*
|
|
||||||
* @return [ Function ] The new callback function
|
|
||||||
*/
|
|
||||||
exports.createCallbackFn = function (callbackFn, scope) {
|
|
||||||
if (typeof callbackFn != 'function')
|
|
||||||
return;
|
|
||||||
|
|
||||||
return function () {
|
|
||||||
callbackFn.apply(scope || this, arguments);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clear the badge if autoClear is on and the indicator type is badge.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.clearIf = function () {
|
|
||||||
if (this._config.autoClear && this._config.indicator == 'badge') {
|
|
||||||
this.clear();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Execute the native counterpart.
|
|
||||||
*
|
|
||||||
* @param [ String ] action The name of the action to execute.
|
|
||||||
* @param [ Array ] args Array of arguments to pass with.
|
|
||||||
* @param [ Function ] callback The callback function to be execute later.
|
|
||||||
* @param [ Function ] scope Optional scope for the callback function.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.exec = function (action, args, callback, scope) {
|
|
||||||
var fn = this.createCallbackFn(callback, scope),
|
|
||||||
params = [];
|
|
||||||
|
|
||||||
if (Array.isArray(args)) {
|
|
||||||
params = args;
|
|
||||||
} else if (args) {
|
|
||||||
params.push(args);
|
|
||||||
}
|
|
||||||
|
|
||||||
exec(fn, null, 'Badge', action, params);
|
|
||||||
};
|
|
||||||
|
|
||||||
// Clear badge on app start if autoClear is set to true
|
|
||||||
channel.onCordovaReady.subscribe(function () {
|
|
||||||
exports.exec('load', null, function (config) {
|
|
||||||
this.mergeConfig(config);
|
|
||||||
this.clearIf();
|
|
||||||
}, exports);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Clear badge on app resume if autoClear is set to true
|
|
||||||
channel.onResume.subscribe(function () {
|
|
||||||
exports.clearIf();
|
|
||||||
});
|
|
||||||
|
|
||||||
// Clear badge on app resume if autoClear is set to true
|
|
||||||
channel.onActivated.subscribe(function () {
|
|
||||||
exports.clearIf();
|
|
||||||
});
|
|
||||||
|
|
||||||
if (isDesktop) {
|
|
||||||
// Clear badge on app resume if autoClear is set to true
|
|
||||||
document.addEventListener('visibilitychange', function () {
|
|
||||||
if (!document.hidden) { exports.clearIf(); }
|
|
||||||
}, false);
|
|
||||||
|
|
||||||
// Clear badge on app resume if autoClear is set to true
|
|
||||||
window.addEventListener('focus', function () {
|
|
||||||
exports.clearIf();
|
|
||||||
}, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Polyfill for Object.assign
|
|
||||||
if (typeof Object.assign != 'function') {
|
|
||||||
Object.assign = function(target) {
|
|
||||||
'use strict';
|
|
||||||
if (target == null) {
|
|
||||||
throw new TypeError('Cannot convert undefined or null to object');
|
|
||||||
}
|
|
||||||
|
|
||||||
target = Object(target);
|
|
||||||
for (var index = 1; index < arguments.length; index++) {
|
|
||||||
var source = arguments[index];
|
|
||||||
if (source != null) {
|
|
||||||
for (var key in source) {
|
|
||||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
||||||
target[key] = source[key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return target;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
@ -1,304 +0,0 @@
|
|||||||
cordova.define("cordova-plugin-calendar.Calendar", function(require, exports, module) { "use strict";
|
|
||||||
function Calendar() {
|
|
||||||
}
|
|
||||||
|
|
||||||
Calendar.prototype.getCreateCalendarOptions = function () {
|
|
||||||
return {
|
|
||||||
calendarName: null,
|
|
||||||
calendarColor: null // optional, the OS will choose one if left empty, example: pass "#FF0000" for red
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.hasReadPermission = function (successCallback, errorCallback) {
|
|
||||||
cordova.exec(successCallback, errorCallback, "Calendar", "hasReadPermission", []);
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.requestReadPermission = function (successCallback, errorCallback) {
|
|
||||||
cordova.exec(successCallback, errorCallback, "Calendar", "requestReadPermission", []);
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.hasWritePermission = function (successCallback, errorCallback) {
|
|
||||||
cordova.exec(successCallback, errorCallback, "Calendar", "hasWritePermission", []);
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.requestWritePermission = function (successCallback, errorCallback) {
|
|
||||||
cordova.exec(successCallback, errorCallback, "Calendar", "requestWritePermission", []);
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.hasReadWritePermission = function (successCallback, errorCallback) {
|
|
||||||
cordova.exec(successCallback, errorCallback, "Calendar", "hasReadWritePermission", []);
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.requestReadWritePermission = function (successCallback, errorCallback) {
|
|
||||||
cordova.exec(successCallback, errorCallback, "Calendar", "requestReadWritePermission", []);
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.createCalendar = function (calendarNameOrOptionsObject, successCallback, errorCallback) {
|
|
||||||
var options;
|
|
||||||
if (typeof calendarNameOrOptionsObject == "string") {
|
|
||||||
options = {
|
|
||||||
"calendarName": calendarNameOrOptionsObject
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
options = calendarNameOrOptionsObject;
|
|
||||||
}
|
|
||||||
// merge passed options with defaults
|
|
||||||
var mergedOptions = Calendar.prototype.getCreateCalendarOptions();
|
|
||||||
for (var val in options) {
|
|
||||||
if (options.hasOwnProperty(val)) {
|
|
||||||
mergedOptions[val] = options[val];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cordova.exec(successCallback, errorCallback, "Calendar", "createCalendar", [mergedOptions]);
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.deleteCalendar = function (calendarName, successCallback, errorCallback) {
|
|
||||||
cordova.exec(successCallback, errorCallback, "Calendar", "deleteCalendar", [{
|
|
||||||
"calendarName": calendarName
|
|
||||||
}]);
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.openCalendar = function (date, successCallback, errorCallback) {
|
|
||||||
// default: today
|
|
||||||
if (!(date instanceof Date)) {
|
|
||||||
date = new Date();
|
|
||||||
}
|
|
||||||
cordova.exec(successCallback, errorCallback, "Calendar", "openCalendar", [{
|
|
||||||
"date": date.getTime()
|
|
||||||
}]);
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.getCalendarOptions = function () {
|
|
||||||
return {
|
|
||||||
firstReminderMinutes: 60,
|
|
||||||
secondReminderMinutes: null,
|
|
||||||
recurrence: null, // options are: 'daily', 'weekly', 'monthly', 'yearly'
|
|
||||||
recurrenceInterval: 1, // only used when recurrence is set
|
|
||||||
recurrenceWeekstart: "MO",
|
|
||||||
recurrenceByDay: null,
|
|
||||||
recurrenceByMonthDay: null,
|
|
||||||
recurrenceEndDate: null,
|
|
||||||
recurrenceCount: null,
|
|
||||||
calendarName: null,
|
|
||||||
calendarId: null,
|
|
||||||
url: null
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method can be used if you want more control over the event details.
|
|
||||||
* Pass in an options object which you can easily override as follow:
|
|
||||||
* var options = window.plugins.calendar.getCalendarOptions();
|
|
||||||
* options.firstReminderMinutes = 150;
|
|
||||||
*/
|
|
||||||
Calendar.prototype.createEventWithOptions = function (title, location, notes, startDate, endDate, options, successCallback, errorCallback) {
|
|
||||||
if (!(startDate instanceof Date && endDate instanceof Date)) {
|
|
||||||
errorCallback("startDate and endDate must be JavaScript Date Objects");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// merge passed options with defaults
|
|
||||||
var mergedOptions = Calendar.prototype.getCalendarOptions();
|
|
||||||
for (var val in options) {
|
|
||||||
if (options.hasOwnProperty(val)) {
|
|
||||||
mergedOptions[val] = options[val];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (options.recurrenceEndDate != null) {
|
|
||||||
mergedOptions.recurrenceEndTime = options.recurrenceEndDate.getTime();
|
|
||||||
}
|
|
||||||
cordova.exec(successCallback, errorCallback, "Calendar", "createEventWithOptions", [{
|
|
||||||
"title": title,
|
|
||||||
"location": location,
|
|
||||||
"notes": notes,
|
|
||||||
"startTime": startDate instanceof Date ? startDate.getTime() : null,
|
|
||||||
"endTime": endDate instanceof Date ? endDate.getTime() : null,
|
|
||||||
"options": mergedOptions
|
|
||||||
}]);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated use createEventWithOptions instead
|
|
||||||
*/
|
|
||||||
Calendar.prototype.createEventInNamedCalendar = function (title, location, notes, startDate, endDate, calendarName, successCallback, errorCallback) {
|
|
||||||
Calendar.prototype.createEventWithOptions(title, location, notes, startDate, endDate, {calendarName:calendarName}, successCallback, errorCallback);
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.createEvent = function (title, location, notes, startDate, endDate, successCallback, errorCallback) {
|
|
||||||
Calendar.prototype.createEventWithOptions(title, location, notes, startDate, endDate, {}, successCallback, errorCallback);
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.createEventInteractively = function (title, location, notes, startDate, endDate, successCallback, errorCallback) {
|
|
||||||
Calendar.prototype.createEventInteractivelyWithOptions(title, location, notes, startDate, endDate, {}, successCallback, errorCallback);
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.createEventInteractivelyWithOptions = function (title, location, notes, startDate, endDate, options, successCallback, errorCallback) {
|
|
||||||
// merge passed options with defaults
|
|
||||||
var mergedOptions = Calendar.prototype.getCalendarOptions();
|
|
||||||
for (var val in options) {
|
|
||||||
if (options.hasOwnProperty(val)) {
|
|
||||||
mergedOptions[val] = options[val];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (options.recurrenceEndDate != null) {
|
|
||||||
mergedOptions.recurrenceEndTime = options.recurrenceEndDate.getTime();
|
|
||||||
}
|
|
||||||
cordova.exec(successCallback, errorCallback, "Calendar", "createEventInteractively", [{
|
|
||||||
"title": title,
|
|
||||||
"location": location,
|
|
||||||
"notes": notes,
|
|
||||||
"startTime": startDate instanceof Date ? startDate.getTime() : null,
|
|
||||||
"endTime": endDate instanceof Date ? endDate.getTime() : null,
|
|
||||||
"options": mergedOptions
|
|
||||||
}])
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.findEventWithOptions = function (title, location, notes, startDate, endDate, options, successCallback, errorCallback) {
|
|
||||||
// merge passed options with defaults
|
|
||||||
var mergedOptions = Calendar.prototype.getCalendarOptions();
|
|
||||||
for (var val in options) {
|
|
||||||
if (options.hasOwnProperty(val)) {
|
|
||||||
mergedOptions[val] = options[val];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (options.recurrenceEndDate != null) {
|
|
||||||
mergedOptions.recurrenceEndTime = options.recurrenceEndDate.getTime();
|
|
||||||
}
|
|
||||||
cordova.exec(successCallback, errorCallback, "Calendar", "findEventWithOptions", [{
|
|
||||||
"title": title,
|
|
||||||
"location": location,
|
|
||||||
"notes": notes,
|
|
||||||
"startTime": startDate instanceof Date ? startDate.getTime() : null,
|
|
||||||
"endTime": endDate instanceof Date ? endDate.getTime() : null,
|
|
||||||
"options": mergedOptions
|
|
||||||
}])
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.findEvent = function (title, location, notes, startDate, endDate, successCallback, errorCallback) {
|
|
||||||
Calendar.prototype.findEventWithOptions(title, location, notes, startDate, endDate, {}, successCallback, errorCallback);
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.findAllEventsInNamedCalendar = function (calendarName, successCallback, errorCallback) {
|
|
||||||
cordova.exec(successCallback, errorCallback, "Calendar", "findAllEventsInNamedCalendar", [{
|
|
||||||
"calendarName": calendarName
|
|
||||||
}]);
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.deleteEvent = function (title, location, notes, startDate, endDate, successCallback, errorCallback) {
|
|
||||||
if (!(startDate instanceof Date && endDate instanceof Date)) {
|
|
||||||
errorCallback("startDate and endDate must be JavaScript Date Objects");
|
|
||||||
}
|
|
||||||
cordova.exec(successCallback, errorCallback, "Calendar", "deleteEvent", [{
|
|
||||||
"title": title,
|
|
||||||
"location": location,
|
|
||||||
"notes": notes,
|
|
||||||
"startTime": startDate instanceof Date ? startDate.getTime() : null,
|
|
||||||
"endTime": endDate instanceof Date ? endDate.getTime() : null
|
|
||||||
}])
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.deleteEventFromNamedCalendar = function (title, location, notes, startDate, endDate, calendarName, successCallback, errorCallback) {
|
|
||||||
cordova.exec(successCallback, errorCallback, "Calendar", "deleteEventFromNamedCalendar", [{
|
|
||||||
"title": title,
|
|
||||||
"location": location,
|
|
||||||
"notes": notes,
|
|
||||||
"startTime": startDate instanceof Date ? startDate.getTime() : null,
|
|
||||||
"endTime": endDate instanceof Date ? endDate.getTime() : null,
|
|
||||||
"calendarName": calendarName
|
|
||||||
}])
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.deleteEventById = function (id, fromDate, successCallback, errorCallback) {
|
|
||||||
cordova.exec(successCallback, errorCallback, "Calendar", "deleteEventById", [{
|
|
||||||
"id": id,
|
|
||||||
"fromTime": fromDate instanceof Date ? fromDate.getTime() : null
|
|
||||||
}]);
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.modifyEventWithOptions = function (title, location, notes, startDate, endDate, newTitle, newLocation, newNotes, newStartDate, newEndDate, options, newOptions, successCallback, errorCallback) {
|
|
||||||
if (!(newStartDate instanceof Date && newEndDate instanceof Date)) {
|
|
||||||
errorCallback("newStartDate and newEndDate must be JavaScript Date Objects");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// merge passed options with defaults
|
|
||||||
var mergedOptions = Calendar.prototype.getCalendarOptions();
|
|
||||||
for (var val in options) {
|
|
||||||
if (options.hasOwnProperty(val)) {
|
|
||||||
mergedOptions[val] = options[val];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (options.recurrenceEndDate != null) {
|
|
||||||
mergedOptions.recurrenceEndTime = options.recurrenceEndDate.getTime();
|
|
||||||
}
|
|
||||||
// and also merge passed newOptions with defaults
|
|
||||||
var newMergedOptions = Calendar.prototype.getCalendarOptions();
|
|
||||||
for (var val2 in newOptions) {
|
|
||||||
if (newOptions.hasOwnProperty(val2)) {
|
|
||||||
newMergedOptions[val2] = newOptions[val2];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (newOptions.recurrenceEndDate != null) {
|
|
||||||
newMergedOptions.recurrenceEndTime = newOptions.recurrenceEndDate.getTime();
|
|
||||||
}
|
|
||||||
cordova.exec(successCallback, errorCallback, "Calendar", "modifyEventWithOptions", [{
|
|
||||||
"title": title,
|
|
||||||
"location": location,
|
|
||||||
"notes": notes,
|
|
||||||
"startTime": startDate instanceof Date ? startDate.getTime() : null,
|
|
||||||
"endTime": endDate instanceof Date ? endDate.getTime() : null,
|
|
||||||
"newTitle": newTitle,
|
|
||||||
"newLocation": newLocation,
|
|
||||||
"newNotes": newNotes,
|
|
||||||
"newStartTime": newStartDate instanceof Date ? newStartDate.getTime() : null,
|
|
||||||
"newEndTime": newEndDate instanceof Date ? newEndDate.getTime() : null,
|
|
||||||
"options": mergedOptions,
|
|
||||||
"newOptions": newMergedOptions
|
|
||||||
}])
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.modifyEvent = function (title, location, notes, startDate, endDate, newTitle, newLocation, newNotes, newStartDate, newEndDate, successCallback, errorCallback) {
|
|
||||||
Calendar.prototype.modifyEventWithOptions(title, location, notes, startDate, endDate, newTitle, newLocation, newNotes, newStartDate, newEndDate, {}, successCallback, errorCallback);
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.modifyEventInNamedCalendar = function (title, location, notes, startDate, endDate, newTitle, newLocation, newNotes, newStartDate, newEndDate, calendarName, successCallback, errorCallback) {
|
|
||||||
var options = Calendar.prototype.getCalendarOptions();
|
|
||||||
options.calendarName = calendarName;
|
|
||||||
Calendar.prototype.modifyEventWithOptions(title, location, notes, startDate, endDate, newTitle, newLocation, newNotes, newStartDate, newEndDate, options, successCallback, errorCallback);
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.listEventsInRange = function (startDate, endDate, successCallback, errorCallback) {
|
|
||||||
cordova.exec(successCallback, errorCallback, "Calendar", "listEventsInRange", [{
|
|
||||||
"startTime": startDate instanceof Date ? startDate.getTime() : null,
|
|
||||||
"endTime": endDate instanceof Date ? endDate.getTime() : null
|
|
||||||
}])
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.listCalendars = function (successCallback, errorCallback) {
|
|
||||||
cordova.exec(successCallback, errorCallback, "Calendar", "listCalendars", []);
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.prototype.parseEventDate = function (dateStr) {
|
|
||||||
// Handle yyyyMMddTHHmmssZ iCalendar UTC format
|
|
||||||
var icalRegExp = /\b(\d{4})(\d{2})(\d{2}T\d{2})(\d{2})(\d{2}Z)\b/;
|
|
||||||
if (icalRegExp.test(dateStr))
|
|
||||||
return new Date(String(dateStr).replace(icalRegExp, '$1-$2-$3:$4:$5'));
|
|
||||||
|
|
||||||
var spl;
|
|
||||||
// Handle yyyy-MM-dd HH:mm:ss format returned by AbstractCalendarAccessor.java L66 and Calendar.m L378, and yyyyMMddTHHmmss iCalendar local format, and similar
|
|
||||||
return (spl = /^\s*(\d{4})\D?(\d{2})\D?(\d{2})\D?(\d{2})\D?(\d{2})\D?(\d{2})\s*$/.exec(dateStr))
|
|
||||||
&& new Date(spl[1], spl[2] - 1, spl[3], spl[4], spl[5], spl[6])
|
|
||||||
|| new Date(dateStr);
|
|
||||||
};
|
|
||||||
|
|
||||||
Calendar.install = function () {
|
|
||||||
if (!window.plugins) {
|
|
||||||
window.plugins = {};
|
|
||||||
}
|
|
||||||
|
|
||||||
window.plugins.calendar = new Calendar();
|
|
||||||
return window.plugins.calendar;
|
|
||||||
};
|
|
||||||
|
|
||||||
cordova.addConstructor(Calendar.install);
|
|
||||||
|
|
||||||
});
|
|
||||||
@ -1,416 +0,0 @@
|
|||||||
cordova.define("cordova-plugin-local-notification.LocalNotification.Core", function(require, exports, module) { /*
|
|
||||||
* Apache 2.0 License
|
|
||||||
*
|
|
||||||
* Copyright (c) Sebastian Katzer 2017
|
|
||||||
*
|
|
||||||
* This file contains Original Code and/or Modifications of Original Code
|
|
||||||
* as defined in and that are subject to the Apache License
|
|
||||||
* Version 2.0 (the 'License'). You may not use this file except in
|
|
||||||
* compliance with the License. Please obtain a copy of the License at
|
|
||||||
* http://opensource.org/licenses/Apache-2.0/ and read it before using this
|
|
||||||
* file.
|
|
||||||
*
|
|
||||||
* The Original Code and all software distributed under the License are
|
|
||||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
|
||||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
|
||||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
|
||||||
* Please see the License for the specific language governing rights and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
var exec = require('cordova/exec');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check permission to show notifications.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.hasPermission = function (callback, scope) {
|
|
||||||
var fn = this.createCallbackFn(callback, scope);
|
|
||||||
|
|
||||||
exec(fn, null, 'LocalNotification', 'check', []);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Request permission to show notifications.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.requestPermission = function (callback, scope) {
|
|
||||||
var fn = this.createCallbackFn(callback, scope);
|
|
||||||
|
|
||||||
exec(fn, null, 'LocalNotification', 'request', []);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Schedule notifications.
|
|
||||||
*
|
|
||||||
* @param [ Array ] notifications The notifications to schedule.
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
* @param [ Object ] args Optional flags how to schedule.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.schedule = function (msgs, callback, scope, args) {
|
|
||||||
var fn = function (granted) {
|
|
||||||
var toasts = this.toArray(msgs);
|
|
||||||
|
|
||||||
if (!granted && callback) {
|
|
||||||
callback.call(scope || this, false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var i = 0, len = toasts.length; i < len; i++) {
|
|
||||||
var toast = toasts[i];
|
|
||||||
this.mergeWithDefaults(toast);
|
|
||||||
this.convertProperties(toast);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.exec('schedule', toasts, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
if (args && args.skipPermission) {
|
|
||||||
fn.call(this, true);
|
|
||||||
} else {
|
|
||||||
this.requestPermission(fn, this);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Schedule notifications.
|
|
||||||
*
|
|
||||||
* @param [ Array ] notifications The notifications to schedule.
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
* @param [ Object ] args Optional flags how to schedule.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.update = function (msgs, callback, scope, args) {
|
|
||||||
var fn = function(granted) {
|
|
||||||
var toasts = this.toArray(msgs);
|
|
||||||
|
|
||||||
if (!granted && callback) {
|
|
||||||
callback.call(scope || this, false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var i = 0, len = toasts.length; i < len; i++) {
|
|
||||||
this.convertProperties(toasts[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.exec('update', toasts, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
if (args && args.skipPermission) {
|
|
||||||
fn.call(this, true);
|
|
||||||
} else {
|
|
||||||
this.requestPermission(fn, this);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clear the specified notifications by id.
|
|
||||||
*
|
|
||||||
* @param [ Array<Int> ] ids The IDs of the notifications.
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.clear = function (ids, callback, scope) {
|
|
||||||
ids = this.toArray(ids);
|
|
||||||
ids = this.convertIds(ids);
|
|
||||||
|
|
||||||
this.exec('clear', ids, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clear all triggered notifications.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.clearAll = function (callback, scope) {
|
|
||||||
this.exec('clearAll', null, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clear the specified notifications by id.
|
|
||||||
*
|
|
||||||
* @param [ Array<Int> ] ids The IDs of the notifications.
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.cancel = function (ids, callback, scope) {
|
|
||||||
ids = this.toArray(ids);
|
|
||||||
ids = this.convertIds(ids);
|
|
||||||
|
|
||||||
this.exec('cancel', ids, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Cancel all scheduled notifications.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.cancelAll = function (callback, scope) {
|
|
||||||
this.exec('cancelAll', null, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a notification is present.
|
|
||||||
*
|
|
||||||
* @param [ Int ] id The ID of the notification.
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.isPresent = function (id, callback, scope) {
|
|
||||||
var fn = this.createCallbackFn(callback, scope);
|
|
||||||
|
|
||||||
this.getType(id, function (type) {
|
|
||||||
fn(type != 'unknown');
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a notification has a given type.
|
|
||||||
*
|
|
||||||
* @param [ Int ] id The ID of the notification.
|
|
||||||
* @param [ String ] type The type of the notification.
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.hasType = function (id, type, callback, scope) {
|
|
||||||
var fn = this.createCallbackFn(callback, scope);
|
|
||||||
|
|
||||||
this.getType(id, function (type2) {
|
|
||||||
fn(type == type2);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the type (triggered, scheduled) for the notification.
|
|
||||||
*
|
|
||||||
* @param [ Int ] id The ID of the notification.
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.getType = function (id, callback, scope) {
|
|
||||||
this.exec('type', id, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List of all notification ids.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.getIds = function (callback, scope) {
|
|
||||||
this.exec('ids', null, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List of all scheduled notification IDs.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.getScheduledIds = function (callback, scope) {
|
|
||||||
this.exec('scheduledIds', null, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List of all triggered notification IDs.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.getTriggeredIds = function (callback, scope) {
|
|
||||||
this.exec('triggeredIds', null, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List of local notifications specified by id.
|
|
||||||
* If called without IDs, all notification will be returned.
|
|
||||||
*
|
|
||||||
* @param [ Array<Int> ] ids The IDs of the notifications.
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.get = function () {
|
|
||||||
var args = Array.apply(null, arguments);
|
|
||||||
|
|
||||||
if (typeof args[0] == 'function') {
|
|
||||||
args.unshift([]);
|
|
||||||
}
|
|
||||||
|
|
||||||
var ids = args[0],
|
|
||||||
callback = args[1],
|
|
||||||
scope = args[2];
|
|
||||||
|
|
||||||
if (!Array.isArray(ids)) {
|
|
||||||
this.exec('notification', Number(ids), callback, scope);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ids = this.convertIds(ids);
|
|
||||||
|
|
||||||
this.exec('notifications', ids, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List for all notifications.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.getAll = function (callback, scope) {
|
|
||||||
this.exec('notifications', null, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List of all scheduled notifications.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*/
|
|
||||||
exports.getScheduled = function (callback, scope) {
|
|
||||||
this.exec('scheduledNotifications', null, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List of all triggered notifications.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*/
|
|
||||||
exports.getTriggered = function (callback, scope) {
|
|
||||||
this.exec('triggeredNotifications', null, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Register an group of actions by id.
|
|
||||||
*
|
|
||||||
* @param [ String ] id The Id of the group.
|
|
||||||
* @param [ Array] actions The action config settings.
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.addActionGroup = function (id, actions, callback, scope) {
|
|
||||||
var config = { actionGroupId: id, actions: actions };
|
|
||||||
this.exec('actions', config, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The (platform specific) default settings.
|
|
||||||
*
|
|
||||||
* @return [ Object ]
|
|
||||||
*/
|
|
||||||
exports.getDefaults = function () {
|
|
||||||
var map = Object.assign({}, this._defaults);
|
|
||||||
|
|
||||||
for (var key in map) {
|
|
||||||
if (Array.isArray(map[key])) {
|
|
||||||
map[key] = Array.from(map[key]);
|
|
||||||
} else
|
|
||||||
if (Object.prototype.isPrototypeOf(map[key])) {
|
|
||||||
map[key] = Object.assign({}, map[key]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return map;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Overwrite default settings.
|
|
||||||
*
|
|
||||||
* @param [ Object ] newDefaults New default values.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.setDefaults = function (newDefaults) {
|
|
||||||
Object.assign(this._defaults, newDefaults);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Register callback for given event.
|
|
||||||
*
|
|
||||||
* @param [ String ] event The name of the event.
|
|
||||||
* @param [ Function ] callback The function to be exec as callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.on = function (event, callback, scope) {
|
|
||||||
|
|
||||||
if (typeof callback !== "function")
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!this._listener[event]) {
|
|
||||||
this._listener[event] = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
var item = [callback, scope || window];
|
|
||||||
|
|
||||||
this._listener[event].push(item);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unregister callback for given event.
|
|
||||||
*
|
|
||||||
* @param [ String ] event The name of the event.
|
|
||||||
* @param [ Function ] callback The function to be exec as callback.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.un = function (event, callback) {
|
|
||||||
var listener = this._listener[event];
|
|
||||||
|
|
||||||
if (!listener)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (var i = 0; i < listener.length; i++) {
|
|
||||||
var fn = listener[i][0];
|
|
||||||
|
|
||||||
if (fn == callback) {
|
|
||||||
listener.splice(i, 1);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
});
|
|
||||||
@ -1,553 +0,0 @@
|
|||||||
cordova.define("cordova-plugin-local-notification.LocalNotification.Util", function(require, exports, module) { /*
|
|
||||||
* Apache 2.0 License
|
|
||||||
*
|
|
||||||
* Copyright (c) Sebastian Katzer 2017
|
|
||||||
*
|
|
||||||
* This file contains Original Code and/or Modifications of Original Code
|
|
||||||
* as defined in and that are subject to the Apache License
|
|
||||||
* Version 2.0 (the 'License'). You may not use this file except in
|
|
||||||
* compliance with the License. Please obtain a copy of the License at
|
|
||||||
* http://opensource.org/licenses/Apache-2.0/ and read it before using this
|
|
||||||
* file.
|
|
||||||
*
|
|
||||||
* The Original Code and all software distributed under the License are
|
|
||||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
|
||||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
|
||||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
|
||||||
* Please see the License for the specific language governing rights and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
var exec = require('cordova/exec'),
|
|
||||||
channel = require('cordova/channel');
|
|
||||||
|
|
||||||
// Default values
|
|
||||||
exports._defaults = {
|
|
||||||
actionGroupId : null,
|
|
||||||
actions : [],
|
|
||||||
attachments : [],
|
|
||||||
autoClear : true,
|
|
||||||
badge : null,
|
|
||||||
channel : null,
|
|
||||||
color : null,
|
|
||||||
data : null,
|
|
||||||
defaults : 0,
|
|
||||||
foreground : false,
|
|
||||||
group : null,
|
|
||||||
groupSummary : false,
|
|
||||||
icon : null,
|
|
||||||
id : 0,
|
|
||||||
launch : true,
|
|
||||||
led : true,
|
|
||||||
lockscreen : true,
|
|
||||||
mediaSession : null,
|
|
||||||
number : 0,
|
|
||||||
priority : 0,
|
|
||||||
progressBar : false,
|
|
||||||
showWhen : true,
|
|
||||||
silent : false,
|
|
||||||
smallIcon : 'res://icon',
|
|
||||||
sound : true,
|
|
||||||
sticky : false,
|
|
||||||
summary : null,
|
|
||||||
text : '',
|
|
||||||
title : '',
|
|
||||||
trigger : { type : 'calendar' },
|
|
||||||
vibrate : false,
|
|
||||||
wakeup : true
|
|
||||||
};
|
|
||||||
|
|
||||||
// Listener
|
|
||||||
exports._listener = {};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Merge custom properties with the default values.
|
|
||||||
*
|
|
||||||
* @param [ Object ] options Set of custom values.
|
|
||||||
*
|
|
||||||
* @retrun [ Object ]
|
|
||||||
*/
|
|
||||||
exports.mergeWithDefaults = function (options) {
|
|
||||||
var values = this.getDefaults();
|
|
||||||
|
|
||||||
if (values.hasOwnProperty('sticky')) {
|
|
||||||
options.sticky = this.getValueFor(options, 'sticky', 'ongoing');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options.sticky && options.autoClear !== true) {
|
|
||||||
options.autoClear = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Object.assign(values, options);
|
|
||||||
|
|
||||||
for (var key in values) {
|
|
||||||
if (values[key] !== null) {
|
|
||||||
options[key] = values[key];
|
|
||||||
} else {
|
|
||||||
delete options[key];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this._defaults.hasOwnProperty(key)) {
|
|
||||||
console.warn('Unknown property: ' + key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
options.meta = {
|
|
||||||
plugin: 'cordova-plugin-local-notification',
|
|
||||||
version: '0.9-beta.2'
|
|
||||||
};
|
|
||||||
|
|
||||||
return options;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert the passed values to their required type.
|
|
||||||
*
|
|
||||||
* @param [ Object ] options Properties to convert for.
|
|
||||||
*
|
|
||||||
* @return [ Object ] The converted property list
|
|
||||||
*/
|
|
||||||
exports.convertProperties = function (options) {
|
|
||||||
var parseToInt = function (prop, options) {
|
|
||||||
if (isNaN(options[prop])) {
|
|
||||||
console.warn(prop + ' is not a number: ' + options[prop]);
|
|
||||||
return this._defaults[prop];
|
|
||||||
} else {
|
|
||||||
return Number(options[prop]);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
if (options.id) {
|
|
||||||
options.id = parseToInt('id', options);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options.title) {
|
|
||||||
options.title = options.title.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options.badge) {
|
|
||||||
options.badge = parseToInt('badge', options);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options.priority) {
|
|
||||||
options.priority = parseToInt('priority', options);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options.foreground === true) {
|
|
||||||
options.priority = Math.max(options.priority, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options.foreground === false) {
|
|
||||||
options.priority = Math.min(options.priority, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options.defaults) {
|
|
||||||
options.defaults = parseToInt('defaults', options);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options.smallIcon && !options.smallIcon.match(/^res:/)) {
|
|
||||||
console.warn('Property "smallIcon" must be of kind res://...');
|
|
||||||
}
|
|
||||||
|
|
||||||
options.data = JSON.stringify(options.data);
|
|
||||||
|
|
||||||
this.convertTrigger(options);
|
|
||||||
this.convertActions(options);
|
|
||||||
this.convertProgressBar(options);
|
|
||||||
|
|
||||||
return options;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert the passed values to their required type, modifying them
|
|
||||||
* directly for Android and passing the converted list back for iOS.
|
|
||||||
*
|
|
||||||
* @param [ Map ] options Set of custom values.
|
|
||||||
*
|
|
||||||
* @return [ Map ] Interaction object with category & actions.
|
|
||||||
*/
|
|
||||||
exports.convertActions = function (options) {
|
|
||||||
var actions = [];
|
|
||||||
|
|
||||||
if (!options.actions)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
for (var i = 0, len = options.actions.length; i < len; i++) {
|
|
||||||
var action = options.actions[i];
|
|
||||||
|
|
||||||
if (!action.id) {
|
|
||||||
console.warn('Action with title ' + action.title + ' ' +
|
|
||||||
'has no id and will not be added.');
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
action.id = action.id.toString();
|
|
||||||
|
|
||||||
actions.push(action);
|
|
||||||
}
|
|
||||||
|
|
||||||
options.actions = actions;
|
|
||||||
|
|
||||||
return options;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert the passed values for the trigger to their required type.
|
|
||||||
*
|
|
||||||
* @param [ Map ] options Set of custom values.
|
|
||||||
*
|
|
||||||
* @return [ Map ] Interaction object with trigger spec.
|
|
||||||
*/
|
|
||||||
exports.convertTrigger = function (options) {
|
|
||||||
var trigger = options.trigger || {},
|
|
||||||
date = this.getValueFor(trigger, 'at', 'firstAt', 'date');
|
|
||||||
|
|
||||||
var dateToNum = function (date) {
|
|
||||||
var num = typeof date == 'object' ? date.getTime() : date;
|
|
||||||
return Math.round(num);
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!options.trigger)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!trigger.type) {
|
|
||||||
trigger.type = trigger.center ? 'location' : 'calendar';
|
|
||||||
}
|
|
||||||
|
|
||||||
var isCal = trigger.type == 'calendar';
|
|
||||||
|
|
||||||
if (isCal && !date) {
|
|
||||||
date = this.getValueFor(options, 'at', 'firstAt', 'date');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isCal && !trigger.every && options.every) {
|
|
||||||
trigger.every = options.every;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isCal && (trigger.in || trigger.every)) {
|
|
||||||
date = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isCal && date) {
|
|
||||||
trigger.at = dateToNum(date);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isCal && trigger.firstAt) {
|
|
||||||
trigger.firstAt = dateToNum(trigger.firstAt);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isCal && trigger.before) {
|
|
||||||
trigger.before = dateToNum(trigger.before);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isCal && trigger.after) {
|
|
||||||
trigger.after = dateToNum(trigger.after);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!trigger.count && device.platform == 'windows') {
|
|
||||||
trigger.count = trigger.every ? 5 : 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (trigger.count && device.platform == 'iOS') {
|
|
||||||
console.warn('trigger: { count: } is not supported on iOS.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isCal) {
|
|
||||||
trigger.notifyOnEntry = !!trigger.notifyOnEntry;
|
|
||||||
trigger.notifyOnExit = trigger.notifyOnExit === true;
|
|
||||||
trigger.radius = trigger.radius || 5;
|
|
||||||
trigger.single = !!trigger.single;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isCal || trigger.at) {
|
|
||||||
delete trigger.every;
|
|
||||||
}
|
|
||||||
|
|
||||||
delete options.every;
|
|
||||||
delete options.at;
|
|
||||||
delete options.firstAt;
|
|
||||||
delete options.date;
|
|
||||||
|
|
||||||
options.trigger = trigger;
|
|
||||||
|
|
||||||
return options;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert the passed values for the progressBar to their required type.
|
|
||||||
*
|
|
||||||
* @param [ Map ] options Set of custom values.
|
|
||||||
*
|
|
||||||
* @return [ Map ] Interaction object with trigger spec.
|
|
||||||
*/
|
|
||||||
exports.convertProgressBar = function (options) {
|
|
||||||
var isAndroid = device.platform == 'Android',
|
|
||||||
cfg = options.progressBar;
|
|
||||||
|
|
||||||
if (cfg === undefined)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (typeof cfg === 'boolean') {
|
|
||||||
cfg = options.progressBar = { enabled: cfg };
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof cfg.enabled !== 'boolean') {
|
|
||||||
cfg.enabled = !!(cfg.value || cfg.maxValue || cfg.indeterminate !== null);
|
|
||||||
}
|
|
||||||
|
|
||||||
cfg.value = cfg.value || 0;
|
|
||||||
|
|
||||||
if (isAndroid) {
|
|
||||||
cfg.maxValue = cfg.maxValue || 100;
|
|
||||||
cfg.indeterminate = !!cfg.indeterminate;
|
|
||||||
}
|
|
||||||
|
|
||||||
cfg.enabled = !!cfg.enabled;
|
|
||||||
|
|
||||||
return options;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a callback function to get executed within a specific scope.
|
|
||||||
*
|
|
||||||
* @param [ Function ] fn The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Function ]
|
|
||||||
*/
|
|
||||||
exports.createCallbackFn = function (fn, scope) {
|
|
||||||
|
|
||||||
if (typeof fn != 'function')
|
|
||||||
return;
|
|
||||||
|
|
||||||
return function () {
|
|
||||||
fn.apply(scope || this, arguments);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert the IDs to numbers.
|
|
||||||
*
|
|
||||||
* @param [ Array ] ids
|
|
||||||
*
|
|
||||||
* @return [ Array<Number> ]
|
|
||||||
*/
|
|
||||||
exports.convertIds = function (ids) {
|
|
||||||
var convertedIds = [];
|
|
||||||
|
|
||||||
for (var i = 0, len = ids.length; i < len; i++) {
|
|
||||||
convertedIds.push(Number(ids[i]));
|
|
||||||
}
|
|
||||||
|
|
||||||
return convertedIds;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* First found value for the given keys.
|
|
||||||
*
|
|
||||||
* @param [ Object ] options Object with key-value properties.
|
|
||||||
* @param [ *Array<String> ] keys List of keys.
|
|
||||||
*
|
|
||||||
* @return [ Object ]
|
|
||||||
*/
|
|
||||||
exports.getValueFor = function (options) {
|
|
||||||
var keys = Array.apply(null, arguments).slice(1);
|
|
||||||
|
|
||||||
for (var i = 0, key = keys[i], len = keys.length; i < len; key = keys[++i]) {
|
|
||||||
if (options.hasOwnProperty(key)) {
|
|
||||||
return options[key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert a value to an array.
|
|
||||||
*
|
|
||||||
* @param [ Object ] obj Any kind of object.
|
|
||||||
*
|
|
||||||
* @return [ Array ] An array with the object as first item.
|
|
||||||
*/
|
|
||||||
exports.toArray = function (obj) {
|
|
||||||
return Array.isArray(obj) ? Array.from(obj) : [obj];
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fire the event with given arguments.
|
|
||||||
*
|
|
||||||
* @param [ String ] event The event's name.
|
|
||||||
* @param [ *Array] args The callback's arguments.
|
|
||||||
*
|
|
||||||
* @return [ Void]
|
|
||||||
*/
|
|
||||||
exports.fireEvent = function (event) {
|
|
||||||
var args = Array.apply(null, arguments).slice(1),
|
|
||||||
listener = this._listener[event];
|
|
||||||
|
|
||||||
if (!listener)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (args[0] && typeof args[0].data === 'string') {
|
|
||||||
args[0].data = JSON.parse(args[0].data);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var i = 0; i < listener.length; i++) {
|
|
||||||
var fn = listener[i][0],
|
|
||||||
scope = listener[i][1];
|
|
||||||
|
|
||||||
fn.apply(scope, args);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Execute the native counterpart.
|
|
||||||
*
|
|
||||||
* @param [ String ] action The name of the action.
|
|
||||||
* @param [ Array ] args Array of arguments.
|
|
||||||
* @param [ Function] callback The callback function.
|
|
||||||
* @param [ Object ] scope The scope for the function.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.exec = function (action, args, callback, scope) {
|
|
||||||
var fn = this.createCallbackFn(callback, scope),
|
|
||||||
params = [];
|
|
||||||
|
|
||||||
if (Array.isArray(args)) {
|
|
||||||
params = args;
|
|
||||||
} else if (args) {
|
|
||||||
params.push(args);
|
|
||||||
}
|
|
||||||
|
|
||||||
exec(fn, null, 'LocalNotification', action, params);
|
|
||||||
};
|
|
||||||
|
|
||||||
exports.setLaunchDetails = function () {
|
|
||||||
exports.exec('launch', null, function (details) {
|
|
||||||
if (details) {
|
|
||||||
cordova.plugins.notification.local.launchDetails = details;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// Called after 'deviceready' event
|
|
||||||
channel.deviceready.subscribe(function () {
|
|
||||||
if (['Android', 'windows', 'iOS'].indexOf(device.platform) > -1) {
|
|
||||||
exports.exec('ready');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Called before 'deviceready' event
|
|
||||||
channel.onCordovaReady.subscribe(function () {
|
|
||||||
channel.onCordovaInfoReady.subscribe(function () {
|
|
||||||
if (['Android', 'windows', 'iOS'].indexOf(device.platform) > -1) {
|
|
||||||
exports.setLaunchDetails();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// Polyfill for Object.assign
|
|
||||||
if (typeof Object.assign != 'function') {
|
|
||||||
Object.assign = function(target) {
|
|
||||||
'use strict';
|
|
||||||
if (target == null) {
|
|
||||||
throw new TypeError('Cannot convert undefined or null to object');
|
|
||||||
}
|
|
||||||
|
|
||||||
target = Object(target);
|
|
||||||
for (var index = 1; index < arguments.length; index++) {
|
|
||||||
var source = arguments[index];
|
|
||||||
if (source != null) {
|
|
||||||
for (var key in source) {
|
|
||||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
||||||
target[key] = source[key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return target;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// Production steps of ECMA-262, Edition 6, 22.1.2.1
|
|
||||||
// Reference: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from
|
|
||||||
if (!Array.from) {
|
|
||||||
Array.from = (function () {
|
|
||||||
var toStr = Object.prototype.toString;
|
|
||||||
var isCallable = function (fn) {
|
|
||||||
return typeof fn === 'function' || toStr.call(fn) === '[object Function]';
|
|
||||||
};
|
|
||||||
var toInteger = function (value) {
|
|
||||||
var number = Number(value);
|
|
||||||
if (isNaN(number)) { return 0; }
|
|
||||||
if (number === 0 || !isFinite(number)) { return number; }
|
|
||||||
return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));
|
|
||||||
};
|
|
||||||
var maxSafeInteger = Math.pow(2, 53) - 1;
|
|
||||||
var toLength = function (value) {
|
|
||||||
var len = toInteger(value);
|
|
||||||
return Math.min(Math.max(len, 0), maxSafeInteger);
|
|
||||||
};
|
|
||||||
|
|
||||||
// The length property of the from method is 1.
|
|
||||||
return function from(arrayLike/*, mapFn, thisArg */) {
|
|
||||||
// 1. Let C be the this value.
|
|
||||||
var C = this;
|
|
||||||
|
|
||||||
// 2. Let items be ToObject(arrayLike).
|
|
||||||
var items = Object(arrayLike);
|
|
||||||
|
|
||||||
// 3. ReturnIfAbrupt(items).
|
|
||||||
if (arrayLike == null) {
|
|
||||||
throw new TypeError("Array.from requires an array-like object - not null or undefined");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 4. If mapfn is undefined, then let mapping be false.
|
|
||||||
var mapFn = arguments.length > 1 ? arguments[1] : void undefined;
|
|
||||||
var T;
|
|
||||||
if (typeof mapFn !== 'undefined') {
|
|
||||||
// 5. else
|
|
||||||
// 5. a If IsCallable(mapfn) is false, throw a TypeError exception.
|
|
||||||
if (!isCallable(mapFn)) {
|
|
||||||
throw new TypeError('Array.from: when provided, the second argument must be a function');
|
|
||||||
}
|
|
||||||
|
|
||||||
// 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined.
|
|
||||||
if (arguments.length > 2) {
|
|
||||||
T = arguments[2];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 10. Let lenValue be Get(items, "length").
|
|
||||||
// 11. Let len be ToLength(lenValue).
|
|
||||||
var len = toLength(items.length);
|
|
||||||
|
|
||||||
// 13. If IsConstructor(C) is true, then
|
|
||||||
// 13. a. Let A be the result of calling the [[Construct]] internal method of C with an argument list containing the single item len.
|
|
||||||
// 14. a. Else, Let A be ArrayCreate(len).
|
|
||||||
var A = isCallable(C) ? Object(new C(len)) : new Array(len);
|
|
||||||
|
|
||||||
// 16. Let k be 0.
|
|
||||||
var k = 0;
|
|
||||||
// 17. Repeat, while k < len… (also steps a - h)
|
|
||||||
var kValue;
|
|
||||||
while (k < len) {
|
|
||||||
kValue = items[k];
|
|
||||||
if (mapFn) {
|
|
||||||
A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k);
|
|
||||||
} else {
|
|
||||||
A[k] = kValue;
|
|
||||||
}
|
|
||||||
k += 1;
|
|
||||||
}
|
|
||||||
// 18. Let putStatus be Put(A, "length", len, true).
|
|
||||||
A.length = len;
|
|
||||||
// 20. Return A.
|
|
||||||
return A;
|
|
||||||
};
|
|
||||||
}());
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
@ -1,317 +0,0 @@
|
|||||||
cordova.define("cordova-plugin-local-notification.LocalNotification", function(require, exports, module) { /*
|
|
||||||
* Apache 2.0 License
|
|
||||||
*
|
|
||||||
* Copyright (c) Sebastian Katzer 2017
|
|
||||||
*
|
|
||||||
* This file contains Original Code and/or Modifications of Original Code
|
|
||||||
* as defined in and that are subject to the Apache License
|
|
||||||
* Version 2.0 (the 'License'). You may not use this file except in
|
|
||||||
* compliance with the License. Please obtain a copy of the License at
|
|
||||||
* http://opensource.org/licenses/Apache-2.0/ and read it before using this
|
|
||||||
* file.
|
|
||||||
*
|
|
||||||
* The Original Code and all software distributed under the License are
|
|
||||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
|
||||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
|
||||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
|
||||||
* Please see the License for the specific language governing rights and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Request permission to show notifications.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.hasPermission = function (callback, scope) {
|
|
||||||
this.core.hasPermission(callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Request permission to show notifications.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.requestPermission = function (callback, scope) {
|
|
||||||
this.core.requestPermission(callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Schedule notifications.
|
|
||||||
*
|
|
||||||
* @param [ Array ] notifications The notifications to schedule.
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
* @param [ Object ] args Optional flags how to schedule.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.schedule = function (notifications, callback, scope, args) {
|
|
||||||
this.core.schedule(notifications, callback, scope, args);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update notifications.
|
|
||||||
*
|
|
||||||
* @param [ Array ] notifications The notifications to schedule.
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
* @param [ Object ] args Optional flags how to schedule.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.update = function (notifications, callback, scope, args) {
|
|
||||||
this.core.update(notifications, callback, scope, args);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clear the specified notifications by id.
|
|
||||||
*
|
|
||||||
* @param [ Array<Int> ] ids The IDs of the notifications.
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.clear = function (ids, callback, scope) {
|
|
||||||
this.core.clear(ids, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clear all triggered notifications.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.clearAll = function (callback, scope) {
|
|
||||||
this.core.clearAll(callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Cancel the specified notifications by id.
|
|
||||||
*
|
|
||||||
* @param [ Array<Int> ] ids The IDs of the notifications.
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.cancel = function (ids, callback, scope) {
|
|
||||||
this.core.cancel(ids, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Cancel all scheduled notifications.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.cancelAll = function (callback, scope) {
|
|
||||||
this.core.cancelAll(callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a notification is present.
|
|
||||||
*
|
|
||||||
* @param [ Int ] id The ID of the notification.
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.isPresent = function (id, callback, scope) {
|
|
||||||
this.core.isPresent(id, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a notification is scheduled.
|
|
||||||
*
|
|
||||||
* @param [ Int ] id The ID of the notification.
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.isScheduled = function (id, callback, scope) {
|
|
||||||
this.core.hasType(id, 'scheduled', callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a notification was triggered.
|
|
||||||
*
|
|
||||||
* @param [ Int ] id The ID of the notification.
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.isTriggered = function (id, callback, scope) {
|
|
||||||
this.core.hasType(id, 'triggered', callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the type (triggered, scheduled) for the notification.
|
|
||||||
*
|
|
||||||
* @param [ Int ] id The ID of the notification.
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.getType = function (id, callback, scope) {
|
|
||||||
this.core.getType(id, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List of all notification ids.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.getIds = function (callback, scope) {
|
|
||||||
this.core.getIds(callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List of all scheduled notification IDs.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.getScheduledIds = function (callback, scope) {
|
|
||||||
this.core.getScheduledIds(callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List of all triggered notification IDs.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.getTriggeredIds = function (callback, scope) {
|
|
||||||
this.core.getTriggeredIds(callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List of local notifications specified by id.
|
|
||||||
* If called without IDs, all notification will be returned.
|
|
||||||
*
|
|
||||||
* @param [ Array<Int> ] ids The IDs of the notifications.
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.get = function (ids, callback, scope) {
|
|
||||||
this.core.get(ids, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List for all notifications.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.getAll = function (callback, scope) {
|
|
||||||
this.core.getAll(callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List of all scheduled notifications.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*/
|
|
||||||
exports.getScheduled = function (callback, scope) {
|
|
||||||
this.core.getScheduled(callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List of all triggered notifications.
|
|
||||||
*
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*/
|
|
||||||
exports.getTriggered = function (callback, scope) {
|
|
||||||
this.core.getTriggered(callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Register an group of actions by id.
|
|
||||||
*
|
|
||||||
* @param [ String ] id The Id of the group.
|
|
||||||
* @param [ Array] actions The action config settings.
|
|
||||||
* @param [ Function ] callback The function to be exec as the callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.addActionGroup = function (id, actions, callback, scope) {
|
|
||||||
this.core.addActionGroup(id, actions, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The (platform specific) default settings.
|
|
||||||
*
|
|
||||||
* @return [ Object ]
|
|
||||||
*/
|
|
||||||
exports.getDefaults = function () {
|
|
||||||
return this.core.getDefaults();
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Overwrite default settings.
|
|
||||||
*
|
|
||||||
* @param [ Object ] newDefaults New default values.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.setDefaults = function (defaults) {
|
|
||||||
this.core.setDefaults(defaults);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Register callback for given event.
|
|
||||||
*
|
|
||||||
* @param [ String ] event The name of the event.
|
|
||||||
* @param [ Function ] callback The function to be exec as callback.
|
|
||||||
* @param [ Object ] scope The callback function's scope.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.on = function (event, callback, scope) {
|
|
||||||
this.core.on(event, callback, scope);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unregister callback for given event.
|
|
||||||
*
|
|
||||||
* @param [ String ] event The name of the event.
|
|
||||||
* @param [ Function ] callback The function to be exec as callback.
|
|
||||||
*
|
|
||||||
* @return [ Void ]
|
|
||||||
*/
|
|
||||||
exports.un = function (event, callback) {
|
|
||||||
this.core.un(event, callback);
|
|
||||||
};
|
|
||||||
|
|
||||||
});
|
|
||||||
@ -1,52 +0,0 @@
|
|||||||
cordova.define("cordova-plugin-statusbar.StatusBarProxy", function(require, exports, module) { /*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
function notSupported(win,fail) {
|
|
||||||
//
|
|
||||||
console.log('StatusBar is not supported');
|
|
||||||
setTimeout(function(){
|
|
||||||
if (win) {
|
|
||||||
win();
|
|
||||||
}
|
|
||||||
// note that while it is not explicitly supported, it does not fail
|
|
||||||
// this is really just here to allow developers to test their code in the browser
|
|
||||||
// and if we fail, then their app might as well. -jm
|
|
||||||
},0);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
isVisible: false,
|
|
||||||
styleBlackTranslucent:notSupported,
|
|
||||||
styleDefault:notSupported,
|
|
||||||
styleLightContent:notSupported,
|
|
||||||
styleBlackOpaque:notSupported,
|
|
||||||
overlaysWebView:notSupported,
|
|
||||||
styleLightContect: notSupported,
|
|
||||||
backgroundColorByName: notSupported,
|
|
||||||
backgroundColorByHexString: notSupported,
|
|
||||||
hide: notSupported,
|
|
||||||
show: notSupported,
|
|
||||||
_ready:notSupported
|
|
||||||
};
|
|
||||||
|
|
||||||
require("cordova/exec/proxy").add("StatusBar", module.exports);
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
@ -1,115 +0,0 @@
|
|||||||
cordova.define("cordova-plugin-statusbar.statusbar", function(require, exports, module) { /*
|
|
||||||
*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* global cordova */
|
|
||||||
|
|
||||||
var exec = require('cordova/exec');
|
|
||||||
|
|
||||||
var namedColors = {
|
|
||||||
"black": "#000000",
|
|
||||||
"darkGray": "#A9A9A9",
|
|
||||||
"lightGray": "#D3D3D3",
|
|
||||||
"white": "#FFFFFF",
|
|
||||||
"gray": "#808080",
|
|
||||||
"red": "#FF0000",
|
|
||||||
"green": "#00FF00",
|
|
||||||
"blue": "#0000FF",
|
|
||||||
"cyan": "#00FFFF",
|
|
||||||
"yellow": "#FFFF00",
|
|
||||||
"magenta": "#FF00FF",
|
|
||||||
"orange": "#FFA500",
|
|
||||||
"purple": "#800080",
|
|
||||||
"brown": "#A52A2A"
|
|
||||||
};
|
|
||||||
|
|
||||||
var StatusBar = {
|
|
||||||
|
|
||||||
isVisible: true,
|
|
||||||
|
|
||||||
overlaysWebView: function (doOverlay) {
|
|
||||||
exec(null, null, "StatusBar", "overlaysWebView", [doOverlay]);
|
|
||||||
},
|
|
||||||
|
|
||||||
styleDefault: function () {
|
|
||||||
// dark text ( to be used on a light background )
|
|
||||||
exec(null, null, "StatusBar", "styleDefault", []);
|
|
||||||
},
|
|
||||||
|
|
||||||
styleLightContent: function () {
|
|
||||||
// light text ( to be used on a dark background )
|
|
||||||
exec(null, null, "StatusBar", "styleLightContent", []);
|
|
||||||
},
|
|
||||||
|
|
||||||
styleBlackTranslucent: function () {
|
|
||||||
// #88000000 ? Apple says to use lightContent instead
|
|
||||||
exec(null, null, "StatusBar", "styleBlackTranslucent", []);
|
|
||||||
},
|
|
||||||
|
|
||||||
styleBlackOpaque: function () {
|
|
||||||
// #FF000000 ? Apple says to use lightContent instead
|
|
||||||
exec(null, null, "StatusBar", "styleBlackOpaque", []);
|
|
||||||
},
|
|
||||||
|
|
||||||
backgroundColorByName: function (colorname) {
|
|
||||||
return StatusBar.backgroundColorByHexString(namedColors[colorname]);
|
|
||||||
},
|
|
||||||
|
|
||||||
backgroundColorByHexString: function (hexString) {
|
|
||||||
if (hexString.charAt(0) !== "#") {
|
|
||||||
hexString = "#" + hexString;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hexString.length === 4) {
|
|
||||||
var split = hexString.split("");
|
|
||||||
hexString = "#" + split[1] + split[1] + split[2] + split[2] + split[3] + split[3];
|
|
||||||
}
|
|
||||||
|
|
||||||
exec(null, null, "StatusBar", "backgroundColorByHexString", [hexString]);
|
|
||||||
},
|
|
||||||
|
|
||||||
hide: function () {
|
|
||||||
exec(null, null, "StatusBar", "hide", []);
|
|
||||||
StatusBar.isVisible = false;
|
|
||||||
},
|
|
||||||
|
|
||||||
show: function () {
|
|
||||||
exec(null, null, "StatusBar", "show", []);
|
|
||||||
StatusBar.isVisible = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
// prime it. setTimeout so that proxy gets time to init
|
|
||||||
window.setTimeout(function () {
|
|
||||||
exec(function (res) {
|
|
||||||
if (typeof res == 'object') {
|
|
||||||
if (res.type == 'tap') {
|
|
||||||
cordova.fireWindowEvent('statusTap');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
StatusBar.isVisible = res;
|
|
||||||
}
|
|
||||||
}, null, "StatusBar", "_ready", []);
|
|
||||||
}, 0);
|
|
||||||
|
|
||||||
module.exports = StatusBar;
|
|
||||||
|
|
||||||
});
|
|
||||||
File diff suppressed because one or more lines are too long
6
src/server/public/scripts/localforage.js.LICENSE.txt
Normal file
6
src/server/public/scripts/localforage.js.LICENSE.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
/*!
|
||||||
|
localForage -- Offline Storage, Improved
|
||||||
|
Version 1.9.0
|
||||||
|
https://localforage.github.io/localForage
|
||||||
|
(c) 2013-2017 Mozilla, Apache License 2.0
|
||||||
|
*/
|
||||||
1
src/server/public/scripts/localforage.js.map
Normal file
1
src/server/public/scripts/localforage.js.map
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sources":[],"names":[],"mappings":"","file":"scripts/localforage.js","sourceRoot":""}
|
||||||
File diff suppressed because one or more lines are too long
@ -1,247 +1,2 @@
|
|||||||
/**
|
if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let a=Promise.resolve();return i[e]||(a=new Promise(async a=>{if("document"in self){const i=document.createElement("script");i.src=e,document.head.appendChild(i),i.onload=a}else importScripts(e),a()})),a.then(()=>{if(!i[e])throw new Error(`Module ${e} didn’t register its module`);return i[e]})},a=(a,i)=>{Promise.all(a.map(e)).then(e=>i(1===e.length?e[0]:e))},i={require:Promise.resolve(a)};self.define=(a,t,r)=>{i[a]||(i[a]=Promise.resolve().then(()=>{let i={};const c={uri:location.origin+a.slice(1)};return Promise.all(t.map(a=>{switch(a){case"exports":return i;case"module":return c;default:return e(a)}})).then(e=>{const a=r(...e);return i.default||(i.default=a),i})}))}}define("./service-worker.js",["./workbox-69b5a3b7"],(function(e){"use strict";self.addEventListener("message",e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()}),e.precacheAndRoute([{url:"autobundle.js",revision:"13c52d778d9424443ebc2f01ea905320"},{url:"autohtml/abstractWindowTemplate.html",revision:"6c3ea1af1622920ddbc5bf4b548792f1"},{url:"autohtml/alphabeticListFragment.html",revision:"17b160c9c961ee83eced3a2c7d5f7749"},{url:"autohtml/changeUserSite.html",revision:"32ca48dd5c17c3ca7259a192c6ad3e5f"},{url:"autohtml/chooseDialog.html",revision:"1e4a0cfb29c721b64799c342f7586ad6"},{url:"autohtml/contactSite.html",revision:"2cdee4e20c1728e1f8e03110cbfcbd4c"},{url:"autohtml/container.html",revision:"7c9ef0046546b6535e2197845804df3d"},{url:"autohtml/credits.html",revision:"7ad14642353efd449a3890122bb73b1e"},{url:"autohtml/end.html",revision:"162cd57d50145eb4dbf51ca7bc97256a"},{url:"autohtml/forgotPasswordSite.html",revision:"ef290b527ae9e6ecf6e2ec31ecc99b87"},{url:"autohtml/impressum.html",revision:"1533d5dba0bd88309b004d65bc59c5f1"},{url:"autohtml/level.html",revision:"05cef7e7e823c25ed8bb735da3cf585b"},{url:"autohtml/loginSite.html",revision:"28536b28261bdd966784e32ef8e8bda2"},{url:"autohtml/menu.html",revision:"a356869e90f07077cc3a07dd36c238c5"},{url:"autohtml/menuSite.html",revision:"926a7a940ae8741445644f16132a9f20"},{url:"autohtml/navbar.html",revision:"04c4cb0adaa4e69cb43fb35cc8482b0a"},{url:"autohtml/notAllowedSite.html",revision:"da6b73654dccd61eebe8f4f1ba06e340"},{url:"autohtml/privacyPolicy.html",revision:"7319848c6b090b0af30ac56492101ee8"},{url:"autohtml/registrationSite.html",revision:"0911eeabc518befa874ea1661b64c3d7"},{url:"autohtml/selectUserDialog.html",revision:"23ae55ef46c250f2ab2528f4422a14d6"},{url:"autohtml/settings.html",revision:"d8a6ead5c9f8dd6f6319b61caab9d359"},{url:"autohtml/settingsSite.html",revision:"06f47ad4321d3ede658035e0411df0b0"},{url:"autohtml/shareDialog.html",revision:"cc8b45e9c7f6264e7b61d6da3e6210c6"},{url:"autohtml/swipeFragment.html",revision:"553c580ff0a282c49a2efe35dabad809"},{url:"autohtml/tabFragment.html",revision:"ca8c3b2c4a353a0ee7900aef656cc958"},{url:"autoimg/arrowLeft.svg",revision:"6bbb4f0e313bb88cd0cc80c2b3cd36fc"},{url:"autoimg/background.png",revision:"be3db85ac9a143f4bcac7db7f5a4856e"},{url:"autoimg/brightAndBeautifull__.mp3",revision:"2b40fd6c076d254cf639f8f46819d5ca"},{url:"autoimg/coin.png",revision:"5b380862ff8349f6b4b8d5241893f508"},{url:"autoimg/coinTower.png",revision:"50cef0780a1affcd301c2c4be09ccb25"},{url:"autoimg/errorIcon.png",revision:"b48a01a1871b83b30c317f0fc4aed555"},{url:"autoimg/help.png",revision:"45a8dc0493279dc37f72f8026af5bc10"},{url:"autoimg/logo.png",revision:"5246599497de18a878951e1e98083493"},{url:"autoimg/music.svg",revision:"ce36074e94a8d19dfa383f98bd66a1f4"},{url:"autoimg/settings.png",revision:"c44ce577ac56632e53208833ff78e67f"},{url:"autoimg/share.svg",revision:"ac8fc0221ee400fc843090a834df7c9d"},{url:"autoimg/single_coin_fall_on_concrete_.mp3",revision:"7f0de4f503644a7fc14de7e307bbf722"},{url:"autoimg/speaker.svg",revision:"0d926850f1558dd431e1c6b10fe0c2ef"},{url:"autoimg/telegram.svg",revision:"e366fed4603e06142a2d6b8221be51b8"},{url:"autoimg/whatsapp.svg",revision:"0fa4092ac1f91a5390e74a3c2c03d5e3"},{url:"autoindex.css",revision:"57dd368ab96459de433a2a3cbacc765d"},{url:"autoindex.html",revision:"d9da26b18b24767c7bedb06a44bc31ce"},{url:"autoscripts/localforage.js",revision:"7ae08028a75fed2acce92b8e75fbe08c"},{url:"autoscripts/sql-wasm.js",revision:"b34648b4b4c89ba52bcd7468fa035583"},{url:"autosql-wasm.wasm",revision:"bff856e0a3429d33cfb88d20b7f9fcff"}],{})}));
|
||||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// If the loader is already loaded, just stop.
|
|
||||||
if (!self.define) {
|
|
||||||
const singleRequire = name => {
|
|
||||||
if (name !== 'require') {
|
|
||||||
name = name + '.js';
|
|
||||||
}
|
|
||||||
let promise = Promise.resolve();
|
|
||||||
if (!registry[name]) {
|
|
||||||
|
|
||||||
promise = new Promise(async resolve => {
|
|
||||||
if ("document" in self) {
|
|
||||||
const script = document.createElement("script");
|
|
||||||
script.src = name;
|
|
||||||
document.head.appendChild(script);
|
|
||||||
script.onload = resolve;
|
|
||||||
} else {
|
|
||||||
importScripts(name);
|
|
||||||
resolve();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
return promise.then(() => {
|
|
||||||
if (!registry[name]) {
|
|
||||||
throw new Error(`Module ${name} didn’t register its module`);
|
|
||||||
}
|
|
||||||
return registry[name];
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const require = (names, resolve) => {
|
|
||||||
Promise.all(names.map(singleRequire))
|
|
||||||
.then(modules => resolve(modules.length === 1 ? modules[0] : modules));
|
|
||||||
};
|
|
||||||
|
|
||||||
const registry = {
|
|
||||||
require: Promise.resolve(require)
|
|
||||||
};
|
|
||||||
|
|
||||||
self.define = (moduleName, depsNames, factory) => {
|
|
||||||
if (registry[moduleName]) {
|
|
||||||
// Module is already loading or loaded.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
registry[moduleName] = Promise.resolve().then(() => {
|
|
||||||
let exports = {};
|
|
||||||
const module = {
|
|
||||||
uri: location.origin + moduleName.slice(1)
|
|
||||||
};
|
|
||||||
return Promise.all(
|
|
||||||
depsNames.map(depName => {
|
|
||||||
switch(depName) {
|
|
||||||
case "exports":
|
|
||||||
return exports;
|
|
||||||
case "module":
|
|
||||||
return module;
|
|
||||||
default:
|
|
||||||
return singleRequire(depName);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
).then(deps => {
|
|
||||||
const facValue = factory(...deps);
|
|
||||||
if(!exports.default) {
|
|
||||||
exports.default = facValue;
|
|
||||||
}
|
|
||||||
return exports;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
|
||||||
define("./service-worker.js",['./workbox-3b8b670f'], function (workbox) { 'use strict';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Welcome to your Workbox-powered service worker!
|
|
||||||
*
|
|
||||||
* You'll need to register this file in your web app.
|
|
||||||
* See https://goo.gl/nhQhGp
|
|
||||||
*
|
|
||||||
* The rest of the code is auto-generated. Please don't update this file
|
|
||||||
* directly; instead, make changes to your Workbox build configuration
|
|
||||||
* and re-run your build process.
|
|
||||||
* See https://goo.gl/2aRDsh
|
|
||||||
*/
|
|
||||||
|
|
||||||
self.addEventListener('message', event => {
|
|
||||||
if (event.data && event.data.type === 'SKIP_WAITING') {
|
|
||||||
self.skipWaiting();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
/**
|
|
||||||
* The precacheAndRoute() method efficiently caches and responds to
|
|
||||||
* requests for URLs in the manifest.
|
|
||||||
* See https://goo.gl/S9QRab
|
|
||||||
*/
|
|
||||||
|
|
||||||
workbox.precacheAndRoute([{
|
|
||||||
"url": "bundle.js",
|
|
||||||
"revision": "45af70c24da2c923b2e86465e4fca63c"
|
|
||||||
}, {
|
|
||||||
"url": "html/abstractWindowTemplate.html",
|
|
||||||
"revision": "00bb2496dac07a457654781fa8c6948c"
|
|
||||||
}, {
|
|
||||||
"url": "html/alphabeticListFragment.html",
|
|
||||||
"revision": "05e1a0c8574de51e0de78277af030920"
|
|
||||||
}, {
|
|
||||||
"url": "html/changeUserSite.html",
|
|
||||||
"revision": "b416ddd8f231490201243a26afa49ca8"
|
|
||||||
}, {
|
|
||||||
"url": "html/chooseDialog.html",
|
|
||||||
"revision": "0171b83550d8a21f1332a5360c10baf5"
|
|
||||||
}, {
|
|
||||||
"url": "html/contactSite.html",
|
|
||||||
"revision": "b8acb685882c2cb4a970e5a7615a5c5d"
|
|
||||||
}, {
|
|
||||||
"url": "html/container.html",
|
|
||||||
"revision": "a7285c607fdacd912f47738462150efe"
|
|
||||||
}, {
|
|
||||||
"url": "html/credits.html",
|
|
||||||
"revision": "efb301e087d02b5dcd97ecda45e661ca"
|
|
||||||
}, {
|
|
||||||
"url": "html/end.html",
|
|
||||||
"revision": "8aa547874fa8716e1ddb8d29276dcc91"
|
|
||||||
}, {
|
|
||||||
"url": "html/forgotPasswordSite.html",
|
|
||||||
"revision": "b063ea7614dce48ed6794400d34b135f"
|
|
||||||
}, {
|
|
||||||
"url": "html/impressum.html",
|
|
||||||
"revision": "d0e2e95559a8820115ac92659e3d2590"
|
|
||||||
}, {
|
|
||||||
"url": "html/level.html",
|
|
||||||
"revision": "481bf599c219a9f2d94eae4096fc6d79"
|
|
||||||
}, {
|
|
||||||
"url": "html/loginSite.html",
|
|
||||||
"revision": "4d8c2f02ba16dbf38ad679827cbd62f2"
|
|
||||||
}, {
|
|
||||||
"url": "html/menu.html",
|
|
||||||
"revision": "06cf7df2e0e4918542d0d83f21a1c2b0"
|
|
||||||
}, {
|
|
||||||
"url": "html/menuSite.html",
|
|
||||||
"revision": "8dae573b1dcba5727f4bc598b1a09007"
|
|
||||||
}, {
|
|
||||||
"url": "html/navbar.html",
|
|
||||||
"revision": "482d5ac8a3b6ea9ae3f06543d3eed977"
|
|
||||||
}, {
|
|
||||||
"url": "html/notAllowedSite.html",
|
|
||||||
"revision": "2a65f4f3da6f1f508736bd63c3d093ea"
|
|
||||||
}, {
|
|
||||||
"url": "html/privacyPolicy.html",
|
|
||||||
"revision": "f55a77320c0744ac684231107bd51012"
|
|
||||||
}, {
|
|
||||||
"url": "html/registrationSite.html",
|
|
||||||
"revision": "5d732604002df8c6eb1f206709bc4b9a"
|
|
||||||
}, {
|
|
||||||
"url": "html/selectUserDialog.html",
|
|
||||||
"revision": "3cd8fc58c0d2c6a260747475f861b855"
|
|
||||||
}, {
|
|
||||||
"url": "html/settings.html",
|
|
||||||
"revision": "5a7cf19679ca839e4badd6624b6c35aa"
|
|
||||||
}, {
|
|
||||||
"url": "html/settingsSite.html",
|
|
||||||
"revision": "c20c185a3dd15b8e5a62d9934f0402f5"
|
|
||||||
}, {
|
|
||||||
"url": "html/shareDialog.html",
|
|
||||||
"revision": "49fd3d7553c48ecc11c3861afc0b0771"
|
|
||||||
}, {
|
|
||||||
"url": "html/swipeFragment.html",
|
|
||||||
"revision": "3278efb5dd279a359cdd950fa002b234"
|
|
||||||
}, {
|
|
||||||
"url": "html/tabFragment.html",
|
|
||||||
"revision": "733ad585b3927993d15cbd04e9c135da"
|
|
||||||
}, {
|
|
||||||
"url": "html/tutorialSite.html",
|
|
||||||
"revision": "24b319cd6fbb2d54fa57fdf46176287a"
|
|
||||||
}, {
|
|
||||||
"url": "img/arrowLeft.svg",
|
|
||||||
"revision": "6bbb4f0e313bb88cd0cc80c2b3cd36fc"
|
|
||||||
}, {
|
|
||||||
"url": "img/brightAndBeautifull__.mp3",
|
|
||||||
"revision": "2b40fd6c076d254cf639f8f46819d5ca"
|
|
||||||
}, {
|
|
||||||
"url": "img/coin.png",
|
|
||||||
"revision": "5b380862ff8349f6b4b8d5241893f508"
|
|
||||||
}, {
|
|
||||||
"url": "img/coinTower.png",
|
|
||||||
"revision": "50cef0780a1affcd301c2c4be09ccb25"
|
|
||||||
}, {
|
|
||||||
"url": "img/errorIcon.png",
|
|
||||||
"revision": "b48a01a1871b83b30c317f0fc4aed555"
|
|
||||||
}, {
|
|
||||||
"url": "img/help.png",
|
|
||||||
"revision": "45a8dc0493279dc37f72f8026af5bc10"
|
|
||||||
}, {
|
|
||||||
"url": "img/logo.png",
|
|
||||||
"revision": "5246599497de18a878951e1e98083493"
|
|
||||||
}, {
|
|
||||||
"url": "img/music.svg",
|
|
||||||
"revision": "ce36074e94a8d19dfa383f98bd66a1f4"
|
|
||||||
}, {
|
|
||||||
"url": "img/settings.png",
|
|
||||||
"revision": "c44ce577ac56632e53208833ff78e67f"
|
|
||||||
}, {
|
|
||||||
"url": "img/share.svg",
|
|
||||||
"revision": "ac8fc0221ee400fc843090a834df7c9d"
|
|
||||||
}, {
|
|
||||||
"url": "img/single_coin_fall_on_concrete_.mp3",
|
|
||||||
"revision": "7f0de4f503644a7fc14de7e307bbf722"
|
|
||||||
}, {
|
|
||||||
"url": "img/speaker.svg",
|
|
||||||
"revision": "0d926850f1558dd431e1c6b10fe0c2ef"
|
|
||||||
}, {
|
|
||||||
"url": "img/telegram.svg",
|
|
||||||
"revision": "e366fed4603e06142a2d6b8221be51b8"
|
|
||||||
}, {
|
|
||||||
"url": "img/whatsapp.svg",
|
|
||||||
"revision": "0fa4092ac1f91a5390e74a3c2c03d5e3"
|
|
||||||
}, {
|
|
||||||
"url": "index.css",
|
|
||||||
"revision": "6fc107452ad861200f8193f85e7709c2"
|
|
||||||
}, {
|
|
||||||
"url": "index.html",
|
|
||||||
"revision": "5f8832bceb6eae4ba8126bf5b03e0d38"
|
|
||||||
}, {
|
|
||||||
"url": "scripts/localforage.js",
|
|
||||||
"revision": "7e2a4110781376e372c538e67787773a"
|
|
||||||
}, {
|
|
||||||
"url": "scripts/sql-wasm.js",
|
|
||||||
"revision": "7da4edc42b013dcff1b48e8c02867e26"
|
|
||||||
}, {
|
|
||||||
"url": "sql-wasm.wasm",
|
|
||||||
"revision": "bff856e0a3429d33cfb88d20b7f9fcff"
|
|
||||||
}], {});
|
|
||||||
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=service-worker.js.map
|
//# sourceMappingURL=service-worker.js.map
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
BIN
src/server/public/wordRotator.apk
Normal file
BIN
src/server/public/wordRotator.apk
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
2
src/server/public/workbox-69b5a3b7.js
Normal file
2
src/server/public/workbox-69b5a3b7.js
Normal file
File diff suppressed because one or more lines are too long
1
src/server/public/workbox-69b5a3b7.js.map
Normal file
1
src/server/public/workbox-69b5a3b7.js.map
Normal file
File diff suppressed because one or more lines are too long
@ -5,7 +5,7 @@ const functions = require("../../lib/functions.js");
|
|||||||
|
|
||||||
async function solveLevel() {
|
async function solveLevel() {
|
||||||
await functions.pause(500);
|
await functions.pause(500);
|
||||||
await browser.executeAsync((delayFactor, done) => {
|
await browser.executeAsync(async (delayFactor, done) => {
|
||||||
const delay = 100*delayFactor;
|
const delay = 100*delayFactor;
|
||||||
|
|
||||||
let promise = Promise.resolve();
|
let promise = Promise.resolve();
|
||||||
@ -69,6 +69,7 @@ describe("fsj suite", () => {
|
|||||||
|
|
||||||
let baseUrl = null;
|
let baseUrl = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
|
|
||||||
if (browser.config.baseUrl.trim() !== "") {
|
if (browser.config.baseUrl.trim() !== "") {
|
||||||
baseUrl = browser.config.baseUrl;
|
baseUrl = browser.config.baseUrl;
|
||||||
} else {
|
} else {
|
||||||
@ -81,6 +82,7 @@ describe("fsj suite", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(async function () {
|
beforeEach(async function () {
|
||||||
|
|
||||||
await browser.url(baseUrl);
|
await browser.url(baseUrl);
|
||||||
|
|
||||||
await browser.waitUntil(async () => {
|
await browser.waitUntil(async () => {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user