From abe8b28b69bad077dcd6352b50bc1fa9ee0451bf Mon Sep 17 00:00:00 2001 From: Curtis ROck Date: Sat, 25 Jul 2020 23:31:39 -0500 Subject: [PATCH] added handlers for add new list item. Probs with homeFooter and customCSS item add functions --- app/soapbox/features/configuration/index.js | 42 +++++++++++++++++++-- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/app/soapbox/features/configuration/index.js b/app/soapbox/features/configuration/index.js index 8255e2fc9..ffb1cf93d 100644 --- a/app/soapbox/features/configuration/index.js +++ b/app/soapbox/features/configuration/index.js @@ -110,6 +110,9 @@ class ConfigSoapbox extends ImmutablePureComponent { ]); }; this.handlecustomCSSChange = this.handleCustomCSSChange.bind(this); + // this.handleAddPromoPanelItem = this.handleAddPromoPanelItem.bind(this); + // this.handleAddHomeFooterItem = this.handleAddHomeFooterItem.bind(this); + // this.handleAddCSSItem = this.handleAddCSSItem.bind(this); } getPromoItemsParams = () => { @@ -225,6 +228,39 @@ class ConfigSoapbox extends ImmutablePureComponent { }); } + handleAddPromoPanelItem = () => { + this.setState({ + promoItems: this.state.promoItems.concat([ + ImmutableMap({ + icon: '', + text: '', + url: '', + }), + ]), + }); + } + + handleAddHomeFooterItem = () => { + this.setState({ + homeFooterItems: this.state.homeFooterItems.concat([ + ImmutableMap({ + title: '', + url: '', + }), + ]), + }); + } + + handleAddCSSItem = () => { + this.setState({ + customCssItems: this.state.customCssItems.concat([ + ImmutableMap({ + url: '', + }), + ]), + }); + } + render() { const { intl } = this.props; @@ -318,7 +354,7 @@ class ConfigSoapbox extends ImmutablePureComponent { )) }
-
@@ -347,7 +383,7 @@ class ConfigSoapbox extends ImmutablePureComponent { )) }
-
@@ -371,7 +407,7 @@ class ConfigSoapbox extends ImmutablePureComponent { )) }
-