Merge branch 'release/v_1.7'
This commit is contained in:
20
.github/ISSUE_TEMPLATE/-de--feature-anfrage.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/-de--feature-anfrage.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: "[DE] Feature-Anfrage"
|
||||||
|
about: Schlage eine Idee für dieses Projekt vor
|
||||||
|
title: ''
|
||||||
|
labels: enhancement
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Bezieht sich Deine Feature-Anfrage auf ein Problem? Bitte beschreiben.**
|
||||||
|
Eine klare und präzise Beschreibung des Problems. Z.B. Ich bin immer frustriert, wenn [...]
|
||||||
|
|
||||||
|
**Beschreibe die gewünschte Lösung**
|
||||||
|
Eine klare und präzise Beschreibung dessen, was passieren soll.
|
||||||
|
|
||||||
|
**Beschreibe Alternativen, die Du in Betracht gezogen hast**
|
||||||
|
Eine klare und präzise Beschreibung aller alternativen Lösungen oder Funktionen, die Du in Betracht gezogen hast.
|
||||||
|
|
||||||
|
**Zusätzlicher Kontext**
|
||||||
|
Füge hier weitere Kontexte oder Screenshots zur Feature-Anfrage hinzu.
|
||||||
38
.github/ISSUE_TEMPLATE/-de--fehlerbericht.md
vendored
Normal file
38
.github/ISSUE_TEMPLATE/-de--fehlerbericht.md
vendored
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
name: "[DE] Fehlerbericht"
|
||||||
|
about: Erstelle einen Bericht, um uns zu helfen, die App zu verbessern
|
||||||
|
title: ''
|
||||||
|
labels: bug
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Beschreibe den Fehler**
|
||||||
|
Eine klare und präzise Beschreibung des Fehlers.
|
||||||
|
|
||||||
|
**Reproduzierung**
|
||||||
|
Schritte zum Reproduzieren des Fehlers:
|
||||||
|
1. Gehe zu '...'
|
||||||
|
2. Klicke auf '....'
|
||||||
|
3. Scrolle nach unten zu '....'
|
||||||
|
4. Sieh den Fehler
|
||||||
|
|
||||||
|
**Erwartetes Verhalten**
|
||||||
|
Eine klare und präzise Beschreibung dessen, was Du erwartet hattest.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
Füge gegebenenfalls Screenshots hinzu, um Dein Problem zu erklären.
|
||||||
|
|
||||||
|
**Desktop (bitte verfolständige die folgenden Informationen):**
|
||||||
|
- Betriebssystem: [z.B. Windows 10]
|
||||||
|
- Browser [z.B. chrome, safari]
|
||||||
|
- Version [z.B. 2.14]
|
||||||
|
|
||||||
|
**Smartphone (bitte verfolständige die folgenden Informationen):**
|
||||||
|
- Gerät: [z.B. iPhone 6]
|
||||||
|
- Betriebssystem: [z.B. iOS 8.1]
|
||||||
|
- Browser [z.B. stock browser, safari]
|
||||||
|
- Version [z.B. 2.14]
|
||||||
|
|
||||||
|
**Zusätzlicher Kontext**
|
||||||
|
Füge hier einen anderen Kontext zum Problem hinzu.
|
||||||
38
.github/ISSUE_TEMPLATE/-en--bug-report.md
vendored
Normal file
38
.github/ISSUE_TEMPLATE/-en--bug-report.md
vendored
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
name: "[EN] Bug report"
|
||||||
|
about: Create a report to help us improve
|
||||||
|
title: ''
|
||||||
|
labels: bug
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Steps to reproduce the behavior:
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Desktop (please complete the following information):**
|
||||||
|
- OS: [e.g. Windows 10]
|
||||||
|
- Browser [e.g. chrome, safari]
|
||||||
|
- Version [e.g. 2.14]
|
||||||
|
|
||||||
|
**Smartphone (please complete the following information):**
|
||||||
|
- Device: [e.g. iPhone 6]
|
||||||
|
- OS: [e.g. iOS 8.1]
|
||||||
|
- Browser [e.g. stock browser, safari]
|
||||||
|
- Version [e.g. 2.14]
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
||||||
20
.github/ISSUE_TEMPLATE/-en--feature-request.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/-en--feature-request.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: "[EN] Feature request"
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
title: ''
|
||||||
|
labels: enhancement
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**Describe alternatives you've considered**
|
||||||
|
A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
||||||
11
README.md
Normal file
11
README.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Regatten.net App
|
||||||
|
|
||||||
|
Willkommen im GitHub-Repository unserer neuen Regatten.net App.
|
||||||
|
|
||||||
|
Falls sich jemand dafür interessiert, ist hier der gesamte Quellcode unserer neuen App zu finden.
|
||||||
|
Bitte beachtet, dass diese App einschließlich dem gesamten Quellcode exklusivem Urheberrecht unterliegt. Sie darf also nicht kopiert, verteilt oder verändert werden.
|
||||||
|
Sollte Interesse an einer Anbindung an unser System bestehen, kontaktiere uns bitte einfach (https://regatten.net/contact)
|
||||||
|
|
||||||
|
Der Hauptzweck dieses Repository besteht jedoch darin, Feedback von Euch zu unserer neuen App zu bekommen.
|
||||||
|
Selbstverständlich könnt Ihr uns auch weiterhin auf anderen Kanälen erreichen, doch für Problem-Meldungen und Verbesserungsvorschläge ist GitHub am besten geeignet.
|
||||||
|
Wie Du Teil unseres BETA-Programmes wirst, die App installierst und Feedback gibst, erfährst Du in unserem [Wiki](https://github.com/ostertun/RegattenApp/wiki).
|
||||||
1484
client/scripts/mobileconsole.js
Normal file
1484
client/scripts/mobileconsole.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -206,7 +206,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="menu-developer" class="menu menu-box-bottom menu-box-detached rounded-m" data-menu-height="310">
|
<div id="menu-developer" class="menu menu-box-bottom menu-box-detached rounded-m" data-menu-height="360">
|
||||||
<div class="menu-title"><h1>Entwickler-Optionen</h1><p class="color-highlight">Version <?php echo PWA_VERSION; ?></p><a href="#" class="close-menu"><i class="fa fa-times"></i></a></div>
|
<div class="menu-title"><h1>Entwickler-Optionen</h1><p class="color-highlight">Version <?php echo PWA_VERSION; ?></p><a href="#" class="close-menu"><i class="fa fa-times"></i></a></div>
|
||||||
<div class="divider divider-margins mb-n2"></div>
|
<div class="divider divider-margins mb-n2"></div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
@@ -226,11 +226,16 @@
|
|||||||
<span>Reset Cache</span>
|
<span>Reset Cache</span>
|
||||||
<i class="fa fa-angle-right"></i>
|
<i class="fa fa-angle-right"></i>
|
||||||
</a>
|
</a>
|
||||||
<a href="https://report.regatten.net/" class="border-0">
|
<a href="https://report.regatten.net/">
|
||||||
<i class="fa font-14 fa-bug rounded-s bg-highlight color-white"></i>
|
<i class="fa font-14 fa-bug rounded-s bg-highlight color-white"></i>
|
||||||
<span>Problem melden</span>
|
<span>Problem melden</span>
|
||||||
<i class="fa fa-angle-right"></i>
|
<i class="fa fa-angle-right"></i>
|
||||||
</a>
|
</a>
|
||||||
|
<a href="#" onclick="mobileConsole.displayConsole(); return false;" class="border-0 menu-close">
|
||||||
|
<i class="fa font-14 fa-terminal rounded-s bg-highlight color-white"></i>
|
||||||
|
<span>Console anzeigen</span>
|
||||||
|
<i class="fa fa-angle-right"></i>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
<html lang="de">
|
<html lang="de">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
<script type="text/javascript" src="<?php echo SERVER_ADDR; ?>/client/scripts/mobileconsole.js"></script>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||||
|
|||||||
@@ -120,8 +120,10 @@ var siteScript = async function() {
|
|||||||
ms = parseDate(regatta['meldungSchluss']);
|
ms = parseDate(regatta['meldungSchluss']);
|
||||||
}
|
}
|
||||||
var diff = Math.round((ms - today) / 86400000);
|
var diff = Math.round((ms - today) / 86400000);
|
||||||
if ((ms >= today) && (diff < 7)) {
|
if (ms < today) {
|
||||||
color = ' color-red2-dark';
|
color = ' color-red2-dark';
|
||||||
|
} else if (diff < 7) {
|
||||||
|
color = ' color-yellow2-dark';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -227,8 +229,10 @@ var siteScript = async function() {
|
|||||||
ms = parseDate(regatta['meldungSchluss']);
|
ms = parseDate(regatta['meldungSchluss']);
|
||||||
}
|
}
|
||||||
var diff = Math.round((ms - today) / 86400000);
|
var diff = Math.round((ms - today) / 86400000);
|
||||||
if ((ms >= today) && (diff < 7)) {
|
if (ms < today) {
|
||||||
color = ' color-red2-dark';
|
color = ' color-red2-dark';
|
||||||
|
} else if (diff < 7) {
|
||||||
|
color = ' color-yellow2-dark';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,8 +160,10 @@ var siteScript = async function() {
|
|||||||
ms = parseDate(entry['meldungSchluss']);
|
ms = parseDate(entry['meldungSchluss']);
|
||||||
}
|
}
|
||||||
var diff = Math.round((ms - today) / 86400000);
|
var diff = Math.round((ms - today) / 86400000);
|
||||||
if ((ms >= today) && (diff < 7)) {
|
if (ms < today) {
|
||||||
color = ' color-red2-dark';
|
color = ' color-red2-dark';
|
||||||
|
} else if (diff < 7) {
|
||||||
|
color = ' color-yellow2-dark';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
define('PWA_VERSION', '1.6');
|
define('PWA_VERSION', '1.7');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -56,15 +56,19 @@ workbox.precaching.precacheAndRoute([
|
|||||||
'/manifest.json.php',
|
'/manifest.json.php',
|
||||||
];
|
];
|
||||||
$dirsToCache = [
|
$dirsToCache = [
|
||||||
'/client',
|
'/client/app',
|
||||||
|
'/client/fonts/css',
|
||||||
|
'/client/fonts/webfonts',
|
||||||
|
'/client/images',
|
||||||
|
'/client/scripts',
|
||||||
|
'/client/styles',
|
||||||
];
|
];
|
||||||
|
|
||||||
function addDir($path) {
|
function addDir($path) {
|
||||||
global $filesToCache;
|
global $filesToCache;
|
||||||
if ($dir = opendir(__DIR__ . $path)) {
|
if ($dir = opendir(__DIR__ . $path)) {
|
||||||
while (($file = readdir($dir)) !== false) {
|
while (($file = readdir($dir)) !== false) {
|
||||||
if ($file == '.') continue;
|
if (substr($file, 0, 1) == '.') continue;
|
||||||
if ($file == '..') continue;
|
|
||||||
if (is_dir(__DIR__ . $path . '/' . $file)) {
|
if (is_dir(__DIR__ . $path . '/' . $file)) {
|
||||||
addDir($path . '/' . $file);
|
addDir($path . '/' . $file);
|
||||||
} else {
|
} else {
|
||||||
@@ -109,30 +113,41 @@ workbox.routing.registerRoute(
|
|||||||
|
|
||||||
// DB
|
// DB
|
||||||
|
|
||||||
var db = null;
|
function openDb() {
|
||||||
if (indexedDB) {
|
return new Promise(function(resolve) {
|
||||||
|
if (indexedDB) {
|
||||||
var request = indexedDB.open('regatten_app_db_<?php echo BOATCLASS; ?>');
|
var request = indexedDB.open('regatten_app_db_<?php echo BOATCLASS; ?>');
|
||||||
request.onerror = function (e) {
|
request.onerror = function (e) {
|
||||||
console.log('[sW] Cannot open DB:', e.target.errorCode);
|
console.log('[sW] Cannot open DB:', e.targer.errorCode);
|
||||||
|
resolve(null);
|
||||||
};
|
};
|
||||||
request.onupgradeneeded = function (e) {
|
request.onupgradeneeded = function (e) {
|
||||||
console.log('[sW] DB does not exist');
|
console.log('[sW] DB does not exist');
|
||||||
e.target.transaction.abort();
|
e.target.transaction.abort();
|
||||||
|
resolve(null);
|
||||||
};
|
};
|
||||||
request.onsuccess = function (e) {
|
request.onsuccess = function (e) {
|
||||||
console.log('[sW] DB loaded');
|
console.log('[sW] DB loaded');
|
||||||
db = e.target.result;
|
var db = e.target.result;
|
||||||
db.onerror = function (e) {
|
db.onerror = function (e) {
|
||||||
console.log('[sW] DB Error:', e)
|
console.log('[sW] DB Error:', e);
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
resolve(db);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
resolve(null);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function dbSettingsGet(key) {
|
function dbSettingsGet(key) {
|
||||||
return new Promise(function(resolve) {
|
return new Promise(async function(resolve) {
|
||||||
if (db != null) {
|
var db = await openDb();
|
||||||
|
if (db !== null) {
|
||||||
var request = db.transaction('settings').objectStore('settings').get(key);
|
var request = db.transaction('settings').objectStore('settings').get(key);
|
||||||
request.onsuccess = function (event) {
|
request.onsuccess = function (event) {
|
||||||
|
db.close();
|
||||||
|
console.log('[sW] DB closed');
|
||||||
resolve(typeof request.result != 'undefined' ? request.result.value : null);
|
resolve(typeof request.result != 'undefined' ? request.result.value : null);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -141,10 +156,20 @@ function dbSettingsGet(key) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function dbSettingsSet(key, value) {
|
async function dbSettingsSet(key, value) {
|
||||||
|
var db = await openDb();
|
||||||
if (db != null) {
|
if (db != null) {
|
||||||
var os = db.transaction('settings', 'readwrite').objectStore('settings');
|
var os = db.transaction('settings', 'readwrite').objectStore('settings');
|
||||||
os.put({ key: key, value: value});
|
var request = os.put({ key: key, value: value});
|
||||||
|
request.onerror = function (event) {
|
||||||
|
console.log('[sW] Error while saving data to DB:', e);
|
||||||
|
db.close();
|
||||||
|
console.log('[sW] DB closed');
|
||||||
|
}
|
||||||
|
request.onsuccess = function (event) {
|
||||||
|
db.close();
|
||||||
|
console.log('[sW] DB closed');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,7 +244,7 @@ self.addEventListener('push', async function(event) {
|
|||||||
data: data,
|
data: data,
|
||||||
body: data.body,
|
body: data.body,
|
||||||
icon: getEntry(data, 'icon', '<?php echo SERVER_ADDR; ?>/client/app/icons/icon-512x512.png'),
|
icon: getEntry(data, 'icon', '<?php echo SERVER_ADDR; ?>/client/app/icons/icon-512x512.png'),
|
||||||
badge: '<?php echo SERVER_ADDR; ?>/client/app/icons/icon-96x96.png',
|
badge: '<?php echo SERVER_ADDR; ?>/client/app/icons/badge-128x128.png',
|
||||||
vibrate: [500,100,500]
|
vibrate: [500,100,500]
|
||||||
};
|
};
|
||||||
if ((image = getEntry(data, 'image', null)) !== null) {
|
if ((image = getEntry(data, 'image', null)) !== null) {
|
||||||
@@ -227,13 +252,50 @@ self.addEventListener('push', async function(event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Force refresh on next app open
|
// Force refresh on next app open
|
||||||
|
var db = await openDb();
|
||||||
|
if (db != null) {
|
||||||
var os = db.transaction('update_times', 'readwrite').objectStore('update_times');
|
var os = db.transaction('update_times', 'readwrite').objectStore('update_times');
|
||||||
os.put({ table: 'last_sync', time: 0 });
|
var request = os.put({ table: 'last_sync', time: 0 });
|
||||||
|
request.onerror = function (event) {
|
||||||
|
console.log('[sW] Error while saving data to DB:', e);
|
||||||
|
db.close();
|
||||||
|
console.log('[sW] DB closed');
|
||||||
|
}
|
||||||
|
request.onsuccess = function (event) {
|
||||||
|
db.close();
|
||||||
|
console.log('[sW] DB closed');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
console.log('Showing notification');
|
console.log('Showing notification');
|
||||||
self.registration.showNotification(data.title, options);
|
self.registration.showNotification(data.title, options);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'forcesync':
|
||||||
|
// Force refresh on next app open
|
||||||
|
var db = await openDb();
|
||||||
|
if (db != null) {
|
||||||
|
var os = db.transaction('update_times', 'readwrite').objectStore('update_times');
|
||||||
|
var request = os.put({ table: 'last_sync', time: 0 });
|
||||||
|
request.onerror = function (event) {
|
||||||
|
console.log('[sW] Error while saving data to DB:', e);
|
||||||
|
db.close();
|
||||||
|
console.log('[sW] DB closed');
|
||||||
}
|
}
|
||||||
|
request.onsuccess = function (event) {
|
||||||
|
console.log('[sW] Data successfully saved');
|
||||||
|
db.close();
|
||||||
|
console.log('[sW] DB closed');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
console.log('[sW] Push type unknown:', data.type);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log('[sW] No push type given!');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user