Commit Graph

4749 Commits

Author SHA1 Message Date
J. Ryan Stinnett
c38a7e6756 Pass correct args when creating event permalink in context menu
After the permalink API was changed in
https://github.com/matrix-org/matrix-react-sdk/pull/2671, it seems we forgot to
update this call site, so it was creating `<room>/<room>` links, instead of
`<room>/<event>`.

Fixes https://github.com/vector-im/riot-web/issues/9110
2019-03-11 15:05:05 +00:00
Erik Johnston
03d60e6af2 Fix header counters to correctly handle zero
Currently if you set the value to zero the counter is not displayed.
2019-03-11 14:04:15 +00:00
Bruno Windels
99f82a3de9
Merge pull request #2766 from matrix-org/bwindels/scrolling
Scroll investigation changes
2019-03-11 09:57:13 +00:00
Travis Ralston
e1f9482107
Merge pull request #2757 from matrix-org/anoa/accept_all_invites
Ability to bulk accept all invites (and fix rejecting all invites)
2019-03-08 14:55:59 -07:00
Travis Ralston
47b6356e10
Merge pull request #2767 from matrix-org/travis/misc-status-message-fixes
Misc fixes to StatusMessageContextMenu
2019-03-08 08:20:28 -07:00
J. Ryan Stinnett
d93e97bcd2 Remove span to regain explicit whitespace for country options
This change restores whitespace between the country name and prefix code in the
country dropdown.
2019-03-08 10:03:51 +00:00
Travis Ralston
604f8f8b6b Misc fixes to StatusMessageContextMenu
"waiting" is not a property, and unmount had a typo
2019-03-07 14:57:30 -07:00
Travis Ralston
241309ab83 Use CSS for hovering the tile 2019-03-07 14:55:17 -07:00
Bruno Windels
96b1b723cd restore scroll position when encrypted download attachment iframe is shown 2019-03-07 17:22:43 +01:00
Bruno Windels
4e382b1dd9 rename onWidgetLoad to onHeightChanged
as it's easy to confuse it with room widgets, but has nothing to do with it.
2019-03-07 17:02:19 +01:00
Andrew Morgan
71261fc7a7 Add 2500 as default delay 2019-03-07 11:12:16 +00:00
Travis Ralston
5b49584d79 Fix sticky hover state by listening for hover on the document 2019-03-06 16:27:29 -07:00
Andrew Morgan
c5198418b0 Use retry_after_ms instead of hardcoded delay 2019-03-06 15:37:06 +00:00
Andrew Morgan
0f14d89257 Ability to bulk accept all invites 2019-03-06 14:06:53 +00:00
J. Ryan Stinnett
13957bb5e7 Move country dropdown inside field in Settings
This updates the Settings phone input to match the new styling used on auth
flows.

Fixes https://github.com/vector-im/riot-web/issues/9049
2019-03-06 11:26:05 +00:00
J. Ryan Stinnett
5120ff83be Enable show prefix for phone input in Settings
This fixes an unrelated bug where the currently selected country's prefix number
wasn't being displayed. Since other country dropdown's show the prefix, and this
is also for phone numbers, it seems good to also show it here as well.
2019-03-06 11:22:29 +00:00
J. Ryan Stinnett
8bf5e1d19f
Merge pull request #2749 from jryans/auth-field
Use Field component in auth flows
2019-03-06 11:18:24 +00:00
J. Ryan Stinnett
35ee9c9ac7 One line for prefix container 2019-03-06 10:58:54 +00:00
J. Ryan Stinnett
df9888614b Normalize whitespace in PasswordLogin 2019-03-06 10:57:38 +00:00
David Baker
c1056025ed
Merge pull request #2748 from matrix-org/dbkr/shameless_plugging
Support linking to hosting providers
2019-03-05 18:22:02 +00:00
J. Ryan Stinnett
bc54ea5623 Convert login type to Field component
This converts the login type Dropdown on the login flow to also use the Field
component so that every presents a similar visual style.
2019-03-05 17:58:42 +00:00
J. Ryan Stinnett
5a491ac053 Convert login inputs to Field component
As with other auth flows, this converts inputs on the login page to use the
Field component for consistent styling. The login type dropdown is left as-is
for now.
2019-03-05 17:58:42 +00:00
J. Ryan Stinnett
5b1d361577 Convert registration phone number to Field component
Now that we have prefix support in the Field component, we can also convert the
phone number with country dropdown on registration.
2019-03-05 17:58:42 +00:00
Travis Ralston
6eaaa8b687
Merge pull request #2728 from matrix-org/travis/encryption-warning
Get confirmation before enabling encryption
2019-03-05 10:15:32 -07:00
David Baker
0244990731 Add utm_campaign to the hosting links
According to where in the app the link was clicked
2019-03-05 16:42:22 +00:00
David Baker
b68a71b294 Lint 2019-03-05 16:20:18 +00:00
David Baker
57d8f6d8a2 Support linking to hosting providers
From link in app config
2019-03-05 16:12:02 +00:00
J. Ryan Stinnett
26b2aa174b Add prefix support to Fields
This allows Fields to have an optional prefix component which is placed inside
the border of the Field and to the left of the input. Since this label animation
would be complex to get right for this case, it is instead fixed to the top left
if there is a prefix component.

