Skip to content

Commit 0ffca2b

Browse files
authored
[frontend] bugfix: Incorrect read-only state after opening app publish history (#251)
1.shapes cannot move after exiting app detail page in readonly mode; 2. sometimes the graph doesn't go into readonly mode.
1 parent 0d251ce commit 0ffca2b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

app-engine/frontend/src/components/timeLine/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ const TimeLineFc = (props) => {
6767
setTimeList([]);
6868
setPage(1);
6969
hasMoreRef.current = true;
70+
elsaReadOnlyRef.current = true;
7071
window.agent?.readOnly();
7172

7273
Promise.all([

app-engine/frontend/src/pages/components/header.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ const ChoreographyHead = (props) => {
164164

165165
// 实时保存数据
166166
const updateGraph = async () => {
167+
if (preview) {
168+
return;
169+
}
167170
const currentApp = cloneDeep(appInfo);
168171
currentApp.flowGraph.appearance = window.agent.serialize();
169172
await updateFlowInfo(tenantId, appId, currentApp.flowGraph);

0 commit comments

Comments
 (0)