import * as riot from 'riot' import TinyLoading from '@tiny-components/loading/src/loading.riot' import TinySidebarFormHeader from './forms/header.riot' import TinySidebarFormFooter from './forms/footer.riot' import FieldError from '@tiny-components/validator/src/fieldError.riot' import ShinyAppsView from './views/apps.riot' import ShinyFieldTags from './components/fields/tags.riot' import ShinyCloseButton from './components/closeButton.riot' // register & mount riot component riot.register('field-error', FieldError) riot.register('tiny-loading', TinyLoading) riot.register('tiny-sidebar-form-header', TinySidebarFormHeader) riot.register('tiny-sidebar-form-footer', TinySidebarFormFooter) riot.register('shiny-field-tags', ShinyFieldTags) riot.register('shiny-apps-view', ShinyAppsView) riot.register('shiny-close-button', ShinyCloseButton) // adding events for Neutralino Neutralino.events.on('ready', () => { riot.mount('shiny-apps-view') }) // let it rain Neutralino.init() window._arrayBufferToBase64 = function _arrayBufferToBase64(buffer) { var binary = ''; var bytes = new Uint8Array(buffer); var len = bytes.byteLength; for (var i = 0; i < len; i++) { binary += String.fromCharCode(bytes[i]); } return window.btoa(binary); }