mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Show the selected posts controls at the bottom of mobile topics too
This commit is contained in:
@@ -34,6 +34,11 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, {
|
|||||||
}
|
}
|
||||||
}.observes('model.title', 'category'),
|
}.observes('model.title', 'category'),
|
||||||
|
|
||||||
|
@computed('site.mobileView', 'model.posts_count')
|
||||||
|
showSelectedPostsAtBottom(mobileView, postsCount) {
|
||||||
|
return mobileView && (postsCount > 3);
|
||||||
|
},
|
||||||
|
|
||||||
@computed('model.postStream.posts')
|
@computed('model.postStream.posts')
|
||||||
postsToRender() {
|
postsToRender() {
|
||||||
return this.capabilities.isAndroid ? this.get('model.postStream.posts')
|
return this.capabilities.isAndroid ? this.get('model.postStream.posts')
|
||||||
|
|||||||
@@ -130,6 +130,10 @@
|
|||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if showSelectedPostsAtBottom}}
|
||||||
|
{{view "selected-posts"}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{plugin-outlet "topic-above-suggested"}}
|
{{plugin-outlet "topic-above-suggested"}}
|
||||||
|
|
||||||
{{#if model.details.suggested_topics.length}}
|
{{#if model.details.suggested_topics.length}}
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
export default Ember.View.extend({
|
export default Ember.View.extend({
|
||||||
elementId: 'selected-posts',
|
classNameBindings: ['controller.multiSelect::hidden', ':selected-posts'],
|
||||||
classNameBindings: ['customVisibility'],
|
|
||||||
templateName: "selected-posts",
|
templateName: "selected-posts",
|
||||||
|
|
||||||
customVisibility: function() {
|
|
||||||
if (!this.get('controller.multiSelect')) return 'hidden';
|
|
||||||
}.property('controller.multiSelect')
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -805,7 +805,7 @@ $topic-avatar-width: 45px;
|
|||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
#selected-posts {
|
.selected-posts {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
|
|||||||
@@ -417,9 +417,9 @@ iframe {
|
|||||||
right: 4px;
|
right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#selected-posts {
|
.selected-posts {
|
||||||
width: 97%;
|
width: 97%;
|
||||||
padding-left: 3%;
|
padding: 0.1em 0.7em;
|
||||||
background-color: srgb-scale($tertiary, $secondary, 15%);
|
background-color: srgb-scale($tertiary, $secondary, 15%);
|
||||||
.btn {
|
.btn {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
|||||||
Reference in New Issue
Block a user