Commit graph

71 commits

Author SHA1 Message Date
Keith Carangelo d2019d3a09 Fixed issue with suggestions on multiple terms 2021-09-08 20:45:56 -04:00
Keith Carangelo 6202038c65 Updated to pass eslint 2021-09-08 15:40:05 -04:00
Keith Carangelo a7d43caccb Added support for OR (~) and optional AND (+) operators for tag searches. 2021-09-08 15:26:58 -04:00
ArthurHoaro 83b4eb1795
Merge pull request #1694 from ArthurHoaro/fix/bulk-add-redirect-token
Fix: bulk add redirection with ending slash
2021-01-26 16:25:09 +01:00
ArthurHoaro baac4388b1
Merge pull request #1693 from ArthurHoaro/fix/bulk-add-delete
Fix: bulk add - delete existing link
2021-01-19 14:31:15 +01:00
ArthurHoaro 3d6278e86f Fix: bulk add redirection with ending slash
Otherwise cookie may not be store under the right subfolder, thus generating tokens in the wrong session file.

Fixes #1690
2021-01-19 14:26:04 +01:00
ArthurHoaro 93175b6e9d Fix: bulk add - delete existing link
Do not send redirect response in bookmark delete controller if the request comes from bulk creation page.

Fixes #1683
2021-01-19 12:54:34 +01:00
ArthurHoaro 47ac77adbb Fix: bulk add - private status
Use 'checked' attribute instead of 'value' for checkboxes. 'value' always returns 'on'.

Fixes #1684
2021-01-19 11:55:50 +01:00
ArthurHoaro 336f15e8ba Vintage theme: display global messages 2020-11-09 12:46:24 +01:00
ArthurHoaro 1e49a65a2a Vintage theme: support async metadata retrieval 2020-11-09 12:36:04 +01:00
ArthurHoaro d9d71b10c3
Merge pull request #1621 from ArthurHoaro/feature/tag-separators 2020-11-08 14:07:33 +01:00
ArthurHoaro cfdd209440 Display error details even with dev.debug set to false
It makes more sense to display the error even if it's unexpected.
Only for logged in users.

Fixes #1606
2020-11-05 19:55:17 +01:00
ArthurHoaro 8a1ce1da15 ESLint 2020-11-05 19:14:17 +01:00
ArthurHoaro df9aac5b64 Tags separator: vintage theme compatibility 2020-11-05 18:16:52 +01:00
ArthurHoaro b3bd8c3e8d Feature: support any tag separator
So it allows to have multiple words tags.

Breaking change: commas ',' are no longer a default separator.

Fixes #594
2020-11-05 17:54:42 +01:00
ArthurHoaro 5f987a64d8 Fix confirm popup before bookmark deletion
Regression introduced by #1596

Fixes #1623
2020-11-05 16:49:00 +01:00
ArthurHoaro 6a71675887 Bulk creation: displays a progress bar when saving all displayed forms 2020-10-27 20:11:30 +01:00
ArthurHoaro 25e90d8d75 Bulk creation: fix private status based on the first form 2020-10-27 20:11:30 +01:00
ArthurHoaro 5d8de7587d Feature: bulk creation of bookmarks
This changes creates a new form in addlink page allowing to create
multiple bookmarks at once more easily. It focuses on re-using as much
existing code and template component as  possible.

These changes includes:
  - a new form in addlink (hidden behind a button by default),
containing a text area for URL, and tags/private status to apply to
created links
  - this form displays a new template called editlink.batch, itself
including editlink template multiple times
  - User interation in this new templates are handle by a new JS script
(shaare-batch.js) making AJAX requests, and therefore does not need page
reloading
  - ManageShaareController has been split into 3 distinct controllers:
    + ShaareAdd: displays addlink template
    + ShaareManage: various operation applied on existing shaares
(change visibility, pin, deletion, etc.)
    + ShaarePublish: handles creation/edit forms and saving Shaare's
form
  - Updated translations

Fixes #137
2020-10-27 20:11:30 +01:00
ArthurHoaro 0cf76ccb47 Feature: add a Server administration page
It contains mostly read only information about the current Shaarli instance,
PHP version, extensions, file and folder permissions, etc.
Also action buttons to clear the cache or sync thumbnails.

Part of the content of this page is also displayed on the install page,
to check server requirement before installing Shaarli config file.

Fixes #40
Fixes #185
2020-10-21 15:06:47 +02:00
ArthurHoaro 21e72da9ee Asynchronous retrieval of bookmark's thumbnails
This feature is based general.enable_async_metadata setting and works with existing metadata.js file.
The script is compatible with any template:
   - the thumbnail div bloc must have  attribute
   - the bookmark bloc must have  attribute with the bookmark ID as value

Fixes #1564
2020-10-20 10:15:18 +02:00
ArthurHoaro 9b3c1270bc
Merge pull request #1567 from ArthurHoaro/feature/async-title-retrieval 2020-10-20 10:14:28 +02:00
ArthurHoaro 4e3875c0ce Feature: highlight fulltext search results
How it works:

  1. when a fulltext search is made, Shaarli looks for the first
occurence position of every term matching the search. No change here,
but we store these positions in an array, in Bookmark's additionalContent.
  2. when formatting bookmarks (through BookmarkFormatter
implementation):
    1. first we insert specific tokens at every search result positions
    2. we format the content (escape HTML, apply markdown, etc.)
    3. as a last step, we replace our token with displayable span
elements

Cons: this tightens coupling between search filters and formatters
Pros: it was absolutely necessary not to perform the
search twice. this solution has close to no impact on performances.

