Skip to content
This repository was archived by the owner on Aug 31, 2020. It is now read-only.

Commit acc4ff6

Browse files
author
lepon01
committed
add custom_path into the editor
1 parent 7dc15f8 commit acc4ff6

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

src/locales/en.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"title": "Add a application",
5151
"info": "Fields marked with (OPTIONAL) are optional. Do not type anything in boxes which are optional if you do not have them. Optional means optional, and does not mean type 'N/A' or 'none'. Pull requests with this will be rejected.",
5252
"notice": "When you are finished, click the \"Create a pull request\" button to publish to GitHub.",
53-
"default": "# Title\n\nThis is a cool bot that you should accept.\nReasons include:\n\n- Being awesome\n- Not being un-awesome\n- The prefix can be changed to !\n\n<!--\n Stan LOONA\n Stan Talent\n-->\n",
53+
"default": "<!--\nThis is the description box.\nThe contents of this box will appear on your bot page\n\nThis box supports:\n- Markdown\n- HTML\n\nPlease refrain from using CSS.\nCSS may be deprecated in the future and removed.\n-->\n",
5454
"steps": {
5555
"1": "Step 1: Type of application",
5656
"service": "Please select a type of service",
@@ -100,7 +100,7 @@
100100
},
101101
"bot_cover": {
102102
"title": "Cover Image",
103-
"placeholder": "http:// or https:// - The big cover image"
103+
"placeholder": "http:// or https:// - Image on homepage and in header of your page"
104104
},
105105
"bot_support": {
106106
"title": "Support URL",
@@ -165,6 +165,10 @@
165165
"title": "localStorage was not found",
166166
"description": "localStorage is required for this service to function."
167167
},
168+
"custom_path": {
169+
"title": "Customised path @ https://discordbots.co.uk/r/[name]",
170+
"placeholder": "Letters and numbers only"
171+
},
168172
"submit": "Submit"
169173
},
170174
"notfound": {
@@ -187,6 +191,7 @@
187191
"terminal": "Join Terminal.ink on Discord"
188192
},
189193
"forms": {
190-
"select": "Please select..."
194+
"select": "Please select...",
195+
"delete": "Delete"
191196
}
192197
}

src/pages/edit.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class EditPage extends React.Component {
2626
monaco: null,
2727
editor_type: null,
2828
editor_lang: null,
29+
custom_path: null,
2930
filename: null,
3031
pagename: null,
3132
description: null,
@@ -149,6 +150,7 @@ class EditPage extends React.Component {
149150
images: this.state.images,
150151
link: this.state.link,
151152
support: this.state.support,
153+
custom_path: this.custom_path,
152154
nsfw: this.state.nsfw === 'true' ? true : false,
153155
};
154156

@@ -353,9 +355,6 @@ class EditPage extends React.Component {
353355
<EditorInput id="bot_invite" name="link" onChange={this.handleChange}></EditorInput>
354356
<EditorInput id="bot_avatar" name="avatar" onChange={this.handleChange}></EditorInput>
355357
</div>
356-
<div className="row">
357-
<EditorInput id="bot_cover" name="cover" onChange={this.handleChange}></EditorInput>
358-
</div>
359358
<div className="row">
360359
<EditorInput id="bot_support" name="support" onChange={this.handleChange}></EditorInput>
361360
<EditorInput id="bot_nsfw" name="nsfw" onChange={this.handleChange} choices={['true', 'false']}></EditorInput>
@@ -370,6 +369,10 @@ class EditPage extends React.Component {
370369
<div className="row">
371370
<EditorStringArray id="bot_images" onChange={this.handleImages} />
372371
</div>
372+
<div className="row">
373+
<EditorInput id="bot_cover" name="cover" onChange={this.handleChange}></EditorInput>
374+
<EditorInput id="custom_path" name="custom_path" onChange={this.handleChange}></EditorInput>
375+
</div>
373376
</div>
374377
);
375378
} else if (this.state.editor_type === 'servers') {
@@ -393,6 +396,7 @@ class EditPage extends React.Component {
393396
</div>
394397
<div className="row">
395398
<EditorInput id="server_nsfw" name="nsfw" onChange={this.handleChange} choices={['true', 'false']}></EditorInput>
399+
<EditorInput id="custom_path" name="custom_path" onChange={this.handleChange}></EditorInput>
396400
</div>
397401
</div>
398402
);

0 commit comments

Comments
 (0)