mirror of
https://github.com/flarum/framework.git
synced 2025-01-21 12:51:44 +08:00
Merge pull request #3 from dcsjapan/flags-key-fix
Fix key names in Flags
This commit is contained in:
commit
2f26de4fcb
|
@ -6,7 +6,7 @@ app.initializers.add('flarum-flags', () => {
|
||||||
extend(PermissionGrid.prototype, 'moderateItems', items => {
|
extend(PermissionGrid.prototype, 'moderateItems', items => {
|
||||||
items.add('viewFlags', {
|
items.add('viewFlags', {
|
||||||
icon: 'flag',
|
icon: 'flag',
|
||||||
label: app.translator.trans('flarum-flags.admin.permissions.view_flags'),
|
label: app.translator.trans('flarum-flags.admin.permissions.view_flags_label'),
|
||||||
permission: 'discussion.viewFlags'
|
permission: 'discussion.viewFlags'
|
||||||
}, 65);
|
}, 65);
|
||||||
});
|
});
|
||||||
|
@ -14,7 +14,7 @@ app.initializers.add('flarum-flags', () => {
|
||||||
extend(PermissionGrid.prototype, 'replyItems', items => {
|
extend(PermissionGrid.prototype, 'replyItems', items => {
|
||||||
items.add('flagPosts', {
|
items.add('flagPosts', {
|
||||||
icon: 'flag',
|
icon: 'flag',
|
||||||
label: app.translator.trans('flarum-flags.admin.permissions.flag_posts'),
|
label: app.translator.trans('flarum-flags.admin.permissions.flag_posts_label'),
|
||||||
permission: 'discussion.flagPosts'
|
permission: 'discussion.flagPosts'
|
||||||
}, 70);
|
}, 70);
|
||||||
});
|
});
|
||||||
|
|
|
@ -101,7 +101,7 @@ export default function() {
|
||||||
const detail = flag.reasonDetail();
|
const detail = flag.reasonDetail();
|
||||||
|
|
||||||
return [
|
return [
|
||||||
app.translator.trans(reason ? 'flarum-flags.forum.post.flagged_by_with_reason' : 'flarum-flags.forum.post.flagged_by', {user, reason}),
|
app.translator.trans(reason ? 'flarum-flags.forum.post.flagged_by_with_reason_text' : 'flarum-flags.forum.post.flagged_by_text', {user, reason}),
|
||||||
detail ? <span className="Post-flagged-detail">{detail}</span> : ''
|
detail ? <span className="Post-flagged-detail">{detail}</span> : ''
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ export default class FlagList extends Component {
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
: !this.loading
|
: !this.loading
|
||||||
? <div className="NotificationList-empty">{app.translator.trans('flarum-flags.forum.flagged_posts.no_flags')}</div>
|
? <div className="NotificationList-empty">{app.translator.trans('flarum-flags.forum.flagged_posts.empty_text')}</div>
|
||||||
: LoadingIndicator.component({className: 'LoadingIndicator--block'})}
|
: LoadingIndicator.component({className: 'LoadingIndicator--block'})}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user