This canonical example of this today would be a phone number field which
includes a country dropdown.
2019-03-05 15:25:43 +00:00
J. Ryan Stinnett
bfe120fbf4 Convert registration to Field component
This converts most fields in the registration form to use the Field component,
except for the phone number, which is a left as a separate task because of the
country dropdown menu.
2019-03-05 15:25:42 +00:00
Bruno Windels
96196d8c3d
Merge pull request #2746 from matrix-org/bwindels/flairnolayout
Prevent flair pushing timeline downwards
2019-03-05 15:34:09 +01:00
Bruno Windels
624572daa9 show flair container when no profiles loaded to ensure same height 2019-03-05 14:50:39 +01:00
J. Ryan Stinnett
b6351f2607
Merge pull request #2740 from jryans/reorg-field-props
Reorganise props handling in Field
2019-03-05 11:30:06 +00:00
J. Ryan Stinnett
d4a148d56c Use oneOf to check the input element 2019-03-05 11:18:58 +00:00
Travis Ralston
879fa22416 Merge branch 'develop' into travis/encryption-warning 2019-03-04 23:14:30 -07:00
Travis Ralston
363964e423 Don't loop forever if you demote yourself via Enter on a PowerSelector
The included comment explains what happens and why this is bad.

Fixes https://github.com/vector-im/riot-web/issues/9039
2019-03-04 13:08:54 -07:00
J. Ryan Stinnett
7c672e608d Reorganise props handling in Field
Several small tweaks to the props handling:

* Use destructuring instead of `delete`
* Emphasize the `element` as a primary prop
* Document `textarea` as supported
2019-03-04 17:25:19 +00:00
David Baker
a6a3716576
Merge pull request #2739 from matrix-org/dbkr/devices_toggle_update
Fix media device selectors not updating
2019-03-04 14:49:50 +00:00
David Baker
c7b019830d Fix media device selectors not updating
Missed a setState

