Skip to content

Commit d4b7e8f

Browse files
committed
fix: Make it so that it's possible to upload multiple images
1 parent 6033b41 commit d4b7e8f

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

app/components/open-to/files/index.gjs

+10-8
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,26 @@ import OpenToFilesPreview from 'open-to-dot-dot-dot/components/open-to/files/pre
44
import fileQueue from 'ember-file-upload/helpers/file-queue';
55
import OpenToFilesUpload from 'open-to-dot-dot-dot/components/open-to/files/upload';
66
import { t } from 'ember-intl';
7+
import { notEq } from 'ember-truth-helpers';
78

89
export default class OpenToFiles extends Component {
910
<template>
1011
{{#let (fileQueue onFileAdded=this.uploadPhoto) as |queue|}}
11-
<ul role='list' class='grid grid-cols-1 gap-x-4 gap-y-8 sm:gap-x-6'>
12+
<ul
13+
role='list'
14+
class='grid grid-cols-1 gap-x-4 gap-y-8 sm:gap-x-6
15+
{{if (notEq queue.files.length 0) "sm:grid-cols-2"}}'
16+
>
17+
<li>
18+
<OpenToFilesUpload />
19+
</li>
20+
1221
{{#each queue.files as |file|}}
1322
<li>
1423
<div class='mx-auto w-full aspect-square relative'>
1524
<OpenToFilesPreview @file={{file}} />
1625
</div>
1726
</li>
18-
{{else}}
19-
<li>
20-
<div class='mx-auto w-full aspect-square relative'>
21-
<OpenToFilesUpload />
22-
</div>
23-
</li>
24-
2527
{{/each}}
2628
</ul>
2729
{{/let}}

translations/en-us.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ application:
22
name: '#OpenTo...'
33
subtitle: LinkedIn avatar generator
44
drag-and-drop:
5-
instructions: Drop your image here
5+
instructions: Drop your images here
66
drop-now: Drop it!
77
toggles:
88
text: Text

0 commit comments

Comments
 (0)