UNPKG

homebridge-bondbridge

Version:

Plugin to integrate BondBridge units by Bond to Homekit

53 lines (45 loc) 2.21 kB
<link rel="stylesheet" href="css/style.css"> <div class="card card-body"> <img src="images/Homebridge-bondbridge.png" alt="Bond Bridge" width="300px" class="center-it"> </div> <div id="advErrorModal" class="modal fade" tabindex="-1" role="dialog"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">Error:</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> </div> <div class="modal-body" <p>Modal body text goes here.</p> </div> </div> </div> </div> <!-- Modules bootstrap is supposedly already there, but I have problems with modal being undefined. I believe this is because bootstrap only allows One Modal and this is the Error Dialog is the second. The solution is to reload them again in the proper order --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous">var $jq = jQuery.noConflict(true);</script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script> <!-- Main --> <script type="text/javascript" src="js/main.js?v=0.0.7"> </script> <script> (async () => { // get the initial config - this is an array potentially containing multiple config blocks const pluginConfig = await homebridge.getPluginConfig(); const configSchema = await homebridge.getPluginConfigSchema(); if (!pluginConfig.length) { pluginConfig.push({}); } const configuration = pluginConfig[0]; configuration.devices = configuration.devices || []; function createForm(configSchema, configuration) { const configForm = homebridge.createForm(configSchema, configuration); configForm.onChange(async (changes) => { await homebridge.updatePluginConfig([changes]); }) } createForm(configSchema, configuration); })(); </script>