@@ -3,7 +3,6 @@ import FileDropzone from 'ember-file-upload/components/file-dropzone';
3
3
import fileQueue from ' ember-file-upload/helpers/file-queue' ;
4
4
import { t } from ' ember-intl' ;
5
5
import Avatar from ' ../../../avatar' ;
6
- import Instructions from ' ./instructions' ;
7
6
import { action } from ' @ember/object' ;
8
7
import { on } from ' @ember/modifier' ;
9
8
import { Button } from ' @frontile/buttons' ;
@@ -19,36 +18,40 @@ export default class OpenToFilesUpload extends Component {
19
18
{{#let ( fileQueue onFileAdded =this . uploadPhoto) as | queue | }}
20
19
<FileDropzone @ queue ={{queue }} class =' ' as | dropzone | >
21
20
22
- {{#if dropzone.active }}
23
- <Instructions >
24
- <span
25
- class =' text-xl font-black shadow-md text-white bg-gradient-to-r from-indigo-500 from-10% via-sky-500 via-30% to-emerald-500 to-90% px-6 py-2 rounded-lg'
26
- >
27
- {{t ' drag-and-drop.drop-now' }}
28
- </span >
29
- </Instructions >
30
- {{else }}
31
- <div class =' relative w-full aspect-square' >
32
- <div class =' absolute top-0 left-0 w-full aspect-square' >
33
- <Avatar
34
- class =' border-dashed border-4 border-slate-400'
35
- @ file =' /images/unicorn.webp'
36
- />
37
- </div >
21
+ <div class =' relative w-full aspect-square' >
22
+ <div class =' absolute top-0 left-0 w-full aspect-square' >
23
+ <Avatar
24
+ class =' border-dashed border-4
25
+ {{if dropzone.active " border-emerald-500" " border-slate-400" }} '
26
+ @ file =' /images/unicorn.webp'
27
+ />
28
+ </div >
38
29
39
- <Instructions >
40
- <Button @ intent =' primary' {{on ' click' this . toggleFileSelector}} >
30
+ <div
31
+ class =' relative top-0 left-0 w-full aspect-square text-center flex justify-center items-center'
32
+ >
33
+ <Button
34
+ @ intent =' primary'
35
+ {{on ' click' this . toggleFileSelector}}
36
+ class =' {{if
37
+ dropzone.active
38
+ " bg-gradient-to-r from-indigo-500 from-10% via-sky-500 via-30% to-emerald-500 to-90%"
39
+ }} '
40
+ >
41
+ {{#if dropzone.active }}
42
+ {{t ' drag-and-drop.drop-now' }}
43
+ {{else }}
41
44
{{t ' drag-and-drop.instructions' }}
42
45
<input
43
46
id =' file-input'
44
47
type =' file'
45
48
{{queue.selectFile }}
46
49
class =' hidden'
47
50
/>
48
- </ Button >
49
- </Instructions >
51
+ {{/ if }}
52
+ </Button >
50
53
</div >
51
- {{/ if }}
54
+ </ div >
52
55
</FileDropzone >
53
56
{{/let }}
54
57
</template >
0 commit comments