Fixes https://github.com/vector-im/riot-web/issues/9036
2019-03-04 14:35:41 +00:00
Michael Telatynski
080c67439b
Merge pull request #2708 from matrix-org/fix_room_dict
Fix Room Directory custom homeserver entry not showing properly
2019-03-04 11:44:11 +00:00
Michael Telatynski
6b0b5e4aa3
Merge pull request #2729 from matrix-org/t3chguy/missing_permalinkCreator
Add missing permalinkCreator prop
2019-03-04 11:15:53 +00:00
Travis Ralston
71630af201 Patch users not existing when opening settings
Fixes https://github.com/vector-im/riot-web/issues/9022
2019-03-02 10:59:53 -07:00
Travis Ralston
454251d17c Use a div instead of an image
There's no source, so just make it a block element
2019-03-01 17:21:37 -07:00
Travis Ralston
8a6ae6b48e Use a mask for the continuation icon
Fixes https://github.com/vector-im/riot-web/issues/7990
2019-03-01 15:59:19 -07:00
Travis Ralston
5a4676ac66
Merge pull request #2725 from matrix-org/travis/settings/pl-dropdowns
Convert PowerSelector to use mxField instead
2019-03-01 09:03:16 -07:00
Travis Ralston
f9d6d42781
Merge pull request #2726 from matrix-org/travis/settings/save-feedback
Don't re-enable the save button after saving profiles
2019-03-01 09:02:54 -07:00
Michael Telatynski
eb46e62a2e delint NetworkDropdown
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-03-01 09:39:39 +00:00
Michael Telatynski
6b07195b63 Add missing permalinkCreator prop
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-03-01 09:36:36 +00:00
Travis Ralston
7d207ca2c3 speeling 2019-02-28 20:45:31 -07:00
Travis Ralston
9402e81835 Get confirmation before enabling encryption
Fixes https://github.com/vector-im/riot-web/issues/8843
2019-02-28 20:39:07 -07:00
Travis Ralston
12d939b36f Support multiple email pushers and remove the legacy UserSettingsStore
Fixes https://github.com/vector-im/riot-web/issues/5496
Fixes https://github.com/vector-im/riot-web/issues/8424
2019-02-28 19:57:45 -07:00
Travis Ralston
b84b11d3bd Don't re-enable the save button after saving profiles
Fixes https://github.com/vector-im/riot-web/issues/8569
2019-02-28 19:13:28 -07:00
Travis Ralston
a41df7ab68 Convert PowerSelector to use mxField instead 2019-02-28 19:00:57 -07:00
Travis Ralston
b5ffd4a538 Stop listening to account data when the stickerpicker is unmounted
Fixes https://github.com/vector-im/riot-web/issues/8994
2019-02-28 14:15:01 -07:00
Jason Robinson
a74cb001b4 Remove unnecessary ref from Stickerpicker
There is a ref=target in the call to render AccessibleButton for
the hide stickers button. This ref is not present in the show case.

When clicking the stickerpicker show button, React gives a warning:

> Warning: Stateless function components cannot be given refs
> (See ref "target" in AccessibleButton created by Stickerpicker).
> Attempts to access this ref will fail.

Removed the ref. Stickerpicker hide/show still works fine, no warning.

Signed-off-by: Jason Robinson <jasonr@matrix.org>
2019-02-28 15:51:36 +02:00
Travis Ralston
93043c8cc0
Merge pull request #2709 from matrix-org/t3chguy/badge_51
Show nearest lower badge, e.g show Mod for 51... etc
2019-02-27 18:30:57 -07:00
Michael Telatynski
9dede7ab65
Merge pull request #2710 from matrix-org/t3chguy/composer_demote
move canSendMessages into state so that it will re-render the composer
2019-02-27 15:40:00 +00:00
J. Ryan Stinnett
209ac2c587
Merge pull request #2706 from jryans/move-non-feather-icons
Move non-feather icons out of feather dir
2019-02-27 13:08:23 +00:00
David Baker
6cdb318cd0
Merge pull request #2713 from matrix-org/dbkr/fix_logout_dialog_backup
Fix backup button in logout dialog
2019-02-27 12:45:52 +00:00
David Baker
98402e7eae Fix backup button in logout dialog
We set the caption appropriately but forgot to actually do the
right thing depending on whether there was a key backup already.

Also fix the loadihng spinner which was never shown.

