mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
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:
@ -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) {
|
||||
|
Reference in New Issue
Block a user