Commit Graph

78 Commits

Author SHA1 Message Date
Charlie
4df0101f56 Update icons to "fas" (#1426)
* Update icons to "fas"

* Install icon change
2018-05-09 08:56:30 +02:00
AFR
1a2df2d581 FontAwesome v5.0.6 (#1372)
* Update FontAwesome to v5.0.6

* Adapt DiscussionListItem-count icon to match FontAwesome 5 syntax

* Change icon name to match FontAwesome 5.0.6 fas icon

* Add font type prefix parameter to icon helper

* Add Enable Icon Prefix to show icon in Extension Page

* Fix invalid icon behavior

* Change icon name to match FontAwesome 5.0.6 far icon

* Use iconPrefix property on component

* Use full icon class name

* Update icon helper docblock

* Full icon class syntax
2018-02-23 23:42:00 +01:00
Toby Zerner
3be98b9f8e Make sure dropdowns don't go above the edge of the screen 2017-11-05 16:17:50 +10:30
Toby Zerner
e3e4786391 Simplify global back button
The behaviour is not overly intuitive, and the icon wasn't helping
(hamburger icon usually means "menu"). Now the back button always goes
back to the index, no matter where you are, and there's a tooltip that
says "Back to discussion list".
2017-07-22 12:08:09 +09:30
Toby Zerner
240aa9e83b Improve permissions page
- Introduce the concept of "required permissions" - basically a permission dependency tree. In order for a group to be granted one permission, they must also have another.
- Improve redraw performance by not building dropdown menu contents until dropdown is opened

ref #904
2016-05-27 12:42:19 +09:30
Toby Zerner
66a39bbbf5 Fix buttons being given incorrect title 2016-04-08 13:38:50 +09:30
Toby Zerner
6dd190114d Retain global page components between routes 2016-04-08 13:38:16 +09:30
Franz Liedke
42c9086c32 Improve Button component to only show tooltip if textual content is available 2016-04-01 09:51:18 +09:00
Franz Liedke
179fcfb3ca Show full button content as tooltip
Refs #494.
2016-03-30 10:04:08 +09:00
Franz Liedke
16b229649a Use group ID instead of name in generated class names
This fixes #847.
2016-03-29 22:08:44 +09:00
Toby Zerner
d1c436c4d5 Dramatically improve performance when typing in a modal
Since Mithril doesn't really offer granular redraw control, typing in a text input on a modal would trigger a redraw for the whole page (including the page content behind the modal) on every keystroke. This commit allows components to be "paused" so that their vdom subtree will be retained instead of reconstructed on subsequent redraws. When a modal is opened, we pause the main page component, and when it's closed, we unpause it. This means that while a modal is visible, only the content inside of the modal will be redrawn, dramatically improving performance.
2016-03-11 13:18:16 +10:30
Toby Zerner
e37c7a9b06 Remove sudo mode and add password confirmation when changing email address
closes #674
2016-03-11 12:44:18 +10:30
Toby Zerner
e5a7013c2c Key item lists to maintain identity across redraws
Fixes #667. This issue was due to the fact that Mithril would change the "Lock" badge into a "Sticky" badge, but the tooltip initialization would not be triggered because it was using the same element. By maintaining element identity, the "Lock" badge will remain untouched, and a new element for the "Sticky" badge will be inserted before it. See https://lhorie.github.io/mithril/mithril.html#dealing-with-focus for more information.
2016-01-13 09:34:12 +10:30
Toby Zerner
1cfae4ad14 Merge branch 'sudo-mode'
# Conflicts:
#	CHANGELOG.md
2015-12-03 15:12:51 +10:30
Toby Zerner
9896378b59 Overhaul sessions, tokens, and authentication
- Use cookies + CSRF token for API authentication in the default client. This mitigates potential XSS attacks by making the token unavailable to JavaScript. The Authorization header is still supported, but not used by default.
- Make sensitive/destructive actions (editing a user, permanently deleting anything, visiting the admin CP) require the user to re-enter their password if they haven't entered it in the last 30 minutes.
- Refactor and clean up the authentication middleware.
- Add an `onhide` hook to the Modal component. (+1 squashed commit)
2015-12-03 15:11:57 +10:30
Toby Zerner
81a1c0955b Fix some issues with dropdown positioning 2015-12-03 14:51:55 +10:30
Toby Zerner
1f4e03d1fa Make sure dropdowns stay within the viewport horizontally too 2015-11-20 12:35:07 +10:30
Toby Zerner
25932cf7c4 Add label to back button, change behaviour
The back button longer shows if the user hasn't actually navigated anywhere. e.g. if they come in directly to a discussion, it will be hidden.
2015-11-03 15:54:05 +10:30
Toby Zerner
2a5c0c1c7a Improve request error debug output 2015-10-21 10:47:07 +10:30
Toby Zerner
26a821e3e2 Improve client XHR error handling
The default XHR error handler produce an alert which is appropriate to the response status code. It can be overridden per-request (by specifying the `errorHandler` option) so that the alert can be suppressed or displayed in a different position (e.g. inside a modal).

ref #118
2015-10-20 12:48:26 +10:30
Toby Zerner
33dd5fff36 Initialise component state in init() instead of constructor
This allows component state to be overridden via monkey-patch. ref #246
2015-10-13 16:55:56 +10:30
Franz Liedke
f5b5d9ca5c Use correct method for notification drawer on mobile
Refs #500.
2015-09-29 01:28:47 +02:00
Toby Zerner
264725d872 Allow discussions to be hidden and restored 2015-09-22 17:48:21 +09:30
Toby Zerner
d610ea663f Keep post actions visible when controls dropdown is open
Also show without hover on touch devices
2015-09-22 17:05:14 +09:30
Toby Zerner
efca923d30 Add "Debug" button to inspect the response of a failed AJAX request
Related to #118
2015-09-18 16:46:46 +09:30
Franz Liedke
9767bce1e3 Move dropdown mouseover to correct location
Related to #496.
2015-09-16 09:00:33 +02:00
Franz Liedke
ffcba1f173 Always use label as tooltip for header icons
Closes #496.
2015-09-16 08:45:45 +02:00
Toby Zerner
8414a59908 Don't use a default dropdown label 2015-09-16 10:12:49 +09:30
Toby Zerner
6beb4fe898 Add external authenticator (social login) API
Allows registrations to be completed with a pre-confirmed email address
and no password.
2015-09-15 11:27:31 +09:30
Toby Zerner
8cccaaaf6b Improve API error handling
- Change 'path' key to 'source.pointer', as per spec
- Add 500 error detail if debug mode is on
2015-09-14 15:40:07 +09:30
Toby Zerner
70815b024a Make Dropdown and NotificationsDropdown components more extensible 2015-09-04 12:15:11 +09:30
Franz Liedke
f0c240f863 Add a first empty state to the discussion list 2015-09-03 09:59:33 +02:00
Toby Zerner
0474f410a4 Refactor start/endComputation into lazyRedraw method 2015-08-31 12:04:51 +09:30
Toby Zerner
734badb4bc Begin JavaScript cleanup 2015-08-26 16:56:33 +09:30
Toby Zerner
c3b2fa5a99 Prevent badge tooltips from being cut off
By overflow in the notifications dropdown. closes flarum/core#228
2015-08-13 13:01:13 +09:30
Toby Zerner
3f809761d3 Improve extensions page
- Allow extensions to define an icon in their flarum.json
- Show a "please wait" modal when enabling/disabling an extension
- Styling tweaks
2015-08-07 08:51:03 +09:30
Toby Zerner
0d968536bc Tweak dropdown caret margins 2015-08-05 19:21:00 +09:30
Toby Zerner
5005e37cfb Focus on the first input too, in case it's not a text field 2015-08-05 16:07:43 +09:30
Toby Zerner
1679f1e27b Implement edit user modal
EditUserHandler is a bit rough
2015-08-05 11:49:37 +09:30
Toby Zerner
f49d0e5341 Allow locale to be selected in footer 2015-08-05 09:50:57 +09:30
Toby Zerner
a14be00041 Sort out default dropdown caret icons 2015-08-04 11:42:24 +09:30
Toby Zerner
addb061458 Change default dropdown caret icon 2015-08-04 11:01:11 +09:30
Toby Zerner
8f4ef28475 Make the back button a functional link 2015-08-02 17:26:57 +09:30
Toby Zerner
d44ffd1866 Remove modal responsibility for loading UI; using loading button state 2015-08-02 17:25:05 +09:30
Toby Zerner
fde7afd3e2 Finish admin permissions page and clean up everything 2015-07-31 20:16:47 +09:30
Toby Zerner
42fd8e26c1 Begin implementing permissions page 2015-07-29 21:00:27 +09:30
Toby Zerner
f96cac6057 Implement basic settings page 2015-07-29 21:00:09 +09:30
Toby Zerner
ff6f2ebf82 Properly disable buttons 2015-07-28 17:19:00 +09:30
Toby Zerner
52c9539be3 Appearance tweaks 2015-07-23 16:39:20 +09:30
Toby Zerner
e82a50e53b Update modal responsive control classes 2015-07-22 09:56:01 +09:30