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
|
onClick: handleEdit
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
} else if (saveState === 'saved') {
|
||||||
|
viewButtons.push(
|
||||||
|
{
|
||||||
|
label: 'Saved',
|
||||||
|
key: 'edit',
|
||||||
|
color: 'green',
|
||||||
|
onClick: handleEdit
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let editButtons: IButton[] = [
|
let editButtons: IButton[] = [
|
||||||
|
|
|
@ -49,6 +49,7 @@ function getDefaultRecipientValue({
|
||||||
const DefaultRecipients: React.FC = () => {
|
const DefaultRecipients: React.FC = () => {
|
||||||
const {
|
const {
|
||||||
currentState,
|
currentState,
|
||||||
|
saveState,
|
||||||
handleSave,
|
handleSave,
|
||||||
handleCancel,
|
handleCancel,
|
||||||
updateSetting,
|
updateSetting,
|
||||||
|
@ -115,6 +116,7 @@ const DefaultRecipients: React.FC = () => {
|
||||||
return (
|
return (
|
||||||
<SettingGroup
|
<SettingGroup
|
||||||
description='When you publish new content, who do you usually want to send it to?'
|
description='When you publish new content, who do you usually want to send it to?'
|
||||||
|
saveState={saveState}
|
||||||
state={currentState}
|
state={currentState}
|
||||||
title='Default recipients'
|
title='Default recipients'
|
||||||
onCancel={handleCancel}
|
onCancel={handleCancel}
|
||||||
|
|
Loading…
Add table
Reference in a new issue