Fixes https://github.com/vector-im/riot-web/issues/8369
2019-02-27 11:45:00 +00:00
J. Ryan Stinnett
4b340450b9 Rename Feather icon directory to feather-customised
These icons are based on Feather as the original source, but they have various
tweaks applied, such as stroke width, color, etc. Hopefully the tweaked name
makes this more obvious in the future.
2019-02-27 10:42:10 +00:00
Michael Telatynski
f16011394e Merge branches 'develop' and 't3chguy/composer_demote' of github.com:matrix-org/matrix-react-sdk into t3chguy/composer_demote
# Conflicts:
#	src/components/views/rooms/MessageComposer.js
2019-02-27 00:28:16 +00:00
Michael Telatynski
7dfbf3feb2 move canSendMessages into state so that it will re-render the composer
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-02-27 00:23:37 +00:00
Michael Telatynski
93323421de Show nearest lower badge, e.g show Mod for 51... etc
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-02-26 23:59:40 +00:00
Michael Telatynski
fbe4d52b48 Fix Room Directory custom homeserver entry not showing propely
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-02-26 23:25:31 +00:00
J. Ryan Stinnett
1a89a4e87d Move logos out of feather dir
These clearly aren't from the Feather set.
2019-02-26 20:41:33 +00:00
J. Ryan Stinnett
426bdafe22
Merge pull request #2672 from jryans/password-validation
Report validity state of all registration fields on any change
2019-02-26 18:20:38 +00:00
Bruno Windels
68ba14909b
Merge pull request #2671 from matrix-org/bwindels/permalinkperf
Improve permalink performance
2019-02-26 10:48:20 +01:00
Bruno Windels
4d95af705d fix lint 2019-02-26 10:26:33 +01:00
Travis Ralston
18b27a72d8
Merge pull request #2692 from matrix-org/t3chguy/room_context_menu_settings
Settings button in Room Context Menu
2019-02-25 20:28:38 -07:00
Michael Telatynski
7029695224 make it i18n friendly
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-02-25 23:26:24 +00:00
Michael Telatynski
8d149575ea Merge branches 'develop' and 't3chguy/room_context_menu_settings' of github.com:matrix-org/matrix-react-sdk into t3chguy/room_context_menu_settings 2019-02-25 23:12:06 +00:00
Michael Telatynski
d4b6ce6932 Apply PR feedback, don't change room to go to its settings
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-02-25 23:08:51 +00:00
Michael Telatynski
dd9077f1e4 Merge branches 'develop' and 't3chguy/pretty_Devtools' of github.com:matrix-org/matrix-react-sdk into t3chguy/pretty_Devtools 2019-02-25 22:39:37 +00:00
Michael Telatynski
56d58f8600 make better use of space
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-02-25 22:38:33 +00:00
Michael Telatynski
5bdd61111d Fix textareas
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-02-25 22:12:06 +00:00
Travis Ralston
1aef157d2a Fix variable reference 2019-02-25 11:52:45 -07:00
Travis Ralston
24099de2a4 Merge branch 'develop' into travis/settings-cleanup-1 2019-02-25 10:56:43 -07:00
Travis Ralston
e0a5eeca75
Merge pull request #2686 from matrix-org/travis/old-room-sorting
Support the old room sorting algorithm and SettingsStore watchers
2019-02-25 10:51:10 -07:00
Bruno Windels
77f979ed6d also pass permalinkCreator here 2019-02-25 18:43:08 +01:00
Bruno Windels
b8c6bed906 adjust permalink code for tombstone message 2019-02-25 18:43:08 +01:00
Bruno Windels
fb672ffb28 change handling of event permalinks in replies 2019-02-25 18:43:08 +01:00
Bruno Windels
31dda34e6b use new permalink class in share dialog & context menu 2019-02-25 18:43:08 +01:00
Bruno Windels
f7ea9cfeb2 rename all instances of permalinkCreator 2019-02-25 18:43:08 +01:00
Bruno Windels
f97ea37717 permalink is one word 2019-02-25 18:43:08 +01:00
Bruno Windels
29be28919d create permalink creator in roomview and pass it on to the event tiles 2019-02-25 18:43:08 +01:00
Travis Ralston
5bf9f721c8 Port minimize to tray to new settings tab (post-merge)
Brings in b02b371250
2019-02-25 09:43:39 -07:00
Travis Ralston
4801b25f77 Merge remote-tracking branch 'origin/develop' into travis/settings-cleanup-1 2019-02-25 09:40:50 -07:00
Travis Ralston
8049d5c2b2
Merge pull request #2684 from matrix-org/travis/fix-e2e-menu-item
Only set e2e info callback if the event is encrypted
2019-02-25 07:31:17 -07:00
Travis Ralston
1c10b3050d Revert "Add some logging for riot-web#7838"
This reverts commit f5ff580e35.
2019-02-24 18:05:40 -07:00
Travis Ralston
c12bea06c8
Merge pull request #2698 from matrix-org/t3chguy/room_member_filter_clear
Add abilities to clear Filter room members input
2019-02-24 18:00:02 -07:00
Travis Ralston
2b9b07c29d
Merge pull request #2696 from matrix-org/t3chguy/pretty_view_source
make ViewSource less awkward
2019-02-24 17:55:07 -07:00
Travis Ralston
8ca1c96df4
Merge pull request #2691 from matrix-org/t3chguy/user_typing_memberinfo
view user on click typing tile
2019-02-24 17:38:25 -07:00
Travis Ralston
c261879ba7
Merge pull request #2690 from matrix-org/t3chguy/share_permalink
Change Share Message to Share Permalink if !m.room.message||redacted
2019-02-24 17:37:25 -07:00
Travis Ralston
f0353dbc3f
Merge pull request #2688 from matrix-org/t3chguy/minimize_tray
Allow configuration of whether closing window closes or minimizes to tray
2019-02-24 17:33:26 -07:00
Matthew Hodgson
ef3b729ff4 s/google.com/recaptcha.net/ as per https://developers.google.com/recaptcha/docs/faq#can-i-use-recaptcha-globally 2019-02-24 23:35:08 +00:00
Michael Telatynski
ee47e0f72e pass through className
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-02-24 04:44:38 +00:00
Michael Telatynski
5052039b36 Re-use SearchBox from filter rooms for filter room members
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-02-24 04:42:04 +00:00
Michael Telatynski
dbf540074d replace text Inputs in Devtools with Field bcuz prettier
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-02-24 04:28:42 +00:00
Michael Telatynski
7b88d5d21c make ViewSource less awkward
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-02-24 03:43:44 +00:00
Michael Telatynski
393fd26a42 Settings button in Room Context Menu
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-02-24 02:42:41 +00:00
Michael Telatynski
c99b4bda32 view user on click typing tile
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-02-24 02:30:45 +00:00
Michael Telatynski
f2624beca4 Change Share Message to Share Permalink if !m.room.message||redacted
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-02-24 02:03:20 +00:00
Michael Telatynski
b02b371250 Allow configuration of whether closing window closes or minimizes to tray
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-02-24 01:06:53 +00:00
Travis Ralston
b0cc69bca9 Add an option to sort the room list by recents first
Fixes https://github.com/vector-im/riot-web/issues/8892
2019-02-22 17:09:07 -07:00
Travis Ralston
014e4a2ccf Remove DragDropContext from FlairSettings
This also fixes a technical bug where one could drag a community from the settings to the LLP
2019-02-22 11:33:03 -07:00
Travis Ralston
bd54a401bc Sort settings tabs into a logical structure
Fixes https://github.com/vector-im/riot-web/issues/8864
2019-02-22 11:33:03 -07:00
Travis Ralston
20cd198784 Only set e2e info callback if the event is encrypted
Fixes https://github.com/vector-im/riot-web/issues/8551
2019-02-22 10:31:14 -07:00
J. Ryan Stinnett
150c941340
Merge pull request #2682 from jryans/simplify-composer-state-change
Remove duplicated conversion from `enableRichText`
2019-02-22 16:57:37 +00:00
Travis Ralston
d6f89f422b
Merge pull request #2679 from matrix-org/travis/settings/field-editable-list
Fix AliasSettings and RelatedGroups UX
2019-02-22 09:40:34 -07:00
J. Ryan Stinnett
c45ca58689
Merge pull request #2677 from jryans/composer-input
Add `onClick` to Markdown buttons
2019-02-22 16:19:22 +00:00
J. Ryan Stinnett
f5c477bbc8 Remove duplicated conversion from enableRichText
`enableRichText` would convert the editor state between rich and md versions
explicitly, but then it would also call `createEditorState`, which can do the
same thing.

