mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
Updated save sequence for settings group in admin-x
refs https://github.com/TryGhost/Team/issues/3151 - updated save sequence for setting groups where edit button is hidden by default - shows `Saved` for couple of seconds before disappearing on saving such setting groups - adds save sequence for default recipient setting group
This commit is contained in:
parent
9ca82490c2
commit
664f4ebedd
2 changed files with 11 additions and 0 deletions
|
@ -93,6 +93,15 @@ const SettingGroup: React.FC<SettingGroupProps> = ({
|
|||
onClick: handleEdit
|
||||
}
|
||||
);
|
||||
} else if (saveState === 'saved') {
|
||||
viewButtons.push(
|
||||
{
|
||||
label: 'Saved',
|
||||
key: 'edit',
|
||||
color: 'green',
|
||||
onClick: handleEdit
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
let editButtons: IButton[] = [
|
||||
|
|
|
@ -49,6 +49,7 @@ function getDefaultRecipientValue({
|
|||
const DefaultRecipients: React.FC = () => {
|
||||
const {
|
||||
currentState,
|
||||
saveState,
|
||||
handleSave,
|
||||
handleCancel,
|
||||
updateSetting,
|
||||
|
@ -115,6 +116,7 @@ const DefaultRecipients: React.FC = () => {
|
|||
return (
|
||||
<SettingGroup
|
||||
description='When you publish new content, who do you usually want to send it to?'
|
||||
saveState={saveState}
|
||||
state={currentState}
|
||||
title='Default recipients'
|
||||
onCancel={handleCancel}
|
||||
|
|
Loading…
Add table
Reference in a new issue