Changeset b50a885 in Klonkt


Ignore:
Timestamp:
06/15/2026 01:06:49 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
f45fc82
Parents:
cb6b1ad
Message:

fix: cover URL field accepts relative /media/ paths (type=url -> text)

<input type='url'> required an absolute URL, but uploads return a relative
path (/media/post-images/...). This caused saving to fail with 'Please enter
a URL'. Now type=text (inputmode=url) — accepts both /media/... and https://...
Same fix in the track editor cover URL.

Co-Authored-By: Claude <noreply@…>

Location:
src/views
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/post-edit.ejs

    rcb6b1ad rb50a885  
    4848          <label class="pe-field">
    4949            <span>Cover URL</span>
    50             <input type="url" name="cover_image_url" id="cover-url-field"
     50            <input type="text" name="cover_image_url" id="cover-url-field"
    5151                   value="<%= post.cover_image_url || '' %>"
    52                    placeholder="https://…  of upload met de knop">
     52                   inputmode="url" autocapitalize="none" spellcheck="false"
     53                   placeholder="/media/…  of https://…  (of upload met de knop)">
    5354          </label>
    5455          <div class="pe-cover-upload">
  • src/views/partials/track-editor.ejs

    rcb6b1ad rb50a885  
    407407                    </button>` : ''}
    408408                  </div>
    409                   <input type="url" id="te-cover-url"
    410                          placeholder="of plak URL: https://…"
     409                  <input type="text" id="te-cover-url" inputmode="url"
     410                         placeholder="/media/… of https://…"
    411411                         autocomplete="off" autocapitalize="none" spellcheck="false"
    412412                         value="${esc(track.cover_url || '')}">
Note: See TracChangeset for help on using the changeset viewer.