Commit Graph

210 Commits

Author SHA1 Message Date
Jérémie Astori
ede37b9cb6
Merge pull request #1931 from thelounge/astorije/build-views
Build template list at Webpack time instead of manually keeping this in sync with the views folders
2018-01-29 01:04:06 -05:00
Jérémie Astori
a122ed5b7f
Build template list at Webpack time instead of manually keeping this in sync with the views folders 2018-01-02 01:38:57 -05:00
Pavel Djundik
f38fa9b98e Set decoding=async on image previews 2017-12-29 21:57:52 +02:00
William Boman
f3b64958cb views/join_channel: disable autocompletion of form inputs 2017-12-28 13:51:28 +01:00
Pavel Djundik
3cd99816b8
Add screen reader label for custom css textarea 2017-12-27 22:48:03 +02:00
Pavel Djundik
48ebde6008
Add log role to message container
Fixes #936
2017-12-27 22:43:21 +02:00
Jérémie Astori
a392b9f35f
Improve a bit window loading on init 2017-12-25 18:19:12 -05:00
Jérémie Astori
238e894377
Improve the version checking part of the changelog feature
- There is no client caching of the changelog/version anymore. Instead, server returns the expiration date of its cache, and that is used by the client as well.
- There is now a "Check now" button on the client that appears when data is stale. This means that info is fetched only once and never refreshed (it was refreshed every hour before) unless the user explicitly wants to check latest version, which in turn is as stale as server info is, i.e. 15 minutes max.
- Button style is shared with the "Join a channel" feature, `.btn-small` (not `.btn-sm` to be explicit that this is not a Bootstrap thing).
- Version checker content is now centralized in the `version_checker` template, instead of being partially in the checker template, partially in the Help template,  and partially in the code.
- A "Try again" button lets user attempt to fetch info instead of forcing them to reload the page.
- Use Flexbox to display a nicer version checker: icon is slightly bigger, and button is always aligned on the right.
- Changelog logic has been removed from `lounge.js` and moved into the component file.
- Changelog template is only passed what it needs instead of everything the server gives us.
- Public version now displays version checker, since server is caching things.
- Cleaner code overall.
2017-12-25 17:44:53 -05:00
Jérémie Astori
32a95c4d75
Merge pull request #1327 from thelounge/xpaw/view-changelog
Changelog viewer and updater checker in the client
2017-12-23 16:13:29 -05:00
Jérémie Astori
7fa30980aa
Improve wording of join channel UI form restrictions
This gives a more actionable message to the user if they do not enter a valid value.
2017-12-23 03:05:29 -05:00
Jérémie Astori
9691df67e3
Improve UI of the About section and changelog viewer
- Keep consistent width between the Help page and Changelog (which is already different from other windows 😠)
- Add icons to the About links
- Make sure `li` elements (i.e. all the lists in changelogs) are consistent in size with rest of the client
- Display version and release notes link on the "About The Lounge" header line, smaller, pushed to the right
- Check new releases when opening the Help window in order to display it without having to open the release notes. Release notes are being fed to the Changelog page at that moment to avoid fetching twice.
- Re-check version/fetch release notes after 24h. Since The Lounge can now run 24/7, reconnect when losing the network, we have to assume an "always-on" usage.
- Change icon, animate background color when getting response from GitHub to avoid flashing.
- Combine click handlers with our wonderful window management. These were the same handler, even with similar checks (`target` exists, etc.), just in 2 different places. This is necessary for the next item.
- Combine "Open release notes" and "Go back to Help" button behaviors with window management handlers. The window management code is gross as ever, and is in desperate need of a refactor, but at least there is no duplicated code for the same behavior + history management. This fixes the "Next" history behavior (however reloading the app while viewing the notes does not load on the notes, but this is a bug for a different PR!).
- Added a rule in the history management thingy: if a link we want to add history handling to has an `id`, store that in the state
- Added a button to go back to the Help window
- Fixed links to releases
- Send user to the GitHub issues *list* instead of *new issue form* because if they do not have a GitHub account, they will be redirected to the login page, which is a rather unpleasant experience when you are already confused...
- Fixed a bug that would return data about a new release in `latest` even though it is already the `current`. It was showing the current version as "The Lounge v... is now available".
- Added https://user-images.githubusercontent.com to the CSP rule when prefetch storage is enabled, because that is where we have stored screenshots in the changelog so far. Meh (we can improve that later if we decide to have a dedicated place for screenshots).
- Fetch changelog info even in public mode because users in public mode can access the release notes. They do not see the result of the version checker however.
2017-12-22 22:46:11 -05:00
Pavel Djundik
df858a5aaf
Add changelog viewing and update checking 2017-12-22 16:26:12 -05:00
Jérémie Astori
1063d7b1d6
Mark the channel field of "Join a channel" UI as required 2017-12-22 12:18:48 -05:00
Jérémie Astori
a03f894888
Change content of tooltip and button when opening/closing join channel form 2017-12-22 12:18:48 -05:00
Jérémie Astori
522bba694b
Use an ellipsis for change nick and join channel tooltips 2017-12-22 12:18:47 -05:00
Max Leiter
3fde87efbc
Add join channel UI via context menu or plus button next to lobbys 2017-12-22 12:18:46 -05:00
Pavel Djundik
aad9033d06
Use notEqual helper for close button 2017-12-22 12:30:23 +02:00
Pavel Djundik
06becc798f
Merge pull request #1874 from thelounge/astorije/handlebars-notEqual
Add a `notEqual` block helper for Handlebars and tests for `equal`
2017-12-22 12:28:15 +02:00
Al McKinlay
8004e051aa
Merge pull request #1833 from Cldfire/master
Remove lobby close button
2017-12-22 10:18:29 +00:00
Jérémie Astori
371c5bcac2
Add a notEqual block helper for Handlebars 2017-12-21 22:09:08 -05:00
Pavel Djundik
2b7657a9e7 Format whois as a definition list 2017-12-18 19:40:01 +02:00
Cldfire
daa45c13fd Remove lobby close button
Without cheating and doing `display: none` this time around.
2017-12-17 22:28:56 -05:00
Pavel Djundik
b5ad495c6d Insert user-configurable string when autocompleting nicks
Fixes #1176
2017-12-17 21:15:47 +02:00
Al McKinlay
b9f1b9fd4d
Merge pull request #1832 from MaxLeiter/media
Rename thumbnail/image option to more general `media`
2017-12-14 09:05:40 +00:00
Max Leiter
d4ad60c11d Support video file previews 2017-12-13 17:52:07 -08:00
Max Leiter
fdd8ef3e6a
Rename thumbnail/image option to more general 'media' 2017-12-13 20:03:12 -05:00
Pavel Djundik
7dcab09516
Merge pull request #1806 from MaxLeiter/sound
Support audio file previews
2017-12-13 11:03:04 +02:00
Max Leiter
ad1114ccfe Support audio file previews 2017-12-12 11:29:13 -08:00
Erik Vosseberg
33d865501d
Add whois and conversation as action to user contextmenu
Add Op specific actions to contextMenu

