Commit Graph

593 Commits

Author SHA1 Message Date
Pavel Djundik
c583d6edf9 Correctly update user list and search filtering on user updates 2017-04-23 18:18:56 -04:00
Pavel Djundik
b1e9a7ffda Use separate container for search results 2017-04-23 18:18:56 -04:00
Jérémie Astori
cfa9da17a7 Rely on fuzzy's case insensitivity, do not trim mode 2017-04-23 18:18:56 -04:00
Jérémie Astori
6a26014b81 Implement fuzzy-matching for the user list 2017-04-23 18:18:56 -04:00
Pavel Djundik
98e3bd0ca2 Merge pull request #1054 from thelounge/astorije/friendly-date-marker
Use moment on the client to display friendly dates
2017-04-23 10:24:21 +03:00
Alistair McKinlay
2e286849fc Move commands into constants module 2017-04-22 20:16:59 +01:00
Pavel Djundik
7522847ecc Enable show more button correctly 2017-04-22 19:04:46 +03:00
Alistair McKinlay
1e504f4383 Add support for banlist messages 2017-04-22 13:51:28 +01:00
Jérémie Astori
5fabf2f61a Make sure friendly date markers are reset at midnight 2017-04-22 00:39:00 -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
bc5b03d2fc Merge pull request #1060 from thelounge/yamanickill/modularise-socket
Create socket module
2017-04-22 00:36:06 -04:00
Pavel Djundik
999e419636 Remove cycle nicks button
Reverts #708.
Fixes #869.
Fixes #1023.
2017-04-21 21:00:57 +03: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
Bonuspunkt
0b85ded53f Add bonuspunkt's parser
Fixes #15.
Fixes #199.
Fixes #583.
Fixes #654.
Fixes #928.
Fixes #1001.
2017-04-21 20:29:04 +03:00
Alistair McKinlay
05d363d9a5 Create socket module 2017-04-21 09:54:46 +01:00
Al McKinlay
9072fda146 Merge pull request #1052 from KlipperKyle/KlipperKyle/motd
Issue 1019: Show MOTD by default
2017-04-20 09:07:27 +01:00
Jérémie Astori
4de632ba3c Merge pull request #1018 from swordbeta/sort_channel_list
Improve channels list.
2017-04-20 01:40:14 -04:00
Michael van Tricht
764ac831d4 Improve channels list.
- Set fixed width to channel and users column.
- Sort by number of users in channel.
- Executing /list multiple times wont show multiple tables.
- Channel list is not stickied to the bottom.
- Limit channels to 500. Scrolling through 1k is very slow on my system.
2017-04-19 12:02:15 +02:00
Kyle Terrien
a900abc2a4 Issue 1019: Show MOTD by default 2017-04-18 19:48:14 -07:00
Alistair McKinlay
4938878d10 Disable show more button when loading messages 2017-04-17 10:35:27 +01:00
Daniel Oaks
5c336d3789 Add slug with command to unhandled messages 2017-04-16 12:31:32 +03:00
William Boman
cc0962ba12 client: implement states using the History Web API 2017-04-15 22:34:14 +02:00
Pavel Djundik
d093a7f4c2 Reset notification markers on document focus
Fixes #837
2017-04-15 18:43:34 +03:00
Pavel Djundik
fce3d11e74 Stick to bottom when opening user list
Fixes #1031
2017-04-14 21:29:04 +03:00
Michael van Tricht
bcbd29cd22 Unread marker takes hidden messages into account. 2017-04-08 15:56:09 +02:00
Pavel Djundik
bb24bc645c Merge pull request #1013 from awalgarg/patch-1
fix: count only message items for show-more
2017-04-06 06:43:29 +03:00
Awal Garg
c066f25b17 fix: count only message items for show-more
the `messages` div contains a `date-marker` div and an `unread-marker` div. this causes the `count` variable to be 2 more than the expected value, which makes the show-more button skip two messages when loading history. this change filters the counted elements to fix this issue.
2017-04-06 00:45:28 +05:30
Jérémie Astori
09eaf80f8c Fix page scroll glitch 2017-04-02 21:03:01 -04:00
Pavel Djundik
2d9aa35c06 Implement pgup/pgdown keys 2017-04-01 22:35:07 +03:00
Pavel Djundik
110c0f0c87 Correctly append date marker when receiving a message 2017-04-01 11:06:01 +03:00
Pavel Djundik
212703d162 Merge pull request #810 from thelounge/xpaw/color-hotkeys
Implement color hotkeys
2017-03-31 19:17:16 +03:00
Jérémie Astori
4363ef4abe Merge pull request #973 from thelounge/xpaw/use-require
Use require() instead of import in client code
2017-03-31 01:41:29 -04:00
Jérémie Astori
e62da5b1ea Remove extra newline to please ESLint
See https://travis-ci.org/thelounge/lounge/jobs/217041734#L1200
2017-03-31 01:26:37 -04:00
Jérémie Astori
abd155e881 Merge pull request #873 from PolarizedIons/fix-username-override
Fix filling in the nickname, overriding the username (in add network tab)
2017-03-31 01:20:12 -04:00
Pavel Djundik
3b2e3fc08c Enforce more space and new line rules 2017-03-18 21:40:39 +02:00
Stephan
3318acd16b fix filling in nickname overriding username (in add network tab) 2017-03-18 18:11:43 +02:00
Pavel Djundik
dcefcd19cb Use require() instead of import in client code
Closes #895
2017-03-18 11:21:18 +02:00
Pavel Djundik
f2e43b84be Implement color hotkeys 2017-03-12 11:50:18 +02:00
Jérémie Astori
dcc98c3efb Un-ellipsis placeholder and use ES6 template 2017-01-24 23:55:57 -05:00
Alistair McKinlay
0d8b58425e Merge pull request #855 from MaxLeiter/MaxLeiter/search
Fix searching for user in user list, closes #851
2017-01-04 11:15:14 +00:00
Jérémie Astori
280d145502 Merge pull request #836 from thelounge/xpaw/slideout-width
Calculate menu width on touch start
2017-01-04 01:48:38 -05:00
Max Leiter
ba00738f1f Fix searching for user in user list, closes #851 2016-12-29 18:03:05 -10:00
Pavel Djundik
c75771f13d Fix stuff that breaks in jQuery 3 2016-12-29 23:43:10 +02:00
Pavel Djundik
8fd1d161ea Remove vendor client code 2016-12-27 19:15:31 +02:00
Pavel Djundik
fb87bd3a58 Webpack 2016-12-27 19:15:30 +02:00
Pavel Djundik
3017e67f3a Calculate menu width on touch start
Fixes #831
2016-12-21 19:58:36 +02:00
Jérémie Astori
b07ec94bc3 Remind channel name or nick in input placeholder 2016-12-20 20:13:05 -05:00
Pavel Djundik
7709847267 Fix unread marker being removed from DOM 2016-12-19 14:46:18 +02:00
Pavel Djundik
d24eb44991 Merge pull request #818 from thelounge/xpaw/no-notif-controls
Strip control characters from notifications
2016-12-19 12:52:12 +02:00
Pavel Djundik
8fff5ee829 Strip control characters from notifications 2016-12-18 18:19:03 +02:00
Pavel Djundik
3d6e4a38c6 Prevent focus on mobile 2016-12-17 21:17:23 +02:00
Pavel Djundik
7933b2453d Only append "says" to notifications if its a message 2016-12-17 13:05:12 +02:00
Jérémie Astori
3d0e1fd9f0 Merge pull request #745 from thelounge/xpaw/away-command
Implement /away and /back commands
2016-12-16 23:16:02 -05:00
Jérémie Astori
86358c619b Lock input message when app is disconnected 2016-12-14 01:35:32 -05:00
Pavel Djundik
a8926e2ced Stop refreshing the page on every socket.io error 2016-12-13 01:55:11 -05:00
stepie22
a5ad573b2d Sync reordering of channels/networks to other clients 2016-12-09 14:56:19 +02:00
stepie22
10fefab279 Switch to jQuery's hasClass instaid of checking direct class equality 2016-12-01 13:25:49 +02:00
stepie22
c160852042 slight nit-pick 2016-11-28 19:55:16 +02:00
stepie22
06ecf625c6 Fix date-marker not being removed when at the top of the page sometimes 2016-11-25 18:05:04 +02:00
stepie22
93f0f6942e Add a date seperator 2016-11-23 16:35:42 +02:00
Alistair McKinlay
c954d9c9a3 Merge pull request #739 from williamboman/fix/dont-dismiss-notifications
client: don't dismiss native web notifications programmatically after 5s
2016-11-22 15:44:03 +00:00
Pavel Djundik
6023035838 Update depdencides to latest stable versions 2016-11-19 10:49:16 +02:00
Pavel Djundik
f24f707119 Implement /away and /back commands 2016-11-19 10:27:39 +02:00
William Boman
6e1cdb370b client: don't dismiss native web notifications programmatically after 5s 2016-11-16 17:43:30 +01:00
Jérémie Astori
dff1a48e05 Prevent sound notification to throw an exception on mobile 2016-11-08 01:02:56 -05:00
Jérémie Astori
e21ec8b447 Silence failures to trigger notifications when not available
Recent Chrome versions are dropping out `new Notification` in favor of `ServiceWorkerRegistration.showNotification`.
This makes sure nothing bad happens until we have proper support for Service Workers.

