From 66797c7cb816a739dd59f3010b2ac30f3fcf937f Mon Sep 17 00:00:00 2001 From: DarkZmaj Date: Sat, 20 Dec 2025 14:25:24 +0100 Subject: [PATCH 1/7] feat: Add price filter to extension/theme browse page - Added new Price filter card with 3 options: All Prices, Free Only, Premium Only - Implemented filtering logic based on minimum platform price - Integrates seamlessly with existing search and type filters - No backend API changes required --- .../src/components/ui/browse/Filters.vue | 37 +++++++++++++++++++ apps/frontend/src/pages/browse/index.vue | 24 ++++++++++++ 2 files changed, 61 insertions(+) diff --git a/apps/frontend/src/components/ui/browse/Filters.vue b/apps/frontend/src/components/ui/browse/Filters.vue index f320946..5501ef4 100644 --- a/apps/frontend/src/components/ui/browse/Filters.vue +++ b/apps/frontend/src/components/ui/browse/Filters.vue @@ -27,6 +27,36 @@ + +
+
+ + Price +
+
+ +
+
+
-
- +
+ +
+ Free + Paid +
@@ -111,7 +110,7 @@ const props = defineProps<{ sortBy: string showExtensions: boolean showThemes: boolean - priceFilter: string + maxPrice: number } }>() @@ -120,10 +119,55 @@ const sortOptions = [ { value: 'name', label: 'Name (A-Z)' }, { value: 'created', label: 'Newest First' }, ] - -const priceOptions = [ - { value: 'all', label: 'All Prices' }, - { value: 'free', label: 'Free Only' }, - { value: 'premium', label: 'Premium Only' }, -] + + diff --git a/apps/frontend/src/pages/browse/index.vue b/apps/frontend/src/pages/browse/index.vue index 8ef587d..2b66028 100644 --- a/apps/frontend/src/pages/browse/index.vue +++ b/apps/frontend/src/pages/browse/index.vue @@ -151,7 +151,7 @@ const form = ref({ sortBy: 'popularity', showExtensions: true, showThemes: true, - priceFilter: 'all', + maxPrice: 0, }) const getMinPrice = (extension: Extension): number => { @@ -191,15 +191,12 @@ const filteredAndSortedExtensions = computed(() => { }) filtered = filtered.filter((extension) => { - switch (form.value.priceFilter) { - case 'free': - return isFree(extension) - case 'premium': - return !isFree(extension) - case 'all': - default: - return true + const minPrice = getMinPrice(extension) + if (form.value.maxPrice === 0) { + return minPrice === 0 } + // any non-zero becomes paid-only + return minPrice > 0 }) switch (form.value.sortBy) { From d8210667efcbfdf33c52c37e6ae225ec77097ffb Mon Sep 17 00:00:00 2001 From: DarkZmaj Date: Sun, 21 Dec 2025 20:52:55 +0100 Subject: [PATCH 3/7] fix: correct devProxy configuration in nuxt.config.ts Replace arrow functions with proper ProxyServerOptions objects for devProxy configuration --- apps/frontend/.env.example | 1 + apps/frontend/nuxt.config.ts | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/frontend/.env.example b/apps/frontend/.env.example index d9a0c17..ba675d4 100644 --- a/apps/frontend/.env.example +++ b/apps/frontend/.env.example @@ -1 +1,2 @@ TURNSTILE_PUBLIC=1x00000000000000000000AA +DEV_API_TARGET=http://localhost:8000 diff --git a/apps/frontend/nuxt.config.ts b/apps/frontend/nuxt.config.ts index 25af62f..ff9e48a 100644 --- a/apps/frontend/nuxt.config.ts +++ b/apps/frontend/nuxt.config.ts @@ -99,14 +99,17 @@ export default defineNuxtConfig({ name: 'Blueprint', }, nitro: { + // Allow switching dev API target via DEV_API_TARGET (https://blueprint.zip) + // Falls back to local backend when unset. devProxy: { '/api': { - // Change to https://blueprint.zip/api to use the production API - // Local API is http://localhost:8000/api - target: 'http://localhost:8000/api', + target: process.env.DEV_API_TARGET?.replace(/\/$/, '') || 'http://localhost:8000', + changeOrigin: true, + }, + '/browse/sitemap.xml': { + target: process.env.DEV_API_TARGET?.replace(/\/$/, '') || 'http://localhost:8000', changeOrigin: true, }, - '/browse/sitemap.xml': 'http://localhost:8000/browse/sitemap.xml', '/yay': 'https://blueprint.zip/yay', }, routeRules: { From 9a480d47acf8d89119c9c4f238f33a1342638ae2 Mon Sep 17 00:00:00 2001 From: DarkZmaj <110541167+darkzmaj@users.noreply.github.com> Date: Sun, 21 Dec 2025 21:01:09 +0100 Subject: [PATCH 4/7] Update apps/frontend/src/components/ui/browse/Filters.vue Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- apps/frontend/src/components/ui/browse/Filters.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/frontend/src/components/ui/browse/Filters.vue b/apps/frontend/src/components/ui/browse/Filters.vue index 764efe9..aad59b8 100644 --- a/apps/frontend/src/components/ui/browse/Filters.vue +++ b/apps/frontend/src/components/ui/browse/Filters.vue @@ -45,7 +45,7 @@ type="range" min="0" max="1000" - step="1000" + step="10" v-model.number="props.form.maxPrice" class="slider block w-full rounded-lg appearance-none cursor-pointer" /> From 2718ce3bdd1577391dbbb0689724580fb96ac06f Mon Sep 17 00:00:00 2001 From: DarkZmaj <110541167+darkzmaj@users.noreply.github.com> Date: Sun, 21 Dec 2025 21:01:17 +0100 Subject: [PATCH 5/7] Update apps/frontend/src/pages/browse/index.vue Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- apps/frontend/src/pages/browse/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/frontend/src/pages/browse/index.vue b/apps/frontend/src/pages/browse/index.vue index 2b66028..e848d41 100644 --- a/apps/frontend/src/pages/browse/index.vue +++ b/apps/frontend/src/pages/browse/index.vue @@ -195,8 +195,8 @@ const filteredAndSortedExtensions = computed(() => { if (form.value.maxPrice === 0) { return minPrice === 0 } - // any non-zero becomes paid-only - return minPrice > 0 + // any non-zero maxPrice shows all price tiers (free and paid) + return true }) switch (form.value.sortBy) { From b7af19882f296daa5c064f890a3d675074cc33f1 Mon Sep 17 00:00:00 2001 From: DarkZmaj <110541167+darkzmaj@users.noreply.github.com> Date: Sun, 21 Dec 2025 21:01:22 +0100 Subject: [PATCH 6/7] Update apps/frontend/nuxt.config.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- apps/frontend/nuxt.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/frontend/nuxt.config.ts b/apps/frontend/nuxt.config.ts index ff9e48a..61552b8 100644 --- a/apps/frontend/nuxt.config.ts +++ b/apps/frontend/nuxt.config.ts @@ -99,7 +99,7 @@ export default defineNuxtConfig({ name: 'Blueprint', }, nitro: { - // Allow switching dev API target via DEV_API_TARGET (https://blueprint.zip) + // Allow switching dev API target via DEV_API_TARGET (e.g., https://blueprint.zip) // Falls back to local backend when unset. devProxy: { '/api': { From ec27318191825f1e4dc63100b07262a3d43fdce9 Mon Sep 17 00:00:00 2001 From: DarkZmaj <110541167+darkzmaj@users.noreply.github.com> Date: Sun, 21 Dec 2025 21:15:42 +0100 Subject: [PATCH 7/7] Update apps/frontend/src/pages/browse/index.vue Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- apps/frontend/src/pages/browse/index.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/frontend/src/pages/browse/index.vue b/apps/frontend/src/pages/browse/index.vue index e848d41..c3cdf7d 100644 --- a/apps/frontend/src/pages/browse/index.vue +++ b/apps/frontend/src/pages/browse/index.vue @@ -151,6 +151,8 @@ const form = ref({ sortBy: 'popularity', showExtensions: true, showThemes: true, + // Note: Despite the name, this is used as a pricing filter flag: + // 0 = show free only, non-zero = show paid only. maxPrice: 0, })