Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions web/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ const heightOptions = [
];

interface AppState extends ParsedRequest {
customLogoUrl: string;
loading: boolean;
showToast: boolean;
messageToast: string;
Expand All @@ -541,6 +542,7 @@ const App = (_: any, state: AppState, setState: SetState) => {
setState({ ...newState, loading: true });
};
const {
customLogoUrl = '',
fileType = 'png',
fontSize = '100px',
theme = 'light',
Expand Down Expand Up @@ -574,8 +576,12 @@ const App = (_: any, state: AppState, setState: SetState) => {
url.searchParams.append('md', mdValue);
url.searchParams.append('showWatermark', watermarkValue);
url.searchParams.append('fontSize', fontSize);
for (let image of images) {
url.searchParams.append('images', image);
if(customLogoUrl != '') {
url.searchParams.append('images', customLogoUrl);
}else{
for (let image of images) {
url.searchParams.append('images', image);
}
}
for (let width of widths) {
url.searchParams.append('widths', width);
Expand Down Expand Up @@ -680,6 +686,15 @@ const App = (_: any, state: AppState, setState: SetState) => {
}
})
}),
H(Field, {
label: 'Link your logo',
input: H(TextInput, {
value: customLogoUrl,
oninput: (val: string) => {
setLoadingState({ customLogoUrl: val, overrideUrl: url });
}
})
}),
H(Field, {
label: 'Image',
input: H('div',
Expand Down