From e60fe8a70933c5888603f504d16df7aa674d4c37 Mon Sep 17 00:00:00 2001 From: Curtis ROck Date: Tue, 28 Jul 2020 23:30:16 -0500 Subject: [PATCH] identified data object structure to be able to create JSON object for storing soapbox config in Pleroma DB --- app/soapbox/features/configuration/index.js | 68 ++++++++++++++++++++- 1 file changed, 65 insertions(+), 3 deletions(-) diff --git a/app/soapbox/features/configuration/index.js b/app/soapbox/features/configuration/index.js index 7f4964452..364cc7735 100644 --- a/app/soapbox/features/configuration/index.js +++ b/app/soapbox/features/configuration/index.js @@ -18,7 +18,6 @@ import { List as ImmutableList, } from 'immutable'; import { patchSoapbox } from 'soapbox/actions/soapbox'; -//import { generateThemeCss } from 'soapbox/utils/theme'; const messages = defineMessages({ heading: { id: 'column.soapbox_settings', defaultMessage: 'Soapbox settings' }, @@ -33,7 +32,6 @@ const messages = defineMessages({ const mapStateToProps = state => { const soapbox = state.get('soapbox'); return { - // themeCss: generateThemeCss(soapbox.get('brandColor')), brandColor: soapbox.get('brandColor'), customCssItems: soapbox.get('customCss'), logo: soapbox.get('logo'), @@ -47,7 +45,6 @@ const mapStateToProps = state => { }; export default @connect(mapStateToProps) -// export default @connect() @injectIntl class ConfigSoapbox extends ImmutablePureComponent { @@ -160,6 +157,71 @@ class ConfigSoapbox extends ImmutablePureComponent { this.getCustomCssParams().toJS()); } + // Target object to be JSON.stringified + // var obj = { + // configs: [{ + // group: ":pleroma", + // key: ":frontend_configurations", + // value: [{ + // tuple: [":soapbox_fe", + // { + // logo: "/instance/images/teci_social_logo.svg", + // banner: "/instance/images/teci_social_logo2.svg", + // brandColor: "#3b5998", + // customCss: [ + // "/instance/custom.css", + // "/instance/custom2.css", + // ], + // promoPanel: { + // items: [{ + // icon: "comment-o", + // text: "TECI blog", + // url: "https://www.teci.world/blog", + // }, { + // icon: "globe", + // text: "TECI web site", + // url: "https://teci.world", + // }, { + // icon: "globe", + // text: "TECI Social Mastodon FE", + // url: "https://social.teci.world/web", + // }, { + // icon: "area-chart", + // text: "TECI Social stats", + // url: "https://fediverse.network/social.teci.world", + // }] + // }, + // extensions: { + // patron: false, + // }, + // defaultSettings: { + // autoPlayGif: false, + // }, + // copyright: "?2020. Copying is an act of love. Please copy and share.", + // navlinks: { + // homeFooter: [{ + // title: "About", + // url: "/about", + // }, { + // title: "Terms of Service", + // url: "/about/tos", + // }, { + // title: "Privacy Policy", + // url: "/about/privacy", + // }, { + // title: "DMCA", + // url: "/about/dmca", + // }, { + // title: "Source Code", + // url: "/about#opensource", + // }], + // }, + // }, + // ], + // }], + // }], + // }; + getFormdata = () => { const data = this.getParams(); let formData = new FormData();