Add Blog Feed to About section

This commit is contained in:
PrestonN 2019-06-05 14:49:58 -04:00
parent 8872131968
commit 0663ac5b0a
4 changed files with 44 additions and 13 deletions

View File

@ -86,7 +86,7 @@ let init = function () {
settingsDb.findOne({
_id: 'bounds'
}, function (err, doc) {
if (docs.value !== false) {
if (doc.value !== false) {
win.setBounds(doc.value);
}
});

View File

@ -143,6 +143,20 @@ let sideNavBar = new Vue({
loadingView.seen = false;
}
aboutView.seen = true;
$.get('https://write.as/freetube/feed/', function (data) {
aboutView.rssFeed = [];
$(data).find("item").each(function () {
let el = $(this);
let rssData = {
title: el.find("title").text(),
link: el.find("link").text(),
pubDate: new Date(el.find("pubDate").text()).toDateString(),
};
aboutView.rssFeed.push(rssData);
});
});
}
}
});
@ -398,6 +412,7 @@ let aboutView = new Vue({
el: '#aboutView',
data: {
seen: false,
rssFeed: [],
versionNumber: electron.remote.app.getVersion()
},
template: aboutTemplate

View File

@ -369,6 +369,11 @@ a {
color: #FFEB3B;
}
.blogFeed a {
font-size: 20px;
font-weight: bold;
}
/* Thanks to Guus Lieben for the Material Design Switch */
.switch-input {

View File

@ -1,13 +1,24 @@
<div class='center' v-if="seen">
<img src='icons/logoColor.png' width='500px;'/>
<h1>{{ versionNumber }} Beta</h1>
<h3><i class='fas fa-envelope'></i>&nbsp;&nbsp;FreeTubeApp@protonmail.com</h3>
<h2>This software is FOSS and released under the <a href='https://www.gnu.org/licenses/quick-guide-gplv3.html'>GNU Public License v3+</a>.</h2>
<p>Found a bug? Want to suggest a feature? Want to help out? Check out our <a href='https://github.com/FreeTubeApp/FreeTube'>GitHub</a> page. Pull requests are welcome.</p>
<p>Thank you very much to the <a href='https://github.com/FreeTubeApp/FreeTube/wiki/Credits'>People and Projects</a> that make FreeTube possible!</p>
<p>Want to chat? Join our <a href='https://riot.im/app/#/room/#freetube:matrix.org'>Riot / Matrix Server</a>. Please check the <a href='https://github.com/FreeTubeApp/FreeTube/wiki/Matrix-Server-Info-&-Rules'>rules</a> before joining.</p>
<p>Looking for help? Check out our <a href='https://github.com/FreeTubeApp/FreeTube/wiki'>Wiki</a> page.</p>
<p>Check out our <a href='https://addons.mozilla.org/en-US/firefox/addon/freetube-redirect/'>Firefox</a> extension!</p>
<p>If you enjoy using FreeTube, consider donating via <a href='https://liberapay.com/FreeTube'>Liberapay</a> or through our Bitcoin address.</p>
<p>BTC: 1Lih7Ho5gnxb1CwPD4o59ss78pwo2T91eS</p>
<div v-if="seen">
<div class='center'>
<img src='icons/logoColor.png' width='500px;'/>
<h1>{{ versionNumber }} Beta</h1>
<h3><i class='fas fa-envelope'></i>&nbsp;&nbsp;FreeTubeApp@protonmail.com</h3>
<h2>This software is FOSS and released under the <a href='https://www.gnu.org/licenses/quick-guide-gplv3.html'>GNU Public License v3+</a>.</h2>
<p>Found a bug? Want to suggest a feature? Want to help out? Check out our <a href='https://github.com/FreeTubeApp/FreeTube'>GitHub</a> page. Pull requests are welcome.</p>
<p>Thank you very much to the <a href='https://github.com/FreeTubeApp/FreeTube/wiki/Credits'>People and Projects</a> that make FreeTube possible!</p>
<p>Want to chat? Join our <a href='https://riot.im/app/#/group/+freetube:matrix.org'>Riot / Matrix Server</a>. Please check the <a href='https://github.com/FreeTubeApp/FreeTube/wiki/Matrix-Server-Info-&-Rules'>rules</a> before joining.</p>
<p>Looking for help? Check out our <a href='https://github.com/FreeTubeApp/FreeTube/wiki'>Wiki</a> page.</p>
<p>Check out our <a href='https://addons.mozilla.org/en-US/firefox/addon/freetube-redirect/'>Firefox</a> extension!</p>
<p>If you enjoy using FreeTube, consider donating via <a href='https://liberapay.com/FreeTube'>Liberapay</a> or through our Bitcoin address.</p>
<p>BTC: 1Lih7Ho5gnxb1CwPD4o59ss78pwo2T91eS</p>
</div>
<br></br>
<h1 class='center' style='text-decoration-line: underline'>Latest FreeTube News</h1>
<div v-for='feed in rssFeed' class='blogFeed center'>
<p>
<a :href='feed.link'>{{feed.title}}</a>
<br />
{{feed.pubDate}}
</p>
</div>
</div>