Commit eef5f4d6 authored by yPhil's avatar yPhil
Browse files

The custom name of the feed was overriden with the default one

- Plus proper management of the empty field in feedNew
parent 20a1e101
Pipeline #436377 passed with stage
in 46 seconds
# Changelog
## 1.4.0
## v1.5.0
### Bugfixes
- The custom name of the feed was overriden with the default one
## v1.4.0
- New "New feed" dialog, streamlined w/ only the feed URL #b57887be
- Auto / transparent search / build / add of the feed at the URL
......@@ -25,7 +30,7 @@
- Refresh icon tooltip text items (both feed URL / name and timeStamp) were `undefined` after a (long) while #a633d06d
- The help tour functions are now in PTL.dialog #dd1df3bb
## 1.3.3
## v1.3.3
- Default search engine update (because of various instances searx RSS restrictions) #8870f07e
......@@ -34,7 +39,7 @@
- A legacy db call was left in dialog's killFeed
- Removed lingering (sync) debug symbols
## 1.3.2
## v1.3.2
- One big squashed commit #b92f6cb6
- New favicon error handling
......@@ -44,7 +49,7 @@
- Libs version update
- Default feeds update
## 1.3.0
## v1.3.0
- New feed items indicator / badge #96
- New help system #104
......@@ -62,7 +67,7 @@
- Finalized name refactoring
- Explicit CSS vars names
## 1.2.8
## v1.2.8
- New function / dialog to merge the imported / open feeds with existing ones #e38691d5
- Server ports now set in [the config file](https://framagit.org/yphil/petrolette/-/blob/master/package.json) #c46149d8
......@@ -99,7 +104,7 @@
- Changed dialog wording policy : Laconic and modular in the titles, explicit and literal in the content text
- [Valid HTML](https://validator.w3.org/nu/?doc=https%3A%2F%2Fpetrolette.space%2F) #c6c5bfc2 to #140685b4
## 1.2.7
## v1.2.7
- The feed's favicon file name / path is now saved along, so as to avoid re-requesting it, then re-computing the (hash) name, and only *then* re-rend it back from the server favicon cache, so everybody wins #1e5f4c20
- The Logging strategy has been slightly adjusted: We now log the access to /feed and not to /favicon #1e5f4c20
......@@ -112,7 +117,7 @@
- Mobile: Removed transparency on hover #98d979c7
- New dialog options #7895970c
## 1.2.6
## v1.2.6
- Removed all sync calls on the server #71e24de1
- Error feeds keep their title #4e00f880
......@@ -123,7 +128,7 @@
- CSS rules update / cleanup #4412c6b9
- XML is not an object when nbGroups / nbFeeds < 2 (#93)
## 1.2.5
## v1.2.5
- Feed name is now saved along #037426a8
- Completely revamped the favicon (client) display system from a bg-img to a plain img with a fallback #47923bfb to #13f63af5
......@@ -134,7 +139,7 @@
- MediaRSS metadata preloading new preference option #50ef2ebb
- Site (fav)icon in "folded" feeds #bbc6ab5e
## 1.2.1
## v1.2.1
- MediaRSS audio & video (plain HTML5) player #3800c2a0 to #ffcfcfb6
- Infinite scrolling within the feeds #0f760e9b to #b2cf0f86
......@@ -146,6 +151,6 @@
- Relative imageUrl #8a63acaf
- Global sanitization of new inputs #a0cc0013
## 1.2.0
## v1.2.0
- Complete revamp of the image loading strategy #5bdd9341
......@@ -52,8 +52,6 @@ PTL.dialog = {
}
});
console.log('MOB: %s (%s)', PTL.util.isMobile());
$dialog.dialog('open');
});
......@@ -519,6 +517,11 @@ PTL.dialog = {
$addButton.click(function() {
const feedUrl = DOMPurify.sanitize($feedAddInput.val());
if (feedUrl == "") {
$messageZone.text(PTL.tr('This field cannot be empty'));
return;
}
$addButtonIcon
.removeClass('icon-checked icon-error ui-state-success ui-state-error')
......@@ -527,7 +530,6 @@ PTL.dialog = {
.removeClass('ui-state-success ui-state-error');
$addButtonText.text(PTL.tr('Searching'));
$.get('/discover', {
dataType: 'json',
......@@ -638,11 +640,11 @@ PTL.dialog = {
$feed.show('fade', 250, function() {
PTL.feed.populate($button);
PTL.tab.saveTabs();
});
}
PTL.tab.saveTabs();
PTL.dialog.kill($dialog);
}
......@@ -717,14 +719,12 @@ PTL.dialog = {
$feedGuessInput.on('keypress', function(e) {
if (e.which == 13) {
$okButton.click();
console.log('ENTER!: %s (%s)');
}
});
$feedNameInput.on('keypress', function(e) {
if (e.which == 13) {
$okButton.click();
console.log('ENTER!: %s (%s)');
}
});
......
......@@ -577,11 +577,13 @@ PTL.feed = {
.attr('title', PTL.tr('Refresh this feed (%1 - %2)', fetchFeed.feedTitle || fetchFeed.feedLink, timeStampAlt))
.removeClass('spin');
$feedLink
.text(fetchFeed.feedTitle)
.attr('href', fetchFeed.feedLink);
$dataStore.data('name', fetchFeed.feedTitle);
$feedLink.attr('href', fetchFeed.feedLink);
if ($dataStore.data('name') == '') {
$feedLink.text(fetchFeed.feedTitle);
$dataStore.data('name', fetchFeed.feedTitle);
}
if (fetchFeed.totalNewItems > 0) {
$dataStore.data('lastitem', fetchFeed.lastItem);
PTL.tab.saveTabs();
......
......@@ -191,6 +191,7 @@ PTL.i18n.translations = {
"Add a column" : { fr: "Ajouter une colonne" , ja: "列を追加する", es: "Agrega una columna" },
"This field cannot be empty" : { fr: "Ce champ ne peut pas être vide" , ja: "このフィールドを空にすることはできません", es: "Esta entrada de texto no puede estar vacía" },
"Add a feed to this column" : { fr: "Ajouter un flux à cette colonne" , ja: "この列にソースを追加する", es: "Agregar una fuente a esta columna" },
"Keyboard shortcuts" : { fr: "Raccourcis clavier" , ja: "キーボードショートカット", es: "Atajos de teclado" },
......
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