-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: frontend
Model
extender (#3646)
* feat: reintroduce frontend extenders * chore: used `Routes` extender in bundled extensions * chore: used `PostTypes` extender in bundled extensions * chore: `yarn format` * feat: `Model` frontend extender * chore: naming * chore(review): attributes can be nullable or undefined * chore(review): delay extender implementation * chore(review): unnecessary check * chore(review): stay consistent * chore: merge conflicts * chore: unused import * chore: multiline extenders * feat: add Store extender Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
- Loading branch information
Showing
3 changed files
with
12 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
import Extend from 'flarum/common/extenders'; | ||
import Post from 'flarum/common/models/Post'; | ||
import User from 'flarum/common/models/User'; | ||
import MentionsUserPage from './components/MentionsUserPage'; | ||
|
||
export default [new Extend.Routes().add('user.mentions', '/u/:username/mentions', MentionsUserPage)]; | ||
export default [ | ||
new Extend.Routes() // | ||
.add('user.mentions', '/u/:username/mentions', MentionsUserPage), | ||
|
||
new Extend.Model(Post) // | ||
.hasMany<Post>('mentionedBy'), | ||
|
||
new Extend.Model(User) // | ||
.attribute<boolean>('canMentionGroups'), | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters