File tree Expand file tree Collapse file tree
frontend/src/ts/components/pages/settings/custom-setting Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -376,17 +376,28 @@ function CustomThemeButton(props: { theme: CustomTheme }): JSXElement {
376376 message : "Name is required" ,
377377 } ;
378378 }
379- void editCustomTheme ( {
379+ editCustomTheme ( {
380380 themeId : props . theme . _id ,
381381 name : name . replace ( / / g, "_" ) ,
382382 colors : updateColors
383383 ? convertThemeToCustomColors ( untrack ( ( ) => getTheme ( ) ) )
384384 : untrack ( ( ) => props . theme . colors ) ,
385- } ) ;
385+ } )
386+ . then ( ( ) => {
387+ showSuccessNotification ( "Updated" ) ;
388+ } )
389+ . catch ( ( ) => {
390+ showErrorNotification (
391+ e instanceof Error
392+ ? e . message
393+ : "Failed to update custom theme" ,
394+ ) ;
395+ } ) ;
386396
387397 return {
388398 status : "success" ,
389- message : "Updated" ,
399+ message : "" ,
400+ showNotification : false ,
390401 } ;
391402 } ,
392403 } ) ;
You can’t perform that action at this time.
0 commit comments