Dateien nach "/" hochladen
This commit is contained in:
parent
6a66046f61
commit
69ab0ff6ce
Binary file not shown.
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "Materialverwaltung",
|
||||
"short_name": "Materialverwaltung",
|
||||
"start_url": "index.php",
|
||||
"display": "standalone",
|
||||
"background_color": "#ffffff",
|
||||
"theme_color": "#2196f3",
|
||||
"author": "M_Viper",
|
||||
"icons": [
|
||||
{
|
||||
"src": "img/icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "img/icon-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
// service-worker.js
|
||||
|
||||
self.addEventListener('install', function(event) {
|
||||
event.waitUntil(
|
||||
caches.open('my-cache').then(function(cache) {
|
||||
return cache.addAll([
|
||||
'index.php',
|
||||
'add_material_form.php',
|
||||
'article_overview.php',
|
||||
'check_expiration.php',
|
||||
'css/style.css',
|
||||
'img/favicon.png',
|
||||
'img/Willkommen.png'
|
||||
]);
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
self.addEventListener('fetch', function(event) {
|
||||
event.respondWith(
|
||||
fetch(event.request).catch(function() {
|
||||
return caches.match(event.request);
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
// Öffnen der Datenbankverbindung bei Bedarf
|
||||
function openDatabaseConnection() {
|
||||
// Code zum Öffnen der Datenbankverbindung
|
||||
}
|
||||
|
||||
// Schließen der Datenbankverbindung bei Bedarf
|
||||
function closeDatabaseConnection() {
|
||||
// Code zum Schließen der Datenbankverbindung
|
||||
}
|
||||
|
||||
// Events zum Öffnen und Schließen der Datenbankverbindung
|
||||
self.addEventListener('activate', function(event) {
|
||||
openDatabaseConnection();
|
||||
});
|
||||
|
||||
// Nachrichtenempfang vom Hauptthread (z.B. von der index.php)
|
||||
self.addEventListener('message', function(event) {
|
||||
if (event.data.action === 'closeDatabaseConnection') {
|
||||
closeDatabaseConnection();
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue