fix: export buttons (#286)

This commit is contained in:
lencx
2023-02-02 00:39:30 +08:00
parent 8aeca251e6
commit 62924975a6
2 changed files with 10 additions and 2 deletions

View File

@@ -5,6 +5,10 @@
Fix: Fix:
- PNG and PDF buttons do not work (https://github.com/lencx/ChatGPT/issues/274) - PNG and PDF buttons do not work (https://github.com/lencx/ChatGPT/issues/274)
- Change the window size and the Send button is obscured by the Export button (https://github.com/lencx/ChatGPT/issues/286)
- Change forward and backward shortcuts (https://github.com/lencx/ChatGPT/issues/254)
- MacOS: `Cmd [`, `Cmd ]`
- Windows and Linux: `Ctrl [`, `Ctrl ]`
Feat: Feat:

View File

@@ -2,11 +2,13 @@
async function init() { async function init() {
const buttonOuterHTMLFallback = `<button class="btn flex justify-center gap-2 btn-neutral" id="download-png-button">Try Again</button>`; const buttonOuterHTMLFallback = `<button class="btn flex justify-center gap-2 btn-neutral" id="download-png-button">Try Again</button>`;
if (window.innerWidth < 767) return; removeButtons();
const chatConf = await invoke('get_app_conf') || {};
if (window.buttonsInterval) { if (window.buttonsInterval) {
clearInterval(window.buttonsInterval); clearInterval(window.buttonsInterval);
} }
if (window.innerWidth < 767) return;
const chatConf = await invoke('get_app_conf') || {};
window.buttonsInterval = setInterval(() => { window.buttonsInterval = setInterval(() => {
const actionsArea = document.querySelector("form>div>div"); const actionsArea = document.querySelector("form>div>div");
if (!actionsArea) { if (!actionsArea) {
@@ -27,6 +29,8 @@ async function init() {
}, 1000); }, 1000);
} }
window.addEventListener('resize', init);
const Format = { const Format = {
PNG: "png", PNG: "png",
PDF: "pdf", PDF: "pdf",