Commit graph

96 commits

Author SHA1 Message Date
Max Leiter 01753a814c Improve accessibility for emoji 2018-03-18 12:13:48 -07:00
Jérémie Astori 00bca229f0
Enforce object literal shorthand syntax with ESLint 2018-03-15 00:22:09 -04:00
creesch 27393bb804 Offer optional syncing of client settings
Write synced settings to localstorage.

move settings and webpush init to init.js

stub for server sending clientsettings

get very basic setting sync working

Also update client.config.clientSettings on settings:set

Full setting sync with mandatory and excluded sync options

Actually check client preferences.

Further settings restructuring.

Refactor options.js make storage act in a sane manner.

Add new parameter to applySetting

Do not sync if the setting is stored as a result of syncing

General clean up, commenting and restructing.

sync from server on checking "sync"

offer initial sync

Better deal with DOM being ready and instances of inital sync showing

Don't try to disable autocompletion when not enabled.

Restructure option.js to seperate functions from settings.

More consistency in naming options vs settings

Switch processSetting and applySetting names reflecting their functionality better.

move options init back to configuration.

simplify how settings are synced around.

move options init after template building.

Remove unneeded hasOwnProperty

Use global for #theme and only apply theme in applySetting

Return when no server side clientsettings excist.

Autocompletion options to options.settings

Make nocss param in url work again.

Actually filter out empty highlight values.

Clarify alwaysSync comment.

Remove manual step for initial sync

change attr to prop in options.js

replace unbind with off in autocompletion.js

Do not sync settings when the lounge is set to public.

fix eslint error

Fix merge error

Do not show sync warning after page refresh when sync is enabled

Move setting sync label in actual label.

Improve server setting sync handling performance and failure potential.

Don't give impression that the desktop notificiation is off when the browser permission is denied.

Refine showing and hiding of notification warnings.

rename all setting socket events to singular setting.

add experimental note and icon to settingsync.

