1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-27 21:18:30 +00:00

4.0.0 Beta 1

This commit is contained in:
SirStendec 2017-11-13 01:23:39 -05:00
parent c2688646af
commit 262757a20d
187 changed files with 22878 additions and 38882 deletions

View file

@ -0,0 +1,50 @@
<template lang="html">
<div class="ffz--changelog border-t pd-t-1">
<div class="align-center">
<h2>{{ t('home.changelog', 'Changelog') }}</h2>
</div>
<div ref="changes" />
</div>
</template>
<script>
import {SERVER} from 'utilities/constants';
export default {
props: ['item', 'context'],
methods: {
fetch(url, container) {
const done = data => {
if ( ! data )
data = 'There was an error loading this page from the server.';
container.innerHTML = data;
const btn = container.querySelector('#ffz-old-news-button');
if ( btn )
btn.addEventListener('click', () => {
btn.parentElement.removeChild(btn);
const old_news = container.querySelector('#ffz-old-news');
if ( old_news )
this.fetch(`${SERVER}/script/old_changes.html`, old_news);
});
}
fetch(url)
.then(resp => resp.ok ? resp.text() : null)
.then(done)
.catch(err => done(null));
}
},
mounted() {
this.fetch(`${SERVER}/script/changelog.html`, this.$refs.changes);
}
}
</script>