This removes the duplication, and also supplies the right arguments to
`createEditorState` so it can do its work correctly.
2019-02-22 15:48:44 +00:00
Travis Ralston
a02508023b
Merge pull request #2678 from matrix-org/travis/fix-email-config
Fix toggle for email notifications
2019-02-22 08:22:43 -07:00
J. Ryan Stinnett
ccd4dee0d2 Isolate rich text notifications from other input changes
The step that would notify parent components of rich text state changes was
stirred into the input's change handler, which leads to race which the parent is
sometimes notified of the old rich text state instead of the new.

Here we avoid this complication by using a separate path for sending the rich
text state when we know we have updated it correctly.
2019-02-22 15:18:24 +00:00
J. Ryan Stinnett
3e6199c0f7 Change Markdown buttons to onClick
`AccessibleButton` expects click handlers, which we can use here, as long we
make some additional changes to avoid race processing the new state (see
subsequent patch).

Fixes https://github.com/vector-im/riot-web/issues/8866
2019-02-22 15:18:06 +00:00
J. Ryan Stinnett
b6682c0469
Merge pull request #2673 from jryans/username-label
Clarify what the username error refers to
2019-02-22 10:17:58 +00:00
Alexander Terczka
892802e9cc
RoomDirectory Dropdown should use roomDirectory.servers
The sample config.json in riot-web has "roomDirectory.servers" and not "servers".
Are other systems than riot-web use "servers" without "roomDirectory" ? Then this would break these.
2019-02-22 02:40:01 +01:00
Travis Ralston
75a2593523 More misc linter cleanup 2019-02-21 18:18:12 -07:00
Travis Ralston
9795161f40 Misc linter cleanup 2019-02-21 17:53:29 -07:00
Travis Ralston
1e6594ceba Disable removal of items if the user doesn't have permission 2019-02-21 17:15:25 -07:00
Travis Ralston
003d0eb0bf Show changes to related groups (flair) in the timeline 2019-02-21 17:03:15 -07:00
Travis Ralston
96eeab23af Convert RelatedGroupSettings to a class component 2019-02-21 16:48:54 -07:00
Travis Ralston
10daa35263 Make related groups direct manipulation 2019-02-21 16:40:12 -07:00
Travis Ralston
58b9a0675e Disable main address dropdown when lacking permissions
Instead of rendering it as a span with no label.
2019-02-21 16:38:10 -07:00
Travis Ralston
2990cf41e7 Remove old "click to save" functionality from AliasSettings 2019-02-21 16:27:49 -07:00
Travis Ralston
750c9202cc Make the canonical alias direct manipulation 2019-02-21 16:11:26 -07:00
Travis Ralston
278e48cfc9 Make removing aliases direct manipulation 2019-02-21 15:22:08 -07:00
Travis Ralston
5d2f17c49a Make adding aliases direct manipulation 2019-02-21 15:22:08 -07:00
Travis Ralston
2903a0e712 Rework EditableItemList to support mxField
Also improves upon the general UX to be a bit friendlier for direct manipulation things.
2019-02-21 15:22:08 -07:00
Travis Ralston
23dd3573f8 Fix SdkConfig import in Notifications
Fixes an issue discovered after fixing the toggle - The SdkConfig in onEnableEmailNotificationsChange ends up being undefined if the import is left as-is.
2019-02-21 15:18:54 -07:00
Travis Ralston
ee8a027b4c Fix toggle for email notifications
The function doesn't receive an event, it receives a boolean.

