Commit Graph

69 Commits

Author SHA1 Message Date
Pavel Djundik
51d5a4eff4 Fix #2028 - Messages are not condensed correctly 2018-02-03 10:43:39 +02:00
Pavel Djundik
6d6b5cb2a9 Remove deprecated jQuery calls
Fixes #2011
2018-02-01 12:15:51 +02:00
Pavel Djundik
31c33e43d5 Provide correct timestamp to browser notifications 2018-01-09 18:47:13 +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
f725e944dd
Add (semi-working) image viewer support for images shown in changelogs
Semi-working because this does not support Preview/Next. The existing image viewer is very custom to in-channel message previews and expects a certain markup, that needs rework tobe more generic.
2017-12-25 17:44:55 -05:00
Jérémie Astori
3eb429dde3
Make sure all links will open a new tab instead of exiting the application 2017-12-25 17:44:55 -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
d1c2f0df72
Display the correct window on page reload
This commit packs 2 fixes:

- Reloading the page while viewing the settings or help window would now send you to a channel window. This was broken when fixing an issue with the "Join a channel..." form
- Reloading the page while viewing the changelog would also send you to a channel window. This is because, on reload, the click emitted was restricted to sidebar and footer, while it had to be emitted from the help page. It is yet another aspect of our wonky window management and hopefully we can make this much more robust with a better overall solution.
2017-12-23 20:46:43 -05:00
Pavel Djundik
7c2422ee19
Merge pull request #1881 from thelounge/astorije/fix-join-channel-load
Fix join channel UI opening by itself
2017-12-23 23:17:21 +02:00
Jérémie Astori
6c50fe72b9
Fix join channel UI opening by itself
Without this, `target` was matching all of the lobby link, the "Join a channel..." button, and the join form submit button. This change restricts to the first one.
2017-12-23 03:00:16 -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
Pavel Djundik
5e48e04623 Show notices and errors inline 2017-12-06 17:58:52 +02:00
Pavel Djundik
1bdbb75d4c Merge condensed messages when loading more history 2017-12-06 14:07:43 +02:00
Pavel Djundik
e3823803aa Handle javascript errors while loading 2017-12-03 17:16:56 +02:00
Pavel Djundik
5855099d5b Do not keep sign-in and loader references in memory 2017-11-27 19:39:16 +02:00
Pavel Djundik
5ffeb04343
Merge pull request #1739 from thelounge/xpaw/inactive-scroll
Do not keep scroll to bottom in inactive channels
2017-11-26 11:40:50 +02:00
Pavel Djundik
2f84b01427 Do not keep scroll to bottom in inactive channels 2017-11-23 19:33:19 +02:00
Pavel Djundik
15a52ccec3 Trim channel messages in active channel and when switching channels
Fixes #1461
2017-11-23 16:23:32 +02:00
Pavel Djundik
c268d91b4e Access new nick attribute in user object
This was broken in #1698
2017-11-21 13:54:12 +02:00
Pavel Djundik
c30f4aaaeb Move help to view 2017-11-19 19:43:43 +02:00
Pavel Djundik
dbc6b099fe unused var 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
e85e00ebed Remove unused 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
2a6b255aee Make sign in work 2017-11-19 19:43:42 +02:00
Pavel Djundik
0402554563 Move cleanIrcMessage to a separate file 2017-11-19 18:19:52 +02:00
Pavel Djundik
8791a17fc4 Use service worker to display notifications if available 2017-11-19 18:18:55 +02:00
Jérémie Astori
1dc92d8934
Enforce dangling commas with ESLint
¯\_(ツ)_/¯
2017-11-15 01:35:15 -05:00
Pavel Djundik
ded79a184d Merge pull request #1598 from thelounge/xpaw/fix-863
Synchronize unread marker when other client opens a channel
2017-10-18 21:21:50 +03:00
dgw
d675297405 Mark channels as read when receiving self-messages
Resets highlight counter and last unread message ID on server, and
clears the badge on the active client when the message is rendered.

Resolves #911
2017-10-17 08:05:35 -05:00
PolarizedIons
99c8e1c04a
Remove channel containers from DOM after quitting network 2017-10-02 13:55:23 +02:00
Pavel Djundik
08ee28e99b Synchornize unread marker when other client opens a channel
Fixes #863
2017-10-01 11:52:34 +03:00
Pavel Djundik
d7e6db92b5 Implement session list 2017-09-26 10:56:08 +03:00
Pavel Djundik
649e9c3192 Fix opening first channel on server start
Fixes #1547
2017-09-20 16:17:38 +03:00
Jérémie Astori
637949ea55 Merge pull request #1471 from thelounge/xpaw/client-reconnection
Automatic client reconnection
2017-09-20 00:05:37 -04:00
Pavel Djundik
6041e492ee Fix history not loading if first message is condensed 2017-09-19 18:01:02 +03:00
Pavel Djundik
532f55cb86 Redraw channels 2017-09-19 11:59:56 +03:00
Pavel Djundik
05fc00d9be Display all the status changes in UI 2017-09-19 11:45:22 +03:00
Pavel Djundik
0c0df1efc9 Force reload the page if socket reconnects and server restarted 2017-09-19 11:45:22 +03:00
Jérémie Astori
b844b0a782 Merge pull request #1283 from MaxLeiter/MaxLeiter/window-save
Add anchor tag to URL to signify open page for reloading
2017-09-18 19:01:23 -04:00
Al McKinlay
ec6307d55f Merge pull request #1517 from thelounge/xpaw/move-unread-in-history
Move unread marker when loading more history
2017-09-16 20:51:55 +01:00
Max Leiter
c4ebd141c5 Add anchor tag to URL to signify open page for reloading 2017-09-14 13:25:20 -07:00
Al McKinlay
676cc01203 Merge pull request #1518 from thelounge/xpaw/cleanup-jquery
Remove unnecessary end() calls
2017-09-14 07:25:55 +01:00
Pavel Djundik
14cac93e10 Fix requesting last messages when no message id is known
Fixes #1460
2017-09-12 16:05:40 +03:00
Pavel Djundik
712bdafd9e Remove unnecessary end() calls 2017-09-12 15:52:16 +03:00
Pavel Djundik
706943af26 Move unread marker when loading more history
Fixes #835
2017-09-12 15:40:26 +03:00
Pavel Djundik
41b9ffb5e7 Move 'show more' to same event file 2017-09-11 20:48:35 +03:00
Pavel Djundik
17af195994 Move message notification code to msg file 2017-09-11 20:48:35 +03:00