Commit Graph

31 Commits

Author SHA1 Message Date
Alexander Skvortsov
d64750b3eb
Rename viewDiscussions => viewForum, viewUserList => searchUsers (#2854)
This naming is clearer as to the intended effect. Changes include:

- A migration to rename all permissions
- Updating the seed migration to use the original naming from the start
- Replacing usage of the old names with new names in code
- Throwing warnings when the old names are used.
2021-05-11 15:15:27 -04:00
Robert Korulczyk
2ffec2ee71
Update validation.yml. (#2829)
source: https://github.com/laravel/laravel/blob/v8.5.16/resources/lang/en/validation.php
2021-05-03 19:47:18 -04:00
Alexander Skvortsov
b45519974a
Switch to ICU MessageFormat (#2759) 2021-04-30 12:44:39 -04:00
David Wheatley
91b1d9029e LESS should be capitalised as Less
See http://lesscss.org/
2021-04-29 22:07:46 +01:00
David Wheatley
f9779284e4
Add users list to admin dashboard (#2626)
* Commit initial WIP code

* Fix squashed grid on mobile

* Add pagination support; rename to userList

* Improve grid sizing

* Improve grid row shading

* Move EditUserModal to common

* Add link to profile page in grid

* Use Less styling vars

* Move EditUserModal translations to lib

* Add edit user button to grid

* Fix incorrect profile link priority

* Update profile link translation key

* Add priorities to other columns

* Add group badges to grid

* Add username to profile link tooltip

* Organise imports

* Use variable for header border bottom color

* Fix broken export

* Add total user count to API payload's metadata

* Add new metadata to ApiPayload type

* Implement correct page number

* Remove debug code

* Use function to get the total pages

This allows us to use the raw count elsewhere in the component (pssst... check the next commit!)

* Center profile link in column

* Add profile link header

* Show total users above table

* Use ItemList's itemName property for column data attributes

* Add user email column, hidden by default

This column is hidden by default using a placeholder email and blur filter. These are then removed when the visibility toggle is pressed.

This prevents any over-the-shoulder accidental data leakage, as emails are classed as PII under GDPR.

* Fix incorrect tooltip translation keys

* Add extra padding between email and visibility toggle button

* Prevent selection of blurred email

* Fix incorrect icon state for email toggle

* Update API response type to include metadata (for now)

* Increase number of users per page to 50

* Update compat files with new locations

* Format

* Add @deprecated notices for forum compat export

* Use AdminPayload for user count instead of supplying as REST API metadata

* Make nav look less squashed using bottom margin

* Suppress TS warning

* StyleCI fixes

* Fix TS error

* Update based on review comments

* Rename user list -> users

* Rename internal instances of user_list to users

* Fix formatting

* Use CSS custom properties for the table column count

* Use .Button--icon instead of custom style

* Make fake email more realistic length

* Add a11y attributes

* Use padding bottom instead of margin bottom for page spacing

* Make compatible with new CSS LoadingIndicator

I won't let it break here! :P

* Integrate profile link into username column

* Don't force columns to be 300px

This made the grid look very bloated and intimidating -- lets instead increase the padding between items and make it only the width it needs to be.

* Center edit user button in column

* Increase spacing between email and visibility toggle button

* Rename `statistics` to `modelStatistics` in Admin payload

This prevents any possible conflicts with core and `flarum/statistics`. We might want to consider migrating the stats extension to extend this object in the future.

* Update comments, fix TS error

* Various translation key changes

* Change gmail.com -> example.com

* Stretch 'edit user' button to entire cell size

* Update translations

* Is the YAML formatted right this time? 🙈

* Remove email placeholder

Fixes an issue where the table would jump if an email was unhidden that was longer than the placeholder.

* Re-order lib translations

* Clicking blurred email now unblurs

* Correct header class

* Improve edit user button centring

* Improve vertical row item centering

* Fix incorrect column length in aria attribute

* Use .Button--text!
2021-04-22 23:35:42 +01:00
David Wheatley
9716a15c31
Add accessibility attributes to loading spinner (#2799) 2021-04-20 17:25:23 +01:00
David Wheatley
0d139e6133
[A11Y] Add aria-label to dropdown toggles (#2668)
Implement custom accessible dropdown toggle labels for forum components

Making the a11y label more specific to the specific action it performs is critical for good UX with assistive technologies.
2021-03-16 10:50:36 -04:00
Matt Kilgore
9627eb73f1
User edit permission tightening (#2620)
- Split user edit permision into edit attributes, edit credentials, and edit groups
- Only Admins can edit Admin Credentials
- Only Admins can Promote/Demote to/from Admin
2021-03-01 15:52:29 -05:00
KyrneDev
0ed71ed581
Adminux locale 2021-02-19 13:03:26 -08:00
KyrneDev
dc75ebad00
Adminux locale 2021-02-19 13:02:42 -08:00
Robert Korulczyk
c4ebebe48e
Move locale files from language pack to core (#2408) 2021-02-17 16:23:13 -05:00
Toby Zerner
3efbffdcec Extract English translations into a language pack
To make this work, we add support for the client working without any locale.

Also fixes #412.
2015-09-25 16:12:09 +09:30
Toby Zerner
fdb598187f Revert to "go to email provider" button 2015-09-24 14:22:14 +09:30
Toby Zerner
753808c3f1 Indent block comments 2015-09-24 14:20:45 +09:30
Toby Zerner
dbef2a4c1f Add comments about intentional spaces 2015-09-24 14:20:37 +09:30
Toby Zerner
d2c4569112 Update discussion list "last reply" translations 2015-09-24 09:07:46 +09:30
dcsjapan
d5d7185794 Primary key renaming
Improved consistency for existing core translation key names.

See flarum/core#265
- Completely overhauled core en.yml
- Replaced existing key names in all core JS files to match
- Extracted a hardcoded string in IndexPage.js
- Combined two app.trans calls in DiscussionControls.js
- Removed hardcoded spaces from LogInModal.js and SignUpModal.js
- Added two new keys from DiscussionControls.js (soft delete)
- Created two new “reused keys” to YML to accommodate same
2015-09-23 14:58:33 +09:00
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
f6e21b75e1 Remove unused translations 2015-09-05 16:05:02 +09:30
Toby Zerner
9ca67635fb Remove unused translations 2015-09-04 12:19:09 +09:30
Toby Zerner
0b8aa5c124 Add header comment; PSR-2 fixes; remove seeders 2015-08-26 16:56:32 +09:30
Toby Zerner
187517a9c7 Remove ability for users to delete themselves 2015-08-04 21:35:41 +09:30
Toby Zerner
6a57ff8b51 Change discussion list activity language 2015-07-28 21:13:14 +09:30
Toby Zerner
497b65289e Fix sign up modal 2015-07-23 14:30:55 +09:30
Toby Zerner
34b7a2fbf6 Move locale files 2015-07-22 16:05:24 +09:30
Toby Zerner
53c621d999 Update event post API
- Use more appropriate component class name
- Allow username to be moved in translation
2015-07-20 18:12:08 +09:30
Toby Zerner
82f1daeef4 Change discussion list sorting labels 2015-07-20 18:11:04 +09:30
Toby Zerner
4a271dd11d Fix HTML entity 2015-07-17 17:52:45 +09:30
Toby Zerner
6ae270db95 Remove duplicates; replace missing commas 2015-07-17 17:47:53 +09:30
Toby Zerner
f93ff7cb3f Make front-end localizable 2015-07-17 17:43:28 +09:30
Toby Zerner
8b162344cd Lay the groundwork for translation & refactor asset compilation
Ditched the idea of having language packs as extensions. Reasoning:

1. Because we use machine keys for translations (rather than English
keys), extensions need to be able to define default translations. If
English translations are to be included in extensions and not in a
language pack extension, then it doesn’t make sense to have other
languages as language pack extensions. Inconsistency → complexity.

2. Translations should maintain version parity with their respective
extensions. There’s no way to do this if extension translations are
external to the extension.

Instead, localisation will be a core effort, as well as a per-extension
effort. Translators will be encouraged to send PRs to core + extensions.

In core, each locale has a directory containing three files:
- translations.yml
- config.js: contains pluralisation logic for the JS app, as well as
moment.js localisation if necessary
- config.php: contains pluralisation logic for the PHP app

Extensions can use the Flarum\Extend\Locale extender to add/override
translations/config to a locale.

Asset compilation has been completely refactored with a better
architecture. Translations + config.js are compiled and cached for the
currently active locale.
2015-06-10 14:23:56 +09:30