See:
- https://stackoverflow.com/questions/29774836/failed-to-construct-notification-illegal-constructor
- https://stackoverflow.com/questions/31512504/html5-notification-not-working-in-mobile-chrome
2016-11-08 01:02:25 -05:00
Pavel Djundik
837f78f1ae Merge pull request #483 from williamboman/fix/focus-input-on-submit
client: re-focus input on chat form submit
2016-10-28 19:14:26 +03:00
Jérémie Astori
e9b118ea71 Merge pull request #708 from thelounge/astorije/nick-cycle
Add a UI element to cycle through nick completions on mobile
2016-10-25 18:45:07 -04:00
Maxime Poulin
0bef9e9cde Merge pull request #720 from stepie22/unread-counters-fix
Fix unread counters resetting when they shouldn't
2016-10-25 12:41:10 -04:00
stepie22
ee1a629be9 Fix incorrect selector for undead badge on channels 2016-10-25 13:58:28 +02:00
Jérémie Astori
ddaf7ff300 Add a way to cycle through nicks on mobile
This was heavily inspired by https://github.com/maxpoulin64/lounge/commit/a877e46.
Clearly not a definitive solution but a good start to have and to improve upon.
2016-10-25 01:03:43 -04:00
stepie22
1a4974b7df Fix channels drag'n'droping 2016-10-23 11:47:33 +02:00
Jérémie Astori
d82a894b7b Remove browser notification polyfill and inform user when unsupported 2016-10-22 17:26:34 -04:00
Jérémie Astori
f5af8a4986 Merge pull request #674 from MaxLeiter/MaxLeiter/override-defaults
Override defaults with URL
2016-10-17 02:11:30 -04:00
Pavel Djundik
a1f56c7395 Improve support for opening multiple clients at once
- Synchornize unread counter with the server
- Fix unread marker on no attached clients
- Increase unread counter for server messages
2016-10-17 01:31:22 -04:00
Pavel Djundik
4f5bb55951 Revert "Do not trigger a DOM event on every message" 2016-10-14 18:49:08 +03:00
William Boman
aabdf562a6 client: re-focus input on chat form submit 2016-10-11 10:43:27 +02:00
Max Leiter
0d058a5ef7 Begin work on overriding defaults in URL 2016-10-10 10:35:33 -07:00
Pavel Djundik
aa02fd5180 Enforce more eslint rules 2016-10-09 17:55:37 -04:00
Jérémie Astori
caa46042bf Enforce strict mode across all JS files with ESLint
Several ES6 additions are only available in strict mode. Example:
> SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode

