feat: add global server custom CSS (#6753)
* feat: add global server custom CSS * refactor: reuse CodeMirror for CSS editors
This commit is contained in:
1 parent
ee30aa13cf
commit
f57a660088
18 files changed
+152
-359
No files matched your search
@@ -54,6 +54,7 @@ export function CodeEditorToolbar({
|
||||
</Text>
|
||||
</Group>
|
||||
<Group gap={6}>
|
||||
{props.actions}
|
||||
{!props.readOnly && (
|
||||
<>
|
||||
<Button
|
||||
|
||||
@@ -57,4 +57,5 @@ export interface CustomWidgetCodeEditorProps {
|
||||
readOnly?: boolean;
|
||||
reference?: CustomWidgetSchemaReferenceData;
|
||||
height?: string;
|
||||
actions?: ReactNode;
|
||||
}
|
||||
@@ -51,6 +51,7 @@ export const brandingServerSettingsSchema = z.object({
|
||||
signInBackgroundOverlay: z.number().min(0).max(0.9),
|
||||
authBranding: authBrandingSchema,
|
||||
defaultRadius: z.enum(brandingRadiusOptions),
|
||||
customCss: z.string().max(16_384),
|
||||
});
|
||||
|
||||
export type BrandingSettings = z.infer<typeof brandingServerSettingsSchema>;
|
||||
@@ -71,6 +72,7 @@ export const defaultBrandingSettings: BrandingSettings = {
|
||||
showGreeting: true,
|
||||
},
|
||||
defaultRadius: "md",
|
||||
customCss: "",
|
||||
};
|
||||
|
||||
const hasDefaultBrandingColors = (branding: Pick<BrandingSettings, "primaryColor" | "secondaryColor">) =>
|
||||
|
||||
@@ -5972,6 +5972,7 @@
|
||||
"groups": {
|
||||
"identity": "Identity",
|
||||
"appearance": "Appearance",
|
||||
"customCss": "Custom CSS",
|
||||
"authentication": "Authentication"
|
||||
},
|
||||
"identity": {
|
||||
@@ -6018,6 +6019,10 @@
|
||||
"xl": "Soft"
|
||||
}
|
||||
},
|
||||
"customCss": {
|
||||
"label": "Global custom CSS",
|
||||
"description": "Applied to every page. Board custom CSS can override it."
|
||||
},
|
||||
"authVisibility": {
|
||||
"description": "Choose what appears on every authentication page.",
|
||||
"appName": "Application name",
|
||||
|
||||
Reference in new issue
Block a user