Skip to content

Commit

Permalink
Merge pull request #5250 from systeminit/fix/func-updated-shouldnt-na…
Browse files Browse the repository at this point in the history
…vigate

FuncUpdated should not navigate. Also icon menu button disabling when locked
  • Loading branch information
jobelenus authored Jan 14, 2025
2 parents c1f077e + 9ebbad2 commit d425ef0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
1 change: 1 addition & 0 deletions app/web/src/components/AssetDetailIntrinsicInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
/>
</DropdownMenu>
<DetailsPanelMenuIcon
:disabled="isLocked"
:selected="contextMenuRef?.isOpen"
@click="
(e) => {
Expand Down
2 changes: 2 additions & 0 deletions app/web/src/components/DetailsPanelMenuIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
icon="dots-vertical"
iconIdleTone="neutral"
:selected="selected"
:disabled="disabled"
/>
</template>

Expand All @@ -12,5 +13,6 @@ import { IconButton } from "@si/vue-lib/design-system";
defineProps({
selected: { type: Boolean },
disabled: { type: Boolean, default: false },
});
</script>
10 changes: 1 addition & 9 deletions app/web/src/store/func/funcs.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ export const useFuncStore = () => {
},
{
eventType: "FuncUpdated",
callback: (data, metadata) => {
callback: (data) => {
if (data.changeSetId !== selectedChangeSetId) return;
// Requests that send client ID are assumed to update the state directly
// So we skip updating them from the websocket event
Expand All @@ -890,14 +890,6 @@ export const useFuncStore = () => {
bindings.codegenBindings;
this.managementBindings[data.funcSummary.funcId] =
bindings.managementBindings;

if (
metadata.actor !== "System" &&
metadata.actor.User === authStore.userPk
) {
const assetStore = useAssetStore(selectedChangeSetId);
assetStore.setFuncSelection(data.funcSummary.funcId);
}
},
},
{
Expand Down

0 comments on commit d425ef0

Please sign in to comment.