mirror of
https://github.com/flarum/core.git
synced 2025-07-28 04:00:40 +02:00
Get admin area working again
This commit is contained in:
56
js/admin/src/components/AdminNav.js
Normal file
56
js/admin/src/components/AdminNav.js
Normal file
@@ -0,0 +1,56 @@
|
||||
import Component from 'flarum/Component';
|
||||
import AdminLinkButton from 'flarum/components/AdminLinkButton';
|
||||
import SelectDropdown from 'flarum/components/SelectDropdown';
|
||||
|
||||
import ItemList from 'flarum/utils/ItemList';
|
||||
|
||||
export default class AdminNav extends Component {
|
||||
view() {
|
||||
return SelectDropdown.component({
|
||||
className: 'AdminNav App-titleControl',
|
||||
buttonClassName: 'Button',
|
||||
children: this.items().toArray()
|
||||
});
|
||||
}
|
||||
|
||||
items() {
|
||||
const items = new ItemList();
|
||||
|
||||
items.add('dashboard', AdminLinkButton.component({
|
||||
href: app.route('dashboard'),
|
||||
icon: 'bar-chart',
|
||||
children: 'Dashboard',
|
||||
description: 'Your forum at a glance.'
|
||||
}));
|
||||
|
||||
items.add('basics', AdminLinkButton.component({
|
||||
href: app.route('basics'),
|
||||
icon: 'pencil',
|
||||
children: 'Basics',
|
||||
description: 'Set your forum title, language, and other basic settings.'
|
||||
}));
|
||||
|
||||
items.add('permissions', AdminLinkButton.component({
|
||||
href: app.route('permissions'),
|
||||
icon: 'key',
|
||||
children: 'Permissions',
|
||||
description: 'Configure who can see and do what.'
|
||||
}));
|
||||
|
||||
items.add('appearance', AdminLinkButton.component({
|
||||
href: app.route('appearance'),
|
||||
icon: 'paint-brush',
|
||||
children: 'Appearance',
|
||||
description: 'Customize your forum\'s colors, logos, and other variables.'
|
||||
}));
|
||||
|
||||
items.add('extensions', AdminLinkButton.component({
|
||||
href: app.route('extensions'),
|
||||
icon: 'puzzle-piece',
|
||||
children: 'Extensions',
|
||||
description: 'Add extra functionality to your forum and make it your own.'
|
||||
}));
|
||||
|
||||
return items;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user