mirror of
https://github.com/flarum/framework.git
synced 2024-12-04 08:13:39 +08:00
parent
37bc5eea08
commit
1349f146d5
6
framework/core/js/forum/dist/app.js
vendored
6
framework/core/js/forum/dist/app.js
vendored
|
@ -27783,13 +27783,11 @@ System.register('flarum/components/SessionDropdown', ['flarum/helpers/avatar', '
|
||||||
href: app.route('settings')
|
href: app.route('settings')
|
||||||
}), 50);
|
}), 50);
|
||||||
|
|
||||||
if (user.groups().some(function (group) {
|
if (app.forum.attribute('adminUrl')) {
|
||||||
return group.id() === Group.ADMINISTRATOR_ID;
|
|
||||||
})) {
|
|
||||||
items.add('administration', LinkButton.component({
|
items.add('administration', LinkButton.component({
|
||||||
icon: 'wrench',
|
icon: 'wrench',
|
||||||
children: app.translator.trans('core.forum.header.admin_button'),
|
children: app.translator.trans('core.forum.header.admin_button'),
|
||||||
href: app.forum.attribute('baseUrl') + '/admin',
|
href: app.forum.attribute('adminUrl'),
|
||||||
target: '_blank',
|
target: '_blank',
|
||||||
config: function config() {}
|
config: function config() {}
|
||||||
}), 0);
|
}), 0);
|
||||||
|
|
|
@ -62,12 +62,12 @@ export default class SessionDropdown extends Dropdown {
|
||||||
50
|
50
|
||||||
);
|
);
|
||||||
|
|
||||||
if (user.groups().some(group => group.id() === Group.ADMINISTRATOR_ID)) {
|
if (app.forum.attribute('adminUrl')) {
|
||||||
items.add('administration',
|
items.add('administration',
|
||||||
LinkButton.component({
|
LinkButton.component({
|
||||||
icon: 'wrench',
|
icon: 'wrench',
|
||||||
children: app.translator.trans('core.forum.header.admin_button'),
|
children: app.translator.trans('core.forum.header.admin_button'),
|
||||||
href: app.forum.attribute('baseUrl') + '/admin',
|
href: app.forum.attribute('adminUrl'),
|
||||||
target: '_blank',
|
target: '_blank',
|
||||||
config: () => {}
|
config: () => {}
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user