Skip to content

Commit

Permalink
Removed 'successfully' from notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
peterzimon committed May 14, 2024
1 parent 71233e0 commit 0f720fc
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const PinturaModal = NiceModal.create(() => {

showToast({
type: 'success',
title: `Pintura ${form} uploaded successfully`
title: `Pintura ${form} uploaded`
});
} catch (e) {
setUploadingState({js: false, css: false});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const BetaFeatures: React.FC = () => {
setRedirectsUploading(true);
await uploadRedirects(file);
showToast({
title: 'Redirects uploaded successfully',
title: 'Redirects uploaded',
type: 'success'
});
} catch (e) {
Expand All @@ -58,7 +58,7 @@ const BetaFeatures: React.FC = () => {
await uploadRoutes(file);
showToast({
type: 'success',
title: 'Routes uploaded successfully'
title: 'Routes uploaded'
});
} catch (e) {
handleError(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const Sidebar: React.FC<{
modal?.remove();
showToast({
type: 'success',
message: 'Newsletter archived successfully'
message: 'Newsletter archived'
});
} catch (e) {
handleError(e);
Expand Down Expand Up @@ -173,7 +173,7 @@ const Sidebar: React.FC<{
modal?.remove();
showToast({
type: 'success',
message: 'Newsletter reactivated successfully'
message: 'Newsletter reactivated'
});
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const InviteUserModal = NiceModal.create(() => {
setSaveState('saved');

showToast({
title: `Invitation successfully sent`,
title: `Invitation sent`,
message: `${email}`,
type: 'success'
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const Sidebar: React.FC<{
modal?.remove();
showToast({
type: 'success',
title: 'Offer archived successfully'
title: 'Offer archived'
});
updateRoute('offers/edit');
} catch (e) {
Expand All @@ -88,7 +88,7 @@ const Sidebar: React.FC<{
modal?.remove();
showToast({
type: 'success',
title: 'Offer reactivated successfully'
title: 'Offer reactivated'
});
updateRoute('offers/edit');
} catch (e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const TierDetailModalContent: React.FC<{tier?: Tier}> = ({tier}) => {
confirmModal?.remove();
showToast({
type: 'success',
title: `Tier ${tier.active ? 'archived' : 'reactivated'} successfully`
title: `Tier ${tier.active ? 'archived' : 'reactivated'}`
});
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const ThemeToolbar: React.FC<ThemeToolbarProps> = ({

let title = 'Upload successful';
let prompt = <>
<strong>{uploadedTheme.name}</strong> uploaded successfully.
<strong>{uploadedTheme.name}</strong> uploaded
</>;

if (!uploadedTheme.active) {
Expand All @@ -184,7 +184,7 @@ const ThemeToolbar: React.FC<ThemeToolbarProps> = ({

title = `Upload successful with ${hasErrors ? 'errors' : 'warnings'}`;
prompt = <>
The theme <strong>&quot;{uploadedTheme.name}&quot;</strong> was installed successfully but we detected some {hasErrors ? 'errors' : 'warnings'}.
The theme <strong>&quot;{uploadedTheme.name}&quot;</strong> was installed but we detected some {hasErrors ? 'errors' : 'warnings'}.
</>;

if (!uploadedTheme.active) {
Expand Down
4 changes: 2 additions & 2 deletions apps/admin-x-settings/test/acceptance/advanced/labs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test.describe('Labs', async () => {
const fileChooser = await fileChooserPromise;
await fileChooser.setFiles(`${__dirname}/../../utils/files/redirects.yml`);

await expect(page.getByTestId('toast-success')).toContainText('Redirects uploaded successfully');
await expect(page.getByTestId('toast-success')).toContainText('Redirects uploaded');

expect(lastApiRequests.uploadRedirects).toBeTruthy();

Expand Down Expand Up @@ -56,7 +56,7 @@ test.describe('Labs', async () => {
const fileChooser = await fileChooserPromise;
await fileChooser.setFiles(`${__dirname}/../../utils/files/routes.yml`);

await expect(page.getByTestId('toast-success')).toContainText('Routes uploaded successfully');
await expect(page.getByTestId('toast-success')).toContainText('Routes uploaded');

expect(lastApiRequests.uploadRoutes).toBeTruthy();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ test.describe('User invitations', async () => {
await modal.locator('input[value=author]').check();
await modal.getByRole('button', {name: 'Retry'}).click();

await expect(page.getByTestId('toast-success')).toHaveText(/Invitation successfully sent/);
await expect(page.getByTestId('toast-success')).toHaveText(/Invitation sent/);

await section.getByRole('tab', {name: 'Invited'}).click();

Expand Down
2 changes: 1 addition & 1 deletion apps/admin-x-settings/test/acceptance/site/theme.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ test.describe('Theme settings', async () => {

await modal.getByRole('button', {name: 'Install Headline'}).click();

await expect(page.getByTestId('confirmation-modal')).toHaveText(/successfully installed/);
await expect(page.getByTestId('confirmation-modal')).toHaveText(/installed/);

await page.getByRole('button', {name: 'Activate'}).click();

Expand Down
2 changes: 1 addition & 1 deletion ghost/admin/app/components/editor/publish-management.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export default class PublishManagement extends Component {
yield this.publishTask.perform({taskName: 'revertToDraftTask'});

const postType = capitalize(this.args.post.displayName);
this.notifications.showNotification(`${postType} successfully reverted to a draft.`, {type: 'success'});
this.notifications.showNotification(`${postType} reverted to a draft.`, {type: 'success'});

return true;
} catch (e) {
Expand Down
4 changes: 2 additions & 2 deletions ghost/admin/app/components/gh-members-no-members.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ export default class GhMembersNoMembersComponent extends Component {

this.notifications.showNotification('Member added',
{
description: 'You\'ve successfully added yourself as a member.'
description: 'You\'ve added yourself as a member.'
}
);

// force update the member count; this otherwise only updates every minute
yield this.membersCountCache.count({});

return member;
} catch (error) {
if (error) {
Expand Down
2 changes: 1 addition & 1 deletion ghost/admin/app/components/members/modals/logout-member.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default class LogoutMemberModal extends Component {
yield this.ajax.delete(url, options);

this.args.data.afterLogout?.();
this.notifications.showNotification(`${this.member.name || this.member.email} has been successfully signed out from all devices.`, {type: 'success'});
this.notifications.showNotification(`${this.member.name || this.member.email} has been signed out from all devices.`, {type: 'success'});
this.args.close(true);
return true;
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion ghost/admin/app/components/modals/restore-revision.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default class RestoreRevisionModal extends Component {
updateTitle();
updateEditor();

this.notifications.showNotification('Revision successfully restored.', {type: 'success'});
this.notifications.showNotification('Revision restored.', {type: 'success'});

closePostHistoryModal();

Expand Down
24 changes: 12 additions & 12 deletions ghost/admin/app/components/posts-list/context-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,28 @@ function tpl(str, data) {

const messages = {
deleted: {
single: '{Type} deleted successfully',
multiple: '{count} {type}s deleted successfully'
single: '{Type} deleted',
multiple: '{count} {type}s deleted'
},
unpublished: {
single: '{Type} successfully reverted to a draft',
multiple: '{count} {type}s successfully reverted to drafts'
single: '{Type} reverted to a draft',
multiple: '{count} {type}s reverted to drafts'
},
accessUpdated: {
single: '{Type} access successfully updated',
multiple: '{Type} access successfully updated for {count} {type}s'
single: '{Type} access updated',
multiple: '{Type} access updated for {count} {type}s'
},
tagsAdded: {
single: 'Tags added successfully',
multiple: 'Tags added successfully to {count} {type}s'
single: 'Tags added',
multiple: 'Tags added to {count} {type}s'
},
tagAdded: {
single: 'Tag added successfully',
multiple: 'Tag added successfully to {count} {type}s'
single: 'Tag added',
multiple: 'Tag added to {count} {type}s'
},
duplicated: {
single: '{Type} duplicated successfully',
multiple: '{count} {type}s duplicated successfully'
single: '{Type} duplicated',
multiple: '{count} {type}s duplicated'
}
};

Expand Down

0 comments on commit 0f720fc

Please sign in to comment.