mirror of
https://github.com/open-webui/open-webui
synced 2025-05-29 17:52:48 +00:00
refac
This commit is contained in:
parent
d93828e923
commit
4f5aba8be7
@ -96,7 +96,7 @@
|
|||||||
heightLeft -= pageHeight;
|
heightLeft -= pageHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
pdf.save('document.pdf');
|
pdf.save(`chat-${chat.chat.title}.pdf`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error generating PDF', error);
|
console.error('Error generating PDF', error);
|
||||||
}
|
}
|
||||||
|
@ -79,6 +79,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
const downloadPdf = async () => {
|
const downloadPdf = async () => {
|
||||||
|
const chat = await getChatById(localStorage.token, chatId);
|
||||||
const containerElement = document.getElementById('messages-container');
|
const containerElement = document.getElementById('messages-container');
|
||||||
|
|
||||||
if (containerElement) {
|
if (containerElement) {
|
||||||
@ -113,7 +114,7 @@
|
|||||||
heightLeft -= pageHeight;
|
heightLeft -= pageHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
pdf.save('document.pdf');
|
pdf.save(`chat-${chat.chat.title}.pdf`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error generating PDF', error);
|
console.error('Error generating PDF', error);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user