Commit Graph

380 Commits

Author SHA1 Message Date
Jérémie Astori
dbabdd83dc
Lighten the "More" button handler when checks are not necessary 2018-04-09 21:39:40 -04:00
Jérémie Astori
7355db94d6
Improve UI of previews
- Remove margins around thumbnails and images, increase radius, etc. for a fresher look overall
- Increase preview body contrast just enough to pass AA standards
- Add a `More`/`Less` button to expand previews that take more than one line. Button is added only when necessary
- Use a zoom-in cursor on hover for thumbnails
- Improve preview message errors
2018-04-09 21:39:38 -04:00
Jérémie Astori
7591088982
Merge pull request #2290 from lol768/feature/join-alias-query-param
Add ?channels=x,y,z alias for ?join=x,y,z
2018-03-31 14:05:25 -04:00
Jérémie Astori
fe08547d6b
Merge pull request #2289 from lol768/master
Add auto-prepend behaviour for unprefixed channel names
2018-03-29 01:19:45 -04:00
Al McKinlay
ce08201d13
Merge pull request #1878 from thelounge/yamanickill/refactor-context-menu
Pull context menu code out of lounge.js and make it more generic
2018-03-29 06:04:24 +01:00
Jérémie Astori
7d057a9ca7
Fix bug preventing to click on channels/queries
This bug is present both in channel list, #channel in messages, etc.
2018-03-27 19:28:20 -04:00
Al McKinlay
edba18375f
Merge pull request #2286 from thelounge/xpaw/input-history
Reimplement input history
2018-03-27 17:38:49 +01:00
Pavel Djundik
a2440e665f Do not close sidebar when collapsing networks
Fixes #2293
2018-03-27 12:07:19 +03:00
Pavel Djundik
3aea9d34e9 Reimplement input history 2018-03-26 11:23:10 +03:00
Al McKinlay
1dc356a8f2 Pull context menu code out of lounge.js and make it more generic
Add separate call for divider in context menu factory
2018-03-26 09:08:43 +01:00
Adam Williams
25dee77600 Add auto-prepend behaviour for unprefixed channels
This change adds behaviour to automatically prefix channel names passed in via the "?join=x,y,z" query string/search parameter which do not appear to include an appropriate channel symbol.
2018-03-24 22:17:32 +00:00
Adam Williams
950bad1d7a Add ?channels=x,y,z alias for ?join=x,y,z
For backwards compat. with Iris and other systems.
2018-03-24 16:54:26 +00:00
Pavel Djundik
6f47a78afd Unfocus input on touch devices to close the keyboard
Fixes #2257
2018-03-22 12:47:15 +02:00
Jérémie Astori
dbe81f1e59
Merge pull request #2254 from thelounge/astorije/sign-out-settings
Empty local storage on sign out and move the sign out button to the settings
2018-03-20 21:06:44 -04:00
Pavel Djundik
528d2b5fb7
Scroll channel list only when using keybinds 2018-03-20 19:27:07 -04:00
Jérémie Astori
d1548572d4
Move the sign out button to the settings and empty local storage on sign out
This change improves privacy/security by ensuring all local storage (which includes settings, etc.) is destroyed on sign out or when revoking a remote session. Because signing out is now more "risky", the button has been moved to the settings along with other existing sessions.

This commit:

- Removes the power/sign-out icon from the sidebar footer (gives additional room for when the admin panel gets added)
- Adds a "Sign out" button next to the current session info in the settings session list
- Renames "Disconnect" buttons into "Revoke" to better clarify the intent (I will admit that I borrowed the wording from Telegram)
- Fixes incorrect `localStorage.remove` method
- Uses Sinon.js to mock wrappers for `window.localStorage` and `window.location` (does not mock those themselves, in the "Do not mock what you do not own" fashion, mock our layer instead). I expect we will be able to test a bit more from the UI with this. A good next candidate will be the `mockLogger` things.
2018-03-20 01:52:22 -04:00
Pavel Djundik
5bb0b198e6 Disable scrolling through sidebar overlay 2018-03-17 11:35:33 +02:00
Jérémie Astori
c395e74e64
Merge pull request #2235 from thelounge/xpaw/store-sidebar-visibility
Store visibility status of sidebar menus
2018-03-16 23:57:24 -04:00
Pavel Djundik
7267f89377 Do not aggressively focus input when clicking anywhere 2018-03-16 18:07:19 +02:00
Pavel Djundik
103c3395dd Store visibility status of sidebar menus
Fixes #51
Closes #1606
2018-03-16 09:03:16 +02:00
Jérémie Astori
00bca229f0
Enforce object literal shorthand syntax with ESLint 2018-03-15 00:22:09 -04:00
Pavel Djundik
b01e01bc19 Convert most of the layout to flexbox, make sidebar an overlay 2018-03-11 00:23:43 +02:00
dgw
e5a6417a82 Scroll to newly joined/activated channels
Add a new utility function for scrolling elements into view with the
same, consistent options, and use it for both the new channel scrolling
behavior and the existing userlist scroll code.

