feat: 完成分享、单会话与发布审批改造

- 增加工作流协作分享与知识库卡片分享入口,统一低版本浏览器复制反馈

- Web 新登录替换旧会话,并保持 API Key 会话隔离

- 发布审批增加必填说明并在审批详情展示

- 账号重置与导入改用可配置默认强密码
This commit is contained in:
2026-07-23 16:09:31 +08:00
parent caa1f07b66
commit 5a42826d44
71 changed files with 3191 additions and 132 deletions

View File

@@ -19,6 +19,11 @@ import { ElMessage } from 'element-plus';
import { events } from 'fetch-event-stream';
import { useAuthStore } from '#/store';
import {
readWorkflowShareKey,
withWorkflowShareHeader,
WORKFLOW_SHARE_HEADER,
} from '#/utils/workflow-share-context';
import { refreshTokenApi } from './core';
@@ -95,6 +100,10 @@ function createRequestClient(baseURL: string, options?: RequestClientOptions) {
config.headers['easyflow-token'] = formatToken(accessStore.accessToken);
config.headers['Accept-Language'] = preferences.app.locale;
const workflowShareKey = readWorkflowShareKey();
if (workflowShareKey) {
config.headers[WORKFLOW_SHARE_HEADER] = workflowShareKey;
}
return config;
},
});
@@ -263,13 +272,12 @@ export class SseClient {
'Content-Type': 'application/json',
'easyflow-token': accessStore.accessToken || '',
};
if (!extraHeaders) {
return headers;
if (extraHeaders) {
new Headers(extraHeaders).forEach((value, key) => {
headers[key] = value;
});
}
new Headers(extraHeaders).forEach((value, key) => {
headers[key] = value;
});
return headers;
return withWorkflowShareHeader(headers);
}
}