Skip to content

Commit

Permalink
Fix 116 always go to root after saving
Browse files Browse the repository at this point in the history
  • Loading branch information
alvinsw committed Jan 25, 2024
1 parent 995a2cc commit ddb15d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/views/CrateoView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ const commands = {
await writable.write(content);
await writable.close();
data.crate = crate;
data.entityId = '';
data.validationResult = validate(data.crate, profile.value);
data.validationResultDialog = !isEmpty(data.validationResult);
}
Expand Down Expand Up @@ -333,7 +334,7 @@ function updateCrate(raw, roc) {
<el-col :xs="24" :sm="24" :md="14" :lg="10" :xl="8">
<el-row class="w-full p-1">
<span class="flex items-center">Mode:&nbsp;</span>
<el-select v-model="data.selectedProfile" placeholder="Select a mode" class="w-[30em]">
<el-select v-model="data.selectedProfile" placeholder="Select a mode" class="w-[30em]" :disabled="!data.dirHandle">
<el-option :value="-1">
<p class="font-bold italic">Load and add a new mode from your computer ...</p>
</el-option>
Expand Down
3 changes: 3 additions & 0 deletions src/lib/components/CrateEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ function updateEntity(entity, prop, value) {
entity[prop] = value;
emit('update:crate', props.crate); // ,state.crate, diff
}
if (prop === '@id' && value !== props.entityId) {
emit('update:entityId', value);
}
} else {
data.entity = entity;
emit('update:crate', props.crate); // ,state.crate, diff
Expand Down

0 comments on commit ddb15d0

Please sign in to comment.