Implements & resolves #2062
2018-03-08 10:30:07 -06:00
Pavel Djundik
bb066ecb02 Do not listen to touch events until client is initialized
Fixes #2148
2018-03-07 10:02:02 +02:00
Pavel Djundik
e719e4ff81 Cleanup chat/userlist to use flexbox, fix a couple of bugs 2018-03-05 18:17:13 +02:00
Jérémie Astori
25517f3ad7
Move the user list client code to its own file 2018-02-26 01:36:34 -05:00
Pavel Djundik
bd2907c13f Use document.body when wrapping it in a jquery object 2018-02-23 21:22:05 +02:00
Al McKinlay
c09f06fccc Change isOpInChannel to allow multiple different user roles 2018-02-21 15:05:02 +00:00
Pavel Djundik
c733e72e7a Auto-fix code for padding-line-between-statements rule 2018-02-20 09:28:04 +02:00
Pavel Djundik
7724762c14 Fix active class not being removed when switching channels 2018-02-19 21:05:05 +02:00
Pavel Djundik
a3e448acf5 Enable no-var rule
Fixes #1961
2018-02-19 19:49:39 +02:00
Pavel Djundik
e448dc711c Turn channel list into an accessible tablist 2018-02-18 09:58:44 +02:00
Pavel Djundik
6d6b5cb2a9 Remove deprecated jQuery calls
Fixes #2011
2018-02-01 12:15:51 +02:00
Pavel Djundik
e77de3315a Prevent user contextmenu from opening while selecting text 2018-01-09 18:16:20 +02:00
Pavel Djundik
bd9e219d92 Set aria-label on main input 2017-12-27 22:34:19 +02:00
Pavel Djundik
d16b18de78 Open context menu inside of chats on sidebar item 2017-12-26 20:40:02 +02: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
7f165a7593
Fix slideout not closing on mobile when hitting a footer icon
Introduced by 9691df67e3 (diff-e5178f7b74fe45f2cfe1baf9aa1ef6faR347).
Seriously...
2017-12-24 02:51:58 -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
4b34a093c9
Reduce changelog client cache to 1h since as there is also server caching now 2017-12-23 13:38:34 -05:00
Jérémie Astori
685951966b
Rename "Client Settings" into "Settings" in tooltip, cleanup 2017-12-22 22:53:56 -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
Jérémie Astori
47f95c234d
Call the openForm function specifically when clicking on the context menu instead of relying on click handler
Not defining a `toggleForm` function has the advantage of "fixing" the fact that clicking "Join a channel..." from the context menu would close it when it was already open
2017-12-22 12:18:49 -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
9ea3966140
Move the join channel form to its own component 2017-12-22 12:18:47 -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
Al McKinlay
8004e051aa
Merge pull request #1833 from Cldfire/master
Remove lobby close button
2017-12-22 10:18:29 +00:00
Al McKinlay
5084037cdc Add banlist context menu item 2017-12-20 09:53:28 +00:00
Cldfire
daa45c13fd Remove lobby close button
Without cheating and doing `display: none` this time around.
2017-12-17 22:28:56 -05:00
Jérémie Astori
861d6b6642
Use better icons for channel/query list and context menu actions 2017-12-15 19:09:15 -05: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
Jérémie Astori
9436ba9301
Make sure user icon matches in network list, window context menu, and nick context menu 2017-12-11 01:19:50 -05:00
Jérémie Astori
a8fb892873
Merge pull request #1816 from MaxLeiter/fix-network-context
Proper network icon in context menu
2017-12-09 18:17:38 -05:00
Pavel Djundik
de98c2b13a
Merge pull request #1802 from MaxLeiter/chanlist
Add 'Channel list' to network context menu
2017-12-10 01:09:35 +02:00
Max Leiter
6311176f00 Proper network icon in context menu 2017-12-09 15:03:15 -08:00
Max Leiter
fb5eb0664a Add 'Channel list' to network context menu 2017-12-09 14:34:33 -08:00
Pavel Djundik
df703dc73a Upgrade to new textcomplete library 2017-12-06 12:06:57 +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
ca389c914f
Merge pull request #1491 from realies/master
Focus a channel by joining it, refactor user commands #1189
2017-11-22 15:42:32 +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
Jérémie Astori
1dc92d8934
Enforce dangling commas with ESLint
¯\_(ツ)_/¯
2017-11-15 01:35:15 -05:00
Max Leiter
e6979fb5fd Fix url query parameters in public mode 2017-10-23 19:31:23 -07:00
realies
9a348e3eeb indexOf to charAt 2017-10-05 20:12:26 +03:00
realies
960a6d42e1 Combine if statements to reduce nesting 2017-10-04 13:53:22 +03:00
realies
3244ec91e8 Remove unused var, satisfy linter rules, simplify calls 2017-10-04 00:56:14 +03:00
realies
3890aaad6b Use jQuery for parsing, isolate user commands, remove /clear 2017-10-03 23:29:19 +03:00
Pavel Djundik
d7e6db92b5 Implement session list 2017-09-26 10:56:08 +03:00
realies
f1c40aa8de Simplify initial commit and remove unnecessary refactor 2017-09-25 07:18:31 +03:00
Pavel Djundik
b456ab997c Merge pull request #1503 from thelounge/astorije/image-preview-history
Handle browser history when opening/closing image preview
2017-09-22 21:03:50 +03:00
Pavel Djundik
1c065ad1b6 Remove duplicate keybindings help 2017-09-20 10:57:43 +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
Jérémie Astori
64cc4927b3
Make sure we never ship with JS alerts by accident 2017-09-17 21:50:41 -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
Jérémie Astori
92f8c2bfef
Get rid of /clear command and keybind
Since the introduction of infinite scrolling, `/clear` is now broken. As far as I can tell, there is no way to reproduce something decent (and working!) without drastically changing its behavior from "hide the messages in current channel" to "permanently destroy all messages in memory in the current channel", which is not a great change to introduce sneakily 😂.

