MCPcopy Index your code
hub / github.com/diffgram/diffgram / add_custom_button

Function add_custom_button

frontend/src/store.js:777–797  ·  view source on GitHub ↗
(state, custom_button)

Source from the content-addressed store, hash-verified

775 }
776 },
777 add_custom_button(state, custom_button){
778 /**
779 * custom_button: CustomButton type object.
780 * **/
781
782 let custom_buttons = state.current['custom_buttons']
783 if (!custom_buttons){
784 custom_buttons = {
785 'buttons_list': [custom_button]
786 }
787 } else{
788 if(!custom_buttons.buttons_list){
789 custom_buttons.buttons_list = [custom_button]
790 } else{
791 custom_buttons.buttons_list.push(custom_button)
792 }
793
794 }
795 state.current['custom_buttons'] = custom_buttons
796 state.current = {...state.current}
797 },
798
799 set_ui_schema_top_level_key_value(state, payload) {
800 state.current[payload[0]] = payload[1]

Callers

nothing calls this directly

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected