Commit Graph

78 Commits

Author SHA1 Message Date
Alistair McKinlay
133e7bf710 Format js/vue with prettier 2019-07-19 11:27:40 +01:00
Pavel Djundik
54a4085b68 Store ip and language in a separate object in user file 2019-07-16 13:00:29 +03:00
Pavel Djundik
472d618033 Remove log from global 2018-06-15 23:31:06 +03:00
Jérémie Astori
00bca229f0
Enforce object literal shorthand syntax with ESLint 2018-03-15 00:22:09 -04: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
4b7a53c5e1 Do not rethrow exception if user file failed to write 2018-03-03 21:46:14 +02:00
Pavel Djundik
6b5f6e3e79 Do not crash when user file can not be read
Fixes #2128
Fixes #447
2018-03-03 21:46:14 +02:00
Pavel Djundik
fee81e78e1 Replace colors.js with chalk 2018-03-02 20:28:54 +02:00
Keegan
4fe7dc0808 Enable logging for LDAP users 2018-02-23 20:07:08 -05:00
Pavel Djundik
59ec07be87
Update all links to thelounge repository 2018-02-21 22:47:52 -05:00
Pavel Djundik
c733e72e7a Auto-fix code for padding-line-between-statements rule 2018-02-20 09:28:04 +02:00
Pavel Djundik
a145b8e27c
Merge pull request #1728 from thelounge/astorije/rm-autoload-deprecation
Remove autoload deprecation notice
2018-02-19 18:50:51 +02:00
Howard Johnson
10d43f27ed Add missing executions of callback in ClientManager.updateUser
Signed-off-by: Howard Johnson <merlin@merlinthp.org>
2018-01-13 23:05:23 +00:00
Jérémie Astori
9a8cde189d
Remove autoload deprecation notice 2017-12-12 02:58:17 -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
Rob Jackson
15f7f2e371
Ensure passwords are reloaded when updated via CLI (fixes #598) 2017-12-05 18:52:08 -05:00
Jérémie Astori
aca23257ed
Switch CLI tool from lounge to thelounge and deprecate lounge
This is in preparation of The Lounge v3 which will make `thelounge` uniform across the entire project. No more confusion!
2017-11-22 16:37:26 -05:00
Pavel Djundik
9ff398dac3 Go back to writing user files synchronously 2017-11-11 20:44:09 +02:00
Pavel Djundik
5c45321cca Cleanup client manager functions 2017-10-15 19:05:19 +03:00
Pavel Djundik
833bdfa2aa Fix session data not updating correctly 2017-09-26 10:56:08 +03:00
Pavel Djundik
0d57df81af Gracefully quit on Ctrl+C
Fixes #268
2017-08-30 20:26:45 +03:00
Jérémie Astori
234fd31411
Clarify some users.length that were forgotten in a previous PR 2017-08-26 12:04:13 -04:00
Jérémie Astori
ed68ff4a34
Make sure CLI does not crash on undefined.length when we figured out users could not be read already 2017-08-23 13:21:15 -04:00
Jérémie Astori
f221121998
Inform when no users during autoload to take into account removing the last user 2017-08-23 13:21:14 -04:00
Pavel Djundik
0ac3ba28e1 Web Push Notifications 2017-08-22 10:54:18 +03:00
Pavel Djundik
c14f7da1b2 Generate unique tokens for each login and session 2017-07-31 02:02:15 +03:00
Pavel Djundik
f6dd616d5e Update to eslint 4 and enforce extra rules 2017-06-19 09:58:29 +03:00
Pavel Djundik
d6d7df62fe Fix away message disappearing
Closes #1102
2017-04-28 18:58:14 +03:00
Pavel Djundik
3b2e3fc08c Enforce more space and new line rules 2017-03-18 21:40:39 +02:00
Pavel Djundik
9997aafec7 Rewrite identd server, combine with oidentd 2017-03-12 12:02:22 +02:00
Jérémie Astori
410eff428b Prompt admin for user log at user creation 2017-02-01 01:26:19 -05:00
Jérémie Astori
bc01d6ccd1 Improve message and style of loading/unloading console logs, use ES6 template literals 2016-12-11 03:30:19 -05:00
Jérémie Astori
b01517861d Remove autoload option and always autoload users
Since @xPaw provided a really nice way to watch user config files, there is now no need to be cheap about it (it used to be run every second, possibly why it could be disabled via settings?).

This commit also improves the function a little bit by making use of ES6 syntax.

A warning gets displayed on the server console when the `autoload` option is still present in the config file.
2016-12-11 03:29:30 -05:00
Pavel Djundik
463a63aed3 Avoid unnecessary disk writes if user object has not changed, make updateUser async 2016-12-10 11:05:34 +02:00
Pavel Djundik
69999f9190 Change ghetto autoload to use fs.watch 2016-12-07 00:31:36 -05:00
Jérémie Astori
e905c139d7 Use native ES5 map method instead of lodash's 2016-10-15 15:58:49 -04:00
Jérémie Astori
089c315a8e Use forEach instead of lodash's each, and ES6 fat arrows like it's 2015 2016-10-15 15:58:48 -04:00
Pavel Djundik
aa02fd5180 Enforce more eslint rules 2016-10-09 17:55:37 -04:00
Jérémie Astori
caa46042bf Enforce strict mode across all JS files with ESLint
Several ES6 additions are only available in strict mode. Example:
> SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode

Strict mode was also enabled in a few of our files already, and it is a good thing to have anyway.
2016-10-09 15:14:02 -04:00
Jérémie Astori
cf64cb04c4 Fix token persistency across server restarts
This fixes a regression introduced by LDAP support addition
(https://github.com/thelounge/lounge/pull/477), which forces
users to re-login when the server restarts. This was originally
implemented in https://github.com/thelounge/lounge/pull/370.
2016-08-10 02:26:47 -04:00
Johan Lindskogen
987474cfc1 implementing LDAP support 2016-07-29 21:28:00 -04:00
Pavel Djundik
100262ad1f Cache loaded config and merge it with defaults
Fixes #249
2016-06-26 19:30:25 +03:00
Pavel Djundik
779aed7cd6 Use tabs when saving user configs 2016-06-19 20:16:50 +03:00
Daniel
f8044bfc96 Remove redundant variables (#397) 2016-06-12 09:43:35 +03:00
Pavel Djundik
643e07dead Merge pull request #396 from hogofwar/capital
Capitalise constructor Oidentd
2016-06-12 09:43:02 +03:00
Daniel
29d94bf297 Capitalise constructor. 2016-06-11 21:03:59 +01:00
Daniel
3a2d97af6a Supersede mkdirp with fs-extra.
Ensure USERS_PATH exists at start.

Remove unnecessary USER_PATH check.

Use fs-extra's copy to write default config.
2016-06-11 19:35:40 +01:00
Maxime Poulin
fabb758985 Add support for oidentd spoofing 2016-06-02 23:59:19 -04:00
Jérémie Astori
fe85873f1e Replace all concatenated paths with Node's path.join 2016-05-15 17:01:10 -04:00