diff --git a/frontend/resources/locales.json b/frontend/resources/locales.json index eeba81af1..753e770a1 100644 --- a/frontend/resources/locales.json +++ b/frontend/resources/locales.json @@ -729,6 +729,48 @@ }, "used-in" : [ "src/app/main/ui/dashboard/grid.cljs" ] }, + "dashboard.success-delete-project" : { + "translations" : { + "en" : "Your project has been deleted successfully", + "es" : "Tu proyecto ha sido borrado con éxito" + }, + "used-in" : [ "src/app/main/ui/dashboard/project_menu.cljs" ] + }, + "dashboard.success-delete-file" : { + "translations" : { + "en" : "Your file has been deleted successfully", + "es" : "Tu archivo ha sido borrado con éxito" + }, + "used-in" : [ "src/app/main/ui/dashboard/file_menu.cljs" ] + }, + "dashboard.success-duplicate-project" : { + "translations" : { + "en" : "Your project has been duplicated successfully", + "es" : "Tu proyecto ha sido duplicado con éxito" + }, + "used-in" : [ "src/app/main/ui/dashboard/project_menu.cljs" ] + }, + "dashboard.success-duplicate-file" : { + "translations" : { + "en" : "Your file has been duplicated successfully", + "es" : "Tu archivo ha sido duplicado con éxito" + }, + "used-in" : [ "src/app/main/ui/dashboard/file_menu.cljs" ] + }, + "dashboard.success-move-project" : { + "translations" : { + "en" : "Your project has been moved successfully", + "es" : "Tu proyecto ha sido movido con éxito" + }, + "used-in" : [ "src/app/main/ui/dashboard/project_menu.cljs" ] + }, + "dashboard.success-move-file" : { + "translations" : { + "en" : "Your file has been moved successfully", + "es" : "Tu archivo ha sido movido con éxito" + }, + "used-in" : [ "src/app/main/ui/dashboard/file_menu.cljs" ] + }, "dashboard.switch-team" : { "translations" : { "ca" : "Cambiar d'equip", @@ -1006,7 +1048,7 @@ "translations" : { "ca" : "Sembla que el contingut de la imatge no coincideix amb l'extensió del arxiu", "en" : "Seems that the contents of the image does not match the file extension.", - "es" : "Parece que el contenido de la imagen no coincide con la etensión del archivo.", + "es" : "Parece que el contenido de la imagen no coincide con la extensión del archivo.", "fr" : "Il semble que le contenu de l’image ne correspond pas à l’extension de fichier.", "ru" : "", "zh_cn" : "图片内容好像与文档扩展名不匹配。" diff --git a/frontend/src/app/main/ui/dashboard/file_menu.cljs b/frontend/src/app/main/ui/dashboard/file_menu.cljs index e559fd236..740c89f82 100644 --- a/frontend/src/app/main/ui/dashboard/file_menu.cljs +++ b/frontend/src/app/main/ui/dashboard/file_menu.cljs @@ -10,6 +10,7 @@ (ns app.main.ui.dashboard.file-menu (:require [app.main.data.dashboard :as dd] + [app.main.data.messages :as dm] [app.main.data.modal :as modal] [app.main.repo :as rp] [app.main.store :as st] @@ -48,12 +49,14 @@ on-duplicate (mf/use-callback (mf/deps file) - (st/emitf (dd/duplicate-file file))) + (st/emitf (dm/success (tr "dashboard.success-duplicate-file")) + (dd/duplicate-file file))) delete-fn (mf/use-callback (mf/deps file) - (st/emitf (dd/delete-file file))) + (st/emitf (dm/success (tr "dashboard.success-delete-file")) + (dd/delete-file file))) on-delete (mf/use-callback @@ -75,7 +78,8 @@ :project-id project-id} mdata {:on-success - (st/emitf (rt/nav :dashboard-files + (st/emitf (dm/success (tr "dashboard.success-move-file")) + (rt/nav :dashboard-files {:team-id team-id :project-id project-id}))}] diff --git a/frontend/src/app/main/ui/dashboard/project_menu.cljs b/frontend/src/app/main/ui/dashboard/project_menu.cljs index b319dca85..b6c8fc6bf 100644 --- a/frontend/src/app/main/ui/dashboard/project_menu.cljs +++ b/frontend/src/app/main/ui/dashboard/project_menu.cljs @@ -10,6 +10,7 @@ (ns app.main.ui.dashboard.project-menu (:require [app.main.data.dashboard :as dd] + [app.main.data.messages :as dm] [app.main.data.modal :as modal] [app.main.repo :as rp] [app.main.store :as st] @@ -37,7 +38,8 @@ (mf/deps project) #(let [on-success (fn [new-project] - (st/emit! (rt/nav :dashboard-files + (st/emit! (dm/success (tr "dashboard.success-duplicate-project")) + (rt/nav :dashboard-files {:team-id (:team-id new-project) :project-id (:id new-project)})))] (st/emit! (dd/duplicate-project @@ -59,13 +61,15 @@ (st/emitf (rt/nav :dashboard-projects {:team-id team-id}))}] - (st/emitf (dd/move-project (with-meta data mdata)))))) + (st/emitf (dm/success (tr "dashboard.success-move-project")) + (dd/move-project (with-meta data mdata)))))) delete-fn (mf/use-callback (mf/deps project) (fn [event] - (st/emit! (dd/delete-project project) + (st/emit! (dm/success (tr "dashboard.success-delete-project")) + (dd/delete-project project) (rt/nav :dashboard-projects {:team-id (:team-id project)})))) on-delete