Commit graph

197 commits

Author SHA1 Message Date
Pavel Djundik 472d618033 Remove log from global 2018-06-15 23:31:06 +03:00
Pavel Djundik 2bea5f67b9 Use default nick set in config for fallback 2018-04-12 10:39:03 +03:00
Pavel Djundik f86d73972d Implement network editing UI and object updating 2018-04-12 10:38:35 +03:00
Pavel Djundik 682d3070e9 Move IRC object and validation to network model 2018-04-12 10:37:45 +03:00
Jérémie Astori 62fb5524ae
Switch client to default theme when it is using a theme that has been removed 2018-04-02 23:51:59 -04:00
Pavel Djundik ed4b6e85ac Print failed login attempts to console 2018-03-17 10:09:59 +02:00
Pavel Djundik b2eb11b5ef
Merge pull request #1851 from creesch/settingSync
Optional syncing of client settings.
2018-03-09 12:37:17 +02:00
creesch 27393bb804 Offer optional syncing of client settings
Write synced settings to localstorage.

move settings and webpush init to init.js

stub for server sending clientsettings

get very basic setting sync working

Also update client.config.clientSettings on settings:set

Full setting sync with mandatory and excluded sync options

Actually check client preferences.

Further settings restructuring.

Refactor options.js make storage act in a sane manner.

Add new parameter to applySetting

Do not sync if the setting is stored as a result of syncing

General clean up, commenting and restructing.

sync from server on checking "sync"

offer initial sync

Better deal with DOM being ready and instances of inital sync showing

Don't try to disable autocompletion when not enabled.

Restructure option.js to seperate functions from settings.

More consistency in naming options vs settings

Switch processSetting and applySetting names reflecting their functionality better.

move options init back to configuration.

simplify how settings are synced around.

move options init after template building.

Remove unneeded hasOwnProperty

Use global for #theme and only apply theme in applySetting

Return when no server side clientsettings excist.

Autocompletion options to options.settings

Make nocss param in url work again.

Actually filter out empty highlight values.

Clarify alwaysSync comment.

Remove manual step for initial sync

change attr to prop in options.js

replace unbind with off in autocompletion.js

Do not sync settings when the lounge is set to public.

fix eslint error

Fix merge error

Do not show sync warning after page refresh when sync is enabled

Move setting sync label in actual label.

Improve server setting sync handling performance and failure potential.

Don't give impression that the desktop notificiation is off when the browser permission is denied.

Refine showing and hiding of notification warnings.

rename all setting socket events to singular setting.

add experimental note and icon to settingsync.