Fixes https://github.com/vector-im/riot-web/issues/8837
2019-02-21 15:18:11 -07:00
Travis Ralston
ade9ee3c18
Merge pull request #2634 from matrix-org/travis/better-room-sorting
"Breadcrumb" room sorting algorithm
2019-02-21 08:46:17 -07:00
Bruno Windels
ab9bf4c0e0
Merge pull request #2666 from matrix-org/bwindels/userview
Bring back user view
2019-02-21 16:05:03 +01:00
J. Ryan Stinnett
b74107116b Clarify what the username error refers to
Fixes https://github.com/vector-im/riot-web/issues/8839
2019-02-21 15:01:09 +00:00
J. Ryan Stinnett
86a375c7da Report validity state of all registration fields on any change
This passes the validity state of all fields to the consumer of
`RegistrationForm` via the `onValdiationChange` callback, instead of just the
most recent error.

In addition, we notify the consumer for any validation change, whether success
or failure. This allows old validation messages to be properly cleared. It also
allows the consumer to be aware of multiple validation errors and display the
next one after you have fixed the first.

Fixes https://github.com/vector-im/riot-web/issues/8769
2019-02-21 14:44:39 +00:00
J. Ryan Stinnett
acae2e9976 Wait until password confirm is non-empty
If password confirm is empty on blur, there's no reason to try validating it.
The user may just be tabbing through fields.
2019-02-21 14:44:32 +00:00
J. Ryan Stinnett
27abd7d507 Update validation order to match field order
Validation is meant to run in reverse order of the fields (so that the last
message emitted is for the first invalid field).
2019-02-21 11:35:55 +00:00
J. Ryan Stinnett
8b66b6bdb3 Relabel custom HS link on registration from 'Edit' to 'Change'
Fixes https://github.com/vector-im/riot-web/issues/8853
2019-02-21 11:03:50 +00:00
J. Ryan Stinnett
16b9688303
Merge pull request #2669 from matrix-org/jryans/default-server-name
Restores support for `default_server_name` which discovers URLs via `.well-known`
2019-02-21 10:38:15 +00:00
Bruno Windels
d9b8b0f988 fix indentation 2019-02-21 10:51:09 +01:00
J. Ryan Stinnett
42bb3c4f40 Prevent default for forgot password link
The forgot password link should prevent default to avoid changing the URL's hash
state.
2019-02-20 17:33:59 +00:00
J. Ryan Stinnett
d220dd49ef Clarify that the account is a Matrix account
Now that auth flows can show a server name like `example.com` which might
delegate the HS to some other server, it could be confusing to see text like
"Sign in to example.com", especially if `example.com` runs an identity service,
uses SSO, has its own account system, or other things like this.

