Commit graph

321 commits

Author SHA1 Message Date
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
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