mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-12 04:03:42 +08:00
Fix Client App [Tauri]
[+] fix(exporter.tsx): fix issue with saving files in client app [Tauri] when there is a ':' in the dialog [+] fix(utils.ts): fix issue with saving files in client app [Tauri] when there is a ':' in the dialog
This commit is contained in:
@@ -446,8 +446,13 @@ export function ImagePreviewer(props: {
|
||||
|
||||
if (isMobile || (isApp && window.__TAURI__)) {
|
||||
if (isApp && window.__TAURI__) {
|
||||
/**
|
||||
* Fixed client app [Tauri]
|
||||
* Resolved the issue where files couldn't be saved when there was a `:` in the dialog.
|
||||
*/
|
||||
const fileName = props.topic.replace(/:/g, '');
|
||||
const result = await window.__TAURI__.dialog.save({
|
||||
defaultPath: `${props.topic}.png`,
|
||||
defaultPath: `${fileName}.png`,
|
||||
filters: [
|
||||
{
|
||||
name: "PNG Files",
|
||||
|
||||
Reference in New Issue
Block a user