mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 05:42:57 -04:00
do it properly this time
This commit is contained in:
parent
e5df5349b6
commit
f8dcbb3314
2 changed files with 5 additions and 3 deletions
|
@ -16,7 +16,6 @@ const {
|
||||||
ResolveCallbackTypes
|
ResolveCallbackTypes
|
||||||
} = require("./constants");
|
} = require("./constants");
|
||||||
const {InteractiveComponentTypes, DEFAULT_BUTTON_STYLES} = require("#cardstack/constants");
|
const {InteractiveComponentTypes, DEFAULT_BUTTON_STYLES} = require("#cardstack/constants");
|
||||||
const {Xid} = require("#utils/hash");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stores all active card stacks
|
* Stores all active card stacks
|
||||||
|
@ -24,6 +23,8 @@ const {Xid} = require("#utils/hash");
|
||||||
*/
|
*/
|
||||||
const activeStacks = new WeakMap();
|
const activeStacks = new WeakMap();
|
||||||
|
|
||||||
|
const { xid } = require("utils");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DynamicCardStack represents an interactive stacks
|
* DynamicCardStack represents an interactive stacks
|
||||||
* of cards (embeds) for the user to paginate through
|
* of cards (embeds) for the user to paginate through
|
||||||
|
@ -338,7 +339,7 @@ class DynamicCardStack {
|
||||||
let component = {
|
let component = {
|
||||||
type: MessageComponentTypes.BUTTON,
|
type: MessageComponentTypes.BUTTON,
|
||||||
// id/XID is used for dynamically generated components via BUTTON_GENERATOR
|
// id/XID is used for dynamically generated components via BUTTON_GENERATOR
|
||||||
customId: button.customId ? id + "/" + Xid(button.customId) : id,
|
customId: button.customId ? id + "/" + xid(button.customId) : id,
|
||||||
style: button.style || 2,
|
style: button.style || 2,
|
||||||
disabled: disabled
|
disabled: disabled
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,8 @@
|
||||||
"dotenv": "^16.4.7",
|
"dotenv": "^16.4.7",
|
||||||
"emoji-aware": "^3.1.0",
|
"emoji-aware": "^3.1.0",
|
||||||
"eventemitter3": "^5.0.1",
|
"eventemitter3": "^5.0.1",
|
||||||
"superagent": "^10.1.1"
|
"superagent": "^10.1.1",
|
||||||
|
"utils": "gitlab:bignutty/utils"
|
||||||
},
|
},
|
||||||
"imports": {
|
"imports": {
|
||||||
"#api": "./labscore/api/index.js",
|
"#api": "./labscore/api/index.js",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue