File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed
plugin/assets/src/settings Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ const Integrations = () => {
7979 lastUpdated = { state . updaters [ key ] . lastUpdated }
8080 type = { UPDATERS [ key ] . type }
8181 displayUpdatedOn = { UPDATERS [ key ] . displayUpdatedOn }
82+ versionAvailable = { UPDATERS [ key ] . versionAvailable }
8283 />
8384 ) ) }
8485 </ div >
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ const Updater = ( {
4343 checked,
4444 type,
4545 displayUpdatedOn,
46+ versionAvailable,
4647} ) => {
4748 const [ id ] = useState ( _uniqueId ( 'updater-' ) ) ;
4849 const { state, dispatch } = useContext ( SettingsContext ) ;
@@ -90,7 +91,7 @@ const Updater = ( {
9091 return (
9192 < div
9293 className = { classNames ( 'material-settings__updater' , {
93- 'no__last-update' : false === displayUpdatedOn ,
94+ 'no__last-update' : false === displayUpdatedOn && ! versionAvailable ,
9495 } ) }
9596 >
9697 < div className = "mdc-layout-grid" >
@@ -124,6 +125,15 @@ const Updater = ( {
124125 ) }
125126 </ p >
126127 ) }
128+
129+ { versionAvailable && (
130+ < p className = "mdc-typography--body1" >
131+ { sprintf (
132+ __ ( 'New version %s is available.' , 'material-design' ) ,
133+ versionAvailable
134+ ) }
135+ </ p >
136+ ) }
127137 </ div >
128138
129139 < div className = "mdc-layout-grid__cell mdc-layout-grid__cell--span-3 mdc-layout-grid__cell--align-middle material-settings__cell--justify-end" >
Original file line number Diff line number Diff line change @@ -56,7 +56,8 @@ export const UPDATERS = {
5656 type : 'PLUGIN' ,
5757 lastUpdated : false ,
5858 needsKey : false ,
59- updateAvailable : 1 === parseInt ( getConfig ( 'pluginUpdateStatus' ) , 10 ) ,
59+ updateAvailable : '0' !== String ( getConfig ( 'pluginUpdateStatus' ) ) ,
60+ versionAvailable : getConfig ( 'pluginUpdateStatus' ) ,
6061 autoUpdates : parseInt ( getConfig ( 'pluginAutoUpdate' ) , 10 ) ,
6162 displayUpdatedOn : false ,
6263 } ,
@@ -65,7 +66,8 @@ export const UPDATERS = {
6566 type : 'THEME' ,
6667 lastUpdated : false ,
6768 needsKey : false ,
68- updateAvailable : 1 === parseInt ( getConfig ( 'themeUpdateStatus' ) , 10 ) ,
69+ updateAvailable : '0' !== String ( getConfig ( 'themeUpdateStatus' ) ) ,
70+ versionAvailable : getConfig ( 'themeUpdateStatus' ) ,
6971 autoUpdates : parseInt ( getConfig ( 'themeAutoUpdate' ) , 10 ) ,
7072 displayUpdatedOn : false ,
7173 } ,
You can’t perform that action at this time.
0 commit comments