Commit Graph

984 Commits

Author SHA1 Message Date
Andrew Dolgov 8f8675a26a * filters: remove duplicate code, overall cleanup
* check if some tres exist before trying to reload them
2021-02-12 14:31:36 +03:00
Andrew Dolgov 9804a17b79 fix typo 2021-02-12 12:12:31 +03:00
Andrew Dolgov a72171f8ef dialogOf: deal with both raw DOM elements and widgets 2021-02-12 12:12:12 +03:00
Andrew Dolgov bf6d0f2817 various dialog-related fixes; stop referring to many dialogs by name; move filter test initial dialog to client side 2021-02-12 10:35:13 +03:00
Andrew Dolgov 72e38bfe1f rework a few more dialogs to use App.dialogOf() 2021-02-12 09:56:27 +03:00
Andrew Dolgov d466284fab * customizeCSS: client dialog
* remove hardcoded width from most dialogs (move to css)
* add helper to easily get dialog from its widget
* rework some dialog buttons to use current object instead of calling dialog by name
2021-02-12 09:02:44 +03:00
Andrew Dolgov cb7c075cd2 remove OPML.onImportComplete 2021-02-12 08:22:39 +03:00
Andrew Dolgov 83b0738b04 opml import: no more iframe, use client dialog 2021-02-12 08:22:00 +03:00
Andrew Dolgov eac7ad5d34 remove explainError server-side dlg 2021-02-12 08:00:25 +03:00
Andrew Dolgov 4182018cb7 generated feed: use client dialog 2021-02-11 22:04:39 +03:00
Andrew Dolgov 1a680d4eae publishedOPML: use client dialog 2021-02-11 21:42:38 +03:00
Andrew Dolgov 848bc57f29 disable themes in safe mode; rework safe mode warning/login prompt 2021-02-11 21:19:57 +03:00
Andrew Dolgov 74986d1ac6 shorten pref tab names; make log-alert clickable 2021-02-11 15:49:32 +03:00
Andrew Dolgov ce2335deaf pref-users: css fixes 2021-02-06 16:24:40 +03:00
Andrew Dolgov 10392ecc28 event log: add pagination 2021-02-06 10:10:54 +03:00
Andrew Dolgov 2933483393 add a hack (Headlines.unpackVisible) to workaround against unpack observer sometimes missing articles 2021-01-19 11:54:13 +03:00
Andrew Dolgov da0ad82c24 Archive cleanup:
- remove code to manually archive/unarchive articles
- remove ttrss_archived_feeds/orig_feed_id handling - the whole thing was implemented for
this data to be kept indefinitely; it doesn't make a lot of sense to deal with this stuff
now that it is expired after one month anyway (same reasons as feed browser being removed - privacy)
- remove "originally from"-related stuff because of the above
- also remove unused remaining frontend/backend code related to feed browser (rip)
2021-01-17 14:55:11 +03:00
Andrew Dolgov 6c13449088 remove CommonDialogs.feedBrowser() 2021-01-17 14:34:04 +03:00
Andrew Dolgov 25520e9784 Select... dropdown: replace dijit Select with DropDownButton, simplify layout
PluginHost: add HOOK_HEADLINE_TOOLBAR_SELECT_MENU_ITEM
Headlines.onActionChanged: removed
2021-01-17 11:27:07 +03:00
Andrew Dolgov b2993bcd30 remove menu options to manually un/archive articles 2021-01-17 10:37:40 +03:00
Andrew Dolgov 8cc07bc8bd event log: add severity filtering 2020-12-24 15:02:47 +03:00
Andrew Dolgov e86b2e60d3 edit tags dialog: initialize autocomplete in onShow (instead of onLoad) because of xhr 2020-12-23 12:14:11 +03:00
Andrew Dolgov 57f36f3f97 search dialog: populate current search values onShow instead of onLoad because the dialog is preloaded via xhr 2020-12-23 12:09:34 +03:00
Andrew Dolgov 0e4e0e624e viewfeed debugger: open properly for categories 2020-12-07 17:10:36 +03:00
Andrew Dolgov d06cc8267b queryFeedHeadlines: bring back DISTINCT for a limited set of columns 2020-12-07 16:59:48 +03:00
Andrew Dolgov db3fcb861b viewfeed: reintroduce timestamps, fix debugging, fix some indents 2020-12-04 18:55:53 +03:00
Andrew Dolgov 87184904ed don't select next unread feed when marking as read last week, etc. 2020-11-30 15:15:51 +03:00
Andrew Dolgov 0a6ff72e70 Revert "fix HOOK_ARTICLE_RENDERED_CDM never being called"
This reverts commit e3a522cdc1.
2020-10-21 07:32:30 +03:00
Andrew Dolgov e3da11bf6d Revert "somewhat experimental: disable article packing/unpacking, render content immediately"
This reverts commit ab53591957.
2020-10-21 07:19:15 +03:00
Andrew Dolgov e3a522cdc1 fix HOOK_ARTICLE_RENDERED_CDM never being called 2020-10-09 13:18:47 +03:00
Andrew Dolgov ab53591957 somewhat experimental: disable article packing/unpacking, render content immediately 2020-10-09 13:07:34 +03:00
Andrew Dolgov f693ebab21 fix default password nag dialog, load via xhr 2020-09-16 06:38:41 +03:00
Andrew Dolgov 77faa5d523 editFeed: only try to reload feed tree in preferences if its actually there 2020-09-15 18:55:34 +03:00
Andrew Dolgov 3f9390c45f comments link: load in new tab 2020-09-15 18:49:03 +03:00
Andrew Dolgov 42b5564d1e editarticletags: load dialog via XHR 2020-09-15 18:47:19 +03:00
Andrew Dolgov 0a142912d3 backend handler: require CSRF, remove obsolete code 2020-09-15 18:08:08 +03:00
Andrew Dolgov 154417d80b public/logout: require valid CSRF token 2020-09-15 16:59:11 +03:00
Andrew Dolgov cbcb10a272 Feeds: load quickaddfeed and search dialogs via XHR w/ CSRF protection 2020-09-15 16:28:09 +03:00
Andrew Dolgov 8080c525fd - backend: require CSRF token to be passed via POST
- do not leak CSRF token via GET request in feed debugger
- rework Article/redirect to use POST
2020-09-15 16:12:53 +03:00
Andrew Dolgov aeaafefa07 don't pass csrf token as a GET parameter to Article 2020-09-15 16:03:09 +03:00
Andrew Dolgov e670ac2ee5 require CSRF token for Article/redirect 2020-09-15 15:35:50 +03:00
Andrew Dolgov 7e50c6c4b5 - enable CSRF support earlier
- remove rpc/sanityCheck from CSRF-excluded calls
2020-09-15 15:32:17 +03:00
Andrew Dolgov b4cb67e77f remove csrf token from rpc method sanityCheck 2020-09-14 20:00:01 +03:00
nanaya 8d8affdc45 Store FeedTree data in localStorage
Patching internal functions of dijit.Tree as they don't provide option on where to store the data.

