summaryrefslogtreecommitdiffstats
path: root/client/components/sidebar/sidebar.js
diff options
context:
space:
mode:
authorLiming Xie <liming.xie@gmail.com>2015-12-17 14:23:35 +0800
committerLiming Xie <liming.xie@gmail.com>2015-12-17 14:23:35 +0800
commit354eff9f7bf550f83d55ef2e96b10aab1a70162d (patch)
tree34cba5531d56d4ca51ed5346a5f26e480c4a33c7 /client/components/sidebar/sidebar.js
parent0954cff5b470712210275a9c0699d85d6579ab54 (diff)
downloadwekan-354eff9f7bf550f83d55ef2e96b10aab1a70162d.tar.gz
wekan-354eff9f7bf550f83d55ef2e96b10aab1a70162d.tar.bz2
wekan-354eff9f7bf550f83d55ef2e96b10aab1a70162d.zip
add: support compact mode for mobile web, auto adapt to small screen/window
Diffstat (limited to 'client/components/sidebar/sidebar.js')
-rw-r--r--client/components/sidebar/sidebar.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/client/components/sidebar/sidebar.js b/client/components/sidebar/sidebar.js
index ec3ebcf6..4bb53d4d 100644
--- a/client/components/sidebar/sidebar.js
+++ b/client/components/sidebar/sidebar.js
@@ -18,7 +18,8 @@ BlazeComponent.extendComponent({
},
onCreated() {
- this._isOpen = new ReactiveVar(!Session.get('currentCard'));
+ const initOpen = Utils.isMiniScreen() ? false : (!Session.get('currentCard'));
+ this._isOpen = new ReactiveVar(initOpen);
this._view = new ReactiveVar(defaultView);
Sidebar = this;
},
@@ -96,6 +97,7 @@ BlazeComponent.extendComponent({
// XXX Hacky, we need some kind of `super`
const mixinEvents = this.getMixin(Mixins.InfiniteScrolling).events();
return [...mixinEvents, {
+ 'click .js-hide-sidebar': this.hide,
'click .js-toggle-sidebar': this.toggle,
'click .js-back-home': this.setView,
}];