Commit graph

58 commits

Author SHA1 Message Date
Keith Carangelo
a7d43caccb Added support for OR (~) and optional AND (+) operators for tag searches. 2021-09-08 15:26:58 -04: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
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
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
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
ArthurHoaro
c5e96f594b
Merge pull request #1295 from ArthurHoaro/feature/visited-link-color
Slightly lighten visited link color
2019-05-08 11:00:58 +02:00
ArthurHoaro
160d9a7741
Merge pull request #1296 from ArthurHoaro/feature/sticky-label
Display sticky label in linklist
2019-05-08 11:00:33 +02:00
ArthurHoaro
786f35f270
Merge pull request #1276 from ArthurHoaro/feature/bulk-visibility
Bulk action: set visibility
2019-04-22 12:31:09 +02:00
ArthurHoaro
d3defcac1c Display sticky label in linklist
Add sticky label, like private label, in linklist to make it more visible.
2019-04-22 11:26:37 +02:00
ArthurHoaro
8fc0a984f0 Slightly lighten visited link color
To make it more visible in the middle of raw text.
2019-04-22 10:21:33 +02:00
ArthurHoaro
8d03f705eb Bulk action: set visibility
Added 2 buttons when link checkboxes are checked to set them either public or private.

Related to #572 #1160
2019-02-09 17:59:53 +01:00
ArthurHoaro
54ee240878 Fix button overlapping on mobile in linklist 2019-02-09 16:56:24 +01:00
ArthurHoaro
a062416918
Merge pull request #1208 from ArthurHoaro/feature/select-all
Add a button to toggle all checkboxes of displayed links
2018-10-06 13:30:29 +02:00
ArthurHoaro
d9bf5b31ff Sticky feature - Add translation and display for logged out users 2018-10-06 13:13:57 +02:00
ArthurHoaro
4154c25b5f Add a button to set links as sticky
Meaning that they always appear on top of all links

Fixes #186
2018-10-06 12:55:05 +02:00
ArthurHoaro
4fa9a3c5d8 Fix a JS bug preventing AJAX tag deletion to work
Fixes #1214
2018-08-16 17:25:47 +02:00
ArthurHoaro
fc574e6454 Add a button to toggle all checkboxes of displayed links
Related to #1160
2018-08-13 13:13:26 +02:00