Strict mode was also enabled in a few of our files already, and it is a good thing to have anyway.
2016-10-09 15:14:02 -04:00
Jérémie Astori
e9d7d77cbd Merge pull request #661 from thelounge/xpaw/no-dom-event
Do not trigger a DOM event on every message
2016-10-08 16:35:14 -04:00
Pavel Djundik
024369d4c3 Implement our own /nick command to allow editing nick when not connected 2016-10-01 16:51:35 -04:00
Jérémie Astori
12839af684 Make nick badge editable to set it in the UI 2016-10-01 16:51:34 -04:00
Jérémie Astori
4e1d89f567 Consolidate locale time helpers
When working on #660, I missed that helper already existed, added in #167.
2016-10-01 15:38:06 -04:00
Pavel Djundik
743d4b61d5 Do not trigger a DOM event on every message 2016-10-01 13:09:57 +03:00
Jérémie Astori
fc03a338fc Display localized timestamp in title of message times 2016-10-01 02:46:19 -04:00
Jérémie Astori
28b5fdb8ce Merge pull request #637 from thelounge/xpaw/extra-loading
Display extra loading messages
2016-09-30 01:34:05 -04:00
Jérémie Astori
ad4a79cbca Merge pull request #400 from maxpoulin64/slide
Add touch slideout menu for mobile
2016-09-30 00:03:04 -04:00
Jérémie Astori
345aac1a27 Merge pull request #258 from maxpoulin64/channel-list
Implement /list
2016-09-29 02:47:34 -04:00
Pavel Djundik
396a9cffb1 Display extra loading messages 2016-09-25 09:52:16 +03:00
Jérémie Astori
813572de47 Ensure localStorage cannot fail because of quota or Safari private browsing
See http://stackoverflow.com/q/14555347/1935861
2016-09-20 23:43:23 -04:00
Jérémie Astori
b153d568a0 Add a theme selector in the settings
Power to the people!

There is now 2 ways to set the theme: on the app config file (defaults
for all users) and in the user settings.
All CSS files present in the `client/themes` folder will be given as
choices to the users.

This is temporary (as in, temporary for a fairly long time) until we
have proper theme management.
2016-09-06 01:11:31 -04:00
Jérémie Astori
c4cfd7e4b5 Alphabetically order default user settings, remove unnecessary continue statement, transform ifs into else-ifs 2016-09-06 01:11:31 -04:00
Jérémie Astori
34036a4b7a Allow ourselves to have decent looking select elements in the settings 2016-09-06 01:11:31 -04:00
Jérémie Astori
d48830a1fd Make custom highlights case-insensitive 2016-08-16 10:09:19 -04:00
Jérémie Astori
dd02f0f029 Make sure input height is reset when submitting with icon
This is especially noticeable on mobile, where clicking Send icon is more natural.
2016-08-11 01:13:41 -04:00
Henning Hoefer
08d3633ae2 Prevent Ctrl-Tab from triggering tab completion
Fixes #529

This is probably the simplest workaround for Firefox sending a keydown event when switching browser tabs via Ctrl-Tab
2016-08-04 04:31:19 +02:00