Commit 5a6627ee authored by yPhil's avatar yPhil
Browse files

Ready to merge

- See changelog
- v1.3.0 "Souvenir d'avions"
parent a0c6e1f3
Pipeline #421242 passed with stage
in 35 seconds
...@@ -3,14 +3,19 @@ ...@@ -3,14 +3,19 @@
## 1.3.0 ## 1.3.0
- New theming engine / logic - New feed items indicator / badge #96
- Full "Light / Dark" UI - New help system #104
- Number of items hard limit #81
- New theming engine / logic #75
- Full "Light / Dark" UI
- New icon set
- Rendering (CSS, transitions, JQ, etc.) optimizations - Rendering (CSS, transitions, JQ, etc.) optimizations
- Dialog KB control - Dialog KB control
### Bugfixes ### Bugfixes
- Better (faster) server (fetch) error handling - Better (faster) server (fetch) error handling
- Sister libs Licence change
- Finalized name refactoring - Finalized name refactoring
- Explicit CSS vars names - Explicit CSS vars names
......
...@@ -1174,6 +1174,7 @@ video { ...@@ -1174,6 +1174,7 @@ video {
#ptlSearch { #ptlSearch {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
padding-left: 12px;
} }
#ptlSearch .ptlSearchButton { #ptlSearch .ptlSearchButton {
......
...@@ -13,7 +13,7 @@ PTL.feed = { ...@@ -13,7 +13,7 @@ PTL.feed = {
class: 'favicon', class: 'favicon',
width: '16px', width: '16px',
height: '16px', height: '16px',
onerror: "this.onerror=null;this.src='/static/images/rss.gif';" onerror: "this.src='/static/images/rss.gif';"
}) })
.on("error", function(error) { .on("error", function(error) {
$(this).parent().parent().children('div.dataStore').data('iconhash', ''); $(this).parent().parent().children('div.dataStore').data('iconhash', '');
...@@ -89,7 +89,6 @@ PTL.feed = { ...@@ -89,7 +89,6 @@ PTL.feed = {
.data('title', 'Refresh this feed', url) .data('title', 'Refresh this feed', url)
.attr('title', PTL.tr('Refresh this feed', url)) .attr('title', PTL.tr('Refresh this feed', url))
.click(function() { .click(function() {
// var plop = $(this).parent().parent().parent().next('div.feedBody').find('li').lengh;
$('.selected').removeClass('selected'); $('.selected').removeClass('selected');
$('.icon-checked').toggleClass('icon-checked icon-checkbox'); $('.icon-checked').toggleClass('icon-checked icon-checkbox');
PTL.feed.populate($(this), progress).then().catch(e => {console.log('whoap: %s (%s)', e);}); PTL.feed.populate($(this), progress).then().catch(e => {console.log('whoap: %s (%s)', e);});
...@@ -197,8 +196,6 @@ PTL.feed = { ...@@ -197,8 +196,6 @@ PTL.feed = {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// console.log('feedItems: %s (%s)', JSON.stringify(feedItems));
const $feedBodyUl = $('<ul>').attr('class', 'feedBody'), const $feedBodyUl = $('<ul>').attr('class', 'feedBody'),
feedUrl = $dataStore.data('url'), feedUrl = $dataStore.data('url'),
nbItems = $dataStore.data('nbitems'), nbItems = $dataStore.data('nbitems'),
...@@ -265,9 +262,7 @@ PTL.feed = { ...@@ -265,9 +262,7 @@ PTL.feed = {
if (!imageUrl && typeof $tempDom.find('img').attr('src') !== 'undefined') { if (!imageUrl && typeof $tempDom.find('img').attr('src') !== 'undefined') {
imageUrl = $tempDom.find('img').attr('src'); imageUrl = $tempDom.find('img').attr('src');
if (typeof $tempDom.find('img').attr('title') !== 'undefined') { if (typeof $tempDom.find('img').attr('title') !== 'undefined') {
// XKCD summary in the title of the description XML tag
$feedItem.attr('title', $tempDom.find('img').attr('title')); $feedItem.attr('title', $tempDom.find('img').attr('title'));
} }
} }
...@@ -357,12 +352,8 @@ PTL.feed = { ...@@ -357,12 +352,8 @@ PTL.feed = {
} }
if (true) { resolve([$feedBodyUl.html(), newItems]);
resolve([$feedBodyUl.html(), newItems]);
} else {
reject('no real reason');
}
}); });
}, },
...@@ -545,9 +536,9 @@ PTL.feed = { ...@@ -545,9 +536,9 @@ PTL.feed = {
PTL.feed.fetchIcon(feedHost) PTL.feed.fetchIcon(feedHost)
.then(hash => { .then(hash => {
PTL.util.say(PTL.tr('New icon in cache') + ' (' + hash + '.favicon / ' + feedHost + ')', 'success'); // PTL.util.say(PTL.tr('New icon in cache') + ' (' + hash + '.favicon / ' + feedHost + ')', 'success');
$favIcon.attr('src', '/favicons/' + hash + '.favicon'); // $favIcon.attr('src', '/favicons/' + hash + '.favicon');
$dataStore.data('iconhash', hash); $dataStore.data('iconhash', hash);
PTL.tab.saveTabs(); PTL.tab.saveTabs();
}) })
...@@ -559,7 +550,6 @@ PTL.feed = { ...@@ -559,7 +550,6 @@ PTL.feed = {
if ($dataStore.data('status') == 'on') { if ($dataStore.data('status') == 'on') {
$feedIcon.removeClass('fold');
$refreshButton.addClass('spin'); $refreshButton.addClass('spin');
let fetchFeed = await PTL.feed.fetchFeed(feedUrl, feedLastItem); let fetchFeed = await PTL.feed.fetchFeed(feedUrl, feedLastItem);
...@@ -609,8 +599,6 @@ PTL.feed = { ...@@ -609,8 +599,6 @@ PTL.feed = {
} }
if (progress) progress.increment(); if (progress) progress.increment();
return true;
} }
......
...@@ -32,12 +32,9 @@ router.get('/favicon', function(req, res) { ...@@ -32,12 +32,9 @@ router.get('/favicon', function(req, res) {
favrat(req.query.url, function(error, url) { favrat(req.query.url, function(error, url) {
if (error) { if (error) {
console.erroror('######### error: %s (%s)', error);
res.status(500).send(error); res.status(500).send(error);
} else if (url) { } else if (url) {
console.error('######### url: %s (%s)',url);
// if (!url.startsWith('http') || !url.startsWith('//')) url = 'http://' + url.substring(url.indexOf("/") + 1); // if (!url.startsWith('http') || !url.startsWith('//')) url = 'http://' + url.substring(url.indexOf("/") + 1);
const hash = crypto.createHash('md5').update(url).digest('hex'), const hash = crypto.createHash('md5').update(url).digest('hex'),
...@@ -48,8 +45,6 @@ router.get('/favicon', function(req, res) { ...@@ -48,8 +45,6 @@ router.get('/favicon', function(req, res) {
res.send(hash); res.send(hash);
// } else {
// res.status(500).send(false);
} }
}); });
......
...@@ -218,33 +218,6 @@ ...@@ -218,33 +218,6 @@
</div> </div>
</fieldset> </fieldset>
<div class="sideMenuTitleToggleDiv ui-corner-top hover">
<i class="icon-right rotate unfold"></i>
<span class="translate"
data-content="Pétrolette">
Pétrolette
</span>
</div>
<fieldset class="menuForm">
<div class="flexBox">
<a href="https://framagit.org/yphil/petrolette"
class="grow ui-button ui-corner-all translate left"
data-title="Use the force - read the Source"
title="Use the force - read the Source"
data-content="Source">
Source
</a>
<a href="/about/javascript"
data-jslicense="1"
class="grow ui-button ui-corner-all translate"
data-title="JavaScript licencing information"
title="JavaScript licencing information"
data-content="License">
License
</a>
</div>
</fieldset>
<div class="sideMenuTitleToggleDiv ui-corner-top hover"> <div class="sideMenuTitleToggleDiv ui-corner-top hover">
<i class="icon-right rotate unfold"></i> <i class="icon-right rotate unfold"></i>
<span class="translate" <span class="translate"
...@@ -404,6 +377,33 @@ ...@@ -404,6 +377,33 @@
</div> </div>
</fieldset> </fieldset>
<div class="sideMenuTitleToggleDiv ui-corner-top hover">
<i class="icon-right rotate unfold"></i>
<span class="translate"
data-content="Pétrolette">
Pétrolette
</span>
</div>
<fieldset class="menuForm">
<div class="flexBox">
<a href="https://framagit.org/yphil/petrolette"
class="grow ui-button ui-corner-all translate left"
data-title="Use the force - read the Source"
title="Use the force - read the Source"
data-content="Source">
Source
</a>
<a href="/about/javascript"
data-jslicense="1"
class="grow ui-button ui-corner-all translate"
data-title="JavaScript licencing information"
title="JavaScript licencing information"
data-content="License">
License
</a>
</div>
</fieldset>
<div class="sideMenuTitleToggleDiv ui-corner-top hover"> <div class="sideMenuTitleToggleDiv ui-corner-top hover">
<i class="icon-right rotate unfold"></i> <i class="icon-right rotate unfold"></i>
<span class="translate" <span class="translate"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment