feat: fix pinterest
This commit is contained in:
parent
0a538b408d
commit
2a1efdd96e
|
|
@ -357,3 +357,13 @@ html {
|
||||||
.uppy-ProgressBar-inner[style='width: 100%;'] + div {
|
.uppy-ProgressBar-inner[style='width: 100%;'] + div {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fill-text-white {
|
||||||
|
-webkit-text-fill-color: white !important;
|
||||||
|
}
|
||||||
|
div div .set-font-family {
|
||||||
|
font-family: "Helvetica Neue", Helvetica !important;
|
||||||
|
font-stretch: 100% !important;
|
||||||
|
font-style: normal !important;
|
||||||
|
font-weight: 400 !important;
|
||||||
|
}
|
||||||
|
|
@ -7,10 +7,14 @@ import dayjs from 'dayjs';
|
||||||
|
|
||||||
export const Editor = forwardRef<
|
export const Editor = forwardRef<
|
||||||
RefMDEditor,
|
RefMDEditor,
|
||||||
MDEditorProps & { order: number, currentWatching: string, isGlobal: boolean}
|
MDEditorProps & { order: number; currentWatching: string; isGlobal: boolean }
|
||||||
>(
|
>(
|
||||||
(
|
(
|
||||||
props: MDEditorProps & { order: number, currentWatching: string, isGlobal: boolean },
|
props: MDEditorProps & {
|
||||||
|
order: number;
|
||||||
|
currentWatching: string;
|
||||||
|
isGlobal: boolean;
|
||||||
|
},
|
||||||
ref: React.ForwardedRef<RefMDEditor>
|
ref: React.ForwardedRef<RefMDEditor>
|
||||||
) => {
|
) => {
|
||||||
useCopilotReadable({
|
useCopilotReadable({
|
||||||
|
|
@ -33,6 +37,10 @@ export const Editor = forwardRef<
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
return <MDEditor {...props} ref={ref} />;
|
return (
|
||||||
|
<div className="relative">
|
||||||
|
<MDEditor {...props} ref={ref} />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ const PinterestSettings: FC = () => {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<Input label={'Title'} {...register('title')} />
|
<Input label={'Title'} {...register('title')} />
|
||||||
<Input label={'Description'} {...register('description')} />
|
|
||||||
<PinterestBoard {...register('board')} />
|
<PinterestBoard {...register('board')} />
|
||||||
<ColorPicker
|
<ColorPicker
|
||||||
label="Select Pin Color"
|
label="Select Pin Color"
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,9 @@ module.exports = {
|
||||||
loginBox: 'url(/auth/login-box.png)',
|
loginBox: 'url(/auth/login-box.png)',
|
||||||
loginBg: 'url(/auth/bg-login.png)',
|
loginBg: 'url(/auth/bg-login.png)',
|
||||||
},
|
},
|
||||||
|
fontFamily: {
|
||||||
|
sans: ["Helvetica Neue"],
|
||||||
|
},
|
||||||
animation: {
|
animation: {
|
||||||
fade: 'fadeOut 0.5s ease-in-out',
|
fade: 'fadeOut 0.5s ease-in-out',
|
||||||
overflow: 'overFlow 0.5s ease-in-out forwards',
|
overflow: 'overFlow 0.5s ease-in-out forwards',
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,6 @@ export class PinterestSettingsDto {
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
title: string;
|
title: string;
|
||||||
|
|
||||||
@IsString()
|
|
||||||
@IsOptional()
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@IsString()
|
@IsString()
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsUrl()
|
@IsUrl()
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,6 @@ export class PinterestProvider
|
||||||
|
|
||||||
let statusCode = '';
|
let statusCode = '';
|
||||||
while (statusCode !== 'succeeded') {
|
while (statusCode !== 'succeeded') {
|
||||||
console.log('trying');
|
|
||||||
const mediafile = await (
|
const mediafile = await (
|
||||||
await this.fetch('https://api.pinterest.com/v5/media/' + media_id, {
|
await this.fetch('https://api.pinterest.com/v5/media/' + media_id, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
|
@ -215,9 +214,7 @@ export class PinterestProvider
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const {
|
const {
|
||||||
id: pId,
|
id: pId
|
||||||
link,
|
|
||||||
...all
|
|
||||||
} = await (
|
} = await (
|
||||||
await this.fetch('https://api.pinterest.com/v5/pins', {
|
await this.fetch('https://api.pinterest.com/v5/pins', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|
@ -232,11 +229,9 @@ export class PinterestProvider
|
||||||
...(postDetails?.[0]?.settings.title
|
...(postDetails?.[0]?.settings.title
|
||||||
? { title: postDetails?.[0]?.settings.title }
|
? { title: postDetails?.[0]?.settings.title }
|
||||||
: {}),
|
: {}),
|
||||||
...(postDetails?.[0]?.settings.description
|
description: postDetails?.[0]?.message,
|
||||||
? { title: postDetails?.[0]?.settings.description }
|
|
||||||
: {}),
|
|
||||||
...(postDetails?.[0]?.settings.dominant_color
|
...(postDetails?.[0]?.settings.dominant_color
|
||||||
? { title: postDetails?.[0]?.settings.dominant_color }
|
? { dominant_color: postDetails?.[0]?.settings.dominant_color }
|
||||||
: {}),
|
: {}),
|
||||||
board_id: postDetails?.[0]?.settings.board,
|
board_id: postDetails?.[0]?.settings.board,
|
||||||
media_source: mediaId
|
media_source: mediaId
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue