How to display list bot in binary.bot
Hi every one!
Please help me!
I want to display list bot in binary.bot.
Please give me more informations!
Hi every one!
Please help me!
I want to display list bot in binary.bot.
Please give me more informations!
Answers
Hi RubyTran,
So, you want to display a list of robots in the left panel, clicking in the particular item in this list should load the bot accordingly?
Is this correct?
I have the same need. exactly as you described. I created one application and already have my app_id. So I want to provide my own robots in my application. How can I do that?
Yes! I want to display a list if robot in the left panel in https://www.binary.bot/bot.html, please help me!
What is the particulat item? Where is it?
Thanks
Anton, please help us. We need to know how to do that. I've already registered my application, and own a app_id. but the API documentation does not teach how do I can serve my own robots
I have the same need. exactly as you described. I created one application and already have my app_id. So I want to provide my own robots in my application. How can I do that?> @RubyTran said:
did you had any progress?
> (Quote)
> I have the same need. exactly as you described. I created one application and already have my app_id. So I want to provide my own robots in my application. How can I do that?> @RubyTran said:
>
> (Quote)
> did you had any progress?
Hi you! M in processing! And i think i must to build a site that i can edit it with what i want!
How about u @hugoofab ?
Hi @Anton how r u? Can u give me more informations?
Hi all,
A solution that matches the user’s idea could be implemented using Blockly’s dynamic categories in a hacky way. See https://developers.google.com/blockly/guides/configure/web/toolbox#dynamic_categories for more information.
Dynamic categories allow the developer to specify a category item (e.g. Bot Cuutinh Sideway in their screenshot) using the toolbox.xml (file used to populate the toolbox menu).
They can specify a JavaScript callback that would then load their custom strategy. Within this callback, we can load the custom strategy. See the src/botPage/view/blockly/index.js file, and then find the loadWorkspace(xml) function.
Example:
toolbox.xml
blockly/index.js
// Add your custom category callbacks below.
workspace.registerToolboxCategoryCallback('BOT_CUUTINH_SIDEWAY', async () => {
const xmlString = await fetch('xml/main.xml').then(response => response.text())
const xml = Blockly.Xml.textToDom(xmlString);
loadWorkspace(xml);
// Unselect the category and hide the flyout.
workspace.toolbox_.clearSelection(); // eslint-disable-line
});
See https://github.com/binary-com/binary-bot/pull/1921/commits/874d245fccd98b752523bc659d8124fb255819f1 for the suggested file changes.
See https://aaron-binary2.binary.sx/client-example/bot.html for a working example (clicking Bot Cuutinh Sideway will load the main strategy, in your code you would replace this with your custom strategy).
Hope that helps.
Please make sure that you remove Binary logo before publishing your modified website.
Anton
Hi @Anton
It's mean i must build a new site?
Thanks for your help!