Next Big Update
This commit is contained in:
parent
ac4b4d1651
commit
2db6d47475
@ -1,16 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<div class="header-top">
|
<div class="header-top">
|
||||||
<div class="">
|
<div class>
|
||||||
<h1 class="display-4">{{ title }}</h1>
|
<h1 class="display-4">{{ title }}</h1>
|
||||||
<p class="lead">{{ content }}</p>
|
<p class="lead">{{ content }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="">
|
<div class>
|
||||||
<i id="sub-identifi" class="fa fa-bell-o bell" aria-hidden="true"></i>
|
<i id="sub-identifi" class="fa fa-bell-o bell" aria-hidden="true"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-cloak>
|
||||||
<GamesList />
|
<GamesList />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="row">
|
<div class="row" v-if="isLoaded">
|
||||||
<div class="col-sm-6 col-md-4 mb-5" v-for="game of games" v-bind:key="game.name">
|
<div class="col-sm-6 col-md-4 mb-5" v-for="game of games" v-bind:key="game.name">
|
||||||
<a :href="game.url">
|
<a :href="game.url">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
@ -16,6 +16,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex justify-content-center" v-else>
|
||||||
<div class="spinner-border" role="status">
|
<div class="spinner-border" role="status">
|
||||||
<span class="sr-only">Loading...</span>
|
<span class="sr-only">Loading...</span>
|
||||||
</div>
|
</div>
|
||||||
@ -23,6 +25,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.spinner-border {
|
||||||
|
width: 3rem;
|
||||||
|
height: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: #222;
|
background: #222;
|
||||||
@ -72,23 +79,27 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isLoaded: true,
|
||||||
games: []
|
games: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
async created() {
|
created() {
|
||||||
try {
|
this.getGames();
|
||||||
var res = async axios.get(
|
},
|
||||||
"https://api.gabenparadise.com/api/data",
|
methods: {
|
||||||
{ crossdomain: true }
|
getGames() {
|
||||||
);
|
this.isLoaded = false;
|
||||||
this.games = res.data;
|
axios.get("https://api.gabenparadise.com/api/data").then(response => {
|
||||||
} catch (e) {
|
console.log(response);
|
||||||
console.error(e);
|
if (response.status === 200) {
|
||||||
} finally {
|
this.isLoaded = true;
|
||||||
console.error('finally');
|
this.games = response.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -44,8 +44,8 @@ if (process.env.NODE_ENV === "production") {
|
|||||||
messaging.getToken().then(function (token) {
|
messaging.getToken().then(function (token) {
|
||||||
console.log("Token: ", token)
|
console.log("Token: ", token)
|
||||||
console.log(JSON.stringify({ "token": token }));
|
console.log(JSON.stringify({ "token": token }));
|
||||||
|
//FIX: New URL
|
||||||
axios.post('https://dev.steelants.cz/vasek/gabenparadise/api/subscribe', {
|
axios.post('https://api.gabenparadise.com/subscribe', {
|
||||||
"token" : token
|
"token" : token
|
||||||
}, {
|
}, {
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
self.__precacheManifest = [].concat(self.__precacheManifest || []);
|
/*self.__precacheManifest = [].concat(self.__precacheManifest || []);*/
|
||||||
|
|
||||||
// workbox.setConfig({
|
// workbox.setConfig({
|
||||||
// debug: true
|
// debug: true
|
||||||
// });
|
// });
|
||||||
|
|
||||||
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
|
//workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
|
||||||
|
|
||||||
self.addEventListener("push", function (event) {
|
self.addEventListener("push", function (event) {
|
||||||
console.log('Received a push message', event);
|
console.log('Received a push message', event);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user