diff --git a/web/pages/config-storage.tsx b/web/pages/config-storage.tsx index 9266e035b..acb218a60 100644 --- a/web/pages/config-storage.tsx +++ b/web/pages/config-storage.tsx @@ -28,14 +28,14 @@ function checkSaveable(formValues: any, currentValues: any) { const { endpoint, accessKey, secret, bucket, region, enabled, servingEndpoint, acl } = formValues; // if fields are filled out and different from what's in store, then return true if (enabled) { - if (endpoint !== '' && accessKey !== '' && secret !== '' && bucket !== '' && region !== '') { + if (!!endpoint && !!accessKey && !!secret && !!bucket && !!region) { if ( endpoint !== currentValues.endpoint || accessKey !== currentValues.accessKey || - secret !== currentValues.bucket || + secret !== currentValues.secret || region !== currentValues.region || - servingEndpoint !== currentValues.servingEndpoint || - acl !== currentValues.acl + (!!currentValues.servingEndpoint && servingEndpoint !== currentValues.servingEndpoint) || + (!!currentValues.acl && acl !== currentValues.acl) ) { return true; } @@ -188,10 +188,8 @@ function EditStorage() { /> - + - Advanced -
- diff --git a/web/styles/config-formfields.scss b/web/styles/config-formfields.scss index 53b8fd03a..97b2227c7 100644 --- a/web/styles/config-formfields.scss +++ b/web/styles/config-formfields.scss @@ -85,7 +85,7 @@ width: 100%; display: block; &.empty { - display: inline-block; + display: none; visibility: visible; } } diff --git a/web/styles/config.scss b/web/styles/config.scss index 66f568234..04ec318a6 100644 --- a/web/styles/config.scss +++ b/web/styles/config.scss @@ -340,4 +340,14 @@ .button-container { margin: 1em 0; } + .advanced-section { + margin: 1em 0; + } } + +.field-container { + padding: .85em 0 .5em; + &:nth-child(even) { + background-color: rgba(0,0,0,.25); + } +} \ No newline at end of file