Skip to content

Commit

Permalink
💄 use relative units instead of pixels with uppy
Browse files Browse the repository at this point in the history
this might be a bit of a hack, but it works, and alas uppy styling is a nightmare anyhow
  • Loading branch information
krmax44 authored and pajowu committed Nov 12, 2024
1 parent c9507bb commit f0e317d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions frontend/javascript/components/upload/file-uploader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
:key="upload"
type="hidden"
:name="name"
:value="upload" />
:value="upload"
/>
<input
v-if="!canSubmit"
type="hidden"
name="upload-pending"
value=""
required />
required
/>
</template>
</div>
</template>
Expand Down Expand Up @@ -125,12 +127,8 @@ export default {
theme: document.documentElement.getAttribute('data-bs-theme') || 'light',
inline: true,
target: this.$refs.uppy,
// width is given in pixels and set to uppy-Dashboard.inner's inline style
// but also limited by max-width:100%, hence we can set it to a high enough
// number (here a bootstrap upper bound; default is 750),
// and it will appear like 100%, and thus always centered
width: 1320,
height: 250,
width: '100%',
height: '16rem',
showLinkToFileUploadResult: false,
proudlyDisplayPoweredByUppy: false,
showRemoveButtonAfterComplete: this.allowRemove,
Expand Down

0 comments on commit f0e317d

Please sign in to comment.