Compare commits

...

14 Commits

Author SHA1 Message Date
lencx
51344ebe00 v0.8.1 2023-01-12 19:29:21 +08:00
lencx
b3589257ae v0.8.1 2023-01-12 19:29:05 +08:00
lencx
9c960b2a8e v0.8.1 2023-01-12 19:28:24 +08:00
lencx
080a77031d v0.8.1 2023-01-12 19:28:16 +08:00
lencx
71b37f690c fix: export (#126 #185 #189) 2023-01-12 19:21:48 +08:00
lencx
9fa0fe8e6c readme 2023-01-11 00:10:18 +08:00
lencx
1045f0a689 v0.8.0 2023-01-07 15:30:12 +08:00
lencx
5062769956 Merge pull request #169 from lencx/dev 2023-01-07 15:28:59 +08:00
lencx
b791044a22 v0.8.0 2023-01-07 15:25:08 +08:00
lencx
81ff2b89f1 v0.8.1 2023-01-07 14:57:41 +08:00
lencx
ee576b9a69 fix: winget release 2023-01-07 14:57:28 +08:00
lencx
d7ab912917 fix: winget release 2023-01-07 14:53:18 +08:00
lencx
fc74ce30ed fix: winget release 2023-01-07 14:46:34 +08:00
lencx
fad7c5221b fix: winget release 2023-01-07 14:38:16 +08:00
8 changed files with 62 additions and 32 deletions

View File

@@ -2,7 +2,6 @@ name: Release CI
on: on:
push: push:
# Sequence of patterns matched against refs/tags
tags: tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
@@ -99,5 +98,5 @@ jobs:
- uses: vedantmgoyal2009/winget-releaser@v1 - uses: vedantmgoyal2009/winget-releaser@v1
with: with:
identifier: lencx.ChatGPT identifier: lencx.ChatGPT
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.WINGET_TOKEN }}
version: ${{ env.version }} version: ${{ env.version }}

View File

