Commit d9512c6a authored by yPhil's avatar yPhil
Browse files

Quick issues fixes

- Column controls top margin bump
- Select first tab on help tour start
- Translations fixes
parent b5a12009
Pipeline #425129 passed with stage
in 40 seconds
......@@ -27,6 +27,7 @@ Pétrolette is fully self-contained, makes **no external call** whatsoever, and
- No ads, no trackers, **just the news**
- Displays all modern feeds (Atom, RSS 1/2, **MediaRSS**, etc.)
- New items indicator / badge
- **Video / Audio playing** directly in Pétrolette
- **Discovery of the feed** in a page / website
- Mobile / **phone** / tablet / responsive interface
......
......@@ -840,7 +840,7 @@ ul.column div.buttons {
position: absolute;
right: 0;
text-align: center;
bottom: 15px;
bottom: 1px;
width: 150px;
z-index: 1 !important;
}
......@@ -866,6 +866,12 @@ li.feed {
font-size: unset;
}
.introjs-skipbutton {
font-size: 12pt !important;
padding: 0;
margin-right: -7px;
}
li.feed.selected {
background: none !important;
opacity: 0.6;
......
......@@ -212,7 +212,6 @@ PTL.dialog = {
$('.helpTour').on('click', function() {
PTL.dialog.kill($dialog);
$('#tabs').tabs('option', 'active', 0);
PTL.util.help('ui');
});
......
......@@ -196,15 +196,15 @@ PTL.feed = {
return new Promise((resolve, reject) => {
const $feedBodyUl = $('<ul>').attr('class', 'feedBody'),
feedUrl = $dataStore.data('url'),
nbItems = $dataStore.data('nbitems'),
feedType = $dataStore.data('type');
feedUrl = $dataStore.data('url'),
nbItems = $dataStore.data('nbitems'),
feedType = $dataStore.data('type');
const l = PTL.util.getLocation(feedUrl),
p = l.protocol ? l.protocol + '//' : '//',
feedHost = p + l.hostname;
p = l.protocol ? l.protocol + '//' : '//',
feedHost = p + l.hostname;
var newItems = 0;
let newItems = 0;
for (const key in feedItems) {
newItems++;
......@@ -214,7 +214,7 @@ PTL.feed = {
if (nbItems > 0 && newItems == nbItems) break;
const $description = $.parseHTML(item.description),
imgTypes = ['image', 'image/jpg', 'image/jpeg', 'image/gif', 'image/png'];
imgTypes = ['image', 'image/jpg', 'image/jpeg', 'image/gif', 'image/png'];
let summary, imageUrl, audioUrl, audioType, videoUrl, videoType;
......@@ -316,10 +316,10 @@ PTL.feed = {
.attr('data-caption', '<a href="' + item.link + '" class="ui-button ui-corner-all" title="' + $summary.trim() + '">' + item.title + '</a>');
const protocols = ['http://', 'http://', '//'];
if (protocols.indexOf(imageUrl) !== -1) imageUrl = feedHost + imageUrl;
$image = $('<img>')
.attr('src', '/static/images/loading.gif')
.attr('data-srcset', imageUrl.replace('http://', 'https://'))
......@@ -353,7 +353,7 @@ PTL.feed = {
}
resolve([$feedBodyUl.html(), newItems]);
});
},
......@@ -514,8 +514,8 @@ PTL.feed = {
dateObj = new Date(),
timeStamp = dateObj.getUTCHours() + ":" + dateObj.getUTCMinutes() + ":" + dateObj.getUTCSeconds();
const timeStampAlt = dateObj.toTimeString().substr(0,8);
const timeStampAlt = dateObj.toTimeString().substr(0, 8);
var feedLastItem = $dataStore.data('lastitem');
$feedBodyUl.css('border', '1px solid red');
......@@ -529,7 +529,7 @@ PTL.feed = {
.children('div.feedBody')
.addClass('folded');
}
if (feedIconHash) {
$favIcon.attr('src', '/favicons/' + feedIconHash + '.favicon');
} else {
......@@ -537,17 +537,17 @@ PTL.feed = {
.then(hash => {
// PTL.util.say(PTL.tr('New icon in cache') + ' (' + hash + '.favicon / ' + feedHost + ')', 'success');
// $favIcon.attr('src', '/favicons/' + hash + '.favicon');
$dataStore.data('iconhash', hash);
PTL.tab.saveTabs();
})
.catch(e => {
$favIcon.attr('src', '/static/images/rss.gif');
PTL.util.say(PTL.tr('Error fetching icon') + ' (' + feedHost + ')' , 'warning');
PTL.util.say(PTL.tr('Error fetching icon') + ' (' + feedHost + ')', 'warning');
});
}
if ($dataStore.data('status') == 'on') {
$refreshButton.addClass('spin');
......@@ -599,7 +599,7 @@ PTL.feed = {
}
if (progress) progress.increment();
}
};
......@@ -80,12 +80,14 @@ PTL.i18n.translations = {
"Name the feed of this website, if it is not informative enough ; leave blank to get the default feed title." : { fr: "Renommez le flux de ce site Web, s'il n'est pas assez informatif ; laisser vide pour obtenir le titre du flux par défaut." , ja: "それが十分に報知されていない場合、このウェブサイトのフィードに名前を付けます。 デフォルトフィードのタイトルを取得するには、空白のままにします", es: "Nombra la fuente de este sitio web, si no es lo suficientemente informativo; Deje en blanco para obtener el título de fuente predeterminado." },
"Move this feed to another tab." : { fr: "Déplacer ce flux dans un autre onglet." , ja: "このソースを別のグループに移動する", es: "Mueva esta fuente a otro grupo." },
"Move this feed to another tab ; Use this menu when drag & drop is not available, like on a phone or a TV." : { fr: "Déplacer ce flux dans un autre onglet ; ce menu est pratique lorsque le glisser-déposer n'est pas disponible, comme sur un téléphone ou un téléviseur." , ja: "このソースを別のグループに移動する", es: "Mueva esta fuente a otro grupo ; Use este menú cuando Drag & Drop no está disponible, como en un teléfono o un televisor." },
"The type of feed: It can be all text, all image, or mixed." : { fr: "Quel type de flux ? Tout le texte, toute l'image, ou les deux.", ja: "どんな種類の飼料ですか? すべてのテキスト、すべてのイメージ、または混合。", es: "¿Qué tipo de flux? Todo el texto, toda la imagen o mixto." },
"How many new items should this feed display at a time?" : { fr: "Combien de nouveaux articles dans ce flux ?", ja: "フィードは一度にいくつ表示する必要がありますか?", es: "¿Cuántos elementos nuevos debería mostrar el feed a la vez?" },
"Height of the feed\'s viewport." : { fr: "Hauteur de la fenêtre du flux", ja: "ソースのビューポートの高さ", es: "Altura de la ventana de la fuente." },
"Number of items to load ; 0 loads all items." : { fr: "Nombre d'articles à charger; 0 charge tous les articles.", ja: "ロードする項目数。 0すべてのアイテムをロードします。", es: "Número de artículos para cargar; 0 carga todos los artículos." },
"Tabs and feeds saved" : { fr: "Onglets et flux enregistrés" , ja: "タブとソースが保存されました", es: "Pestañas y fuentes guardadas" },
"New icon in cache" : { fr: "Nouvelle icône dans le cache" , ja: "キャッシュの新しいアイコン", es: "Nuevo icono en caché" },
......@@ -206,8 +208,16 @@ PTL.i18n.translations = {
"Tab control" : { fr: "Contrôle de l'onglet" , ja: "タブコントロール", es: "Control de pestañas" },
"Columns" : { fr: "Colonnes" , ja: "", es: "Columnas" },
"Click <strong>+</strong> to add a column, and <strong>-</strong> to delete it." : { fr: "Cliquez sur </strong>+</strong> pour ajouter une colonne et </strong>-</strong> pour la supprimer." , ja: "「+」をクリックして列を追加し、「-」を削除します。", es: "Haga clic en </strong>+</strong> para agregar una columna, y </strong>-</strong> para eliminarlo." },
"Add a new feed" : { fr: "Ajouter un nouveau flux" , ja: "新しいフィードを追加する", es: "Agregar un nuevo fuente" },
"You are home" : { fr: "Vous êtes chez vous" , ja: "あなたは在宅です", es: "Estás en casa" },
"Use the menu to configure your Pétrolette." : { fr: "Utilisez le menu pour configurer votre Pétrolette." , ja: "メニューを使用してPétroletteを設定します。", es: "Utilice el menú para configurar su Pétrolette." },
"Get the latest articles." : { fr: "Voir les derniers articles." , ja: "最新の記事を入手する。", es: "Obtenga los últimos artículos." },
"B-bye" : { fr: "Au revoir" , ja: "さようなら", es: "Adios" },
"Grip handle" : { fr: "Poignée" , ja: "グリップハンドル", es: "Mango" },
......@@ -219,7 +229,7 @@ PTL.i18n.translations = {
'Drag me to the bookmark bar, or right click "Bookmark this link"' : { fr: 'Glissez-moi dans la barre de favoris, ou clic droit "Marque-page sur ce lien"' , ja: 'ブックマークバーに私をドラッグするか、右クリック"Bookmarkこのリンク"', es: 'Arrastre a la barra de marcadores, o haga clic derecho en "Bookmark este enlace"' },
"This is an RSS feed" : { fr: "Ceci est un flux RSS" , ja: "これはソースです 詳細情報", es: "Esta es una fuente." },
"This is an RSS feed." : { fr: "Ceci est un flux RSS." , ja: "これはソースです 詳細情報", es: "Esta es una fuente." },
"Click this button to add a tab" : { fr: "Cliquez sur ce bouton pour ajouter un onglet" , ja: "グループを追加するには、このボタンをクリックします。", es: "Haga clic en este botón para agregar un grupo" },
......
......@@ -250,7 +250,7 @@ PTL.util = {
{
title: PTL.tr("That's what it's all about"),
element: 'li.feed',
intro: PTL.tr('This is an RSS feed.') + ' <a href="https://' + PTL.language + '.wikipedia.org/wiki/RSS"><i class="icon-help"></i></a>'
intro: PTL.tr('This is an RSS feed.') + ' <a href="https://' + PTL.language + '.wikipedia.org/wiki/RSS"><i class="icon-globe"></i></a>'
},
{
title: PTL.tr('Keep everything tidy'),
......@@ -289,7 +289,7 @@ PTL.util = {
},
{
title: PTL.tr('Fold / unfold this feed'),
element: 'div.feed-toggle',
element: 'div.feedToggle',
intro: PTL.tr('Folded feeds are not loaded at startup, so as to speed things up.')
},
{
......@@ -298,9 +298,14 @@ PTL.util = {
intro: PTL.tr('Delete this feed.')
},
{
title: PTL.tr('You are in control now'),
title: PTL.tr('Columns'),
element: 'div.buttons',
intro: PTL.tr('Click <strong>+</strong> to add a column, and <strong>-</strong> to delete it.')
},
{
title: PTL.tr('You are home') + ' 🏠',
element: 'div#menuButton',
intro: PTL.tr('Use the menu to configure Pétrolette')
intro: PTL.tr('Use the menu to configure your Pétrolette.')
}
]
});
......@@ -322,7 +327,7 @@ PTL.util = {
{
title: PTL.tr('Keep everything tidy'),
element: '#feedTabSelect',
intro: PTL.tr('Move this feed to another tab.'),
intro: PTL.tr('Move this feed to another tab ; Use this menu when drag & drop is not available, like on a phone or a TV.'),
position: 'bottom'
},
{
......@@ -334,13 +339,13 @@ PTL.util = {
{
title: PTL.tr('Height of the feed'),
element: '#feedHeightDiv',
intro: PTL.tr('How many new items should this feed display at a time?'),
intro: PTL.tr('Height of the feed\'s viewport.'),
position: 'top'
},
{
title: PTL.tr('Number of items'),
element: '#feedMaxItemsDiv',
intro: PTL.tr('How many new items should this feed display at a time?'),
intro: PTL.tr('Number of items to load ; 0 loads all items.'),
position: 'top'
},
{
......@@ -379,12 +384,12 @@ PTL.util = {
ui.setOption('prevLabel', PTL.tr('Prev'));
ui.setOption('nextLabel', PTL.tr('Next'));
ui.setOption('skipLabel', PTL.tr('Close'));
ui.setOption('skipLabel', 'x');
ui.setOption('doneLabel', PTL.tr('Got it!'));
dialog.setOption('prevLabel', PTL.tr('Prev'));
dialog.setOption('nextLabel', PTL.tr('Next'));
dialog.setOption('skipLabel', PTL.tr('Close'));
dialog.setOption('skipLabel', 'x');
dialog.setOption('doneLabel', PTL.tr('Got it!'));
dialog.setOption('overlayOpacity', 0);
......@@ -406,6 +411,7 @@ PTL.util = {
} else {
dialog.exit();
$('#menu > .handle').click();
$('#tabs').tabs('option', 'active', 0);
$('.feed').first().find('.collapsible').show('fade', 'fast');
ui.start();
}
......
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