fix css linting error
2018-03-09 10:36:29 +01:00
Pavel Djundik c733e72e7a Auto-fix code for padding-line-between-statements rule 2018-02-20 09:28:04 +02:00
Pavel Djundik a3e448acf5 Enable no-var rule
Fixes #1961
2018-02-19 19:49:39 +02:00
Pavel Djundik 742929280d
Merge pull request #1919 from thelounge/yamanickill/image-size-error
Show error if image is greater than max prefetch size
2018-02-19 18:49:18 +02:00
Pavel Djundik b82ceb162b
Merge pull request #2059 from thelounge/xpaw/motd
Render MOTD with a single message
2018-02-19 18:42:16 +02:00
Pavel Djundik 13a53706f0
Merge pull request #1760 from thelounge/astorije/rm-object.assign-polyfill
Get rid of `Object.assign` polyfill
2018-02-19 18:29:45 +02:00
Pavel Djundik d1e5a8f492 Render MOTD with a single message 2018-02-14 11:00:46 +02:00
Jérémie Astori 91e3ca88bb
UI for "Image too large" errors 2018-02-01 21:14:37 -05:00
Pavel Djundik 349136f172 Do not match nicknames incorrectly as part of a bigger word
Fixes #1776
Fixes #1885
2017-12-27 20:44:59 +02:00
Jérémie Astori 371c5bcac2
Add a notEqual block helper for Handlebars 2017-12-21 22:09:08 -05:00
Jérémie Astori 6d053d65e7
Add tests for the Handlebars helper equal 2017-12-21 20:09:12 -05:00
Jérémie Astori 3e708f9c0b
Get rid of Object.assign polyfill
As far as I know, this is only required for IE at this point, and we have already made changes that removed support of any version of IE.
2017-12-12 02:42:59 -05:00
Pavel Djundik 4e6a29db35
Merge pull request #1797 from grissly-man/master
#1793 - implement reverse style
2017-12-10 16:15:40 +02:00
Pavel Djundik b391b87e29 Clean monospace and strikethrough formatters 2017-12-08 21:09:23 +02:00
Logan Griswold fb94ad4205 implement reverse formatting with tests
implement reverse formatting with tests
2017-12-07 18:27:59 +00:00
Logan Griswold f07c1bef69
#1755 - implement monospace formatting with keybinding, tests, and help section 2017-12-03 15:10:46 -05:00
Logan Griswold 0643d3b4a3
#1754 - implement strikethrough formatting, client keybinding, tests, and help section 2017-12-03 15:10:34 -05:00
Pavel Djundik 52b234bdfc
Merge pull request #1770 from thelounge/astorije/client-tests
Add a bunch of client tests
2017-12-01 12:51:13 +02:00
Jérémie Astori f368dcdc69
Add a bunch of client tests 2017-11-30 20:33:23 -05:00
Pavel Djundik d770028da6 Fix duplicate user names not being found 2017-11-30 14:16:11 +02:00
Jérémie Astori b53f1719eb
Merge pull request #1749 from thelounge/astorije/avoid-escape-quotes
Avoid escaping quotes whenever possible
2017-11-27 12:57:55 -05:00
Max Leiter 3d31fa4686 Link nicks mentioned in messages 2017-11-27 09:10:56 -08:00
Jérémie Astori 287c3a8223
Avoid escaping quotes whenever possible
Our `.eslintrc.yml` configuration file already allows for avoiding escape (see [ESLint doc for `avoidEscape`](https://eslint.org/docs/rules/quotes#avoidescape)) so we might as well use it. We already use this in a few places I believe.
2017-11-26 17:34:28 -05:00
Bonuspunkt 0e52b133af Sending channel and link together generates duplicate text 2017-11-26 21:33:27 +02:00
Pavel Djundik c053011611 Make regex in cleanIrcMessage const 2017-11-22 16:06:32 +02:00
Pavel Djundik 28b084af69 Fix #1413 - Handle hex colours when cleaning string 2017-11-22 16:03:59 +02:00
Pavel Djundik 0402554563 Move cleanIrcMessage to a separate file 2017-11-19 18:19:52 +02:00
Jérémie Astori 1dc92d8934
Enforce dangling commas with ESLint
¯\_(ツ)_/¯
2017-11-15 01:35:15 -05:00
Pavel Djundik 9a8c1b2fd0 Wrap withinString in try/catch 2017-10-05 23:50:45 +03:00
Pavel Djundik 53ebee195c Escape channel names in slugify helper correctly
Fixes #1172.
2017-08-29 12:38:29 +03:00
Pavel Djundik c55c338c72 Merge pull request #1446 from thelounge/parse-emoji
Parse emoji to make them bigger
2017-08-26 20:34:40 +03:00
PolarizedIons e00b28d201 Fix general spelling errors 2017-08-25 18:02:28 +02:00
Mac Carrithers f8663ed28b Parse emoji to make them bigger 2017-08-24 11:54:28 +03:00
Pavel Djundik e4ee3fbb3c Do not throw an exception when URI parsing fails 2017-08-14 15:25:34 +03:00
Jérémie Astori a13c08a45b
Enforce correct order for previews on server-side prefectch rather than at client parsing
This has the benefit of not adding `.preview` divs everywhere, anytime we use `parse()`, and also to un-tie the position of the preview blocks from the result of the helper. This means that templates that call `parse` and have some extra markup after that are not constrained anymore.

This is effectively an alternative, better way to fix https://github.com/thelounge/lounge/issues/1343, but the initial fix that was put in place (https://github.com/thelounge/lounge/pull/1347) is still relevant, for example to make sure a preview stays hidden (and does not add extra margin/padding/etc.) if the link does not prefetch.
2017-07-21 01:06:42 -04:00
Jérémie Astori 28200830ed
Move preview toggle buttons next to their respective URLs and switch from ellipsis to caret 2017-07-08 04:36:26 -04:00
Jérémie Astori 64ebe0f437
Support multiple previews per message
- Load up to 5 previews per message (to avoid abuse)
- Do not load multiple times the same URL
- Prepare preview containers per message instead of appending (to maintain correct order)
- Store an array of previews instead of a single preview in `Msg` objects
- Consolidate preview rendering for new messages and upon refresh/load history (when rendering entire channels)
- Update `parse` tests to reflect previous point
- Add test for multiple URLs
- Switch preview tests from `assert` API to `expect` API
2017-07-08 04:34:12 -04:00
Pavel Djundik f6dd616d5e Update to eslint 4 and enforce extra rules 2017-06-19 09:58:29 +03:00
Niko Bews fd983a7f6b Show seconds in timestamp 2017-06-10 14:53:15 +03:00
Pavel Djundik 7ae364e360 Merge pull request #1100 from thelounge/xpaw/0x04
Add support for 0x04 hex colors
2017-05-06 13:43:14 +03:00
Pavel Djundik 700d3c1ff2 Use moment to render dates everywhere 2017-05-01 21:31:31 +03:00
Pavel Djundik 0b645d54c6 Add support for 0x04 hex colors
Ref: https://modern.ircdocs.horse/formatting.html#hex-color
2017-04-29 09:50:26 +03:00
Pavel Djundik c583d6edf9 Correctly update user list and search filtering on user updates 2017-04-23 18:18:56 -04:00
Jérémie Astori 648cfd12db Use moment on the client to display friendly dates
Also, unread and date markers are now half-transparent based on their colors and not parent opacity. This is necessary to display a non-translucide tooltip.
2017-04-22 00:38:19 -04:00
Jérémie Astori fa1aecdd9e Remove URI.js monkey-patch as fix landed in v1.18.5
See https://github.com/medialize/URI.js/issues/325
2017-04-21 20:31:27 +03:00
Jérémie Astori 03e3444a35 Explain the modules of the message parser and add tests
- Add comments and descriptions to:
  - `findChannels.js`
  - `parseStyle`
  - `findLinks`
  - `fill`
  - `anyIntersection`
  - `merge`
  - `parse`
- Minor optimizations to `parseStyle`
- Add tests for `fill`
2017-04-21 20:31:27 +03:00
Jérémie Astori 90f4a94bb2 Use template literals in parse
Also make it output double quotes for consistency with web stuff.
2017-04-21 20:31:27 +03:00
Jérémie Astori 5b4c00d8ca Extract findLinks into its own file and add tests
Tests were taken from 5a249c30b1/test/findLinks.js.
The underlying code is different but the tests are the same.
2017-04-21 20:31:27 +03:00