Iterated on features UI
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<slot name="toolbar"></slot>
|
||||
<template v-if="$slots.edit">
|
||||
<v-spacer/>
|
||||
<v-btn icon flat @click="() => $emit('delete')" v-if="isEditing">
|
||||
<v-btn icon flat @click="$emit('remove')" v-if="isEditing">
|
||||
<v-icon>delete</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon flat @click="isEditing = !isEditing">
|
||||
|
||||
@@ -2,6 +2,7 @@ import AttributeDialog from '/imports/ui/components/attributes/AttributeDialog.v
|
||||
import AttributeDialogContainer from '/imports/ui/components/attributes/AttributeDialogContainer.vue';
|
||||
import AttributeCreationDialog from '/imports/ui/components/attributes/AttributeCreationDialog.vue';
|
||||
import FeatureCreationDialog from '/imports/ui/components/features/FeatureCreationDialog.vue';
|
||||
import FeatureDialogContainer from '/imports/ui/components/features/FeatureDialogContainer.vue';
|
||||
import SkillDialogContainer from '/imports/ui/components/skills/SkillDialogContainer.vue';
|
||||
|
||||
export default {
|
||||
@@ -9,5 +10,6 @@ export default {
|
||||
AttributeDialogContainer,
|
||||
AttributeCreationDialog,
|
||||
FeatureCreationDialog,
|
||||
FeatureDialogContainer,
|
||||
SkillDialogContainer,
|
||||
};
|
||||
|
||||
@@ -20,6 +20,19 @@ const dialogStackStore = {
|
||||
});
|
||||
updateHistory();
|
||||
},
|
||||
replaceDialog(stat, {component, data, elementId, callback}){
|
||||
const _id = Random.id();
|
||||
if (!state.dialogs.length){
|
||||
throw new Meteor.Error("can't replace dialog if no dialogs are open");
|
||||
}
|
||||
state.dialogs.$set(0, {
|
||||
_id,
|
||||
component,
|
||||
data,
|
||||
elementId,
|
||||
callback,
|
||||
});
|
||||
},
|
||||
popDialogStackMutation (state, result){
|
||||
const dialog = state.dialogs.pop();
|
||||
state.currentResult = null;
|
||||
|
||||
Reference in New Issue
Block a user