@@ -22,22 +22,22 @@
### Windows ### Windows
- [ChatGPT_0.8.0_x64_en-US.msi](https://github.com/lencx/ChatGPT/releases/download/v0.8.0/ChatGPT_0.8.0_x64_en-US.msi): - [ChatGPT_0.8.1_x64_en-US.msi](https://github.com/lencx/ChatGPT/releases/download/v0.8.1/ChatGPT_0.8.1_x64_en-US.msi):
- 使用 [winget](https://winstall.app/apps/lencx.ChatGPT): - 使用 [winget](https://winstall.app/apps/lencx.ChatGPT):
```bash ```bash
# install the latest version # install the latest version
winget install --id=lencx.ChatGPT -e winget install --id=lencx.ChatGPT -e
# install the specified version # install the specified version
winget install --id=lencx.ChatGPT -e --version 0.8.0 winget install --id=lencx.ChatGPT -e --version 0.8.1
``` ```
**注意:如果安装路径和应用名称相同,会导致冲突 ([#142](https://github.com/lencx/ChatGPT/issues/142#issuecomment-0.8.0))** **注意:如果安装路径和应用名称相同,会导致冲突 ([#142](https://github.com/lencx/ChatGPT/issues/142#issuecomment-0.8.1))**
### Mac ### Mac
- [ChatGPT_0.8.0_x64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.8.0/ChatGPT_0.8.0_x64.dmg) - [ChatGPT_0.8.1_x64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.8.1/ChatGPT_0.8.1_x64.dmg)
- [ChatGPT.app.tar.gz](https://github.com/lencx/ChatGPT/releases/download/v0.8.0/ChatGPT.app.tar.gz) - [ChatGPT.app.tar.gz](https://github.com/lencx/ChatGPT/releases/download/v0.8.1/ChatGPT.app.tar.gz)
- Homebrew \ - Homebrew \
_[Homebrew 快捷安装](https://brew.sh) ([Cask](https://docs.brew.sh/Cask-Cookbook)):_ _[Homebrew 快捷安装](https://brew.sh) ([Cask](https://docs.brew.sh/Cask-Cookbook)):_
```sh ```sh
@@ -53,8 +53,8 @@
### Linux ### Linux
- [chat-gpt_0.8.0_amd64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.8.0/chat-gpt_0.8.0_amd64.deb) - [chat-gpt_0.8.1_amd64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.8.1/chat-gpt_0.8.1_amd64.deb)
- [chat-gpt_0.8.0_amd64.AppImage](https://github.com/lencx/ChatGPT/releases/download/v0.8.0/chat-gpt_0.8.0_amd64.AppImage): **工作可靠,`.deb` 运行失败时可以尝试它** - [chat-gpt_0.8.1_amd64.AppImage](https://github.com/lencx/ChatGPT/releases/download/v0.8.1/chat-gpt_0.8.1_amd64.AppImage): **工作可靠,`.deb` 运行失败时可以尝试它**
- 使用 [AUR](https://aur.archlinux.org/packages/chatgpt-desktop-bin): - 使用 [AUR](https://aur.archlinux.org/packages/chatgpt-desktop-bin):
```bash ```bash
yay -S chatgpt-desktop-bin yay -S chatgpt-desktop-bin

View File

@@ -24,22 +24,22 @@
### Windows ### Windows
- [ChatGPT_0.8.0_x64_en-US.msi](https://github.com/lencx/ChatGPT/releases/download/v0.8.0/ChatGPT_0.8.0_x64_en-US.msi): Direct download installer - [ChatGPT_0.8.1_x64_en-US.msi](https://github.com/lencx/ChatGPT/releases/download/v0.8.1/ChatGPT_0.8.1_x64_en-US.msi): Direct download installer
- Use [winget](https://winstall.app/apps/lencx.ChatGPT): - Use [winget](https://winstall.app/apps/lencx.ChatGPT):
```bash ```bash
# install the latest version # install the latest version
winget install --id=lencx.ChatGPT -e winget install --id=lencx.ChatGPT -e
# install the specified version # install the specified version
winget install --id=lencx.ChatGPT -e --version 0.8.0 winget install --id=lencx.ChatGPT -e --version 0.8.1
``` ```
**Note: If the installation path and application name are the same, it will lead to conflict ([#142](https://github.com/lencx/ChatGPT/issues/142#issuecomment-0.8.0))** **Note: If the installation path and application name are the same, it will lead to conflict ([#142](https://github.com/lencx/ChatGPT/issues/142#issuecomment-0.8.1))**
### Mac ### Mac
- [ChatGPT_0.8.0_x64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.8.0/ChatGPT_0.8.0_x64.dmg): Direct download installer - [ChatGPT_0.8.1_x64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.8.1/ChatGPT_0.8.1_x64.dmg): Direct download installer
- [ChatGPT.app.tar.gz](https://github.com/lencx/ChatGPT/releases/download/v0.8.0/ChatGPT.app.tar.gz): Download the `.app` installer - [ChatGPT.app.tar.gz](https://github.com/lencx/ChatGPT/releases/download/v0.8.1/ChatGPT.app.tar.gz): Download the `.app` installer
- Homebrew \ - Homebrew \
Or you can install with _[Homebrew](https://brew.sh) ([Cask](https://docs.brew.sh/Cask-Cookbook)):_ Or you can install with _[Homebrew](https://brew.sh) ([Cask](https://docs.brew.sh/Cask-Cookbook)):_
```sh ```sh
@@ -55,8 +55,8 @@
### Linux ### Linux
- [chat-gpt_0.8.0_amd64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.8.0/chat-gpt_0.8.0_amd64.deb): Download `.deb` installer, advantage small size, disadvantage poor compatibility - [chat-gpt_0.8.1_amd64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.8.1/chat-gpt_0.8.1_amd64.deb): Download `.deb` installer, advantage small size, disadvantage poor compatibility
- [chat-gpt_0.8.0_amd64.AppImage](https://github.com/lencx/ChatGPT/releases/download/v0.8.0/chat-gpt_0.8.0_amd64.AppImage): Works reliably, you can try it if `.deb` fails to run - [chat-gpt_0.8.1_amd64.AppImage](https://github.com/lencx/ChatGPT/releases/download/v0.8.1/chat-gpt_0.8.1_amd64.AppImage): Works reliably, you can try it if `.deb` fails to run
- Available on [AUR](https://aur.archlinux.org/packages/chatgpt-desktop-bin) with the package name `chatgpt-desktop-bin`, and you can use your favourite AUR package manager to install it. - Available on [AUR](https://aur.archlinux.org/packages/chatgpt-desktop-bin) with the package name `chatgpt-desktop-bin`, and you can use your favourite AUR package manager to install it.
<!-- download end --> <!-- download end -->
@@ -203,7 +203,7 @@ It's safe, just a wrapper for [OpenAI ChatGPT](https://chat.openai.com) website,
--- ---
### How do i build it? ### How do I build it?
#### PreInstall #### PreInstall

View File

@@ -1,5 +1,12 @@
# UPDATE LOG # UPDATE LOG
## v0.8.1
fix:
- export button keeps blinking
- export button in the old chat does not work
- disable export sharing links because it is a security risk
## v0.8.0 ## v0.8.0
feat: feat:

View File

@@ -71,7 +71,7 @@ async function init() {
document.addEventListener("click", (e) => { document.addEventListener("click", (e) => {
const origin = e.target.closest("a"); const origin = e.target.closest("a");
if (!origin.target) return; if (!origin || !origin.target) return;
if (origin && origin.href && origin.target !== '_self') { if (origin && origin.href && origin.target !== '_self') {
invoke('open_link', { url: origin.href }); invoke('open_link', { url: origin.href });
} }

View File

@@ -3,7 +3,7 @@
async function init() { async function init() {
document.addEventListener("click", (e) => { document.addEventListener("click", (e) => {
const origin = e.target.closest("a"); const origin = e.target.closest("a");
if (!origin.target) return; if (!origin || !origin.target) return;
if (origin && origin.href && origin.target !== '_self') { if (origin && origin.href && origin.target !== '_self') {
if (/\/(login|signup)$/.test(window.location.href)) { if (/\/(login|signup)$/.test(window.location.href)) {
origin.target = '_self'; origin.target = '_self';

View File

@@ -24,7 +24,7 @@ async function init() {
} else if (shouldRemoveButtons()) { } else if (shouldRemoveButtons()) {
removeButtons(); removeButtons();
} }
}, 200); }, 1000);
} }
const Format = { const Format = {
@@ -47,9 +47,16 @@ function shouldRemoveButtons() {
function shouldAddButtons(actionsArea) { function shouldAddButtons(actionsArea) {
// first, check if there's a "Try Again" button and no other buttons // first, check if there's a "Try Again" button and no other buttons
const buttons = actionsArea.querySelectorAll("button"); const buttons = actionsArea.querySelectorAll("button");
const hasTryAgainButton = Array.from(buttons).some((button) => { const hasTryAgainButton = Array.from(buttons).some((button) => {
return !button.id?.includes("download"); return !button.id?.includes("download");
}); });
// fix: https://github.com/lencx/ChatGPT/issues/189
if (buttons.length === 1) {
return false;
}
if (hasTryAgainButton && buttons.length === 1) { if (hasTryAgainButton && buttons.length === 1) {
return true; return true;
} }
@@ -106,16 +113,18 @@ function addActionsButtons(actionsArea, TryAgainButton) {
downloadThread({ as: Format.PDF }); downloadThread({ as: Format.PDF });
}; };
actionsArea.appendChild(downloadPdfButton); actionsArea.appendChild(downloadPdfButton);
const exportHtml = TryAgainButton.cloneNode(true);
exportHtml.id = "download-html-button"; // fix: https://github.com/lencx/ChatGPT/issues/126
downloadButton.setAttribute("share-ext", "true"); // const exportHtml = TryAgainButton.cloneNode(true);
// exportHtml.innerText = "Share Link"; // exportHtml.id = "download-html-button";
exportHtml.title = "Share Link"; // downloadButton.setAttribute("share-ext", "true");
exportHtml.innerHTML = setIcon('link'); // // exportHtml.innerText = "Share Link";
exportHtml.onclick = () => { // exportHtml.title = "Share Link";
sendRequest(); // exportHtml.innerHTML = setIcon('link');
}; // exportHtml.onclick = () => {
actionsArea.appendChild(exportHtml); // sendRequest();
// };
// actionsArea.appendChild(exportHtml);
} }
function downloadThread({ as = Format.PNG } = {}) { function downloadThread({ as = Format.PNG } = {}) {
@@ -175,12 +184,27 @@ class Elements {
this.thread = document.querySelector( this.thread = document.querySelector(
"[class*='react-scroll-to-bottom']>[class*='react-scroll-to-bottom']>div" "[class*='react-scroll-to-bottom']>[class*='react-scroll-to-bottom']>div"
); );
// fix: old chat https://github.com/lencx/ChatGPT/issues/185
if (!this.thread) {
this.thread = document.querySelector(
"main .overflow-y-auto"
);
}
// h-full overflow-y-auto
this.positionForm = document.querySelector("form").parentNode; this.positionForm = document.querySelector("form").parentNode;
// this.styledThread = document.querySelector("main"); // this.styledThread = document.querySelector("main");
// this.threadContent = document.querySelector(".gAnhyd"); // this.threadContent = document.querySelector(".gAnhyd");
this.scroller = Array.from( this.scroller = Array.from(
document.querySelectorAll('[class*="react-scroll-to"]') document.querySelectorAll('[class*="react-scroll-to"]')
).filter((el) => el.classList.contains("h-full"))[0]; ).filter((el) => el.classList.contains("h-full"))[0];
// fix: old chat
if (!this.scroller) {
this.scroller = document.querySelector('main .overflow-y-auto');
}
this.hiddens = Array.from(document.querySelectorAll(".overflow-hidden")); this.hiddens = Array.from(document.querySelectorAll(".overflow-hidden"));
this.images = Array.from(document.querySelectorAll("img[srcset]")); this.images = Array.from(document.querySelectorAll("img[srcset]"));
} }

View File

@@ -7,7 +7,7 @@
}, },
"package": { "package": {
"productName": "ChatGPT", "productName": "ChatGPT",
"version": "0.8.0" "version": "0.8.1"
}, },
"tauri": { "tauri": {
"allowlist": { "allowlist": {