From a1b45cb721b42cb0f12fdc2986e90659f573c041 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Fri, 15 Mar 2024 00:08:24 +0100 Subject: [PATCH] Added filterable stash pages. --- .babelrc | 5 +- assets/img/icons/archive.svg | 5 + assets/img/icons/box.svg | 5 + assets/img/icons/cabinet.svg | 7 + assets/img/icons/drawer3.svg | 5 + assets/img/icons/folder-open.svg | 5 + assets/img/icons/folder-open2.svg | 5 + assets/img/icons/folder.svg | 5 + assets/img/icons/folder2.svg | 5 + assets/img/icons/folder5.svg | 5 + assets/img/icons/hipster.svg | 7 + assets/img/icons/hipster2.svg | 5 + assets/img/icons/hour-glass.svg | 5 + assets/img/icons/hour-glass2.svg | 5 + assets/img/icons/hour-glass3.svg | 5 + assets/img/icons/mustache2.svg | 5 + components/scenes/scenes.vue | 2 + components/scenes/tile.vue | 15 +- config/default.cjs | 1 + package-lock.json | 282 + package.json | 5 + pages/stashes/@username/+Page.vue | 91 + pages/stashes/@username/+onBeforeRender.js | 51 + pages/stashes/@username/+route.js | 23 + src/auth.js | 25 +- src/knex.js | 13 + src/manticore.js | 2 + src/scenes.js | 204 +- src/stashes.js | 110 +- src/tools/manticore-joins.js | 82 + src/tools/manticore-scenes.js | 203 + src/tools/movies.json | 648028 ++++++++++++++++++ src/users.js | 10 +- src/users/curate.js | 21 + src/utils/chunk.js | 4 + src/web/auth.js | 30 +- src/web/scenes.js | 1 + src/web/server.js | 9 +- src/web/stashes.js | 2 +- 39 files changed, 649218 insertions(+), 80 deletions(-) create mode 100644 assets/img/icons/archive.svg create mode 100644 assets/img/icons/box.svg create mode 100644 assets/img/icons/cabinet.svg create mode 100644 assets/img/icons/drawer3.svg create mode 100644 assets/img/icons/folder-open.svg create mode 100644 assets/img/icons/folder-open2.svg create mode 100644 assets/img/icons/folder.svg create mode 100644 assets/img/icons/folder2.svg create mode 100644 assets/img/icons/folder5.svg create mode 100644 assets/img/icons/hipster.svg create mode 100644 assets/img/icons/hipster2.svg create mode 100644 assets/img/icons/hour-glass.svg create mode 100644 assets/img/icons/hour-glass2.svg create mode 100644 assets/img/icons/hour-glass3.svg create mode 100644 assets/img/icons/mustache2.svg create mode 100644 pages/stashes/@username/+Page.vue create mode 100644 pages/stashes/@username/+onBeforeRender.js create mode 100644 pages/stashes/@username/+route.js create mode 100644 src/tools/manticore-joins.js create mode 100644 src/tools/manticore-scenes.js create mode 100644 src/tools/movies.json create mode 100644 src/users/curate.js create mode 100755 src/utils/chunk.js diff --git a/.babelrc b/.babelrc index 6c3ba4c..c2b8443 100755 --- a/.babelrc +++ b/.babelrc @@ -4,5 +4,8 @@ "@babel/preset-env" ] ], - "plugins": ["@babel/plugin-transform-optional-chaining"], + "plugins": [ + "@babel/plugin-transform-optional-chaining", + "@babel/plugin-syntax-import-attributes" + ], } diff --git a/assets/img/icons/archive.svg b/assets/img/icons/archive.svg new file mode 100644 index 0000000..c683aac --- /dev/null +++ b/assets/img/icons/archive.svg @@ -0,0 +1,5 @@ + + +archive + + diff --git a/assets/img/icons/box.svg b/assets/img/icons/box.svg new file mode 100644 index 0000000..eaa0c6e --- /dev/null +++ b/assets/img/icons/box.svg @@ -0,0 +1,5 @@ + + +box + + diff --git a/assets/img/icons/cabinet.svg b/assets/img/icons/cabinet.svg new file mode 100644 index 0000000..b21108d --- /dev/null +++ b/assets/img/icons/cabinet.svg @@ -0,0 +1,7 @@ + + +cabinet + + + + diff --git a/assets/img/icons/drawer3.svg b/assets/img/icons/drawer3.svg new file mode 100644 index 0000000..50ae0a5 --- /dev/null +++ b/assets/img/icons/drawer3.svg @@ -0,0 +1,5 @@ + + +drawer3 + + diff --git a/assets/img/icons/folder-open.svg b/assets/img/icons/folder-open.svg new file mode 100644 index 0000000..5903222 --- /dev/null +++ b/assets/img/icons/folder-open.svg @@ -0,0 +1,5 @@ + + +folder-open + + diff --git a/assets/img/icons/folder-open2.svg b/assets/img/icons/folder-open2.svg new file mode 100644 index 0000000..39a8392 --- /dev/null +++ b/assets/img/icons/folder-open2.svg @@ -0,0 +1,5 @@ + + +folder-open2 + + diff --git a/assets/img/icons/folder.svg b/assets/img/icons/folder.svg new file mode 100644 index 0000000..26b8315 --- /dev/null +++ b/assets/img/icons/folder.svg @@ -0,0 +1,5 @@ + + +folder + + diff --git a/assets/img/icons/folder2.svg b/assets/img/icons/folder2.svg new file mode 100644 index 0000000..db145db --- /dev/null +++ b/assets/img/icons/folder2.svg @@ -0,0 +1,5 @@ + + +folder2 + + diff --git a/assets/img/icons/folder5.svg b/assets/img/icons/folder5.svg new file mode 100644 index 0000000..91f26b2 --- /dev/null +++ b/assets/img/icons/folder5.svg @@ -0,0 +1,5 @@ + + +folder5 + + diff --git a/assets/img/icons/hipster.svg b/assets/img/icons/hipster.svg new file mode 100644 index 0000000..461d4f5 --- /dev/null +++ b/assets/img/icons/hipster.svg @@ -0,0 +1,7 @@ + + +hipster + + + + diff --git a/assets/img/icons/hipster2.svg b/assets/img/icons/hipster2.svg new file mode 100644 index 0000000..887763f --- /dev/null +++ b/assets/img/icons/hipster2.svg @@ -0,0 +1,5 @@ + + +hipster2 + + diff --git a/assets/img/icons/hour-glass.svg b/assets/img/icons/hour-glass.svg new file mode 100644 index 0000000..d883f61 --- /dev/null +++ b/assets/img/icons/hour-glass.svg @@ -0,0 +1,5 @@ + + +hour-glass + + diff --git a/assets/img/icons/hour-glass2.svg b/assets/img/icons/hour-glass2.svg new file mode 100644 index 0000000..a78ece4 --- /dev/null +++ b/assets/img/icons/hour-glass2.svg @@ -0,0 +1,5 @@ + + +hour-glass2 + + diff --git a/assets/img/icons/hour-glass3.svg b/assets/img/icons/hour-glass3.svg new file mode 100644 index 0000000..3c1f223 --- /dev/null +++ b/assets/img/icons/hour-glass3.svg @@ -0,0 +1,5 @@ + + +hour-glass3 + + diff --git a/assets/img/icons/mustache2.svg b/assets/img/icons/mustache2.svg new file mode 100644 index 0000000..3100c7d --- /dev/null +++ b/assets/img/icons/mustache2.svg @@ -0,0 +1,5 @@ + + +mustache2 + + diff --git a/components/scenes/scenes.vue b/components/scenes/scenes.vue index b77650d..c539e38 100644 --- a/components/scenes/scenes.vue +++ b/components/scenes/scenes.vue @@ -147,6 +147,7 @@ const { actor: pageActor, tag: pageTag, entity: pageEntity, + stash: pageStash, } = pageProps; const scenes = ref(pageProps.scenes); @@ -229,6 +230,7 @@ async function search(options = {}) { ...query, actors: [pageActor, ...filters.value.actors].filter(Boolean).map((filterActor) => getActorIdentifier(filterActor)).join(','), // if we're on an actor page, that actor ID needs to be included tags: [pageTag?.slug, ...filters.value.tags].filter(Boolean).join(','), + stashId: pageStash?.id, e: entitySlug, scope: scope.value, page: currentPage.value, // client uses param rather than query pagination diff --git a/components/scenes/tile.vue b/components/scenes/tile.vue index 98259ac..0d53b2b 100644 --- a/components/scenes/tile.vue +++ b/components/scenes/tile.vue @@ -1,5 +1,10 @@