⚡ Copy tweaks (#2780)
* Update en.json * More copy tweaks and addressed PR comments * 🔥 Remove empty strings from base text * ⚡ Adjust `$showMessage` signature type * 🔥 Remove message from Vue components * ✏️ Fix typo Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
@@ -264,7 +264,6 @@ export const pushConnection = mixins(
|
||||
this.$titleSet(workflow.name as string, 'IDLE');
|
||||
this.$showMessage({
|
||||
title: this.$locale.baseText('pushConnection.showMessage.title'),
|
||||
message: this.$locale.baseText('pushConnection.showMessage.message'),
|
||||
type: 'success',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -12,13 +12,16 @@ let stickyNotificationQueue: ElNotificationComponent[] = [];
|
||||
|
||||
export const showMessage = mixins(externalHooks).extend({
|
||||
methods: {
|
||||
$showMessage(messageData: ElNotificationOptions, track = true) {
|
||||
$showMessage(
|
||||
messageData: Omit<ElNotificationOptions, 'message'> & { message?: string },
|
||||
track = true,
|
||||
) {
|
||||
messageData.dangerouslyUseHTMLString = true;
|
||||
if (messageData.position === undefined) {
|
||||
messageData.position = 'bottom-right';
|
||||
}
|
||||
|
||||
const notification = this.$notify(messageData);
|
||||
const notification = this.$notify(messageData as ElNotificationOptions);
|
||||
|
||||
if (messageData.duration === 0) {
|
||||
stickyNotificationQueue.push(notification);
|
||||
|
||||
@@ -500,12 +500,12 @@ export const workflowHelpers = mixins(
|
||||
this.$externalHooks().run('workflow.afterUpdate', { workflowData });
|
||||
|
||||
return true;
|
||||
} catch (e) {
|
||||
} catch (error) {
|
||||
this.$store.commit('removeActiveAction', 'workflowSaving');
|
||||
|
||||
this.$showMessage({
|
||||
title: this.$locale.baseText('workflowHelpers.showMessage.title'),
|
||||
message: this.$locale.baseText('workflowHelpers.showMessage.message') + `"${e.message}"`,
|
||||
message: error.message,
|
||||
type: 'error',
|
||||
});
|
||||
|
||||
|
||||
@@ -205,7 +205,6 @@ export const workflowRun = mixins(
|
||||
this.$showError(
|
||||
error,
|
||||
this.$locale.baseText('workflowRun.showError.title'),
|
||||
this.$locale.baseText('workflowRun.showError.message'),
|
||||
);
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user