mirror of
https://github.com/flarum/framework.git
synced 2024-12-02 15:03:44 +08:00
9ddc622929
So that it only loads when needed, and caches results so things are nice and snappy
28 lines
616 B
JavaScript
Executable File
28 lines
616 B
JavaScript
Executable File
import Ember from 'ember';
|
|
|
|
export default Ember.Component.extend({
|
|
classNames: ['back-button'],
|
|
classNameBindings: ['active'],
|
|
|
|
active: Ember.computed.or('target.paneIsShowing', 'target.paneIsPinned'),
|
|
|
|
mouseEnter: function() {
|
|
this.get('target').send('showPane');
|
|
},
|
|
|
|
mouseLeave: function() {
|
|
this.get('target').send('hidePane');
|
|
},
|
|
|
|
actions: {
|
|
back: function() {
|
|
this.get('target').send('transitionFromBackButton');
|
|
this.set('target', null);
|
|
},
|
|
|
|
togglePinned: function() {
|
|
this.get('target').send('togglePinned');
|
|
}
|
|
}
|
|
});
|