From 13e9bee16cfd40414e0f072e761d4e4232a03353 Mon Sep 17 00:00:00 2001 From: retoor Date: Thu, 11 Jun 2026 15:04:01 +0200 Subject: [PATCH] Update --- 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 @@
- +