[nextgen/cardstack] use unicode instead of icons for arrows for light theme compat (visualrefresh)

This commit is contained in:
bignutty 2025-02-22 16:39:42 +01:00
parent c969754ca8
commit 7e96b1a413
2 changed files with 13 additions and 8 deletions

View file

@ -11,12 +11,11 @@ const {Message} = require("detritus-client/lib/structures");
const {ComponentContext, Components, ComponentActionRow, ComponentButton} = require("detritus-client/lib/utils");
const {
DEFAULT_BUTTON_ICON_MAPPINGS,
STACK_CACHE_KEYS,
BuiltInButtonTypes,
ResolveCallbackTypes
} = require("./constants");
const {InteractiveComponentTypes} = require("#cardstack/constants");
const {InteractiveComponentTypes, DEFAULT_BUTTON_STYLES} = require("#cardstack/constants");
const {Xid} = require("#utils/hash");
/**
@ -130,7 +129,7 @@ class DynamicCardStack {
console.error("Component Handler Exception:")
console.error(e)
},
onTimeout: (e)=> {
onTimeout: ()=> {
this.kill(true);
}
})
@ -371,9 +370,11 @@ class DynamicCardStack {
customId: b,
style: 2,
disabled: this.activeCardStack.length === 1 || disabled,
emoji: iconAsEmojiObject(DEFAULT_BUTTON_ICON_MAPPINGS[b])
}
if(DEFAULT_BUTTON_STYLES[b].icon) btn.emoji = iconAsEmojiObject(DEFAULT_BUTTON_STYLES[b].icon);
if(DEFAULT_BUTTON_STYLES[b].label) btn.label = DEFAULT_BUTTON_STYLES[b].label;
componentSlots[0].push(new ComponentButton(btn));
}