Show context menu when left clicking user

Switch to using data attributes as selectors

remove ban as possible action

Move `isOpInChannel()` to utils.js

Capitalize strings

use CSS.escape for `ownNick`

use string interpolation

properly point to findCurrentNetworkChan

Move context menu item actions to command pattern

add icons for context menu actions

Make list in context menu always list.

remove empty lines in style.css

use info circle instead of question circle

change context menu labels.

change contextMenuActions.execute to more explicit method.
2017-12-11 23:04:29 -05:00
Pavel Djundik
2d0ddfb2e8
Merge pull request #1778 from thelounge/xpaw/lazy-init
Heavily improve performance of "init" event
2017-12-05 12:03:01 +02:00
Pavel Djundik
b5d39b96b9
Handle CHGHOST cap 2017-12-04 23:33:48 -05:00
Jérémie Astori
b80710ed82
Merge pull request #1788 from PolarizedIons/PolarizedIons/actualip
Add actualip to the actualhost line in the whois output
2017-12-04 23:30:04 -05: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
41e121d270 Only emit a single message per channel on init 2017-12-03 16:13:18 +02:00
stepie22
c7f6b8409f Change whois's actual host to include the actualip aswell 2017-12-01 15:03:02 +02:00
Pavel Djundik
a7bd40a5b1 Fix users not being linked in /me actions 2017-11-30 14:13:11 +02:00
Pavel Djundik
104e270882
Merge pull request #1771 from thelounge/astorije/fix-user-in-msg
Clone instances of `User` in `Msg` to avoid unintentional mutations
2017-11-30 11:29:23 +02:00
Pavel Djundik
f89054784f
Merge pull request #1764 from thelounge/xpaw/fix-data-from
Fix data-from on messages
2017-11-30 11:28:00 +02:00
Jérémie Astori
4ec10b922a
Clone instances of User in Msg to avoid unintentional mutations 2017-11-30 00:41:19 -05:00
Jérémie Astori
c0d348a678
Fix default value given to Msg.from
- `{}` is not falsey so Handlebars would try to render the block (see http://handlebarsjs.com/builtin_helpers.html#conditionals), therefore with a `nick` of `undefined`, which breaks `colorClass` (doing `undefined.length)
- There does not seem to be a way to check for empty objects in Handlebars (sigh) so checking `from.nick` seems like the most reliable way to check for a non-empty value. Alternatively, we could use a helper to check `{}` but meh.
2017-11-29 18:37:17 -05:00
Pavel Djundik
68753ae3e8 Fix data-from on messages 2017-11-29 20:45:19 +02:00
Max Leiter
3d31fa4686 Link nicks mentioned in messages 2017-11-27 09:10:56 -08:00
Max Leiter
9eb79d675c
Fix whois template parsing real name field
Links and etc will now render correctly
2017-11-25 12:23:03 -08:00
Erik Vosseberg
f40edc7dc2
Include all available whois info 2017-11-21 00:27:24 -05:00
Pavel Djundik
c30f4aaaeb Move help to view 2017-11-19 19:43:43 +02:00
Pavel Djundik
90861effb4 Fix sign in 2017-11-19 19:43:43 +02:00
Pavel Djundik
8d88779918 Fix options 2017-11-19 19:43:42 +02:00
Pavel Djundik
711b5e1d91 Make settings/options mostly work
Fixes #1672
2017-11-19 19:43:42 +02:00
Pavel Djundik
55d1625ab2 Split connect and settings into templates 2017-11-19 19:43:42 +02:00
Pavel Djundik
2a6b255aee Make sign in work 2017-11-19 19:43:42 +02:00
Pavel Djundik
303dddb12e wip 2017-11-19 19:43:42 +02:00
Jérémie Astori
0e55dafd8a WIP 2017-11-19 19:43:42 +02:00
Pavel Djundik
74dcc52657
Refactor how user object is sent to the client 2017-11-19 02:46:45 -05:00
Jérémie Astori
36ab3ffc8d
Merge pull request #1689 from thelounge/xpaw/parse-real-name
Parse formatting in real name
2017-11-19 00:07:23 -05:00
Pavel Djundik
9ff974b702 Fix missing attributes on unhandled messages 2017-11-10 16:18:44 +02:00
Pavel Djundik
10dab7afac
Parse formatting in real name 2017-11-07 17:38:03 +02:00
Pavel Djundik
d7e6db92b5 Implement session list 2017-09-26 10:56:08 +03:00
Jérémie Astori
90cb79ac91 Merge pull request #845 from MaxLeiter/MaxLeiter/away-notify
Use away-notify to show updates on users away state
2017-09-17 14:45:27 -04:00
Max Leiter
163cfaba3c Use away-notify to show user away status change 2017-09-17 11:16:48 -07:00
dgw
e4c6d78762 Display correct kick modes
Defining both the kicker and the target before any code touches the
channel user list ensures that everything is passed to the template.
2017-09-14 02:39:00 -05:00
Jérémie Astori
d82f4007ec
Fix /expand command also expanding condensed status messages 2017-09-07 19:50:00 -04:00
Pavel Djundik
94d40256d9 Always create condensed wrapper 2017-09-02 18:31:47 +03:00
Pavel Djundik
d814abd1cf Implement condensed messages option entirely with CSS
Fixes #1432
2017-08-30 15:43:31 +03:00
Jérémie Astori
51bd46b871
Fix time placeholder showing on mobile format for condensed messages
As an extra, make sure time placeholder cannot be selected anymore, and do not do an extra call to `tz` helper when time is not relevant/displayed.

I tried to entirely remove `time`/`from` blocks, but because of flexbox layout, that broke message alignment...
2017-08-23 02:23:54 -04:00
Jérémie Astori
853e646670
Move condense caret to the right, animate transition, add hover state (with transition), reuse thumbnail toggle style 2017-08-13 16:16:38 -04:00
Alistair McKinlay
499dfdfe92
Condense Joins 2017-08-13 14:30:30 -04:00
Pavel Djundik
6b00cdeba9 Change history button text while loading 2017-08-09 14:18:37 +03:00
Jérémie Astori
b9f17b77ab
Add Previous/Next cycling buttons to the image viewer 2017-07-23 13:14:27 -04:00
Jérémie Astori
900d41bf47
Re-use .previews to order incoming previews instead of extra links 2017-07-21 01:51:51 -04:00
Jérémie Astori
1c8ea0b75c
Fix preserved whitespace-related issues for previews by separating them from main text 2017-07-21 01:50:09 -04: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
f88d1e3bef Merge pull request #1242 from starquake/newlines-fix
Correctly show whitespace and newlines in messages
2017-07-19 02:05:31 -04:00
Jan Visser
f0e6e397a4 Correctly handle multiple successive whitespace characters 2017-07-18 16:54:35 +02:00
Pavel Djundik
70d09841d9 Fix incorrect mode on kick target 2017-07-18 17:38:24 +03:00
Pavel Djundik
f35a2809a7 Store preview images on disk for privacy, security and caching 2017-07-18 11:37:16 +03:00
Jérémie Astori
511b173b6f
Add an image viewer for thumbnails and image previews 2017-07-16 19:25:48 -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
Jérémie Astori
ec5b5ef565
Add title attributes to previews
This is useful on long preview titles/descriptions that truncate. We currently do the same for topics
2017-07-04 12:56:57 -04:00
Pavel Djundik
c62bc2fa35 Do not truncate link previews if viewport can fit more text
Fixes #1084
2017-07-04 09:51:35 +03:00
Pavel Djundik
14b2ad7938 Refactor link previews 2017-07-03 00:41:18 +03:00
Niko Bews
eb4a4c7dfe Move nickname rendering to a single template
Closes #1241
2017-06-22 13:28:17 +03:00
Pavel Djundik
acf5dd5351 Do not store unnecessary information in user objects 2017-06-01 21:54:46 +03:00
Jérémie Astori
3e54569624
Fix user list search not responding to clicks on search results 2017-05-13 18:34:27 -04:00
Pavel Djundik
381ea326f4 Disable tabindex on userlist search input
Fixes #1036.
2017-04-30 15:07:09 +03:00
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
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
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
Alistair McKinlay
adfd99c92c Add fix for undefined name being slugified 2017-04-21 09:32:57 +01:00
Daniel Oaks
5c336d3789 Add slug with command to unhandled messages 2017-04-16 12:31:32 +03:00
Pavel Djundik
c0a7ae9d92 Use css tooltips on time elements 2017-04-13 01:55:27 -04:00
Maxime Poulin
6a273d825a Improve inline previews for links and images 2017-04-04 01:40:51 -04: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
William Boman
c6ed95e555 views/msg: set data-from attribute to allow styling messages from specific user(s) 2017-03-20 23:08:28 +01:00
Pavel Djundik
dcefcd19cb Use require() instead of import in client code
Closes #895
2017-03-18 11:21:18 +02:00
Pavel Djundik
fb87bd3a58 Webpack 2016-12-27 19:15:30 +02:00