) => {
if (getNodesReadOnly())
@@ -110,7 +61,7 @@ const Control = () => {
{
{
'flex items-center justify-center w-8 h-8 rounded-lg hover:bg-black/5 hover:text-gray-700 cursor-pointer',
`${nodesReadOnly && '!cursor-not-allowed opacity-50'}`,
)}
- onClick={goLayout}
+ onClick={handleLayout}
>
diff --git a/web/app/components/workflow/operator/zoom-in-out.tsx b/web/app/components/workflow/operator/zoom-in-out.tsx
index 13047cdafc..654097b430 100644
--- a/web/app/components/workflow/operator/zoom-in-out.tsx
+++ b/web/app/components/workflow/operator/zoom-in-out.tsx
@@ -9,7 +9,6 @@ import {
RiZoomInLine,
RiZoomOutLine,
} from '@remixicon/react'
-import { useKeyPress } from 'ahooks'
import { useTranslation } from 'react-i18next'
import {
useReactFlow,
@@ -20,9 +19,7 @@ import {
useWorkflowReadOnly,
} from '../hooks'
import {
- getKeyboardKeyCodeBySystem,
getKeyboardKeyNameBySystem,
- isEventTargetInputArea,
} from '../utils'
import ShortcutsName from '../shortcuts-name'
import TipPopup from './tip-popup'
@@ -116,87 +113,6 @@ const ZoomInOut: FC = () => {
handleSyncWorkflowDraft()
}
- useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.1`, (e) => {
- e.preventDefault()
- if (workflowReadOnly)
- return
-
- fitView()
- handleSyncWorkflowDraft()
- }, {
- exactMatch: true,
- useCapture: true,
- })
-
- useKeyPress('shift.1', (e) => {
- if (workflowReadOnly)
- return
-
- if (isEventTargetInputArea(e.target as HTMLElement))
- return
-
- e.preventDefault()
- zoomTo(1)
- handleSyncWorkflowDraft()
- }, {
- exactMatch: true,
- useCapture: true,
- })
-
- useKeyPress('shift.2', (e) => {
- if (workflowReadOnly)
- return
-
- if (isEventTargetInputArea(e.target as HTMLElement))
- return
-
- e.preventDefault()
- zoomTo(2)
- handleSyncWorkflowDraft()
- }, {
- exactMatch: true,
- useCapture: true,
- })
-
- useKeyPress('shift.5', (e) => {
- if (workflowReadOnly)
- return
-
- if (isEventTargetInputArea(e.target as HTMLElement))
- return
-
- e.preventDefault()
- zoomTo(0.5)
- handleSyncWorkflowDraft()
- }, {
- exactMatch: true,
- useCapture: true,
- })
-
- useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.dash`, (e) => {
- e.preventDefault()
- if (workflowReadOnly)
- return
-
- zoomOut()
- handleSyncWorkflowDraft()
- }, {
- exactMatch: true,
- useCapture: true,
- })
-
- useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.equalsign`, (e) => {
- e.preventDefault()
- if (workflowReadOnly)
- return
-
- zoomIn()
- handleSyncWorkflowDraft()
- }, {
- exactMatch: true,
- useCapture: true,
- })
-
const handleTrigger = useCallback(() => {
if (getWorkflowReadOnly())
return
@@ -289,11 +205,6 @@ const ZoomInOut: FC = () => {
)
}
- {
- option.key === ZoomType.zoomTo200 && (
-
- )
- }
))
}
diff --git a/web/app/components/workflow/panel/index.tsx b/web/app/components/workflow/panel/index.tsx
index 864e24aa80..a35bedc929 100644
--- a/web/app/components/workflow/panel/index.tsx
+++ b/web/app/components/workflow/panel/index.tsx
@@ -7,7 +7,6 @@ import { Panel as NodePanel } from '../nodes'
import { useStore } from '../store'
import {
useIsChatMode,
- useWorkflow,
} from '../hooks'
import DebugAndPreview from './debug-and-preview'
import Record from './record'
@@ -28,10 +27,6 @@ const Panel: FC = () => {
const showEnvPanel = useStore(s => s.showEnvPanel)
const showChatVariablePanel = useStore(s => s.showChatVariablePanel)
const isRestoring = useStore(s => s.isRestoring)
- const {
- enableShortcuts,
- disableShortcuts,
- } = useWorkflow()
const { currentLogItem, setCurrentLogItem, showMessageLogModal, setShowMessageLogModal, currentLogModalActiveTab } = useAppStore(useShallow(state => ({
currentLogItem: state.currentLogItem,
setCurrentLogItem: state.setCurrentLogItem,
@@ -44,8 +39,6 @@ const Panel: FC = () => {
{
diff --git a/web/app/components/workflow/store.ts b/web/app/components/workflow/store.ts
index 854684e5c3..2e5e774191 100644
--- a/web/app/components/workflow/store.ts
+++ b/web/app/components/workflow/store.ts
@@ -99,8 +99,6 @@ type Shape = {
setWorkflowTools: (tools: ToolWithProvider[]) => void
clipboardElements: Node[]
setClipboardElements: (clipboardElements: Node[]) => void
- shortcutsDisabled: boolean
- setShortcutsDisabled: (shortcutsDisabled: boolean) => void
showDebugAndPreviewPanel: boolean
setShowDebugAndPreviewPanel: (showDebugAndPreviewPanel: boolean) => void
showEnvPanel: boolean
@@ -217,8 +215,6 @@ export const createWorkflowStore = () => {
setWorkflowTools: workflowTools => set(() => ({ workflowTools })),
clipboardElements: [],
setClipboardElements: clipboardElements => set(() => ({ clipboardElements })),
- shortcutsDisabled: false,
- setShortcutsDisabled: shortcutsDisabled => set(() => ({ shortcutsDisabled })),
showDebugAndPreviewPanel: false,
setShowDebugAndPreviewPanel: showDebugAndPreviewPanel => set(() => ({ showDebugAndPreviewPanel })),
showEnvPanel: false,
diff --git a/web/app/components/workflow/types.ts b/web/app/components/workflow/types.ts
index 03f78ea21b..034376fed5 100644
--- a/web/app/components/workflow/types.ts
+++ b/web/app/components/workflow/types.ts
@@ -29,6 +29,11 @@ export enum BlockEnum {
Assigner = 'assigner', // is now named as VariableAssigner
}
+export enum ControlMode {
+ Pointer = 'pointer',
+ Hand = 'hand',
+}
+
export type Branch = {
id: string
name: string
diff --git a/web/i18n/de-DE/app.ts b/web/i18n/de-DE/app.ts
index 1ebc84d506..55caff2284 100644
--- a/web/i18n/de-DE/app.ts
+++ b/web/i18n/de-DE/app.ts
@@ -49,6 +49,8 @@ const translation = {
iconPicker: {
ok: 'OK',
cancel: 'Abbrechen',
+ emoji: 'Emoji',
+ image: 'Bild',
},
switch: 'Zu Workflow-Orchestrierung wechseln',
switchTipStart: 'Eine neue App-Kopie wird für Sie erstellt, und die neue Kopie wird zur Workflow-Orchestrierung wechseln. Die neue Kopie wird ',
diff --git a/web/i18n/es-ES/app.ts b/web/i18n/es-ES/app.ts
index c3d7a8362b..739439ff58 100644
--- a/web/i18n/es-ES/app.ts
+++ b/web/i18n/es-ES/app.ts
@@ -70,6 +70,8 @@ const translation = {
iconPicker: {
ok: 'OK',
cancel: 'Cancelar',
+ emoji: 'Emoji',
+ image: 'Imagen',
},
switch: 'Cambiar a Orquestación de Flujo de Trabajo',
switchTipStart: 'Se creará una nueva copia de la app para ti y la nueva copia cambiará a Orquestación de Flujo de Trabajo. La nueva copia no permitirá',
diff --git a/web/i18n/fa-IR/app.ts b/web/i18n/fa-IR/app.ts
index 9f2563709e..b9dd179809 100644
--- a/web/i18n/fa-IR/app.ts
+++ b/web/i18n/fa-IR/app.ts
@@ -74,6 +74,8 @@ const translation = {
iconPicker: {
ok: 'باشه',
cancel: 'لغو',
+ emoji: 'ایموجی',
+ image: 'تصویر',
},
switch: 'تغییر به سازماندهی گردش کار',
switchTipStart: 'یک نسخه جدید از برنامه برای شما ایجاد خواهد شد و نسخه جدید به سازماندهی گردش کار تغییر خواهد کرد. نسخه جدید ',
diff --git a/web/i18n/fr-FR/app.ts b/web/i18n/fr-FR/app.ts
index e3268ae137..fab9b98f99 100644
--- a/web/i18n/fr-FR/app.ts
+++ b/web/i18n/fr-FR/app.ts
@@ -70,6 +70,8 @@ const translation = {
iconPicker: {
ok: 'OK',
cancel: 'Annuler',
+ emoji: 'Emoji',
+ image: 'Image',
},
switch: 'Passer à l\'orchestration de flux de travail',
switchTipStart: 'Une nouvelle copie de l\'application sera créée pour vous, et la nouvelle copie passera à l\'orchestration de flux de travail. La nouvelle copie ne permettra pas le ',
diff --git a/web/i18n/hi-IN/app.ts b/web/i18n/hi-IN/app.ts
index e2b4412332..3f22b6701b 100644
--- a/web/i18n/hi-IN/app.ts
+++ b/web/i18n/hi-IN/app.ts
@@ -70,6 +70,8 @@ const translation = {
iconPicker: {
ok: 'ठीक है',
cancel: 'रद्द करें',
+ emoji: 'इमोजी',
+ image: 'छवि',
},
switch: 'वर्कफ़्लो ऑर्केस्ट्रेट पर स्विच करें',
switchTipStart: 'आपके लिए एक नई ऐप कॉपी बनाई जाएगी, और नई कॉपी वर्कफ़्लो ऑर्केस्ट्रेट में स्विच हो जाएगी। नई कॉपी ',
diff --git a/web/i18n/it-IT/app.ts b/web/i18n/it-IT/app.ts
index 3c23c3ea94..265cb58ec4 100644
--- a/web/i18n/it-IT/app.ts
+++ b/web/i18n/it-IT/app.ts
@@ -76,6 +76,8 @@ const translation = {
iconPicker: {
ok: 'OK',
cancel: 'Annulla',
+ emoji: 'Emoji',
+ image: 'Immagine',
},
switch: 'Passa a Orchestrazione del flusso di lavoro',
switchTipStart:
diff --git a/web/i18n/ja-JP/app.ts b/web/i18n/ja-JP/app.ts
index ece86a442d..55f641f4c3 100644
--- a/web/i18n/ja-JP/app.ts
+++ b/web/i18n/ja-JP/app.ts
@@ -75,6 +75,8 @@ const translation = {
iconPicker: {
ok: 'OK',
cancel: 'キャンセル',
+ emoji: '絵文字',
+ image: '画像',
},
switch: 'ワークフロー オーケストレートに切り替える',
switchTipStart: '新しいアプリのコピーが作成され、新しいコピーがワークフロー オーケストレートに切り替わります。新しいコピーは ',
diff --git a/web/i18n/ko-KR/app.ts b/web/i18n/ko-KR/app.ts
index 9fbc0095f5..a1fde30e4d 100644
--- a/web/i18n/ko-KR/app.ts
+++ b/web/i18n/ko-KR/app.ts
@@ -66,6 +66,8 @@ const translation = {
iconPicker: {
ok: '확인',
cancel: '취소',
+ emoji: '이모지',
+ image: '이미지',
},
switch: '워크플로우 오케스트레이션으로 전환하기',
switchTipStart: '새로운 앱의 복사본이 생성되어 새로운 복사본이 워크플로우 오케스트레이션으로 전환됩니다. 새로운 복사본은 ',
diff --git a/web/i18n/pl-PL/app.ts b/web/i18n/pl-PL/app.ts
index cf2462d012..6a47d43798 100644
--- a/web/i18n/pl-PL/app.ts
+++ b/web/i18n/pl-PL/app.ts
@@ -76,6 +76,8 @@ const translation = {
iconPicker: {
ok: 'OK',
cancel: 'Anuluj',
+ emoji: 'Emoji',
+ image: 'Obraz',
},
switch: 'Przełącz na Orkiestrację Przepływu Pracy',
switchTipStart:
diff --git a/web/i18n/pt-BR/app.ts b/web/i18n/pt-BR/app.ts
index 6d728bad47..ef9122b86c 100644
--- a/web/i18n/pt-BR/app.ts
+++ b/web/i18n/pt-BR/app.ts
@@ -70,6 +70,8 @@ const translation = {
iconPicker: {
ok: 'OK',
cancel: 'Cancelar',
+ emoji: 'Emoji',
+ image: 'Imagem',
},
switch: 'Mudar para Orquestração de Fluxo de Trabalho',
switchTipStart: 'Será criada uma nova cópia do aplicativo para você e a nova cópia mudará para Orquestração de Fluxo de Trabalho. A nova cópia não permitirá a ',
diff --git a/web/i18n/ro-RO/app.ts b/web/i18n/ro-RO/app.ts
index 053dd47d84..2d13dd4e66 100644
--- a/web/i18n/ro-RO/app.ts
+++ b/web/i18n/ro-RO/app.ts
@@ -70,6 +70,8 @@ const translation = {
iconPicker: {
ok: 'OK',
cancel: 'Anulează',
+ emoji: 'Emoji',
+ image: 'Imagine',
},
switch: 'Comută la Orchestrare Flux de Lucru',
switchTipStart: 'O nouă copie a aplicației va fi creată pentru tine, iar noua copie va comuta la Orchestrare Flux de Lucru. Noua copie ',
diff --git a/web/i18n/tr-TR/app.ts b/web/i18n/tr-TR/app.ts
index 336d3567d1..fb1ac36762 100644
--- a/web/i18n/tr-TR/app.ts
+++ b/web/i18n/tr-TR/app.ts
@@ -70,6 +70,8 @@ const translation = {
iconPicker: {
ok: 'Tamam',
cancel: 'İptal',
+ emoji: 'Emoji',
+ image: 'Görsel',
},
switch: 'Workflow Orkestrasyonuna Geç',
switchTipStart: 'Sizin için yeni bir uygulama kopyası oluşturulacak ve yeni kopya Workflow Orkestrasyonuna geçecektir. Yeni kopya ',
diff --git a/web/i18n/uk-UA/app.ts b/web/i18n/uk-UA/app.ts
index fe74f5a262..fbe9eea81e 100644
--- a/web/i18n/uk-UA/app.ts
+++ b/web/i18n/uk-UA/app.ts
@@ -70,6 +70,8 @@ const translation = {
iconPicker: {
ok: 'OK',
cancel: 'Скасувати',
+ emoji: 'Емодзі',
+ image: 'Зображення',
},
switch: 'Перейти до оркестрації робочого процесу',
switchTipStart: 'Для вас буде створена нова копія додатка, і нова копія перейде до оркестрації робочого процесу. Нова копія не дозволить ',
diff --git a/web/i18n/vi-VN/app.ts b/web/i18n/vi-VN/app.ts
index 86dd4fac6f..4052506f83 100644
--- a/web/i18n/vi-VN/app.ts
+++ b/web/i18n/vi-VN/app.ts
@@ -70,6 +70,8 @@ const translation = {
iconPicker: {
ok: 'Đồng ý',
cancel: 'Hủy',
+ emoji: 'Biểu tượng cảm xúc',
+ image: 'Hình ảnh',
},
switch: 'Chuyển sang quản lý quy trình',
switchTipStart: 'Một bản sao ứng dụng mới sẽ được tạo và chuyển sang quản lý quy trình. Bản sao mới sẽ ',
diff --git a/web/i18n/vi-VN/common.ts b/web/i18n/vi-VN/common.ts
index 80570861b5..232148ce74 100644
--- a/web/i18n/vi-VN/common.ts
+++ b/web/i18n/vi-VN/common.ts
@@ -76,9 +76,9 @@ const translation = {
},
model: {
params: {
- temperature: 'Nhiệt độ',
+ temperature: 'Độ sáng tạo',
temperatureTip:
- 'Kiểm soát độ ngẫu nhiên: Giảm nhiệt độ dẫn đến ít kết quả ngẫu nhiên hơn. Khi nhiệt độ gần bằng 0, mô hình sẽ trở nên xác định và lặp lại.',
+ 'Kiểm soát độ ngẫu nhiên: Giảm độ sáng tạo dẫn đến ít kết quả ngẫu nhiên hơn. Khi độ sáng tạo gần bằng 0, mô hình sẽ trở nên xác định và lặp lại.',
top_p: 'Top P',
top_pTip:
'Kiểm soát đa dạng thông qua lấy mẫu nhân nhóm: 0.5 có nghĩa là nửa số tùy chọn có khả năng cao được xem xét.',
diff --git a/web/i18n/zh-Hant/app.ts b/web/i18n/zh-Hant/app.ts
index 41230936e2..4b915b7f2d 100644
--- a/web/i18n/zh-Hant/app.ts
+++ b/web/i18n/zh-Hant/app.ts
@@ -69,6 +69,8 @@ const translation = {
iconPicker: {
ok: '確認',
cancel: '取消',
+ emoji: '表情符號',
+ image: '圖片',
},
switch: '遷移為工作流編排',
switchTipStart: '將為您建立一個使用工作流編排的新應用。新應用將',
diff --git a/web/package.json b/web/package.json
index f1809177d7..bbbb8f3aa1 100644
--- a/web/package.json
+++ b/web/package.json
@@ -1,6 +1,6 @@
{
"name": "dify-web",
- "version": "0.7.0",
+ "version": "0.7.1",
"private": true,
"engines": {
"node": ">=18.17.0"