mirror of
https://github.com/HeyPuter/puter.git
synced 2026-11-05 13:35:20 +00:00
fix(dashboard): Delete Permanently works in every language
The confirmation compared the clicked button's label with 'Delete', so in any other locale confirming did nothing. The buttons carry values now.
This commit is contained in:
1 parent
4be5a8d2c6
commit
5718f0f3dc
1 file changed
+3
-1
@@ -414,15 +414,17 @@ const generate_file_context_menu = async function (options) {
|
||||
buttons: [
|
||||
{
|
||||
label: i18n('delete'),
|
||||
value: 'delete',
|
||||
type: 'primary',
|
||||
},
|
||||
{
|
||||
label: i18n('cancel'),
|
||||
value: 'cancel',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
if ( (alert_resp) === 'Delete' ) {
|
||||
if ( alert_resp === 'delete' ) {
|
||||
await window.delete_item(el_item);
|
||||
await window.refresh_trash_state();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user