Commit a23847f2 authored by yPhil's avatar yPhil
Browse files

Refresh button tooltip update

- Name || URL + last refresh timestamp
- Plus specific - permanent, too - route for cert `/renewal`
- Default # of items pushed to 10
parent 6cbc0823
Pipeline #418103 passed with stage
in 54 seconds
......@@ -9,16 +9,25 @@ const httpServer = http.createServer(petrolette);
const portHttp = pjson.HTTP_PORT || 8000;
const portHttps = pjson.HTTPS_PORT || 8001;
process.on('uncaughtException', function(err) {
console.error('### Pétrolette uncaughtException: %s', err.code);
});
httpServer.listen(portHttp, () => {
console.debug('HTTP Server running on port %s', portHttp);
});
const httpsServer = https.createServer({
key: fs.readFileSync('/etc/letsencrypt/live/petrolette.space/privkey.pem'),
cert: fs.readFileSync('/etc/letsencrypt/live/petrolette.space/cert.pem'),
ca: fs.readFileSync('/etc/letsencrypt/live/petrolette.space/chain.pem'),
}, petrolette);
try {
const httpsServer = https.createServer({
key: fs.readFileSync('/etc/letsencrypt/live/petrolette.space/privkey.pem'),
cert: fs.readFileSync('/etc/letsencrypt/live/petrolette.space/cert.pem'),
ca: fs.readFileSync('/etc/letsencrypt/live/petrolette.space/chain.pem'),
}, petrolette);
httpsServer.listen(portHttps, () => {
console.debug('HTTPS Server running');
});
httpsServer.listen(portHttps, () => {
console.debug('HTTPS Server running');
});
} catch (error) {
console.error('error: no HTTPS here');
}
......@@ -29,6 +29,8 @@ app.use(helmet({contentSecurityPolicy: false}));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: false}));
// app.use(express.static(__dirname + '/renewal', { dotfiles: 'allow' }));
app.use('/favicons', express.static(path.join(__dirname, pjson.FAVICONS_CACHE_DIR)));
app.use('/static', express.static(path.join(__dirname, 'public')));
app.use('/bower', express.static(path.join(__dirname, 'bower_components')));
......
@font-face {
font-family: 'fontello';
src: url('../font/fontello.eot?46778389');
src: url('../font/fontello.eot?46778389#iefix') format('embedded-opentype'),
url('../font/fontello.woff2?46778389') format('woff2'),
url('../font/fontello.woff?46778389') format('woff'),
url('../font/fontello.ttf?46778389') format('truetype'),
url('../font/fontello.svg?46778389#fontello') format('svg');
src: url('../font/fontello.eot?78914911');
src: url('../font/fontello.eot?78914911#iefix') format('embedded-opentype'),
url('../font/fontello.woff2?78914911') format('woff2'),
url('../font/fontello.woff?78914911') format('woff'),
url('../font/fontello.ttf?78914911') format('truetype'),
url('../font/fontello.svg?78914911#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
......@@ -15,7 +15,7 @@
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'fontello';
src: url('../font/fontello.svg?46778389#fontello') format('svg');
src: url('../font/fontello.svg?78914911#fontello') format('svg');
}
}
*/
......@@ -56,16 +56,14 @@
}
.icon-left:before { content: '\e801'; } /* '' */
.icon-down-circle:before { content: '\e802'; } /* '' */
.icon-down:before { content: '\e802'; } /* '' */
.icon-upload:before { content: '\e803'; } /* '' */
.icon-up:before { content: '\e804'; } /* '' */
.icon-down:before { content: '\e805'; } /* '' */
.icon-right:before { content: '\e806'; } /* '' */
.icon-rss:before { content: '\e807'; } /* '' */
.icon-checked:before { content: '\e808'; } /* '' */
.icon-checkbox:before { content: '\e809'; } /* '' */
.icon-petrolette:before { content: '\e80a'; } /* '' */
.icon-download:before { content: '\e80b'; } /* '' */
.icon-checked:before { content: '\e80f'; } /* '' */
.icon-trash-empty:before { content: '\e810'; } /* '' */
.icon-plus:before { content: '\e811'; } /* '' */
.icon-minus:before { content: '\e812'; } /* '' */
......@@ -75,7 +73,8 @@
.icon-cancel:before { content: '\e816'; } /* '' */
.icon-refresh:before { content: '\e817'; } /* '' */
.icon-pencil:before { content: '\e818'; } /* '' */
.icon-cog:before { content: '\e819'; } /* '' */
.icon-checkbox:before { content: '\e81a'; } /* '' */
.icon-cog:before { content: '\e81b'; } /* '' */
.icon-pin:before { content: '\e820'; } /* '' */
.icon-audio:before { content: '\e821'; } /* '' */
.icon-comments:before { content: '\e822'; } /* '' */
......
......@@ -204,6 +204,10 @@ i.tabIcon,
cursor: pointer;
}
.middleButton {
margin: 0 5px;
}
p.dangerous {
color: var(--color-ui-danger);
}
......@@ -688,10 +692,6 @@ i.tabIcon {
right: 3px;
}
button#feedGuessButton {
margin-left: 0.4em;
}
a.feedErrorReportButton,
a.validateFeedButton {
flex: 1;
......@@ -783,7 +783,7 @@ ul.help li.cloud::before {
.grow,
.shrink,
.unique {
.unique:not(#feedTabSelect) {
margin: 0.2em;
}
......@@ -1071,7 +1071,7 @@ div.introjs-helperLayer {
/* IntroJS (help tooltips) */
.introjs-tooltip {
background-color: var(--color-background) !important;
border: 1px solid var(--color-ui-qua);
border: 1px solid var(--color-text);
color: var(--color-text) !important;
width: 360px !important;
max-width: 360px !important;
......@@ -1277,11 +1277,6 @@ li.ui-tabs-tab {
border: 1px solid var(--color-dialog-border);
}
/* .ui-tab.ui-state-active a:link, */
/* .ui-tab.ui-state-active i { */
/* color: var(--color-link-hover); */
/* } */
.introjs-button,
.introjs-button:focus,
.ui-button {
......@@ -1296,9 +1291,6 @@ li.ui-tabs-tab {
color: var(--color-button-text);
}
/* .ui-state-active, */
/* .ui-widget-content .ui-state-active, */
/* .ui-widget-header .ui-state-active, */
.introjs-button:active,
a.ui-button:active,
.ui-button:active,
......@@ -1306,6 +1298,14 @@ a.ui-button:active,
background: var(--color-button-bg-active);
}
.introjs-arrow.top {
border-bottom-color: var(--color-text) !important;
}
.introjs-arrow.bottom {
border-top-color: var(--color-text) !important;
}
.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover {
......@@ -1372,24 +1372,32 @@ button.ui-state-success {
}
.newItemsBadge {
display: inline-block;
flex-basis: content;
flex-grow: 1;
flex-shrink: 1;
font-size: 0.7em;
background: var(--color-ui-success);
color: #000;
width: 18px;
max-width: 18px;
min-width: 18px;
height: 16px;
margin: 4px 3px 0 0;
color: var(--color-ui-qua);
width: 17px;
max-width: 17px;
min-width: 17px;
height: 17px;
line-height: 17px;
margin: 3px 3px 0 0;
text-align: center;
/* line-height: 18px; */
border-radius: 3px;
/* box-shadow: 0 0 1px #333; */
}
.hidden {
display: none;
}
.helpIcon {
margin: 0 0 0 0.3em;
cursor: pointer;
color: var(--color-ui-sec);
}
.helpIcon:hover {
color: var(--color-ui-success);
}
......@@ -44,12 +44,6 @@
"code": 59393,
"src": "elusive"
},
{
"uid": "616b755d0f4c7d2dc7a1dcc2e5427039",
"css": "down",
"code": 59397,
"src": "elusive"
},
{
"uid": "dc4a03854ef986d64565143bea4241aa",
"css": "right",
......@@ -62,18 +56,6 @@
"code": 59399,
"src": "fontawesome"
},
{
"uid": "b90d80c250a9bbdd6cd3fe00e6351710",
"css": "checked",
"code": 59400,
"src": "iconic"
},
{
"uid": "4b900d04e8ab8c82f080c1cfbac5772c",
"css": "checkbox",
"code": 59401,
"src": "fontawesome"
},
{
"uid": "f48ae54adfb27d8ada53d0fd9e34ee10",
"css": "trash-empty",
......@@ -128,12 +110,6 @@
"code": 59416,
"src": "entypo"
},
{
"uid": "6083c8aa5e3345476a24a28ac1afaa61",
"css": "cog",
"code": 59417,
"src": "elusive"
},
{
"uid": "c91522256a4c3972e9a2765b995b7252",
"css": "pin",
......@@ -202,9 +178,27 @@
},
{
"uid": "da74e2a8125fdbca337031474a48215a",
"css": "down-circle",
"css": "down",
"code": 59394,
"src": "elusive"
},
{
"uid": "67a9d2e5512b8aa812eff7da6d36bffc",
"css": "checked",
"code": 59407,
"src": "elusive"
},
{
"uid": "56b0141d7bbb0717fc6246ea145bc0bd",
"css": "checkbox",
"code": 59418,
"src": "elusive"
},
{
"uid": "7560ca08e3d83e43c58fcbf8f16d8f03",
"css": "cog",
"code": 59419,
"src": "elusive"
}
]
}
\ No newline at end of file
No preview for this file type
......@@ -8,26 +8,22 @@
<missing-glyph horiz-adv-x="1000" />
<glyph glyph-name="left" unicode="&#xe801;" d="M0 350l148 149 352 351 148-148-351-352 351-352-148-148-352 352z" horiz-adv-x="648" />
<glyph glyph-name="down-circle" unicode="&#xe802;" d="M0 350q0 207 147 354t353 146 354-146 146-354-146-354-354-146-353 146-147 354z m248 55l252-377 252 377-135 0 0 267-234 0 0-267-135 0z" horiz-adv-x="1000" />
<glyph glyph-name="down" unicode="&#xe802;" d="M0 350q0 207 147 354t353 146 354-146 146-354-146-354-354-146-353 146-147 354z m248 55l252-377 252 377-135 0 0 267-234 0 0-267-135 0z" horiz-adv-x="1000" />
<glyph glyph-name="upload" unicode="&#xe803;" d="M0 84v73q0 33 24 56t57 24 56-24 24-56v-73q0-17 12-29t30-13h531q18 0 30 13t12 29v73q0 33 24 56t56 24 57-24 24-56v-73q0-84-59-143t-144-60h-531q-84 0-143 59t-60 144z m155 407q0 33 24 57l247 247q23 23 57 23 33 0 56-23l243-242q23-24 23-57t-23-57q-24-23-57-23t-57 23l-105 105v-344q0-33-24-57t-56-24q-33 0-57 24t-24 57v344l-110-110q-24-23-57-23t-56 23-24 57z" horiz-adv-x="937.5" />
<glyph glyph-name="up" unicode="&#xe804;" d="M366 790l334-334q31-31 31-73t-31-74-74-31-73 31l-83 82 0-377q0-44-31-74t-73-30q-43 0-74 31t-31 73l0 377-82-82q-31-31-74-31t-74 31-31 74 31 73z" horiz-adv-x="731" />
<glyph glyph-name="down" unicode="&#xe805;" d="M0 526l148 148 352-351 352 351 148-148-352-352-148-148-148 148z" horiz-adv-x="1000" />
<glyph glyph-name="right" unicode="&#xe806;" d="M0-2l352 352-352 352 148 148 352-351 148-149-148-148-352-352z" horiz-adv-x="648" />
<glyph glyph-name="rss" unicode="&#xe807;" d="M286 136q0 29-21 50t-51 21-50-21-21-50 21-51 50-21 51 21 21 51z m196-53q-8 130-99 222t-221 98q-8 1-14-5t-5-13v-71q0-7 5-12t12-6q86-6 147-68t67-147q1-7 6-12t12-5h72q7 0 13 6t5 13z m214 0q-3 86-31 166t-78 145-115 114-145 78-166 31q-7 1-13-5-5-5-5-13v-71q0-7 5-12t12-6q114-4 211-62t156-155 62-211q0-8 5-13t13-5h71q7 0 13 6 6 5 5 13z m161 535v-536q0-66-47-113t-114-48h-535q-67 0-114 48t-47 113v536q0 66 47 113t114 48h535q67 0 114-48t47-113z" horiz-adv-x="857.1" />
<glyph glyph-name="checked" unicode="&#xe808;" d="M352-10l-334 333 158 160 176-174 400 401 159-160z" horiz-adv-x="928" />
<glyph glyph-name="checkbox" unicode="&#xe809;" d="M625 707h-464q-37 0-63-26t-27-63v-464q0-37 27-63t63-27h464q37 0 63 27t26 63v464q0 37-26 63t-63 26z m161-89v-464q0-67-47-114t-114-47h-464q-67 0-114 47t-47 114v464q0 66 47 113t114 48h464q66 0 114-48t47-113z" horiz-adv-x="785.7" />
<glyph glyph-name="petrolette" unicode="&#xe80a;" d="M54 850c-18 0-36-10-46-27l0 0c-16-26-7-60 19-75l252-149 0-432c0-30 24-55 55-55 30 0 55 25 55 55l0 463c0 17-8 32-21 42-3 3-5 5-9 7l-276 163c-9 6-19 8-29 8z m892 0c-10 0-20-2-29-8l-276-163c-3-2-6-4-9-7-13-10-20-25-20-42l0-463c0-30 24-55 54-55 31 0 55 25 55 55l0 432 252 149c26 15 35 49 19 75l0 0c-10 17-28 27-46 27z m-446-48c-30 0-55-24-55-55l0-842c0-31 25-55 55-55 30 0 55 24 55 55l0 842c0 31-25 55-55 55z" horiz-adv-x="1000" />
<glyph glyph-name="download" unicode="&#xe80b;" d="M0 84v73q0 33 24 56t57 24 56-24 24-56v-73q0-17 12-29t30-13h531q18 0 30 13t12 29v73q0 33 24 56t56 24 57-24 24-56v-73q0-84-59-143t-144-60h-531q-84 0-144 60t-59 143z m155 359q0 33 24 57 23 23 56 23t57-23l105-106v344q0 33 24 57t56 23 57-23 24-57v-344l110 110q24 24 57 24t56-24q24-23 24-56t-24-57l-247-247q-24-25-57-25-32 0-56 25l-242 242q-24 24-24 57z" horiz-adv-x="937.5" />
<glyph glyph-name="checked" unicode="&#xe80f;" d="M0 350q0 207 147 354t353 146 354-146 146-354-146-354-354-146-353 146-147 354z m182-57l105-105 104-104 103 104 324 324-103 104-324-325-106 106z" horiz-adv-x="1000" />
<glyph glyph-name="trash-empty" unicode="&#xe810;" d="M286 439v-321q0-8-5-13t-13-5h-36q-8 0-13 5t-5 13v321q0 8 5 13t13 5h36q8 0 13-5t5-13z m143 0v-321q0-8-5-13t-13-5h-36q-8 0-13 5t-5 13v321q0 8 5 13t13 5h36q8 0 13-5t5-13z m142 0v-321q0-8-5-13t-12-5h-36q-8 0-13 5t-5 13v321q0 8 5 13t13 5h36q7 0 12-5t5-13z m72-404v529h-500v-529q0-12 4-22t8-15 6-5h464q2 0 6 5t8 15 4 22z m-375 601h250l-27 65q-4 5-9 6h-177q-6-1-10-6z m518-18v-36q0-8-5-13t-13-5h-54v-529q0-46-26-80t-63-34h-464q-37 0-63 33t-27 79v531h-53q-8 0-13 5t-5 13v36q0 8 5 13t13 5h172l39 93q9 21 31 35t44 15h178q23 0 44-15t30-35l39-93h173q8 0 13-5t5-13z" horiz-adv-x="785.7" />
<glyph glyph-name="plus" unicode="&#xe811;" d="M550 400q30 0 30-50t-30-50l-210 0 0-210q0-30-50-30t-50 30l0 210-210 0q-30 0-30 50t30 50l210 0 0 210q0 30 50 30t50-30l0-210 210 0z" horiz-adv-x="580" />
......@@ -46,7 +42,9 @@
<glyph glyph-name="pencil" unicode="&#xe818;" d="M718 680q32-32 47-64t15-48l0-16-252-252-290-288-238-52 50 240 290 288 252 252q54 12 126-60z m-494-640l24 24q-2 44-52 94-22 22-45 35t-35 13l-14 2-22-24-18-80q28-16 46-34 24-24 36-48z" horiz-adv-x="780" />
<glyph glyph-name="cog" unicode="&#xe819;" d="M0 272l0 156 150 16q14 45 38 88l-96 117 109 109 117-95q41 23 88 37l16 150 156 0 16-150q45-14 88-37l117 95 109-109-96-117q24-43 38-88l150-16 0-156-150-16q-14-47-38-88l96-117-109-109-117 96q-43-24-88-38l-16-150-156 0-16 150q-47 14-88 38l-117-96-109 109 96 117q-24 41-38 88z m355 78q0-60 42-102t103-42 103 42 42 102-42 103-103 42-103-42-42-103z" horiz-adv-x="1000" />
<glyph glyph-name="checkbox" unicode="&#xe81a;" d="M0 350q0 207 147 354t353 146 354-146 146-354-146-354-354-146-353 146-147 354z m109 0q0-162 115-276t276-115 276 115 115 276-115 276-276 115-276-115-115-276z m106-51l94 92 93-94 289 291 94-93-291-289-92-94-93 94z" horiz-adv-x="1000" />
<glyph glyph-name="cog" unicode="&#xe81b;" d="M0 350q0 207 147 354t353 146 354-146 146-354-146-354-354-146-353 146-147 354z m195-47l92-10q8-29 22-52l-59-73 68-68 73 59q23-14 52-22l10-92 94 0 10 92q29 8 52 22l73-59 68 68-59 73q14 23 22 52l92 10 0 94-92 10q-8 29-22 52l59 73-68 68-73-59q-23 14-52 22l-10 92-94 0-10-92q-29-8-52-22l-73 59-68-68 59-73q-14-23-22-52l-92-10 0-94z m217 47q0 37 26 63t62 25 63-25 25-63-25-62-63-26-62 26-26 62z" horiz-adv-x="1000" />
<glyph glyph-name="pin" unicode="&#xe820;" d="M0 527l316 323 0-123 301-277 187 46-195-208 391-438-444 392-188-192 30 169-255 316z" horiz-adv-x="1000" />
......
No preview for this file type
This diff is collapsed.
......@@ -14,7 +14,8 @@ PTL.feed = {
width: '16px',
height: '16px'
})
.on("error", function() {
.on("error", function(error) {
console.error('Fav1: %s (%s)', error, url);
$(this).attr('src', '/static/images/rss.gif');
$(this).parent().parent().children('div.dataStore').data('iconhash', '');
PTL.tab.saveTabs();
......@@ -54,8 +55,8 @@ PTL.feed = {
const $selectIcon = $('<i>')
.attr('class', 'feed-control translate icon-checkbox feedSelect')
.data('title', 'Select this feed (%1)', url)
.attr('title', PTL.tr('Select this feed (%1)', url))
.data('title', 'Select this feed', url)
.attr('title', PTL.tr('Select this feed', url))
.click(function() {
$(this).parent().parent().parent().parent()
.toggleClass('selected');
......@@ -63,9 +64,9 @@ PTL.feed = {
});
const $deleteIcon = $('<i>')
.attr('class', 'feed-control translate icon-cancel feed-delete')
.data('title', 'Delete this feed (%1)', url)
.attr('title', PTL.tr('Delete this feed (%1)', url))
.attr('class', 'feed-control translate icon-trash-empty feed-delete')
.data('title', 'Delete this feed', url)
.attr('title', PTL.tr('Delete this feed', url))
.click(function() {
$('.selected').removeClass('selected');
$('.icon-checked').toggleClass('icon-checked icon-checkbox');
......@@ -74,8 +75,8 @@ PTL.feed = {
const $prefsIcon = $('<i>')
.attr('class', 'feed-control translate icon-cog feedPrefs')
.data('title', 'Edit this feed (%1) parameters', url)
.attr('title', PTL.tr('Edit this feed (%1) parameters', url))
.data('title', 'Edit this feed parameters', url)
.attr('title', PTL.tr('Edit this feed parameters', url))
.click(function() {
$('.selected').removeClass('selected');
$('.icon-checked').toggleClass('icon-checked icon-checkbox');
......@@ -84,8 +85,8 @@ PTL.feed = {
const $refreshIcon = $('<i>')
.attr('class', 'feed-control translate icon-refresh feedRefresh')
.data('title', 'Refresh this feed (%1)', url)
.attr('title', PTL.tr('Refresh this feed (%1)', url))
.data('title', 'Refresh this feed', url)
.attr('title', PTL.tr('Refresh this feed', url))
.click(async function() {
// var plop = $(this).parent().parent().parent().next('div.feedBody').find('li').lengh;
$('.selected').removeClass('selected');
......@@ -165,12 +166,12 @@ PTL.feed = {
$feedHeader.hover (function() {
$(this).find('img.favicon').hide();
$feedIcon.removeClass('icon-rss').addClass('icon-down-circle');
$feedIcon.removeClass('icon-rss').addClass('icon-down');
}, function() {
$(this).find('img.favicon').show();
$feedIcon.removeClass('icon-down-circle');
$feedIcon.removeClass('icon-down');
});
......@@ -211,9 +212,9 @@ PTL.feed = {
for (const key in feedItems) {
newItems++;
var item = feedItems[key];
const item = feedItems[key];
if (newItems == nbItems) break;
if (nbItems > 0 && newItems == nbItems) break;
const $description = $.parseHTML(item.description),
imgTypes = ['image', 'image/jpg', 'image/jpeg', 'image/gif', 'image/png'];
......@@ -559,7 +560,10 @@ PTL.feed = {
$feedBody.html(lastItems[0]);
$refreshButton.removeClass('spin');
$refreshButton
.data('title', 'Refresh this feed (%1 - %2)', fetchFeed.feedTitle || fetchFeed.feedLink, timeStamp)
.attr('title', PTL.tr('Refresh this feed (%1 - %2)', fetchFeed.feedTitle || fetchFeed.feedLink, timeStamp))
.removeClass('spin');
$feedLink
.text(fetchFeed.feedTitle)
......@@ -586,7 +590,6 @@ PTL.feed = {
}
if (feedIconHash) {
$favIcon.attr('src', '/favicons/' + feedIconHash + '.favicon');
} else {
......@@ -596,7 +599,8 @@ PTL.feed = {
$dataStore.data('iconhash', iconhash);
PTL.tab.saveTabs();
}
}).catch((_error) => {
}).catch((error) => {
console.error('Fav: %s (%s)', error, feedUrl);
$favIcon.addClass('icon-rss');
});
}
......
......@@ -75,7 +75,7 @@ PTL.i18n.translations = {
"By yPhil" : { fr: "yPhil", ja: "yPhil著", es: "Por yPhil" },
"The news page that doesn't know you" : { fr: "La page d'actus qui ne sait rien de toi", ja: "あなたを知らないニュースページ", es: "La página de noticias que no te conoce" },
"The news page that doesn't know you" : { fr: "La page d'actu qui ne sait rien de toi", ja: "あなたを知らないニュースページ", es: "La página de noticias que no te conoce" },
"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." },
......@@ -198,7 +198,7 @@ PTL.i18n.translations = {
"That's what it's all about" : { fr: "C'est de ça qu'il s'agit" , ja: "それがすべてです", es: "Eso es lo que se trata" },
"Everything starts here" : { fr: "Tout commence ici" , ja: "すべてがここから始まります", es: "Todo comienza aquí" },
"Location of the feed" : { fr: "Adresse du flux" , ja: "源泉の場所", es: "Ubicación de la fuente" },
"Keep everything tidy" : { fr: "Tout est bien rangé" , ja: "すべてを整頓してください", es: "Mantenga todo ordenado" },
......@@ -428,13 +428,6 @@ PTL.i18n.translations = {
"No valid feed found at this address" : { fr: "Aucun flux valide découverte à cette adresse", ja: "このアドレスに有効なソースが見つかりません", es: "No se encontró una fuente válida en esta dirección" },
"Valid feed found! Now just press OK" : { fr: "Flux valide trouvée ! Maintenant, appuyez simplement sur OK", ja: "有効なソースが見つかりました! OKを押すだけです", es: "¡Se ha encontrado una fuente válida! Ahora solo presione OK" },
"Select this feed (%1)" : { fr: "Sélectionner ce flux (%1)", ja: "RSS(%1)フィードを選択", es: "Selecciona este feed (%1)" },
"Configure this feed" : { fr: "Configurer ce flux" , ja: "このソースを設定します", es: "Configura esta fuente" },
"Configure this feed." : { fr: "Configurer ce flux." , ja: "このソースを設定します。", es: "Configura esta fuente." },
"Delete this feed?" : { fr: "Supprimer ce flux ?", ja: "本当にこのフィードを削除しますか?", es: "¿Borraste esta feed?" },
"Delete feed" : { fr: "Supprimer flux" , ja: "このソースを削除してください", es: "Eliminar fuente" },
"Delete tab" : { fr: "Supprimer onglet", ja: "フォルダを削除", es: "Eliminar carpeta" },
"Delete the [%1] tab" : { fr: "Supprimer l'onglet [%1]" , ja: "本当にこのフォルダを削除しますか?", es: "Eliminar el carpeta [%1]" },
"Delete this tab and all of its content?" : { fr: "Supprimer cet onglet et tout son contenu ?", ja: "フォルダを削除", es: "¿Eliminar esta pestaña y todo su contenido?" },
......@@ -453,10 +446,17 @@ PTL.i18n.translations = {
"This action cannot be undone." : { fr: "Cette action ne peut pas être annulée.", ja: "このアクションは元に戻せません。", es: "Esta acción no se puede deshacer." },
"Move this feed (%1)" : { fr: "Déplacer ce flux (%1)", ja: "このソースを移動する (%1)", es: "Mueva esta fuente (%)" },
"Edit this feed (%1) parameters" : { fr: "Modifier les paramètres de ce flux (%1)", ja: "このソース(%1)パラメータを変更する", es: "Establezca estos parámetros fuente %1" },
"Delete this feed (%1)" : { fr: "Supprimer ce flux (%1)", ja: "本当にこのフィードを削除しますか (%1)", es: "Borraste esta feed (%1)" },
"Move this feed" : { fr: "Déplacer ce flux", ja: "このソースを移動する", es: "Mueva esta fuente (%)" },
"Edit this feed parameters" : { fr: "Modifier les paramètres de ce flux", ja: "このソースパラメータを変更する", es: "Establezca estos parámetros fuente" },
"Delete this feed" : { fr: "Supprimer ce flux", ja: "本当にこのフィードを削除しますか", es: "Borraste esta feed" },
"Refresh this feed" : { fr: "Actualiser ce flux", ja: "このソースをリフレッシュしてください", es: "Actualiza esta fuente" },
"Refresh this feed (%1 - %2)" : { fr: "Actualiser ce flux (%1 - %2)", ja: "このソースをリフレッシュしてください (%1 - %2)", es: "Actualiza esta fuente (%1 - %2)" },
"Select this feed" : { fr: "Sélectionner ce flux", ja: "RSS(%1)フィードを選択", es: "Selecciona este feed" },
"Configure this feed" : { fr: "Configurer ce flux" , ja: "このソースを設定します", es: "Configura esta fuente" },
"Delete this feed?" : { fr: "Supprimer ce flux ?", ja: "本当にこのフィードを削除しますか?", es: "¿Borraste esta feed?" },
"Delete feed" : { fr: "Supprimer flux" , ja: "このソースを削除してください", es: "Eliminar fuente" },
"Untitled" : { fr: "Sans titre", ja: "無題", es: "Intitulado" },
......
......@@ -2,7 +2,7 @@
PTL.prefs = {
getDefaultFeeds:function() {
getDefaultFeeds: function() {
var result = null;
$.ajax({
......@@ -17,7 +17,7 @@ PTL.prefs = {
return result;
},
readConfig:function(key) {
readConfig: function(key) {
const defaults = {
'gallerySlideTransition': 'fade',
......@@ -46,7 +46,7 @@ PTL.prefs = {
}
},
writeConfig:function(key, val) {
writeConfig: function(key, val) {
$('div#logoTitle i').addClass('writing');
......@@ -56,19 +56,19 @@ PTL.prefs = {
localStorage.setItem(key, val);
setTimeout(function () {
setTimeout(function() {
$('div#logoTitle i').delay('slow').removeClass('writing');
}, 300);
},
exportConfig:function(data, fileName) {
exportConfig: function(data, fileName) {
const a = document.createElement("a");
document.body.appendChild(a);
a.style = "display: none";
const json = JSON.stringify(data, null, 2),
blob = new Blob([json], {type: "application/json"}),
url = window.URL.createObjectURL(blob);
blob = new Blob([json], { type: "application/json" }),
url = window.URL.createObjectURL(blob);
a.href = url;
a.download = fileName;
a.click();
......
......@@ -239,7 +239,7 @@ PTL.tab = {
feeds.forEach(function(feed) {
// console.log('feed.lastitem: %s (%s)', feed.lastitem, feed.url);
const type = PTL.feedTypes.includes(feed.type) ? feed.type : 'mixed',
nbitems = Number.isInteger(feed.nbitems) ? feed.nbitems : 5,
nbitems = Number.isInteger(feed.nbitems) ? feed.nbitems : 10,
limit = Number.isInteger(feed.limit) ? feed.limit : 260,
lastItem = feed.lastitem;
PTL.feed.add($column, feed.url, feed.name, type, limit, feed.status, feed.iconhash, nbitems, lastItem, false, false, progress);
......
......@@ -233,13 +233,13 @@ PTL.util = {
return isMobile;
},
help:function(type) {
help:function(type, step) {
PTL.sideMenu('close');
const dialog = introJs(),
const dialog = introJs(step),
menu = introJs(),
ui = introJs();
ui = introJs(step);
ui.setOptions({
steps: [
......@@ -308,17 +308,11 @@ PTL.util = {
dialog.setOptions({
steps: [
{
title: PTL.tr('Everything starts here'),
element: 'input#feedGuessInput',
title: PTL.tr('Location of the feed'),
element: '#feedGuessDiv',
intro: '<p><span class="translate" data-content="Enter a website address URL and click search, then OK, or simply enter the URL of the">' + PTL.tr('Enter a website address/URL and click search, then OK, or simply enter the URL of the') + '</span> <a class="help-rss ptl-link" href="https://' + PTL.language + '.wikipedia.org/wiki/RSS">' + PTL.tr('feed') + '</a>.</p><p><span class="translate" data-content="If what you enter is not a regular URL (an internet location in the form of \"http...\") Pétrolette will build a search feed using the words">' + PTL.tr('If what you enter is not a regular URL (an internet location in the form of \"http...\") Pétrolette will build a search feed using the words') + '.</span><p>',
position: 'bottom'
},
{
title: PTL.tr('Explore!'),
element: 'button#feedGuessButton',
intro: PTL.tr('Find / discover the feed of this website, or build a search feed from the words') + '.',
position: 'left'
},