mirror of
https://github.com/flarum/framework.git
synced 2025-05-23 15:19:56 +08:00
Massive JavaScript cleanup
- Use JSX for templates - Docblock/comment everything - Mostly passes ESLint (still some work to do) - Lots of renaming, refactoring, etc. CSS hasn't been updated yet.
This commit is contained in:
@ -1,12 +1,11 @@
|
||||
import Model from 'flarum/model';
|
||||
import Model from 'flarum/Model';
|
||||
import mixin from 'flarum/utils/mixin';
|
||||
|
||||
class Activity extends Model {}
|
||||
export default class Activity extends mixin(Model, {
|
||||
contentType: Model.attribute('contentType'),
|
||||
content: Model.attribute('content'),
|
||||
time: Model.attribute('time', Model.transformDate),
|
||||
|
||||
Activity.prototype.contentType = Model.attribute('contentType');
|
||||
Activity.prototype.content = Model.attribute('content');
|
||||
Activity.prototype.time = Model.attribute('time', Model.transformDate);
|
||||
|
||||
Activity.prototype.user = Model.hasOne('user');
|
||||
Activity.prototype.subject = Model.hasOne('subject');
|
||||
|
||||
export default Activity;
|
||||
user: Model.hasOne('user'),
|
||||
subject: Model.hasOne('subject')
|
||||
}) {}
|
||||
|
Reference in New Issue
Block a user