Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2023.9.x fix corteza studio #1496

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
>
<b-form-group
:label="$t(`brandVariables.${key}`)"
label-class="primary"
label-class="text-primary"
>
<c-input-color-picker
v-model="brandingVariables[key]"
Expand Down
4 changes: 2 additions & 2 deletions client/web/admin/src/components/Settings/UI/CUICustomCSS.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ export default {
settings: {
immediate: true,
handler (settings) {
this.customCSS = settings['ui.studio.custom-css'] || ''
this.customCSS = settings['ui.custom-css'] || ''
},
},
},

methods: {
onSubmit () {
this.$emit('submit', { 'ui.studio.custom-css': this.customCSS })
this.$emit('submit', { 'ui.custom-css': this.customCSS })
},

openEditorModal () {
Expand Down
2 changes: 1 addition & 1 deletion server/assets/src/css/minified-custom.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion server/pkg/webapp/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func serveConfig(r chi.Router, config webappConfig) {

ctx := auth.SetIdentityToContext(r.Context(), auth.ServiceUser())

stylesheet, err := service.GenerateCSS(ctx, config.settings.UI.Studio.BrandingSASS, config.settings.UI.Studio.CustomCSS, config.scssDirPath)
stylesheet, err := service.GenerateCSS(ctx, config.settings.UI.Studio.BrandingSASS, config.settings.UI.CustomCSS, config.scssDirPath)
if err != nil {
logger.Default().Error("failed to generate CSS", zap.Error(err))
}
Expand Down
2 changes: 1 addition & 1 deletion server/system/service/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func (svc *settings) BulkSet(ctx context.Context, vv types.SettingValueSet) (err

for _, v := range vv {
// if branding-sass or custom-css is updated, empty stylesheet cache
if v.Name == "ui.studio.branding-sass" || v.Name == "ui.studio.custom-css" {
if v.Name == "ui.studio.branding-sass" || v.Name == "ui.custom-css" {
sass.StylesheetCache.Set(map[string]string{})
}

Expand Down
2 changes: 1 addition & 1 deletion server/system/types/app_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ type (
Disabled bool `json:"disabled"`
} `kv:"sidebar,final" json:"sidebar"`

CustomCSS string `kv:"custom-css" json:"customCSS"`
Studio struct {
CustomCSS string `kv:"custom-css" json:"customCSS"`
BrandingSASS string `kv:"branding-sass" json:"branding-sass"`
SassInstalled bool `kv:"sass-installed" json:"sass-installed"`
} `kv:"studio" json:"studio"`
Expand Down