reverse for; removed / from serviceworker

This commit is contained in:
Senta Mandutz 2019-02-08 14:59:19 +01:00
parent 464c8aca5f
commit df40bcbfb1
4 changed files with 22 additions and 22 deletions

View File

@ -5,19 +5,19 @@ const CreateMsgRouter = {
<form class="new-msg-form" @submit.prevent=createMsg> <form class="new-msg-form" @submit.prevent=createMsg>
<div class="form-group bmd-form-group"> <div class="form-group bmd-form-group">
<label class="bmd-label-floating">Betreff</label> <label class="bmd-label-floating">Betreff</label>
<input type="text" class="form-control" id="subject" value="WICHTIG!"> <input type="text" class="form-control" id="subject">
</div> </div>
<div class="form-group bmd-form-group"> <div class="form-group bmd-form-group">
<label class="bmd-label-floating">Tags</label> <label class="bmd-label-floating">Tags</label>
<input type="text" class="form-control" id="tag" value="#efi"> <input type="text" class="form-control" id="tag">
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="bmd-label-floating">Nachricht</label> <label class="bmd-label-floating">Nachricht</label>
<textarea class="form-control" id="message" rows="5">Nachricht</textarea> <textarea class="form-control" id="message" rows="5"></textarea>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="bmd-label-floating">User</label> <label class="bmd-label-floating">User</label>
<input type="text" class="form-control" id="user" value="Dito27"> <input type="text" class="form-control" id="user">
</div> </div>
<button class="btn btn-default"><a @click="$router.go(-1)">ABBRECHEN </a></button> <button class="btn btn-default"><a @click="$router.go(-1)">ABBRECHEN </a></button>
<button type="submit" class="btn btn-raised om-btn"><a @click="$router.push('/home')">SENDEN</a></button> <button type="submit" class="btn btn-raised om-btn"><a @click="$router.push('/home')">SENDEN</a></button>

View File

@ -2,7 +2,7 @@ const HomeRouter = {
template: ` template: `
<div id="om-msg-cards"> <div id="om-msg-cards">
<MsgCard <MsgCard
v-for="id in messagelist" v-for="id in messagelist.slice().reverse()"
:key="id" :key="id"
:msg="messages[id] || {}" :msg="messages[id] || {}"
></MsgCard> ></MsgCard>

View File

@ -7,7 +7,7 @@ if ('serviceWorker' in navigator) {
window.addEventListener('load', function () { window.addEventListener('load', function () {
// Register a service worker hosted at the root of the // Register a service worker hosted at the root of the
// site using the default scope ('/'). // site using the default scope ('/').
return navigator.serviceWorker.register('/serviceWorker.js', { return navigator.serviceWorker.register('serviceWorker.js', {
scope: '/' scope: '/'
}).then(function (registration) { }).then(function (registration) {
return console.log('[ServiceWorker] Registration succeeded: ', registration); return console.log('[ServiceWorker] Registration succeeded: ', registration);

View File

@ -6,21 +6,21 @@ const staticCacheKey = cacheKey + 's-v' + '1';
const dataCacheKey = casheKey + 'd-v' + '1'; const dataCacheKey = casheKey + 'd-v' + '1';
const staticFilesToCache = [ const staticFilesToCache = [
'/', '/',
'/manifest.json', 'manifest.json',
'/index.html', 'index.html',
'/message.html', 'message.html',
'/bookmark.js', 'bookmark.js',
'/createMessage.js', 'createMessage.js',
'/files.js', 'files.js',
'/home.js', 'home.js',
'/main.js', 'main.js',
'/profil.js', 'profil.js',
'/favicon.ico', 'favicon.ico',
'/img/th_nbg_ohmicon_amp.png', 'img/th_nbg_ohmicon_amp.png',
'/lib/jquery-3.3.1.min.js', 'lib/jquery-3.3.1.min.js',
'/lib/vue.js', 'lib/vue.js',
'/lib/vue-router.js', 'lib/vue-router.js',
'/style/style.css', 'style/style.css',
]; ];
const dataFilesToCache = [ const dataFilesToCache = [
'', '',
@ -76,7 +76,7 @@ self.addEventListener('activate', function(event) {
// NOTE: Fetch structure // TODO: Setup fetching method // NOTE: Fetch structure // TODO: Setup fetching method
self.addEventListener('fetch', function(event) { self.addEventListener('fetch', function(event) {
const dataUrl = ' localhost:8888/'; // Provide HTTPS URL for query data. const dataUrl = ' localhost:8013/'; // Provide HTTPS URL for query data.
// const url = new URL(event.request.url); // const url = new URL(event.request.url);
console.log('[ServiceWorker] Fetch', event.request.url); console.log('[ServiceWorker] Fetch', event.request.url);