Commit a633d06d authored by yPhil's avatar yPhil
Browse files

New feedprefs paradigm

- s/Image/Media/g
- Oh, and tooltip bug hopefully sorted out
parent cf906bb6
Pipeline #433389 passed with stage
in 38 seconds
# Changelog
## 1.4.0
- New "media" paradigm in the feed preferences #HEAD
- Text only mode don't show anything but text
- New help tour : Menu entries #5884a8b
- Column buttons now appear on hover #cf906bb
### Bugfixes
- Refresh icon tooltip text (both feed URL / name and timeStamp) were `undefined` after a (long) while #HEAD
## 1.3.3
- Default search engine update (because of various instances searx RSS restrictions)
- Default search engine update (because of various instances searx RSS restrictions) #857142d1
### Bugfixes
- A legacy db call was left in dialog's killFeed
- Removed lingering (sync) debug symbols
## 1.3.2
## 1.3.2 #b92f6cb6
- New favicon error handling #b92f6cb6
- New favicon error handling
- New favicon saving routine
- Support for protocol-relative urls in images
- New feeds saved back
......
......@@ -14,11 +14,11 @@
## VC workflow
All work is done on `dev` or its child branches, then merged into `server` and pushed for testing, then merged into master at each release or critical bugfix. Pull Requests on `dev`, please.
All work is done on `dev` or its child branches, then merged into `server` and pushed for testing, then merged into `master` at each release or critical bugfix. Pull Requests on `dev`, please.
## Installation notes & caveats
The two libs [Feedrat](https://framagit.org/yphil/feedrat) (to discover a RSS/Atom feed at a given URL) and [Favrat](https://framagit.org/yphil/favrat) (to discover a favicon at a given URL) are no longer hosted on npm, but installed directly from the repo ; however their dependancies have to be installed manually by running `npm install` in their respective directories.
The two libs [Feedrat](https://framagit.org/yphil/feedrat) (to discover a RSS/Atom feed at a given URL) and [Favrat](https://framagit.org/yphil/favrat) (to discover a favicon at a given URL) are no longer hosted on npm, but installed directly from the repo ; their dependancies are installed and updated using a `postinstall` command.
## Under the hood
......@@ -29,11 +29,11 @@ Pétrolette is its own server, a standard [express](https://github.com/expressjs
- `npm start` launches `pm2` as per [package.json](package.json)
- `pm2` launches [http/server.js](http/server.js) as per [pm2.config.json](pm2.config.json)
- [http/server.js](http/server.js) launches [petrolette.js](petrolette.js)
- [petrolette.js](petrolette.js) uses [routes/router.js](routes/router.js) to define 4 routes: `/` for the actual Pétrolette page, `/discover` for the RSS searching (see Feedrat), `/favicon` for the site icon searching (see Favrat) and `static` for serving the static (CSS, icons, fonts, etc.) files.
- [petrolette.js](petrolette.js) uses [routes/router.js](routes/router.js) to define 4 routes: `/` for the actual Pétrolette page, `/discover` for the RSS searching (see [Feedrat](https://framagit.org/yphil/feedrat)), `/favicon` for the site icon searching (see [Favrat](https://framagit.org/yphil/favrat)) and `static` for serving the static (CSS, icons, fonts, etc.) files.
- The client send the (RSS / favicon / discover / static) request to the server
- The server returns the content to the client
- The server returns the formatted feed to the client
At the first startup, Pétrolette generates its page using a default tabs and feeds list, then copies this structured list the the client's local storage persistent cache. The user can (should) also use a third party cloud storage to write / read his / her tabs and feeds, in order to have the same contents on all machines : Desktop, laptop, phone, etc.
At the first startup, Pétrolette generates its page using a default tabs and feeds list, then copies this structured list the the client's [local storage persistent cache](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage). The user can (should) also use a third party cloud storage to write / read his / her tabs and feeds, in order to have the same contents on all machines : Desktop, laptop, phone, etc.
## Why is there a server in the first place ?
......@@ -60,10 +60,14 @@ Those logs are also rotated by pm2, using the [pm2-logrotate](https://github.com
### Fonts
The [glyph font](public/font/fontello) is a custom one, containing only the dozen of glyphs used throughout the app, made with [Fontello](https://fontello.com/). To edit this font, juste load (or just D&Drop) [fontello-config.json](public/font/fontello-config.json) into [Fontello](https://fontello.com/), make the changes, then DLoad the archive into petrolette/tmp/fontello.zip, then
The [glyph font](public/font/fontello) is a custom one, containing only the dozen of glyphs used throughout the app, made with [Fontello](https://fontello.com/) and Pétrolette's own logo / glyph. To edit this font, juste load (or just D&Drop) [fontello-config.json](public/font/fontello-config.json) into [Fontello](https://fontello.com/), make the changes, then DLoad the archive into petrolette/tmp/fontello.zip, then
`cd petrolette/tmp`
Extract and copy the relevant files:
`rm -rfv fontello-* ; unzip fontello.zip && cp -fv fontello-*/config.json ../public/font/fontello-config.json && cp -fv fontello-*/css/fontello.css ../public/css/ && cp -fv fontello-*/font/* ../public/font/ && cp -fv fontello-*/font/fontello.ttf ~/.fonts/ && fc-cache -f -v`
For any question, please [use the repo](https://framagit.org/yphil/petrolette/-/issues/new?issue%5Bmilestone_id%5D=) itself.
Thank you **very much** for any love you give to this project.
......@@ -11,7 +11,7 @@
## Good morning! ☕ 📰
[Pétrolette](http://petrolette.space) is a news reading home page, [Free, Libre, and Open-Source Software](https://framagit.org/yphil/petrolette/-/blob/master/LICENSE). It is immediately usable **without registration** with the **same URL** on the desktop or a mobile device.
[Pétrolette](https://petrolette.space) is a news home page, [Free, Libre, and Open-Source Software](https://framagit.org/yphil/petrolette/-/blob/master/LICENSE). She is immediately usable **without registration** with the **same URL** on the desktop or a mobile device.
Go ahead, it's yours : Create, delete, move feeds and tabs, close / quit your browser, come back tomorrow, everything is how you left it.
......
......@@ -827,7 +827,7 @@ ul.column {
ul.column div.colButtons {
display: var(--column-buttons-display);
border-radius: 3px;
border: 3px dashed var(--color-ui-sep);
border: 3px dashed var(--color-feed-bg);
color: var(--color-ui-sep);
left: 0;
margin-left: auto;
......
......@@ -25,9 +25,9 @@ PTL.feed = {
const $feedIcon = $('<i>')
.attr({
'class': 'feed-control feedIcon translate',
'title': PTL.tr('Fold / unfold this feed (%1)', url)
'title': PTL.tr('Fold / unfold this feed')
})
.data('title', 'Fold / unfold this feed (%1)', url)
.data('title', 'Fold / unfold this feed')
.click(function() {
if ($feedControls.data('status') == 'on') {
......@@ -135,7 +135,7 @@ PTL.feed = {
$selectDiv = $('<div>').append($selectIcon),
$deleteDiv = $('<div>').append($deleteIcon),
$prefsDiv = $('<div>').append($prefsIcon),
$reloadDiv = $('<div>').append($refreshIcon);
$refreshDiv = $('<div>').append($refreshIcon);
const $titleDiv = $('<div>')
.attr({
......@@ -178,7 +178,7 @@ PTL.feed = {
$feedHandle,
$titleDiv.append($titleLink),
$newItemsBadge,
$feedControls.append($prefsDiv, $reloadDiv));
$feedControls.append($prefsDiv, $refreshDiv));
$feed.append($feedHeader, $feedBody);
......@@ -292,12 +292,17 @@ PTL.feed = {
audioType = item.enclosures[0].type;
}
if (videoUrl && videoType) {
PTL.feed.appendVideoPlayer($itemDiv, videoUrl, videoType);
}
if (audioUrl && audioType) {
PTL.feed.appendAudioPlayer($itemDiv, audioUrl, audioType);
if (feedType !== 'text') {
if (videoUrl && videoType) {
PTL.feed.appendVideoPlayer($itemDiv, videoUrl, videoType);
}
if (audioUrl && audioType) {
PTL.feed.appendAudioPlayer($itemDiv, audioUrl, audioType);
}
}
}
......
......@@ -58,6 +58,8 @@ PTL.i18n.translations = {
"Loading" : { fr: "Chargement", ja: "読み込み中", es: "Cargando" },
"Media" : { fr: "Média", ja: "メディア", es: "Medios" },
"Media preloading" : { fr: "Pré-chargement des médias", ja: "メディアのプリロード", es: "Precarga de medios" },
......@@ -436,9 +438,9 @@ PTL.i18n.translations = {
"Move the current feed to this tab" : { fr: "Déplacer le flux courant dans cet onglet", ja: "このグループの現在のフィードを移動する", es: "Mueve el fuente actual en este grupo" },
"Display only text" : { fr: "Affichage du texte seul", ja: "テキストのみ", es: "visualización del solo texto" },
"Display text and image" : { fr: "Affichage du texte et de l'image", ja: "テキストとイメージ", es: "visualización del texto e imagen" },
"Display only image" : { fr: "Affichage de l'image seule", ja: "画像のみ", es: "visualización del solo imagen" },
"Only display text" : { fr: "Affichage du texte seul", ja: "テキストのみを表示する", es: "Mostrar solo texto" },
"Display text and media (image, audio, video)" : { fr: "Affichage du texte et du média (image, audio, video)", ja: "テキストとメディア(画像、音声、ビデオ)を表示する", es: "Mostrar texto y medios (imagen, audio, video)" },
"Only display media (image, audio, video)" : { fr: "Affichage du média seul (image, audio, video)", ja: "表示メディア(画像、音声、ビデオ)のみ", es: "Mostrar solo medios (imagen, audio, video)" },
"Validate /verify this feed file with the W3C" : { fr: "Valider / vérifier ce fichier flux avec le W3C", ja: "このソースファイルをW3Cで検証/検証する", es: "Validar / verificar este archivo fuente con el W3C" },
......
......@@ -64,22 +64,22 @@
data-step="4"
class="flexBox helpTourDialogItem">
<label data-title="Display only text"
<label data-title="Only display text"
data-content="Text"
class="translate"
for="text" >Text</label>
<input type="radio" name="radio-1" id="text">
<label data-title="Display text and image"
<label data-title="Display text and media (image, audio, video)"
data-content="Mixed"
for="mixed"
class="translate middleButton">Mixed</label>
<input type="radio" name="radio-1" id="mixed">
<label data-title="Display only image"
data-content="Image"
<label data-title="Only display media (image, audio, video)"
data-content="Media"
class="translate"
for="photo">Image</label>
for="photo">Media</label>
<input type="radio" name="radio-1" id="photo">
</div>
......
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