mirror of
https://github.com/wassname/talk.git
synced 2026-07-13 17:45:56 +08:00
[CORL-127] Custom CSS (#2194)
* feat: moved html-webpack-plugin to custom server templates in production * fix: fixed templates * fix: removed sri for the time being * fix: fixed up tests for new field name
This commit is contained in:
+2
-2
@@ -20,7 +20,7 @@ const CustomCSSConfig: StatelessComponent<Props> = ({ disabled }) => (
|
||||
<FormField>
|
||||
<HorizontalGutter size="full">
|
||||
<Localized id="configure-advanced-customCSS">
|
||||
<Header container={<label htmlFor="configure-advanced-customCssUrl" />}>
|
||||
<Header container={<label htmlFor="configure-advanced-customCSSURL" />}>
|
||||
Custom CSS
|
||||
</Header>
|
||||
</Localized>
|
||||
@@ -33,7 +33,7 @@ const CustomCSSConfig: StatelessComponent<Props> = ({ disabled }) => (
|
||||
styles. Can be internal or external.
|
||||
</Typography>
|
||||
</Localized>
|
||||
<Field name="customCssUrl">
|
||||
<Field name="customCSSURL">
|
||||
{({ input, meta }) => (
|
||||
<>
|
||||
<TextField
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ class CustomCSSConfigContainer extends React.Component<Props> {
|
||||
const enhanced = withFragmentContainer<Props>({
|
||||
settings: graphql`
|
||||
fragment CustomCSSConfigContainer_settings on Settings {
|
||||
customCssUrl
|
||||
customCSSURL
|
||||
}
|
||||
`,
|
||||
})(CustomCSSConfigContainer);
|
||||
|
||||
@@ -115,7 +115,7 @@ exports[`renders configure advanced 1`] = `
|
||||
>
|
||||
<label
|
||||
className="Typography-root Typography-heading1 Typography-colorTextPrimary Header-root"
|
||||
htmlFor="configure-advanced-customCssUrl"
|
||||
htmlFor="configure-advanced-customCSSURL"
|
||||
>
|
||||
Custom CSS
|
||||
</label>
|
||||
@@ -133,8 +133,8 @@ exports[`renders configure advanced 1`] = `
|
||||
autoCorrect="off"
|
||||
className="TextField-input TextField-colorRegular"
|
||||
disabled={false}
|
||||
id="configure-advanced-customCssUrl"
|
||||
name="customCssUrl"
|
||||
id="configure-advanced-customCSSURL"
|
||||
name="customCSSURL"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
|
||||
@@ -72,7 +72,7 @@ it("change custom css", async () => {
|
||||
let settingsRecord = cloneDeep(settings);
|
||||
const updateSettingsStub = createSinonStub(s =>
|
||||
s.onFirstCall().callsFake((_: any, data: any) => {
|
||||
expect(data.input.settings.customCssUrl).toEqual("./custom.css");
|
||||
expect(data.input.settings.customCSSURL).toEqual("./custom.css");
|
||||
settingsRecord = merge(settingsRecord, data.input.settings);
|
||||
return {
|
||||
settings: settingsRecord,
|
||||
|
||||
@@ -17,7 +17,7 @@ export const settings = {
|
||||
closedTimeout: 604800,
|
||||
autoCloseStream: false,
|
||||
closedMessage: null,
|
||||
customCssUrl: null,
|
||||
customCSSURL: null,
|
||||
domains: ["localhost:8080"],
|
||||
editCommentWindowLength: 30000,
|
||||
communityGuidelines: {
|
||||
|
||||
Reference in New Issue
Block a user