The code for this was very trivial, so removing it now until there is a better way to do so, if this is ever possible.

Also, `/clear` was not even autocompleted, sooo...
2017-09-13 20:06:03 -04: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
17127e9fc2 Move keybinds to another file 2017-09-11 20:48:35 +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
Jérémie Astori
a921d7bf04
[Squash me] Fix bug refusing to switch channel when clicking back after closing image viewer 2017-09-10 15:00:27 -04:00
Jérémie Astori
b33ea0f567
Squash me when ready 2017-09-10 14:28:00 -04:00
Jérémie Astori
bb432497be
Handle browser history when opening/closing image preview 2017-09-09 16:40:34 -04:00
Jérémie Astori
d82f4007ec
Fix /expand command also expanding condensed status messages 2017-09-07 19:50:00 -04:00
Pavel Djundik
7ee808169d Format messages on copy
Fixes #1146
2017-09-03 11:27:53 +03:00
realies
bb1e3ee917 Focus a channel by joining it, refactor user commands #1189 2017-09-02 19:28:36 +03: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
Pavel Djundik
1e2d35f206 Move all auto completion code to a separate file 2017-08-24 17:44:40 +03:00
Yash Srivastav
0e332ec19d
Merge redundant functions into one 2017-08-24 05:48:22 +05:30
Yash Srivastav
fa021da7cf
Add fuzzy searching for autocompleting colors 2017-08-24 05:38:21 +05:30
Yash Srivastav
1c8aa7a88f
Extend fuzzy search in autocomplete to all strategies
Fixes #1086
Just building upon the work already done in #1334
2017-08-24 05:38:16 +05:30
Pavel Djundik
fcd9782eb7 Merge pull request #1124 from thelounge/xpaw/push-notifications
Implement push notifications
2017-08-22 23:16:41 +03:00
Max Leiter
64ea29f46d Only match emoji autocomplete after two characters 2017-08-22 11:04:38 +03:00
Pavel Djundik
0ac3ba28e1 Web Push Notifications 2017-08-22 10:54:18 +03:00
Pavel Djundik
28e32dc558 Merge pull request #759 from thelounge/yamanickill/condense-joins
Initial part/join condensing
2017-08-14 11:18:51 +03:00