To clarify that we mean Matrix accounts, all auth flows are updated to talk in
terms of "<verb> your Matrix account on <server>".

Fixes part of
https://github.com/vector-im/riot-web/issues/8763#issuecomment-464823909.
2019-02-20 17:33:59 +00:00
J. Ryan Stinnett
f4b7180087 Display default server name in login
If a default server name is set and the current HS URL is the default HS URL,
we'll display that name in the "sign in to" text on the login form.

This can be a bit more user friendly, especially when the HS is delegated to
somewhere such as Modular, since you'll then see "example.com" instead of
"example.modular.im", which you have no direct relationship with as a user.

This is the key bit of https://github.com/vector-im/riot-web/issues/8763 for
login.
2019-02-20 17:33:59 +00:00
J. Ryan Stinnett
a29a8185fc
Merge pull request #2667 from jryans/trim-changelog
Only show the first line of each commit in changelog dialog
2019-02-20 13:05:14 +00:00
J. Ryan Stinnett
d68b7c29e2 Only show the first line of each commit in changelog dialog
Multi-line commits aren't actually formatted correctly, and most likely the
first line is enough of a summary anyway, so this change trims to the first
line. The commits are linked, so you can click through if you want more detail.

Fixes https://github.com/vector-im/riot-web/issues/8285
2019-02-20 12:20:48 +00:00
J. Ryan Stinnett
91f56a4447 Display default server name in registration
If a default server name is set and the current HS URL is the default HS URL,
we'll display that name in the "your account" text on the registration form.

This can be a bit more user friendly, especially when the HS is delegated to
somewhere such as Modular, since you'll then see "example.com" instead of
"example.modular.im", which you have no direct relationship with as a user.

This is the key bit of https://github.com/vector-im/riot-web/issues/8763 for
registration.
2019-02-20 12:17:51 +00:00
Bruno Windels
f11505a9de bring back user page
Adds a UserView that contains a MainSplit with an empty div
and a RightPanel, preset to the given member.

UserView fetches the profile and creates a fake member, which
it passed on to the RightPanel.

this doesn't use the view_user action on purpose, to avoid any
interference of the UserView when trying to view a room member.
2019-02-20 12:45:55 +01:00
J. Ryan Stinnett
b846ac5800 Rework ServerTypeSelector to only emit changes after initial setup
`ServerTypeSelector` would call its `onChange` prop both at construction
(because it computed the default selected type and consumers might want to know)
as well as on actual user change. This ended up complicating consumer code, as
they want to differentiate between initial state and changes made by the user.

To simplify things, `ServerTypeSelector` now exports a function to compute the
server type from HS URL, which can be useful for setting its initially selected
type. The consumer now provides that type via a prop, and `onChange` is now only
called for actual user changes, simplifying the logic in `Registration` which
uses `ServerTypeSelector`.

In addition, some usages of `customHsUrl` vs. `defaultHsUrl` in `Registration`
are simplified to be `customHsUrl` only (since it already includes a fallback to
the default URL in `MatrixChat`).
2019-02-20 11:23:51 +00:00
J. Ryan Stinnett
9292a46db0 Update comment about Modular server type selection
Modular now sets `disable_custom_urls`, so the server type selector is not shown
for Modular-hosted Riot.
2019-02-20 10:24:03 +00:00
Travis Ralston
7b732ceb43 Merge branch 'develop' into travis/better-room-sorting 2019-02-19 14:35:14 -07:00
Tomas Batalla
b90e33b81b
Fix off by one error for username colors
The hash result would only have a range of 0..7, but the css of color variants is 1..8
2019-02-19 10:52:59 -08:00