mirror of
https://github.com/langgenius/dify.git
synced 2026-02-09 23:20:12 -05:00
Feat node search (#23685)
Co-authored-by: GuanMu <ballmanjq@gmail.com> Co-authored-by: zhujiruo <zhujiruo@foxmail.com> Co-authored-by: Matri Qi <matrixdom@126.com> Co-authored-by: croatialu <wuli.croatia@foxmail.com> Co-authored-by: HyaCinth <88471803+HyaCiovo@users.noreply.github.com> Co-authored-by: lyzno1 <92089059+lyzno1@users.noreply.github.com>
This commit is contained in:
@@ -1,17 +1,25 @@
|
||||
import type { AppMode } from '@/types/app'
|
||||
|
||||
export const getRedirectionPath = (
|
||||
isCurrentWorkspaceEditor: boolean,
|
||||
app: { id: string, mode: AppMode },
|
||||
) => {
|
||||
if (!isCurrentWorkspaceEditor) {
|
||||
return `/app/${app.id}/overview`
|
||||
}
|
||||
else {
|
||||
if (app.mode === 'workflow' || app.mode === 'advanced-chat')
|
||||
return `/app/${app.id}/workflow`
|
||||
else
|
||||
return `/app/${app.id}/configuration`
|
||||
}
|
||||
}
|
||||
|
||||
export const getRedirection = (
|
||||
isCurrentWorkspaceEditor: boolean,
|
||||
app: { id: string, mode: AppMode },
|
||||
redirectionFunc: (href: string) => void,
|
||||
) => {
|
||||
if (!isCurrentWorkspaceEditor) {
|
||||
redirectionFunc(`/app/${app.id}/overview`)
|
||||
}
|
||||
else {
|
||||
if (app.mode === 'workflow' || app.mode === 'advanced-chat')
|
||||
redirectionFunc(`/app/${app.id}/workflow`)
|
||||
else
|
||||
redirectionFunc(`/app/${app.id}/configuration`)
|
||||
}
|
||||
const redirectionPath = getRedirectionPath(isCurrentWorkspaceEditor, app)
|
||||
redirectionFunc(redirectionPath)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user