File tree Expand file tree Collapse file tree 2 files changed +40
-3
lines changed
src/routes/(console)/project-[region]-[project]/storage/bucket-[bucket] Expand file tree Collapse file tree 2 files changed +40
-3
lines changed Original file line number Diff line number Diff line change 169
169
</Table .Cell >
170
170
<Table .Cell column ="actions" {root }>
171
171
<Popover let:toggle placement =" bottom-start" padding =" none" >
172
- <Button text icon ariaLabel ="more options" on:click ={toggle }>
172
+ <Button
173
+ text
174
+ icon
175
+ ariaLabel =" more options"
176
+ on:click ={(e ) => {
177
+ e .stopPropagation ();
178
+ e .preventDefault ();
179
+ toggle ();
180
+ }}>
173
181
<Icon icon ={IconDotsHorizontal } size =" s" />
174
182
</Button >
175
183
<ActionMenu .Root slot =" tooltip" >
178
186
</ActionMenu .Item .Anchor >
179
187
<ActionMenu .Item .Button
180
188
leadingIcon ={IconTrash }
181
- on:click ={() => {
189
+ on:click ={(e ) => {
190
+ e .stopPropagation ();
191
+ e .preventDefault ();
182
192
selectedFile = file ;
183
193
showDelete = true ;
184
194
}}>
Original file line number Diff line number Diff line change 6
6
import { createEventDispatcher } from ' svelte' ;
7
7
import { page } from ' $app/state' ;
8
8
import type { Models } from ' @appwrite.io/console' ;
9
+ import { calculateSize } from ' $lib/helpers/sizeConvertion' ;
10
+ import { Typography , Layout } from ' @appwrite.io/pink-svelte' ;
9
11
10
12
export let file: Models .File ;
11
13
export let showDelete = false ;
32
34
</script >
33
35
34
36
<Confirm {onSubmit } title ="Delete file" bind:open ={showDelete } bind:error >
35
- Are you sure you want to delete <b >{file .name }</b >?
37
+ <Layout .Stack gap =" l" >
38
+ <Typography .Text variant =" m-400" >
39
+ Are you sure you want to delete the following file?
40
+ </Typography .Text >
41
+
42
+ <div
43
+ class =" u-flex u-flex-wrap u-gap-8 u-main-space-between u-cross-center u-padding-16 u-border u-radius" >
44
+ <Layout .Stack gap =" xs" >
45
+ <Typography .Text variant ="m-600" data-private >{file .name }</Typography .Text >
46
+ <Layout .Stack direction =" row" gap =" s" alignItems =" center" >
47
+ <Typography .Text variant =" m-400" class =" u-color-text-secondary" >
48
+ {file .mimeType }
49
+ </Typography .Text >
50
+ <span class =" u-color-text-secondary" >•</span >
51
+ <Typography .Text variant =" m-400" class =" u-color-text-secondary" >
52
+ {calculateSize (file .sizeOriginal )}
53
+ </Typography .Text >
54
+ </Layout .Stack >
55
+ </Layout .Stack >
56
+ </div >
57
+
58
+ <Typography .Text variant =" m-400" class =" u-color-text-secondary" >
59
+ This action cannot be undone. The file will be permanently deleted from your storage
60
+ bucket.
61
+ </Typography .Text >
62
+ </Layout .Stack >
36
63
</Confirm >
You can’t perform that action at this time.
0 commit comments