Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class="main-grid"
:style="gridOffset"
>
<div v-if="!windowIsLarge && !isLocalLibraryEmpty && !deviceId">
<div v-if="!windowIsLarge && (!isLocalLibraryEmpty || deviceId)">
<KButton
icon="filter"
data-test="filter-button"
Expand Down Expand Up @@ -190,7 +190,7 @@

<!-- Side Panels for filtering and searching -->
<SidePanel
v-if="!isLocalLibraryEmpty && !deviceId"
v-if="!isLocalLibraryEmpty || deviceId"
ref="sidePanel"
data-test="side-panel"
:searchTerms="searchTerms"
Expand Down Expand Up @@ -454,8 +454,7 @@
if (
this.windowIsSmall ||
this.windowIsMedium ||
this.isLocalLibraryEmpty ||
this.deviceId
(this.isLocalLibraryEmpty && !this.deviceId)
) {
return 0;
} else if (this.windowBreakpoint < 4) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@
if (this.topic) {
return {
name: PageNames.TOPICS_TOPIC,
id: this.topic.id,
params: {
...this.$route.params,
},
};
}
return {};
Expand All @@ -91,7 +93,9 @@
delete query.dropdown;
return {
name: PageNames.TOPICS_TOPIC_SEARCH,
id: this.topic.id,
params: {
...this.$route.params,
},
query: query,
};
}
Expand Down
16 changes: 0 additions & 16 deletions kolibri/plugins/learn/assets/src/views/TopicsPage/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -424,19 +424,6 @@
{ text: this.topic.ancestors.length ? this.topic.title : this.channelTitle },
];
},
searchTabLink() {
// navigates the main page to the search view
if (this.topic) {
const query = { ...this.$route.query };
delete query.dropdown;
return {
name: PageNames.TOPICS_TOPIC_SEARCH,
id: this.topic.id,
query: query,
};
}
return {};
},
desktopSearchActive() {
return this.$route.name === PageNames.TOPICS_TOPIC_SEARCH;
},
Expand Down Expand Up @@ -609,9 +596,6 @@
return;
}
if (!isEqual(newVal, oldVal)) {
if (!isEqual(this.searchTabLink, this.$route)) {
this.$router.push({ ...this.searchTabLink }).catch(() => {});
}
this.sidePanelIsOpen = false;
}
},
Expand Down
2 changes: 1 addition & 1 deletion kolibri/utils/kolibri_whitenoise.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class StreamingStaticFile(EndRangeStaticFile):
def __init__(self, path, headers, remote_url, encodings=None, stat_cache=None):
self.path = path
self.remote_url = remote_url
super().__init__(path, headers, encodings, stat_cache)
super(StreamingStaticFile, self).__init__(path, headers, encodings, stat_cache)

@staticmethod
def get_file_stats(path, encodings, stat_cache):
Expand Down