@brizy/media-gallery
Version:
73 lines (72 loc) • 2.54 kB
JavaScript
import * as Notifications from "../../containers/GlobalNotifications/types/Actions";
export var notificationKeyPrefix = "project:mediaLibrary:queryError:";
export var fetchError = function(t) {
return Notifications.add({
key: "".concat(notificationKeyPrefix, "loadError"),
type: "error",
message: t("Unable to fetch data")
});
};
export var uploadError = function(t, isMultiple) {
return Notifications.add({
key: "".concat(notificationKeyPrefix, "uploadError"),
type: "error",
message: isMultiple ? t("Unable to upload files") : t("Unable to upload file")
});
};
export var uploadErrorSome = function(t, isMultiple) {
return Notifications.add({
key: "".concat(notificationKeyPrefix, "uploadErrorSome"),
type: "error",
message: isMultiple ? t("Some files could not be uploaded") : t("Some file could not be uploaded")
});
};
export var uploadErrorMaxFiles = function(t) {
return Notifications.add({
key: "".concat(notificationKeyPrefix, "uploadErrorMaxFiles"),
type: "error",
message: t("Please upload maximum 10 files at a time")
});
};
export var removeError = function(t, isMultiple) {
return Notifications.add({
key: "".concat(notificationKeyPrefix, "removeError"),
type: "error",
message: isMultiple ? t("Unable to remove files") : t("Unable to remove file")
});
};
export var updateError = function(t) {
return Notifications.add({
key: "".concat(notificationKeyPrefix, "updateError"),
type: "error",
message: t("Unable to update file")
});
};
export var uploadSuccess = function(t, isMultiple) {
return Notifications.add({
key: "".concat(notificationKeyPrefix, "uploadSuccess"),
type: "success",
message: isMultiple ? t("Files uploaded") : t("File uploaded")
});
};
export var removeSuccess = function(t, isMultiple) {
return Notifications.add({
key: "".concat(notificationKeyPrefix, "removeSuccess"),
type: "success",
message: isMultiple ? t("Files removed") : t("File removed")
});
};
export var updateSuccess = function(t) {
return Notifications.add({
key: "".concat(notificationKeyPrefix, "updateSuccess"),
type: "success",
message: t("File updated")
});
};
export var copy = function(t) {
return Notifications.add({
key: "".concat(notificationKeyPrefix, "copy"),
type: "success",
message: t("Link Copied")
});
};