Fixes #205
2020-10-16 20:31:12 +02:00
ArthurHoaro 3cb4e8a44c Improve Manage tags page
Fixes #1125
2020-10-16 20:03:25 +02:00
ArthurHoaro 4cf3564d28 Add a setting to retrieve bookmark metadata asynchrounously
- There is a new standalone script (metadata.js) which requests
    a new controller to get bookmark metadata and fill the form async
  - This feature is enabled with the new setting: general.enable_async_metadata
    (enabled by default)
  - general.retrieve_description is now enabled by default
  - A small rotating loader animation has a been added to bookmark inputs
    when metadata is being retrieved (default template)
  - Custom JS htmlentities has been removed and  mathiasbynens/he
    library is used instead

Fixes #1563
2020-10-15 09:08:46 +02:00
ArthurHoaro 72fbbcd679 Security: fix multiple XSS vulnerabilities + fix search tags with special chars
XSS vulnerabilities fixed in editlink, linklist, tag.cloud and tag.list.

Also fixed tag search with special characters: urlencode function needs to be applied on raw data, before espaping, otherwise the rendered URL is wrong.
2020-10-06 17:30:18 +02:00
sprak3000 f4ea7cd563 Issue #1437 - Make tag cloud/list views buttons more obvious
This work alters the markup and CSS for the tag sort UI to match the button feel filters and links per page uses.
2020-10-02 14:06:02 -04:00
ArthurHoaro 9192a48be3 Fix ESLint after dependency upgrade 2020-09-22 18:14:18 +02:00
ArthurHoaro 96746d7165 Upgrade front end dependencies
Mostly in order to get rid of deprecated deps, and upgrade vulnerable ones.

  - Upgrade webpack from 3.x to 4.x
  - Moved babel package to main repo
  - Replaced deprecated extract-text-webpack-plugin with extract-text-webpack-plugin
  - Replaced deprecated babel-minify-webpack-plugin with terser-webpack-plugin
  - Replaced deprecated node-sass with (dart) sass package
  - Replaced deprecated sass-lint with stylelint (the rules might be a bit different

Related to #1531: trivy doesn't raise any more issue
2020-09-22 17:51:42 +02:00
ArthurHoaro 0a286f6946
Merge pull request #1526 from kcaran/links_per_page 2020-09-03 08:45:48 +02:00
ArthurHoaro cd10bc23e7 Export: refresh CRSF token after submit
This allow users to submit the form multiple times, because there is no actual browser redirection to the page.

Fixes #1532
2020-09-01 11:01:21 +02:00
Keith Carangelo e813934ae1 Moved definition of a.selected to pass sasslint test 2020-08-30 07:26:21 -04:00
Keith Carangelo 816ffba74b Added $links_per_page variable to template and display on default 2020-08-29 11:02:59 -04:00
ArthurHoaro 301c7ab1a0 Better support for notes permalink 2020-07-28 20:46:11 +02:00
ArthurHoaro 6132d64748 Process thumbnail synchronize page through Slim controllers 2020-07-23 21:19:21 +02:00
ArthurHoaro 764d34a7d3 Process token retrieve through Slim controller 2020-07-23 21:19:21 +02:00
ArthurHoaro 7b8a6f2858 Process change visibility action through Slim controller 2020-07-23 21:19:21 +02:00
ArthurHoaro 9c75f87793 Use multi-level routes for existing controllers instead of 1 level everywhere
Also prefix most admin routes with /admin/
2020-07-23 21:19:21 +02:00
ArthurHoaro 818b3193ff Explicitly define base and asset path in templates
With the new routes, all pages are not all at the same folder level anymore
(e.g. /shaare and /shaare/123), so we can't just use './' everywhere.
The most consistent way to handle this is to prefix all path with the proper variable,
and handle the actual path in controllers.
2020-07-23 21:19:21 +02:00
ArthurHoaro 8eac2e5488 Process manage tags page through Slim controller 2020-07-23 21:19:21 +02:00
ArthurHoaro bee33239ed Fix all relative link to work with new URL 2020-07-23 21:19:21 +02:00
ArthurHoaro dd51f653d0 Fix SASS Lint 2020-01-26 11:34:14 +01:00
ArthurHoaro 6c50a6ccce Render login page through Slim controller 2020-01-26 11:34:14 +01:00
ArthurHoaro cf92b4dd15 Apply the new system (Bookmark + Service) to the whole code base
See https://github.com/shaarli/Shaarli/issues/1307
2020-01-18 09:55:59 +01:00
ArthurHoaro b5e2b23c99 Fix image lazy loading issues
For some reason, bLazy won't load the image if the img block has
either 0 height or width.
2019-08-15 11:41:50 +02:00
Rajat Hans 4c029779c8 Responsive issue with delete button fix 2019-07-24 21:59:56 +05:30
ArthurHoaro a5a0c0399b WIP - Plugin to override default template colors
* Adds a new core plugin to override default template colors
  * Adds a new hook when plugin settings are saved
(`save_plugin_parameters`)
  * Use CSS native variables for main colors instead of SASS variables
  * Disable SASS sort order rules due to a bug in the plugin

Fixes #1312
2019-07-08 23:20:56 +02:00
ArthurHoaro 8ed59f107e
Merge pull request #1301 from ArthurHoaro/template/print-css
Add print CSS rules to the default template
2019-05-25 15:38:49 +02:00
ArthurHoaro b2143ff480 Switch from FontAwesome v4.x to ForkAwesome
And use the Shaarli icon made by @xuv in the header and footer (default template).
2019-05-19 12:03:14 +02:00
ArthurHoaro 374f89e721 Add print CSS rules to the default template
Fixes #1291

  * Display the header bar only on the first page
  * Hide search bars, pagination buttons, filters, and edit/delete buttons
2019-05-08 12:17:52 +02:00