diff --git a/src/components/modals/main/marketplace/sections/Create.jsx b/src/components/modals/main/marketplace/sections/Create.jsx
index ead3f5a6..66de88d5 100644
--- a/src/components/modals/main/marketplace/sections/Create.jsx
+++ b/src/components/modals/main/marketplace/sections/Create.jsx
@@ -11,6 +11,7 @@ import { toast } from 'react-toastify';
import { saveFile } from 'modules/helpers/settings/modals';
import FileUpload from '../../settings/FileUpload';
+import Dropdown from '../../settings/Dropdown';
import '../../../welcome/welcome.scss';
@@ -72,11 +73,46 @@ export default class Create extends PureComponent {
toast('Imported settings!');
}
+ updateQuotePackType(e) {
+ if (e === 'quotePack') {
+ this.setState({
+ addonMetadata: {
+ type: e,
+ quotes: [{
+ quote: '',
+ author: ''
+ }]
+ }
+ });
+ } else {
+ this.setState({
+ addonMetadata: {
+ type: e,
+ quote_api: {
+ url: '',
+ name: '',
+ author: ''
+ }
+ }
+ });
+ }
+ }
+
+ updateQuotePackAPI(type, data) {
+ this.setState({
+ addonData: {
+ url: (type === 'url') ? data : this.state.addonData.url || '',
+ name: (type === 'name') ? data : this.state.addonData.name || '',
+ author: (type === 'author') ? data : this.state.addonData.author || '',
+ }
+ });
+ }
+
downloadAddon() {
saveFile({
name: this.state.addonMetadata.name,
description: this.state.addonMetadata.description,
- type: this.state.addonMetadata.type,
+ type: (this.state.addonMetadata.type === 'quote_api') ? 'quotes' : this.state.addonMetadata.type,
version: this.state.addonMetadata.version,
author: this.state.addonMetadata.author,
icon_url: this.state.addonMetadata.icon_url,
@@ -99,11 +135,11 @@ export default class Create extends PureComponent {