diff --git a/src/data/common.tsx b/src/data/common.tsx index 1fdfd61..2430c07 100644 --- a/src/data/common.tsx +++ b/src/data/common.tsx @@ -16,7 +16,7 @@ import player from "game/player"; import settings from "game/settings"; import type { DecimalSource } from "util/bignum"; import Decimal, { format, formatSmall, formatTime } from "util/bignum"; -import type { WithRequired } from "util/common"; +import { WithRequired, camelToTitle } from "util/common"; import type { Computable, GetComputableType, @@ -177,11 +177,6 @@ export interface LayerTreeNodeOptions extends TreeNodeOptions { layerID: string; /** The color to display this tree node as */ color: Computable; // marking as required - /** - * The content to display in the tree node. - * Defaults to the layer's ID - */ - display?: Computable; /** Whether or not to append the layer to the tabs list. * If set to false, then the tree node will instead always remove all tabs to its right and then add the layer tab. * Defaults to true. @@ -214,12 +209,10 @@ export function createLayerTreeNode( ): LayerTreeNode { return createTreeNode(feature => { const options = optionsFunc.call(feature, feature); - processComputable(options as T, "display"); - setDefault(options, "display", options.layerID); + setDefault(options, "display", camelToTitle(options.layerID)); processComputable(options as T, "append"); return { ...options, - display: options.display, onClick: unref((options as unknown as GenericLayerTreeNode).append) ? function () { if (player.tabs.includes(options.layerID)) { diff --git a/src/features/trees/TreeNode.vue b/src/features/trees/TreeNode.vue index ea48eeb..b6ce3d3 100644 --- a/src/features/trees/TreeNode.vue +++ b/src/features/trees/TreeNode.vue @@ -113,7 +113,6 @@ export default defineComponent({ color: rgba(0, 0, 0, 0.5); text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25); box-shadow: -4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0px 0px 20px var(--background); - text-transform: capitalize; display: flex; }