fix css linting error
2018-03-09 10:36:29 +01:00
Pavel Djundik 731b29c059 Generate uuid per network 2018-03-08 20:23:29 +02:00
Pavel Djundik fee81e78e1 Replace colors.js with chalk 2018-03-02 20:28:54 +02:00
Pavel Djundik 9c46bc5713 Change wsEngine to "ws"
uWS causes major delays - https://github.com/socketio/socket.io/issues/3100
2018-02-23 12:35:35 +02:00
Jérémie Astori a24ab74c4c
Merge pull request #2090 from thelounge/xpaw/rng-nick
Allow generating random numbers in nick on page load
2018-02-22 20:54:52 -05:00
Jérémie Astori f8c894d7e1
Merge pull request #2082 from thelounge/xpaw/rm-isRegistered
Remove isRegistered
2018-02-22 00:45:22 -05:00
Pavel Djundik 906e79f39b Allow generating random numbers in nick on page load 2018-02-21 19:34:33 +02:00
Jérémie Astori 863e9b0b48
Merge pull request #2088 from thelounge/xpaw/harden-server-events
Ignore events on the server if incorrect data is supplied
2018-02-21 09:57:19 -05:00
Pavel Djundik b501d648e3 Ignore events on the server if incorrect data is supplied 2018-02-21 13:17:56 +02:00
William Boman acb6179b30 relay client's preferred language in link preview requests
Closes #1440.
2018-02-21 10:35:33 +01:00
Pavel Djundik b10962f13f Remove isRegistered 2018-02-20 13:24:46 +02:00
Pavel Djundik c733e72e7a Auto-fix code for padding-line-between-statements rule 2018-02-20 09:28:04 +02:00
Pavel Djundik a3e448acf5 Enable no-var rule
Fixes #1961
2018-02-19 19:49:39 +02:00
Pavel Djundik 38bc8e6782 Display password field when displayNetwork is false
Fixes #509
2018-02-17 10:23:01 +02:00
Pavel Djundik e6241556be Fix #2024 - Send visible defaults when displayNetwork is false 2018-01-31 23:14:26 +02:00
Jérémie Astori dcdc1d150f
Merge pull request #1979 from thelounge/astorije/index
Do not statically serve the index template prior to rendering it
2018-01-30 19:21:07 -05:00
Al McKinlay 72fafc5b4f Allow https css
Fixed #2012
2018-01-30 09:23:34 +00:00
Jérémie Astori 33d82287be
Do not statically serve the index template prior to rendering it
Without this, going to `https://thelounge.example.com/index.html` would return the raw file. This now excludes it from the `public` folder so it cannot be rendered as is.
Renaming the file is for good measure, to indicate that this HTML file must be templated. Because it is a straight rename with no modification, rebasing PRs on it should not be to painful, as git re-applies changes on renamed files.
2018-01-14 13:02:27 -05:00
Pavel Djundik 1aaa9391db
Merge pull request #1970 from thelounge/astorije/fix-themes
Fix local themes not being found in theme selector dropdown, and serve local themes using the themes route instead of the public folder
2018-01-13 23:09:55 +02:00
Jérémie Astori c49239b4f1
Fix themes not being found in theme selector dropdown 2018-01-13 13:45:30 -05:00
Pavel Djundik 8d0bdfc200 Fix #1902 - unable to enable push notifications on Firefox 57 2018-01-12 12:04:04 +02:00
Pavel Djundik 98c3108bde
Merge pull request #1940 from thelounge/xpaw/fix-1934
Hash user tokens, increase token entropy
2018-01-11 13:34:14 +02:00
Pavel Djundik eac092e661 Hash user tokens, increase token entropy
Fixes #1934
2018-01-10 15:54:52 +02:00
Pavel Djundik fc39a67e10 Only emit "more" history to the client that requested it 2018-01-07 15:06:59 +02:00
Al McKinlay 3510094665 Allow custom css from plugins 2018-01-05 17:40:47 +00:00
Jérémie Astori dab4fc44ea
Make sure data URIs are allowed by CSP not to block video controls 2017-12-27 13:56:38 -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 c06fb9a275 Clear storage folder after successful start and graceful exit 2017-12-18 16:59:05 +02:00
Jérémie Astori 844ca1fbe6
Merge pull request #1811 from thelounge/astorije/improve-helper
Clean up path helpers, expand defaults location in `thelounge --help`, add tests for `expandHome`
2017-12-08 21:53:14 -05:00
Jérémie Astori 0482747781
Only use helpers and not shared variables around path helpers
This refactor has a few benefits, for example there cannot be a rogue update of `Helper.CONFIG_PATH` or something.
2017-12-07 23:02:32 -05:00
Pavel Djundik fb0f68f8a5 Harden content security policy even further 2017-12-07 20:45:45 +02:00
Pavel Djundik 552f3da67e Implement manual network/channel cloning for better performance 2017-12-03 16:31:37 +02:00
Pavel Djundik 01f524b7c5 Don't send defaults if not displaying network 2017-11-19 19:46:04 +02:00
Pavel Djundik adab03f730 Fix test 2017-11-19 19:43:43 +02:00
Pavel Djundik e86a155ec2 Remove express-handlebars, read manifest.json to get theme-color 2017-11-19 19:43:43 +02:00
Pavel Djundik c30f4aaaeb Move help to view 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
Jérémie Astori f2d9ef62cf
Merge pull request #1715 from thelounge/astorije/deprecate-node-v4
Deprecate support of Node v4 in preparation of The Lounge v3
2017-11-19 01:05:57 -05:00
Jérémie Astori ef1c59072c
Deprecate support of Node v4 in preparation of The Lounge v3 2017-11-18 13:52:31 -05:00
Jérémie Astori 1dc92d8934
Enforce dangling commas with ESLint
¯\_(ツ)_/¯
2017-11-15 01:35:15 -05:00
Pavel Djundik 81e3e88391
Merge pull request #1636 from thelounge/xpaw/cleanup-clientmanager
Cleanup client manager functions
2017-10-29 10:25:42 +02:00