forked from profectus/Profectus
Made board nodes support booleans for visibility
This commit is contained in:
parent
77592ea0db
commit
8c0a0c4410
1 changed files with 3 additions and 3 deletions
|
@ -170,7 +170,7 @@
|
||||||
import themes from "data/themes";
|
import themes from "data/themes";
|
||||||
import type { BoardNode, GenericBoardNodeAction, GenericNodeType } from "features/boards/board";
|
import type { BoardNode, GenericBoardNodeAction, GenericNodeType } from "features/boards/board";
|
||||||
import { ProgressDisplay, getNodeProperty, Shape } from "features/boards/board";
|
import { ProgressDisplay, getNodeProperty, Shape } from "features/boards/board";
|
||||||
import { Visibility } from "features/feature";
|
import { isVisible } from "features/feature";
|
||||||
import settings from "game/settings";
|
import settings from "game/settings";
|
||||||
import { computed, ref, toRefs, unref, watch } from "vue";
|
import { computed, ref, toRefs, unref, watch } from "vue";
|
||||||
|
|
||||||
|
@ -210,8 +210,8 @@ watch(isDraggable, value => {
|
||||||
|
|
||||||
const actions = computed(() => {
|
const actions = computed(() => {
|
||||||
const node = unref(props.node);
|
const node = unref(props.node);
|
||||||
return getNodeProperty(props.nodeType.value.actions, node)?.filter(
|
return getNodeProperty(props.nodeType.value.actions, node)?.filter(action =>
|
||||||
action => getNodeProperty(action.visibility, node) !== Visibility.None
|
isVisible(getNodeProperty(action.visibility, node))
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue