toast for comments, instead of dialog #699
Massimo Melina committed
Sep 21, 2024 at 12:40 UTC
ba113081747494278076dcdd0d71c5f3497c87ca
1 file changed
+2
-2
frontend/src/fileMenu.ts
+2
-2
@@ -10,7 +10,7 @@ import { DirEntry, state } from './state'
10
import { deleteFiles } from './menu'
11
import { Link, LinkProps } from 'react-router-dom'
12
import { fileShow, getShowType } from './show'
13
-import { alertDialog, promptDialog } from './dialog'
13
+import { alertDialog, promptDialog, toast } from './dialog'
14
import { apiCall, useApi } from '@hfs/shared/api'
15
import { inputComment } from './upload'
16
import { cut } from './clip'
@@ -170,7 +170,7 @@ async function editComment(entry: DirEntry) {
170
if (res === null) return
171
await apiCall('comment', { uri: entry.uri, comment: res }, { modal: working })
172
updateEntry(entry, e => e.comment = res)
173
- alertDialog(t`Operation successful`)
173
+ toast(t`Operation successful`, 'success')
174
}
175
176
function updateEntry(entry: DirEntry, cb: (e: DirEntry) => unknown) {