Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions reposilite-frontend/src/components/browser/FileUpload.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,4 +216,13 @@ describe('FileUpload keyboard access', () => {

expect(hiddenInput().tabIndex, 'the input must not take a focus stop without a visible focus ring').toBe(-1)
})

it('stretches the drop zone over the full width through a utility class', async () => {
await mountUpload()

const zone = wrapper!.find('.file-uploads')

expect(zone.exists(), 'the library renders the drop zone root').toBe(true)
expect(zone.classes(), 'the width comes from a utility, not from a global style block').toContain('w-full')
})
})
8 changes: 1 addition & 7 deletions reposilite-frontend/src/components/browser/FileUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ const uploadFiles = () => {
<FileUpload
ref="upload"
v-model="files"
class="mt-3 block cursor-pointer rounded-corner-large border border-dashed border-outline bg-surface-container-low px-6 py-8 text-center transition-colors duration-(--md-sys-motion-duration-short3) hover:bg-surface-container-high"
class="mt-3 block w-full cursor-pointer rounded-corner-large border border-dashed border-outline bg-surface-container-low px-6 py-8 text-center transition-colors duration-(--md-sys-motion-duration-short3) hover:bg-surface-container-high"
post-action="/upload/post"
:multiple="true"
:drop="true"
Expand Down Expand Up @@ -319,9 +319,3 @@ const uploadFiles = () => {
</div>
</section>
</template>

<style>
.file-uploads {
display: block !important;
}
</style>
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
[
{
"file": "src/components/browser/FileUpload.vue",
"match": ".file-uploads",
"count": 1
},
{
"file": "src/helpers/useTreeFits.ts",
"match": ".settings-save-bar",
Expand Down
5 changes: 0 additions & 5 deletions reposilite-frontend/src/style-gate/baseline/style-block.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
[
{
"file": "src/components/browser/FileUpload.vue",
"match": "<style",
"count": 1
},
{
"file": "src/components/renderers/ObjectRenderer.vue",
"match": "<style",
Expand Down
Loading