[nextgen/cardstack] big improvements

- Implement return types
- page numbers
- better subpage resolve delay
- error handling and system error cards
- code cleanup
This commit is contained in:
bignutty 2025-02-14 02:12:26 +01:00
parent 7e850e5b5d
commit 18bd28591c
6 changed files with 249 additions and 125 deletions

View file

@ -148,6 +148,12 @@ module.exports.createEmbed = function(type, context, content){
}
// Adds formatted page numbers to the embed footer
/**
* Formats embeds for pagination.
* @deprecated No longer necessary in DynamicCardStack.
* @param embeds Array of Messages
* @returns {Embed[]}
*/
module.exports.formatPaginationEmbeds = function(embeds){
// No formatting if we only have one page
if(embeds.length == 1) return embeds;