major changes:

- introduce flask cache
- use replaceAll together with encodeURI component on client
- many more
This commit is contained in:
geoffrey45
2021-12-19 13:27:37 +03:00
parent 831b8e7ee2
commit 7e67b819f0
8 changed files with 78 additions and 43 deletions
+1 -4
View File
@@ -21,10 +21,7 @@
<script>
export default {
props: ["folders"],
setup() {
console.log("props.folders");
},
props: ["folders"]
};
</script>
+2 -2
View File
@@ -45,7 +45,7 @@
</div>
</router-link>
<hr />
<router-link :to="{ name: 'FolderView', params: { path: ' ' } }">
<router-link :to="{ name: 'FolderView', params: { path: '$home' } }">
<div class="nav-button" id="folders-button">
<div class="in">
<div class="nav-icon image" id="folders-icon"></div>
@@ -54,7 +54,7 @@
</div>
</router-link>
<hr />
<router-link :to="{ name: 'FolderView', params: { path: ' ' } }">
<router-link :to="{ name: 'FolderView', params: { path: '$home' } }">
<div class="nav-button" id="folders-button">
<div class="in">
<div class="nav-icon image" id="settings-icon"></div>
+4 -2
View File
@@ -6,11 +6,13 @@ const getData = async (path, last_id) => {
let url;
const songs = ref(null);
const folders = ref(null);
path = encodeURIComponent(path.replaceAll("/", "|"));
if (last_id) {
url = `${folders_uri}/?f=${path}&last_id=${last_id}`;
url = `${folders_uri}/f/${path}::${last_id}`;
} else {
url = url = `${folders_uri}/?f=${path}`;
url = url = `${folders_uri}/f/${path}`;
}
const res = await fetch(url);
+1 -1
View File
@@ -59,7 +59,7 @@ export default {
watch(route, (new_route) => {
path.value = new_route.params.path;
getPathFolders(encodeURI(path.value));
getPathFolders(path.value);
});
scrollable.value.onscroll = () => {