Updated error message shown when trying to overwrite a default theme (#20301)
ref https://linear.app/tryghost/issue/ONC-57/trying-to-overwrite-the-default-source-theme-crashes-ghost - No functional change, just an update to the error message to follow our writing guidelines for error messages
This commit is contained in:
parent
46cb819feb
commit
9891abd61c
@ -92,13 +92,13 @@ const ThemeToolbar: React.FC<ThemeToolbarProps> = ({
|
||||
const existingThemeNames = themes.map(t => t.name);
|
||||
if (isDefaultOrLegacyTheme({name: themeFileName})) {
|
||||
NiceModal.show(ConfirmationModal, {
|
||||
title: 'Cannot overwrite theme',
|
||||
title: 'Upload failed',
|
||||
cancelLabel: 'Cancel',
|
||||
okLabel: '',
|
||||
prompt: (
|
||||
<>
|
||||
<p>Sorry, <strong>{themeFileName}</strong> is a default theme and cannot be overwritten.</p>
|
||||
<p>Please rename your zip file and try again.</p>
|
||||
<p>The default <strong>{themeFileName}</strong> theme cannot be overwritten.</p>
|
||||
<p>Rename your zip file and try again.</p>
|
||||
</>
|
||||
),
|
||||
onOk: async (confirmModal) => {
|
||||
|
@ -243,6 +243,6 @@ test.describe('Theme settings', async () => {
|
||||
const fileChooser = await fileChooserPromise;
|
||||
await fileChooser.setFiles(`${__dirname}/../../utils/responses/source.zip`);
|
||||
|
||||
await expect(page.getByTestId('confirmation-modal')).toHaveText(/Cannot overwrite theme/);
|
||||
await expect(page.getByTestId('confirmation-modal')).toHaveText(/Upload failed/);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user