Skip to content

Commit

Permalink
Picarto: Added visibility field
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdicarlo committed Aug 1, 2022
1 parent c2740a5 commit 5a55eaa
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export class Patreon extends Website {
readonly BASE_URL = 'https://www.patreon.com';
readonly acceptsAdditionalFiles = true;
readonly refreshBeforePost: boolean = true;
readonly waitBetweenPostsInterval = 60_000;
readonly usernameShortcuts = [
{
key: 'pa',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export class Picarto extends Website {
finishPost.body?.data?.createArtwork?.status === 'error' ||
finishPost.body.errors?.length
) {
return Promise.reject(this.createPostResponse({ additionalInfo: finishPost.body }));
return Promise.reject(this.createPostResponse({ message: finishPost.body?.data?.createArtwork?.message, additionalInfo: finishPost.body }));
}

return this.createPostResponse({});
Expand Down
13 changes: 13 additions & 0 deletions ui/src/websites/picarto/Picarto.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,19 @@ export class PicartoFileSubmissionForm extends GenericFileSubmissionSection<Pica
renderRightForm(data: PicartoFileOptions) {
const elements = super.renderRightForm(data);
elements.push(
<Form.Item label="Visibility">
<Select
{...GenericSelectProps}
className="w-full"
value={data.visibility ?? null}
onChange={this.setValue.bind(this, 'visibility')}
>
<Select.Option value="PUBLIC">Public</Select.Option>
<Select.Option value="PRIVATE">Private</Select.Option>
<Select.Option value="FOLLOWER_SUBSCRIBER">Followers only</Select.Option>
<Select.Option value="SUBSCRIBER">Subscribers only</Select.Option>
</Select>
</Form.Item>,
<Form.Item label="Folders">
<Select
{...GenericSelectProps}
Expand Down

0 comments on commit 5a55eaa

Please sign in to comment.