import { extend } from 'flarum/extend';
import app from 'flarum/app';
import PermissionGrid from 'flarum/components/PermissionGrid';

app.initializers.add('flarum-sticky', () => {
  extend(PermissionGrid.prototype, 'moderateItems', items => {
    items.add('sticky', {
      icon: 'fas fa-thumbtack',
      label: app.translator.trans('flarum-sticky.admin.permissions.sticky_discussions_label'),
      permission: 'discussion.sticky'
    }, 95);
  });
});

import app from 'flarum/app';

app.initializers.add('flarum-sticky', () => {
  app.extensionData
    .for('flarum-sticky')
    .registerPermission({
      icon: 'fas fa-thumbtack',
      label: app.translator.trans('flarum-sticky.admin.permissions.sticky_discussions_label'),
      permission: 'discussion.sticky'
    }, 'moderate', 95);
});

Update admin js for admin ux redesign
Update admin js for admin ux redesign
