Merge pull request #873 from LaurenceJJones/fix-default-image-delete
fix: hide delete overlay for default app images
This commit is contained in:
commit
2a6f9fbc7c
|
|
@ -431,6 +431,7 @@ func (a *ApplicationAPI) RemoveApplicationImage(ctx *gin.Context) {
|
|||
|
||||
func withResolvedImage(app *model.Application) *model.Application {
|
||||
if app.Image == "" {
|
||||
// This must stay in sync with the isDefaultImage check in ui/src/application/Applications.tsx.
|
||||
app.Image = "static/defaultapp.png"
|
||||
} else {
|
||||
app.Image = "image/" + app.Image
|
||||
|
|
|
|||
|
|
@ -197,12 +197,16 @@ const Row = ({
|
|||
fEdit,
|
||||
}: IRowProps) => {
|
||||
const {classes} = useStyles();
|
||||
const isDefaultImage = image === 'static/defaultapp.png';
|
||||
return (
|
||||
<TableRow>
|
||||
<TableCell padding="normal">
|
||||
<div style={{display: 'flex'}}>
|
||||
<Tooltip title="Delete image" placement="top" arrow>
|
||||
<ButtonBase className={classes.imageContainer} onClick={fDeleteImage}>
|
||||
<ButtonBase
|
||||
className={classes.imageContainer}
|
||||
onClick={fDeleteImage}
|
||||
disabled={isDefaultImage}>
|
||||
<img
|
||||
src={config.get('url') + image}
|
||||
alt="app logo"
|
||||
|
|
|
|||
Loading…
Reference in New Issue