Used tree node views in slot fill selection

This commit is contained in:
Stefan Zermatten
2020-10-17 16:56:23 +02:00
parent e8da7a6c17
commit ebab41838c
9 changed files with 14 additions and 8 deletions

View File

@@ -121,7 +121,6 @@
added(doc){ added(doc){
if (!that.$subReady.singleCharacter) return; if (!that.$subReady.singleCharacter) return;
if (that.$store.state.rightDrawer) return; if (that.$store.state.rightDrawer) return;
if (that.$store.state.snackbars.snackbars.some(o => o._id === doc._id)) return;
that.$store.dispatch('snackbar', { that.$store.dispatch('snackbar', {
text: doc.text, text: doc.text,
showCloseButton: true, showCloseButton: true,

View File

@@ -19,7 +19,8 @@
style="max-width: 500px;" style="max-width: 500px;"
hover hover
ripple ripple
:class="{'primary theme--dark': node._id === (selectedNode && selectedNode._id)}" :class="{'primary': node._id === (selectedNode && selectedNode._id)}"
:dark="node._id === (selectedNode && selectedNode._id)"
@click="selectedNode = node" @click="selectedNode = node"
> >
<v-img <v-img
@@ -31,14 +32,13 @@
<v-card-title primary-title> <v-card-title primary-title>
<div> <div>
<h3 class="title mb-0"> <h3 class="title mb-0">
<property-icon <tree-node-view
v-if="!node.picture"
class="mr-2" class="mr-2"
:class="{'theme--dark': node._id === (selectedNode && selectedNode._id)}" :class="{'theme--dark': node._id === (selectedNode && selectedNode._id)}"
:hide-icon="node.picture"
:model="node" :model="node"
:color="node.color" :color="node.color"
/> />
{{ getTitle(node) }}
</h3> </h3>
<div v-if="node.description"> <div v-if="node.description">
{{ node.description }} {{ node.description }}
@@ -108,14 +108,14 @@ import DialogBase from '/imports/ui/dialogStack/DialogBase.vue';
import { getPropertyName } from '/imports/constants/PROPERTIES.js'; import { getPropertyName } from '/imports/constants/PROPERTIES.js';
import { parse, CompilationContext } from '/imports/parser/parser.js'; import { parse, CompilationContext } from '/imports/parser/parser.js';
import PROPERTIES from '/imports/constants/PROPERTIES.js'; import PROPERTIES from '/imports/constants/PROPERTIES.js';
import PropertyIcon from '/imports/ui/properties/shared/PropertyIcon.vue';
import ColumnLayout from '/imports/ui/components/ColumnLayout.vue'; import ColumnLayout from '/imports/ui/components/ColumnLayout.vue';
import TreeNodeView from '/imports/ui/properties/treeNodeViews/TreeNodeView.vue';
export default { export default {
components: { components: {
DialogBase, DialogBase,
ColumnLayout, ColumnLayout,
PropertyIcon, TreeNodeView,
}, },
props:{ props:{
slotId: { slotId: {

View File

@@ -1,6 +1,7 @@
<template lang="html"> <template lang="html">
<div class="layout row align-center justify-start"> <div class="layout row align-center justify-start">
<property-icon <property-icon
v-if="!hideIcon"
class="mr-2" class="mr-2"
:model="model" :model="model"
:class="selected && 'primary--text'" :class="selected && 'primary--text'"

View File

@@ -1,6 +1,7 @@
<template lang="html"> <template lang="html">
<div class="layout row align-center justify-start"> <div class="layout row align-center justify-start">
<property-icon <property-icon
v-if="!hideIcon"
class="mr-2" class="mr-2"
:model="model" :model="model"
:color="model.color" :color="model.color"

View File

@@ -1,6 +1,7 @@
<template lang="html"> <template lang="html">
<div class="layout row align-center justify-start"> <div class="layout row align-center justify-start">
<v-icon <v-icon
v-if="!hideIcon"
class="mr-2" class="mr-2"
:color="model.color" :color="model.color"
:class="selected && 'primary--text'" :class="selected && 'primary--text'"

View File

@@ -1,6 +1,7 @@
<template lang="html"> <template lang="html">
<div class="layout row align-center justify-start"> <div class="layout row align-center justify-start">
<property-icon <property-icon
v-if="!hideIcon"
class="mr-2" class="mr-2"
:model="model" :model="model"
:color="model.color" :color="model.color"

View File

@@ -1,6 +1,7 @@
<template lang="html"> <template lang="html">
<div class="layout row align-center justify-start"> <div class="layout row align-center justify-start">
<v-icon <v-icon
v-if="!hideIcon"
class="mr-2" class="mr-2"
:class="selected && 'primary--text'" :class="selected && 'primary--text'"
:color="model.color" :color="model.color"

View File

@@ -1,13 +1,14 @@
<template lang="html"> <template lang="html">
<div class="layout row align-center justify-start"> <div class="layout row align-center justify-start">
<property-icon <property-icon
v-if="!hideIcon"
class="mr-2" class="mr-2"
:model="model" :model="model"
:color="model.color" :color="model.color"
:class="selected && 'primary--text'" :class="selected && 'primary--text'"
/> />
<v-icon <v-icon
v-if="model.equipped" v-if="model.equipped && !hideIcon"
class="mr-2" class="mr-2"
:class="selected && 'primary--text'" :class="selected && 'primary--text'"
small small

View File

@@ -11,6 +11,7 @@ export default {
default: () => ({}), default: () => ({}),
}, },
selected: Boolean, selected: Boolean,
hideIcon: Boolean,
}, },
computed: { computed: {
title(){ title(){