feat: enable enterprise users to specify a custom logo (#5566)

* feat: enable enterprise users to specify a custom logo

This adds a field in deployment settings that allows users to specify
the URL to a custom logo that will display in the dashboard.

This also groups service banner into a new appearance settings page.
It adds a Fieldset component to allow for modular fields moving forward.

* Fix tests
This commit is contained in:
Kyle Carberry
2023-01-04 15:31:45 -06:00
committed by GitHub
parent 175be621cf
commit 0dba2defd1
35 changed files with 824 additions and 597 deletions

View File

@ -123,6 +123,7 @@ type data struct {
derpMeshKey string
lastUpdateCheck []byte
serviceBanner []byte
logoURL string
lastLicenseID int32
}
@ -3356,6 +3357,25 @@ func (q *fakeQuerier) GetServiceBanner(_ context.Context) (string, error) {
return string(q.serviceBanner), nil
}
func (q *fakeQuerier) InsertOrUpdateLogoURL(_ context.Context, data string) error {
q.mutex.RLock()
defer q.mutex.RUnlock()
q.logoURL = data
return nil
}
func (q *fakeQuerier) GetLogoURL(_ context.Context) (string, error) {
q.mutex.RLock()
defer q.mutex.RUnlock()
if q.logoURL == "" {
return "", sql.ErrNoRows
}
return q.logoURL, nil
}
func (q *fakeQuerier) InsertLicense(
_ context.Context, arg database.InsertLicenseParams,
) (database.License, error) {