mirror of
https://github.com/pionxzh/chatgpt-exporter.git
synced 2026-09-21 05:27:34 -05:00
fix: stop idle queues silently on cancel and translate the Cancel button
Cancelling an export used to stop() the idle archive/delete queues too, whose done handlers then alerted that conversations were archived and deleted when nothing had happened. A queue now only emits done on stop when it was actually running
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
"Archive": "Archive",
|
||||
"Save": "Save",
|
||||
"Delete": "Delete",
|
||||
"Cancel": "Cancel",
|
||||
"Select All": "Select All",
|
||||
"Select...": "Select...",
|
||||
"Select Not Exported": "Select Not Exported",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"Archive": "Archivo",
|
||||
"Save": "Guardar",
|
||||
"Delete": "Borrar",
|
||||
"Cancel": "Cancelar",
|
||||
"Select All": "Seleccionar Todos",
|
||||
"Select...": "Selección…",
|
||||
"Select Not Exported": "Seleccionar conversaciones no exportadas",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"Archive": "Archiver",
|
||||
"Save": "Enregistrer",
|
||||
"Delete": "Supprimer",
|
||||
"Cancel": "Annuler",
|
||||
"Select All": "Tout sélectionner",
|
||||
"Select...": "Sélection…",
|
||||
"Select Not Exported": "Sélectionner les conversations non exportées",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"Archive": "Arsip",
|
||||
"Save": "Simpan",
|
||||
"Delete": "Hapus",
|
||||
"Cancel": "Batal",
|
||||
"Select All": "Pilih Semua",
|
||||
"Select...": "Pilih massal…",
|
||||
"Select Not Exported": "Pilih percakapan yang belum diekspor",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"Archive": "アーカイブ",
|
||||
"Save": "保存",
|
||||
"Delete": "削除",
|
||||
"Cancel": "キャンセル",
|
||||
"Select All": "すべて選択",
|
||||
"Select...": "一括選択…",
|
||||
"Select Not Exported": "未エクスポートの会話を選択",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"Archive": "Архивировать",
|
||||
"Save": "Сохранить",
|
||||
"Delete": "Удалить",
|
||||
"Cancel": "Отмена",
|
||||
"Select All": "Выбрать все",
|
||||
"Select...": "Выбрать…",
|
||||
"Select Not Exported": "Выбрать неэкспортированные разговоры",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"Archive": "Arşiv",
|
||||
"Save": "Kaydet",
|
||||
"Delete": "Sil",
|
||||
"Cancel": "İptal",
|
||||
"Select All": "Tümünü Seç",
|
||||
"Select...": "Toplu seçim…",
|
||||
"Select Not Exported": "Dışa aktarılmamış konuşmaları seç",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"Archive": "归档",
|
||||
"Save": "保存",
|
||||
"Delete": "删除",
|
||||
"Cancel": "取消",
|
||||
"Select All": "全选",
|
||||
"Select...": "批量选择…",
|
||||
"Select Not Exported": "选择未导出的对话",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"Archive": "封存",
|
||||
"Save": "保存",
|
||||
"Delete": "刪除",
|
||||
"Cancel": "取消",
|
||||
"Select All": "全選",
|
||||
"Select...": "批次選取…",
|
||||
"Select Not Exported": "選取未匯出的對話",
|
||||
|
||||
@@ -834,7 +834,7 @@ const DialogContent: FC<DialogContentProps> = ({ format }) => {
|
||||
title="Stop the export — any batches already downloaded are kept"
|
||||
onClick={cancelExport}
|
||||
>
|
||||
Cancel
|
||||
{t('Cancel')}
|
||||
</button>
|
||||
</div>
|
||||
<div className="w-full bg-gray-200 rounded-full h-2.5 mb-4 dark:bg-gray-700">
|
||||
|
||||
+5
-1
@@ -97,8 +97,12 @@ export class RequestQueue<T> {
|
||||
|
||||
stop() {
|
||||
this.runId++
|
||||
const wasRunning = this.status === 'IN_PROGRESS'
|
||||
this.status = 'STOPPED'
|
||||
this.eventEmitter.emit('done', this.results)
|
||||
// Only a queue that was actually running reports back — an idle
|
||||
// queue emitting 'done' makes its listeners announce work (archive/
|
||||
// delete alerts) that never happened
|
||||
if (wasRunning) this.eventEmitter.emit('done', this.results)
|
||||
}
|
||||
|
||||
clear() {
|
||||
|
||||
Reference in New Issue
Block a user