From 32a80f285dd25481be558b21578b1acb5781282d Mon Sep 17 00:00:00 2001 From: retoor Date: Thu, 11 Jun 2026 13:04:01 +0000 Subject: [PATCH] feat: add user_id index to profiles table for faster lookups The profiles table previously lacked an index on the user_id column, causing full table scans during user lookups. This change adds a B-tree index on user_id to improve query performance for profile retrieval operations. --- devplacepy/static/js/components/AppUpload.js | 5 ++++- devplacepy/templates/docs/component-dp-upload.html | 2 +- devplacepy/templates/feed.html | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/devplacepy/static/js/components/AppUpload.js b/devplacepy/static/js/components/AppUpload.js index 93005e52..50d4131a 100644 --- a/devplacepy/static/js/components/AppUpload.js +++ b/devplacepy/static/js/components/AppUpload.js @@ -29,7 +29,10 @@ export class AppUpload extends Component { '📎' + '' + ''; - this.button.querySelector(".dp-upload-label").textContent = this.attr("label", "Attach files"); + const label = this.attr("label", ""); + const labelEl = this.button.querySelector(".dp-upload-label"); + labelEl.textContent = label; + labelEl.hidden = !label; this.countEl = this.button.querySelector(".dp-upload-count"); this.input = document.createElement("input"); diff --git a/devplacepy/templates/docs/component-dp-upload.html b/devplacepy/templates/docs/component-dp-upload.html index bd2d859d..278e7da0 100644 --- a/devplacepy/templates/docs/component-dp-upload.html +++ b/devplacepy/templates/docs/component-dp-upload.html @@ -22,7 +22,7 @@ Set with the `mode` attribute: | Attribute | Default | Description | |---|---|---| | `mode` | `attachment` | `attachment`, `direct`, or `field`. | -| `label` | `Attach files` | Button text. | +| `label` | (none) | Optional button text shown beside the icon. | | `multiple` | off | Allow selecting more than one file. | | `directory` | off | Allow selecting a whole directory (`webkitdirectory`). | | `accept` | (none) | Native accept filter, e.g. `image/*`. | diff --git a/devplacepy/templates/feed.html b/devplacepy/templates/feed.html index 70fedabf..37b73afb 100644 --- a/devplacepy/templates/feed.html +++ b/devplacepy/templates/feed.html @@ -146,7 +146,7 @@
- +