From 60f7ec32a3c1c6b1e5fd7952904cd28edfa90a58 Mon Sep 17 00:00:00 2001 From: Matt Stover Date: Mon, 30 Sep 2024 15:44:07 -0700 Subject: [PATCH 1/3] fix: make vite load everything behind the static path in dev mode, helps fix tilt --- vite.config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vite.config.js b/vite.config.js index 033839fa22..7abd8a6143 100644 --- a/vite.config.js +++ b/vite.config.js @@ -32,6 +32,9 @@ export default defineConfig({ '**/*.bin', '**/*.wasm', ], + // Force all assets/vite calls through /static in dev mode, compiled mode is covered by the build config below + base: isProd ? '/' : '/static/', + // Use /static for all assets in prod mode build: { assetsDir: 'static', assetsInlineLimit: (filePath, content) => { From ec8b170f5265fac42b7326aa1b3da3cf7c49558d Mon Sep 17 00:00:00 2001 From: Matt Stover Date: Mon, 30 Sep 2024 15:44:35 -0700 Subject: [PATCH 2/3] fix: filter out null values from queries used on LBC --- src/pages/LoanFinding/LoanFinding.vue | 2 +- src/util/loanSearch/dataUtils.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/LoanFinding/LoanFinding.vue b/src/pages/LoanFinding/LoanFinding.vue index c230d12e7f..f20332115b 100644 --- a/src/pages/LoanFinding/LoanFinding.vue +++ b/src/pages/LoanFinding/LoanFinding.vue @@ -433,7 +433,7 @@ export default { const cachedRecommendedLoans = this.apollo.readQuery({ query: flssLoansQueryExtended, variables: prefetchedRecommendedLoansVariables - })?.fundraisingLoans?.values ?? []; + })?.fundraisingLoans?.values?.filter(loan => loan !== null) ?? []; this.initializeFiveDollarsNotes(); diff --git a/src/util/loanSearch/dataUtils.js b/src/util/loanSearch/dataUtils.js index 21a7e1f9fc..ab1b8a3261 100644 --- a/src/util/loanSearch/dataUtils.js +++ b/src/util/loanSearch/dataUtils.js @@ -50,7 +50,7 @@ export async function runLoansQuery(apollo, loanSearchState, origin) { origin, ); - return { loans: flssData?.values ?? [], totalCount: flssData?.totalCount ?? 0 }; + return { loans: flssData?.values?.filter(loan => loan !== null) ?? [], totalCount: flssData?.totalCount ?? 0 }; } /** From f02626d86c0babf88ed5f822fcd83c10aa81aafb Mon Sep 17 00:00:00 2001 From: Matt Stover Date: Mon, 30 Sep 2024 15:45:26 -0700 Subject: [PATCH 3/3] fix: set inital input value in legacy KvRadio component, remove unused watch in autolending status --- src/components/Kv/KvRadio.vue | 12 +++++++++++- src/pages/Autolending/AutolendingStatus.vue | 8 -------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/components/Kv/KvRadio.vue b/src/components/Kv/KvRadio.vue index 51cf30467a..937fc15195 100644 --- a/src/components/Kv/KvRadio.vue +++ b/src/components/Kv/KvRadio.vue @@ -47,7 +47,17 @@ export default { isChecked() { return this.radioValue === this.modelValue; } - } + }, + watch: { + modelValue: { + immediate: true, + handler(value) { + if (value !== this.inputValue) { + this.inputValue = value; + } + } + }, + }, }; diff --git a/src/pages/Autolending/AutolendingStatus.vue b/src/pages/Autolending/AutolendingStatus.vue index f62e81d536..922d3fdab1 100644 --- a/src/pages/Autolending/AutolendingStatus.vue +++ b/src/pages/Autolending/AutolendingStatus.vue @@ -151,14 +151,6 @@ export default { mounted() { // After initial value is loaded, setup watch this.$watch('autolendingStatus', this.watchAutolendingStatus); - this.$watch('showLightbox', next => { - if (next) { - this.autolendingStatus = this.setAutolendingStatus({ - isEnabled: this.isEnabled, - pauseUntil: this.pauseUntil - }); - } - }); }, methods: { watchAutolendingStatus() {