It stores to cookies by default but the data can get quite big for hundreds of feeds and exceeds cookies size limit.

Not to mention it'll cause the cookie to be sent during any request with nothing handling it server side and just wasting bandwidth.

This patch will also migrate current data in cookie to local storage accordingly.
2020-07-09 01:52:46 +09:00
Andrew Dolgov 697418f863 more eslint fixes 2020-06-05 07:54:32 +03:00
Andrew Dolgov d01ad09800 eslint-related fixes; move a few things from global context to App 2020-06-05 07:44:57 +03:00
Andrew Dolgov 88027d7a39 fix various minor issues reported by eslint 2020-06-04 23:27:22 +03:00
Andrew Dolgov 9d28b3ac50 unify prefs/main App objects, remove fake classes, use single static App object instead 2020-06-04 22:19:23 +03:00
Andrew Dolgov 30ed5d7c3c same, but for preferences 2020-06-04 20:04:17 +03:00
Andrew Dolgov e37f8cfa78 don't use declare() for static objects with no inheritance because apparently it's not actually needed by AMD 2020-06-04 19:50:13 +03:00
Andrew Dolgov 676cdf6ee4 move isCombinedMode to AppBase so we wouldn't crash in preferences 2020-06-02 21:00:53 +03:00
Andrew Dolgov b39e615683 add Headlines.default_force_previous, default_force_to_top 2020-05-25 10:26:03 +03:00
Andrew Dolgov 19893d33e3 only bind up/down in 3 panel mode 2020-05-23 08:53:18 +03:00
Andrew Dolgov 409ba0db2d - RIP smooth scrolling and associated hacks
- attempt to make Headlines.move() / Article.cdmMoveToId() behave a bit more intuitively
2020-05-22 21:48:03 +03:00
Andrew Dolgov d63329baa1 Headlines.move: add params.force_previous to always move to previous article in CDM 2020-05-19 09:21:07 +03:00
Andrew Dolgov 2deb9c555e Headlines.move: use requestAnimationFrame in CDM :( 2020-05-19 08:07:23 +03:00
Andrew Dolgov 8dc6b48ebd Headlines.move: when going back to top of active article, use a smarter (?) offset calculation 2020-05-17 22:02:47 +03:00
Andrew Dolgov 25c8467753 rename Headlines.correctHeadlinesOffset() to scrollToArticleId()
invoke it in Article.view() instead of all over the place
2020-05-17 17:01:52 +03:00
Andrew Dolgov 05a84ab778 Headlines.move: maybe glitch less when moving back to top, etc 2020-05-17 16:04:31 +03:00
Andrew Dolgov 9ae9302b6b implement keyboard-related changes discussed in https://community.tt-rss.org/t/changing-the-amount-of-scroll-by-arrow-key/3452/7 2020-05-17 08:25:51 +03:00
Andrew Dolgov a1ffc11619 only enable unpack observer in expanded mode 2020-05-13 12:28:48 +03:00
Andrew Dolgov 5e77d0062b use intersection observer to unpack visible articles, remove Headlines.unpackVisible() 2020-05-13 07:28:13 +03:00
Andrew Dolgov 7adbc95acc remove floating title, use position: sticky for cdm headers instead 2020-05-13 06:51:46 +03:00
Andrew Dolgov 4a00d41915 Article.cdmMoveToId: don't crash if params is not given 2020-05-09 19:41:11 +03:00
Andrew Dolgov a802649d53 rename cdmScrollToId to cdmMoveToId
prevent smooth scrolling when going directly to an article
2020-05-09 08:16:12 +03:00
Andrew Dolgov 2558fcbe21 add hotkey "\" to cancel current search 2020-05-09 07:56:06 +03:00
ltGuillaume 19064864bf Allow setting Insert (45) and Delete (46) as hotkeys
These are not reported via keypress either, so handle them via keydown.
2020-05-03 14:35:17 +02:00
Andrew Dolgov 0d467973dc Article.pack: dispose of unpacked content properly 2020-04-17 15:59:12 +03:00
Andrew Dolgov e17c7e2fb4 Headlines.renderAgain: scroll instantly to active article when going back to combined mode on the fly 2020-04-17 07:58:34 +03:00
Andrew Dolgov b3e4f0188e in combined non-expanded mode, pack headline rows as they are unfocused to save RAM 2020-04-17 07:37:56 +03:00
Andrew Dolgov afaac95d8d if comment URL is not specified but comment count is non-zero, show comments prompt leading to the article 2020-04-07 06:50:24 +03:00
Andrew Dolgov a65749a512 source validationtextarea in main UI 2020-02-28 14:04:29 +03:00
Andrew Dolgov f24ece85a6 add validationtextarea control, use it for filter match editor 2020-02-28 13:53:45 +03:00
Andrew Dolgov 2fefb4fd87 getTestResults: don't try to use previously removed variable 2020-02-28 12:54:39 +03:00
Andrew Dolgov 4f62f5f3f1 filter edit dialog: load rule editor via XHR 2020-02-28 12:52:20 +03:00
Andrew Dolgov 340bb7f392 fix typo 2020-02-28 12:17:49 +03:00
Andrew Dolgov 8645f36c5b filter test dialog: pass contents via xhr POST 2020-02-28 12:16:54 +03:00
Andrew Dolgov 4e74da590e af_readability: allow get full text button to work as a toggle; in cdm, scroll to article after embedding 2020-02-28 08:03:25 +03:00
Andrew Dolgov 07b27b375f update toggle_embed_original hotkey to invoke readability embed instead of removed embed_original plugin 2020-02-27 09:47:20 +03:00
Andrew Dolgov 71ff485fbf af_readability: add article button to embed content of a specific article 2020-02-27 07:57:22 +03:00
Andrew Dolgov 788ea95fbd feed tree: do not mark Labels as Special 2020-02-22 16:44:31 +03:00
Andrew Dolgov 4ab3854aed don't generate default.css, replace with themes/light.css as a default root CSS file 2020-02-22 16:22:44 +03:00
Andrew Dolgov 282b445a43 feed tree: don't set Special class on Labels category 2020-02-21 14:12:10 +03:00
Andrew Dolgov 2d3fdd6836 hide read feeds / hide read shows special: use CSS instead of JS-based hiding 2020-02-21 14:06:21 +03:00
Andrew Dolgov 60288f02e8 1. feedtree: show counters for marked articles if view-mode == marked
2. hide/show relevant counter nodes using css
3. cleanup some counter-related code
4. compile default css into light theme to prevent cache-related issues
2020-02-20 14:14:45 +03:00
Andrew Dolgov 076c5382fa login form: add workarounds for chrome password manager 2020-01-25 17:00:51 +03:00
Andrew Dolgov 776fe4768b default password warning: fix close button, don't crash if dialog is recreated (on feed tree reload etc) 2020-01-25 13:02:11 +03:00
Andrew Dolgov 4a4d7a44fa onViewModeChanged: set view mode value as a custom body attribute 2020-01-24 16:04:12 +03:00
Andrew Dolgov 6f625aa8aa apply Has_Marked css class to feed tree elements with marked articles 2020-01-24 14:35:10 +03:00
Andrew Dolgov a6d314b753 support dark mode for login form 2020-01-23 13:14:47 +03:00
Andrew Dolgov aa56bcaf44 support night mode when using share by URL 2020-01-19 10:51:08 +03:00
Andrew Dolgov 303f8fb329 properly escape quotes when rendering article data to html attributes via template strings 2020-01-18 10:31:00 +03:00
Andrew Dolgov 7e2fd9bdce Headlines.move: fix move to previous article if scrollTop returns a fractional value for current item 2020-01-08 08:51:40 +03:00
Andrew Dolgov f83836ade9 updateCurrentUnread: don't crash if counter element is not available 2019-12-17 14:06:50 +03:00
Andrew Dolgov 9f70bb010a fix blank screen on load if custom theme is enabled 2019-12-15 13:35:09 +03:00
Andrew Dolgov 07f4878d59 workaround for a race condition between dojo.parse() and tt-rss loading proper day/night css on startup because of firefox async CSS loader 2019-12-15 11:57:26 +03:00
Andrew Dolgov 0d6add5d7f show alert() if fatal exception happens while initializing base app objects and app.error is not available 2019-12-14 09:39:44 +03:00
JustAMacUser b4dd03ba2a Wrap AppBase.setupNightModeDetection() in try/catch because Safari doesn't support matchMedia change events. 2019-12-13 13:39:52 -05:00
Andrew Dolgov 0237dee980 implement automatic night mode detection using MQL
add separate light.css to force light theme
remove manual night mode toggle and related code
2019-12-12 20:09:43 +03:00
Andrew Dolgov 9c0235ab66 show current unread counter on headlines toolbar if sidebar is hidden 2019-12-12 07:37:28 +03:00