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.
Don't sort queries/users after special chans
Set all users in tests to be of type query
Add test for not inserting infront of lobby
Break after finding the index, otherwise it always adds it to the end
Add checking for lobby in first test
Fix off-by-one error on the frontend
Fix utterly idiotic issue adding a duplicate of the channel we are on rather than the new user when we query
Check that we always insert before first special chan
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
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